New upstream version 1.4.1
Pirate Praveen
5 years ago
0 | require: rubocop-rspec | |
1 | inherit_from: | |
2 | - .rubocop_todo.yml | |
3 | - .rubocop_rspec.yml | |
4 | AllCops: | |
5 | DisplayCopNames: true # Display the name of the failing cops | |
6 | TargetRubyVersion: 2.1 | |
7 | Exclude: | |
8 | - 'gemfiles/vendor/**/*' | |
9 | - 'vendor/**/*' | |
10 | - '**/.irbrc' | |
11 | ||
12 | Gemspec/RequiredRubyVersion: | |
13 | Enabled: false | |
14 | ||
15 | Metrics/BlockLength: | |
16 | Enabled: false | |
17 | ||
0 | 18 | Metrics/BlockNesting: |
1 | 19 | Max: 2 |
2 | 20 | |
3 | 21 | Metrics/LineLength: |
4 | AllowURI: true | |
5 | 22 | Enabled: false |
6 | 23 | |
7 | 24 | Metrics/MethodLength: |
8 | CountComments: false | |
9 | 25 | Max: 15 |
10 | 26 | |
11 | 27 | Metrics/ParameterLists: |
12 | 28 | Max: 4 |
13 | CountKeywordArgs: true | |
14 | 29 | |
15 | 30 | Layout/AccessModifierIndentation: |
16 | 31 | EnforcedStyle: outdent |
24 | 39 | Lint/UnusedBlockArgument: |
25 | 40 | Exclude: |
26 | 41 | - 'spec/**/*.rb' |
42 | - 'gemfiles/vendor/**/*' | |
43 | - 'vendor/**/*' | |
44 | - '**/.irbrc' | |
45 | ||
46 | RSpec/DescribeClass: | |
47 | Exclude: | |
48 | - 'spec/examples/*' | |
49 | ||
50 | RSpec/NestedGroups: | |
51 | Enabled: false | |
27 | 52 | |
28 | 53 | Style/ClassVars: |
29 | 54 | Enabled: false |
41 | 66 | Style/DoubleNegation: |
42 | 67 | Enabled: false |
43 | 68 | |
44 | Style/EachWithObject: | |
45 | Enabled: false | |
46 | ||
47 | 69 | Style/EmptyMethod: |
48 | 70 | EnforcedStyle: expanded |
49 | 71 | |
50 | 72 | Style/Encoding: |
51 | 73 | Enabled: false |
52 | 74 | |
53 | Style/HashSyntax: | |
54 | EnforcedStyle: hash_rockets | |
75 | Style/TrailingCommaInArrayLiteral: | |
76 | EnforcedStyleForMultiline: comma | |
55 | 77 | |
56 | Style/Lambda: | |
57 | Enabled: false | |
58 | ||
59 | Style/SymbolArray: | |
60 | Enabled: false | |
61 | ||
62 | Style/TrailingCommaInLiteral: | |
63 | EnforcedStyleForMultiline: 'comma' | |
64 | ||
65 | Metrics/BlockLength: | |
66 | Enabled: false | |
78 | Style/TrailingCommaInHashLiteral: | |
79 | EnforcedStyleForMultiline: comma |
0 | RSpec/FilePath: | |
1 | Enabled: false | |
2 | ||
3 | RSpec/MultipleExpectations: | |
4 | Enabled: false | |
5 | ||
6 | RSpec/NamedSubject: | |
7 | Enabled: false | |
8 | ||
9 | RSpec/ExampleLength: | |
10 | Enabled: false | |
11 | ||
12 | RSpec/VerifiedDoubles: | |
13 | Enabled: false | |
14 | ||
15 | RSpec/MessageSpies: | |
16 | Enabled: false | |
17 | ||
18 | RSpec/InstanceVariable: | |
19 | Enabled: false | |
20 | ||
21 | RSpec/NestedGroups: | |
22 | Enabled: false | |
23 | ||
24 | RSpec/ExpectInHook: | |
25 | Enabled: false |
0 | Style/HashSyntax: | |
1 | EnforcedStyle: hash_rockets | |
2 | ||
3 | Style/Lambda: | |
4 | Enabled: false | |
5 | ||
6 | Style/SymbolArray: | |
7 | Enabled: false | |
8 | ||
9 | Style/EachWithObject: | |
10 | Enabled: false | |
11 | ||
12 | # Once we drop Rubies that lack support for __dir__ we can turn this on. | |
13 | Style/ExpandPathArguments: | |
14 | Enabled: false |
0 | 0 | before_install: |
1 | - gem update bundler | |
1 | - gem update --system | |
2 | - gem install bundler | |
2 | 3 | |
3 | bundler_args: --without development | |
4 | bundler_args: --no-deployment --jobs 3 --retry 3 | |
4 | 5 | |
5 | 6 | cache: bundler |
6 | 7 | |
7 | env: | |
8 | global: | |
9 | - JRUBY_OPTS="$JRUBY_OPTS --debug" | |
10 | ||
11 | 8 | language: ruby |
12 | ||
13 | rvm: | |
14 | - 1.9.3 | |
15 | - 2.0.0 | |
16 | - 2.1.10 | |
17 | - 2.2.7 | |
18 | - 2.3.4 | |
19 | - 2.4.1 | |
20 | - jruby-9.1.10.0 | |
21 | - jruby-head | |
22 | - ruby-head | |
23 | 9 | |
24 | 10 | matrix: |
25 | 11 | allow_failures: |
26 | 12 | - rvm: jruby-head |
27 | 13 | - rvm: ruby-head |
14 | - rvm: rbx-3 | |
28 | 15 | fast_finish: true |
16 | include: | |
17 | - rvm: jruby-1.7.27 # targets MRI v1.9 | |
18 | gemfile: gemfiles/jruby_1.7.gemfile | |
19 | - rvm: 1.9.3-p551 | |
20 | gemfile: gemfiles/ruby_1.9.gemfile | |
21 | - rvm: 2.0.0-p648 | |
22 | gemfile: gemfiles/ruby_2.0.gemfile | |
23 | - rvm: 2.1.10 | |
24 | gemfile: gemfiles/ruby_2.1.gemfile | |
25 | - rvm: jruby-9.0.5.0 # targets MRI v2.0 | |
26 | gemfile: gemfiles/jruby_9.0.gemfile | |
27 | # DEPRECATION WARNING | |
28 | # oauth2 1.x series releases are the last to support Ruby versions above | |
29 | # oauth2 2.x series releases will support Ruby versions below, and not above | |
30 | - rvm: jruby-9.1.9.0 # targets MRI v2.3 | |
31 | gemfile: gemfiles/jruby_9.1.gemfile | |
32 | - rvm: 2.2.10 | |
33 | gemfile: gemfiles/ruby_2.2.gemfile | |
34 | - rvm: 2.3.7 | |
35 | gemfile: gemfiles/ruby_2.3.gemfile | |
36 | - rvm: 2.4.4 | |
37 | gemfile: gemfiles/ruby_2.4.gemfile | |
38 | - rvm: jruby-9.2.0.0 # targets MRI v2.5 | |
39 | gemfile: gemfiles/jruby_9.2.gemfile | |
40 | - rvm: 2.5.1 | |
41 | gemfile: gemfiles/ruby_2.5.gemfile | |
42 | - rvm: jruby-head | |
43 | gemfile: gemfiles/jruby_head.gemfile | |
44 | - rvm: ruby-head | |
45 | gemfile: gemfiles/ruby_head.gemfile | |
46 | - rvm: rbx-3 | |
29 | 47 | |
30 | 48 | sudo: false |
1 | 1 | All notable changes to this project will be documented in this file. |
2 | 2 | |
3 | 3 | ## [unreleased] |
4 | - No significant changes. | |
4 | ||
5 | - no changes yet | |
6 | ||
7 | ## [1.4.1] - 2018-10-13 | |
8 | ||
9 | - [#417](oauth-xx/oauth2#417) - update jwt dependency (@thewoolleyman) | |
10 | - [#418](oauth-xx/oauth2#418) - remove rubocop dependency (temporary, added back in [#423](oauth-xx/oauth2#423)) (@pboling) | |
11 | - [#419](oauth-xx/oauth2#419) - update faraday dependency (@pboling) | |
12 | - [#420](oauth-xx/oauth2#420) - update [oauth2.gemspec](oauth2.gemspec) (@pboling) | |
13 | - [#421](oauth-xx/oauth2#421) - fix [CHANGELOG.md](CHANGELOG.md) for previous releases (@pboling) | |
14 | - [#422](oauth-xx/oauth2#422) - update [LICENSE](LICENSE) and [README.md](README.md) (@pboling) | |
15 | - [#423](oauth-xx/oauth2#423) - update [builds](https://travis-ci.org/oauth-xx/oauth2/builds), [Rakefile](Rakefile) (@pboling) | |
16 | - officially document supported Rubies | |
17 | * Ruby 1.9.3 | |
18 | * Ruby 2.0.0 | |
19 | * Ruby 2.1 | |
20 | * Ruby 2.2 | |
21 | * [JRuby 1.7][jruby-1.7] (targets MRI v1.9) | |
22 | * [JRuby 9.0][jruby-9.0] (targets MRI v2.0) | |
23 | * Ruby 2.3 | |
24 | * Ruby 2.4 | |
25 | * Ruby 2.5 | |
26 | * [JRuby 9.1][jruby-9.1] (targets MRI v2.3) | |
27 | * [JRuby 9.2][jruby-9.2] (targets MRI v2.5) | |
28 | ||
29 | [jruby-1.7]: https://www.jruby.org/2017/05/11/jruby-1-7-27.html | |
30 | [jruby-9.0]: https://www.jruby.org/2016/01/26/jruby-9-0-5-0.html | |
31 | [jruby-9.1]: https://www.jruby.org/2017/05/16/jruby-9-1-9-0.html | |
32 | [jruby-9.2]: https://www.jruby.org/2018/05/24/jruby-9-2-0-0.html | |
33 | ||
34 | ## [1.4.0] - 2017-06-09 | |
35 | ||
36 | - Drop Ruby 1.8.7 support (@sferik) | |
37 | - Fix some RuboCop offenses (@sferik) | |
38 | - _Dependency_: Remove Yardstick (@sferik) | |
39 | - _Dependency_: Upgrade Faraday to 0.12 (@sferik) | |
40 | ||
41 | ## [1.3.1] - 2017-03-03 | |
42 | ||
43 | - Add support for Ruby 2.4.0 (@pschambacher) | |
44 | - _Dependency_: Upgrade Faraday to Faraday 0.11 (@mcfiredrill, @rhymes, @pschambacher) | |
5 | 45 | |
6 | 46 | ## [1.3.0] - 2016-12-28 |
7 | 47 | |
8 | 48 | - Add support for header-based authentication to the `Client` so it can be used across the library (@bjeanes) |
9 | 49 | - Default to header-based authentication when getting a token from an authorisation code (@maletor) |
10 | - Allow an `auth_scheme` (`:basic_auth` or `:request_body`) to be set on the client, defaulting to `:request_body` to maintain backwards compatibility (@maletor, @bjeanes) | |
50 | - **Breaking**: Allow an `auth_scheme` (`:basic_auth` or `:request_body`) to be set on the client, defaulting to `:request_body` to maintain backwards compatibility (@maletor, @bjeanes) | |
11 | 51 | - Handle `redirect_uri` according to the OAuth 2 spec, so it is passed on redirect and at the point of token exchange (@bjeanes) |
12 | 52 | - Refactor handling of encoding of error responses (@urkle) |
13 | 53 | - Avoid instantiating an `Error` if there is no error to raise (@urkle) |
41 | 81 | - [breaking] `access_token_method` Client option renamed to `token_method`. |
42 | 82 | - [breaking] `web_server` renamed to `auth_code`. |
43 | 83 | |
44 | [0.5.0]: https://github.com/intridea/oauth2/compare/v0.4.1...v0.5.0 | |
45 | [1.0.0]: https://github.com/intridea/oauth2/compare/v0.9.4...v1.0.0 | |
46 | [1.1.0]: https://github.com/intridea/oauth2/compare/v1.0.0...v1.1.0 | |
47 | [1.2.0]: https://github.com/intridea/oauth2/compare/v1.1.0...v1.2.0 | |
48 | [1.3.0]: https://github.com/intridea/oauth2/compare/v1.2.0...v1.3.0 | |
49 | [unreleased]: https://github.com/intridea/oauth2/compare/v1.3.0...HEAD | |
84 | ## [0.4.1] - 2011-04-20 | |
50 | 85 | |
86 | ## [0.4.0] - 2011-04-20 | |
87 | ||
88 | ## [0.3.0] - 2011-04-08 | |
89 | ||
90 | ## [0.2.0] - 2011-04-01 | |
91 | ||
92 | ## [0.1.1] - 2011-01-12 | |
93 | ||
94 | ## [0.1.0] - 2010-10-13 | |
95 | ||
96 | ## [0.0.13] + [0.0.12] + [0.0.11] - 2010-08-17 | |
97 | ||
98 | ## [0.0.10] - 2010-06-19 | |
99 | ||
100 | ## [0.0.9] - 2010-06-18 | |
101 | ||
102 | ## [0.0.8] + [0.0.7] - 2010-04-27 | |
103 | ||
104 | ## [0.0.6] - 2010-04-25 | |
105 | ||
106 | ## [0.0.5] - 2010-04-23 | |
107 | ||
108 | ## [0.0.4] + [0.0.3] + [0.0.2] + [0.0.1] - 2010-04-22 | |
109 | ||
110 | ||
111 | [0.0.1]: https://github.com/oauth-xx/oauth2/compare/311d9f4...v0.0.1 | |
112 | [0.0.2]: https://github.com/oauth-xx/oauth2/compare/v0.0.1...v0.0.2 | |
113 | [0.0.3]: https://github.com/oauth-xx/oauth2/compare/v0.0.2...v0.0.3 | |
114 | [0.0.4]: https://github.com/oauth-xx/oauth2/compare/v0.0.3...v0.0.4 | |
115 | [0.0.5]: https://github.com/oauth-xx/oauth2/compare/v0.0.4...v0.0.5 | |
116 | [0.0.6]: https://github.com/oauth-xx/oauth2/compare/v0.0.5...v0.0.6 | |
117 | [0.0.7]: https://github.com/oauth-xx/oauth2/compare/v0.0.6...v0.0.7 | |
118 | [0.0.8]: https://github.com/oauth-xx/oauth2/compare/v0.0.7...v0.0.8 | |
119 | [0.0.9]: https://github.com/oauth-xx/oauth2/compare/v0.0.8...v0.0.9 | |
120 | [0.0.10]: https://github.com/oauth-xx/oauth2/compare/v0.0.9...v0.0.10 | |
121 | [0.0.11]: https://github.com/oauth-xx/oauth2/compare/v0.0.10...v0.0.11 | |
122 | [0.0.12]: https://github.com/oauth-xx/oauth2/compare/v0.0.11...v0.0.12 | |
123 | [0.0.13]: https://github.com/oauth-xx/oauth2/compare/v0.0.12...v0.0.13 | |
124 | [0.1.0]: https://github.com/oauth-xx/oauth2/compare/v0.0.13...v0.1.0 | |
125 | [0.1.1]: https://github.com/oauth-xx/oauth2/compare/v0.1.0...v0.1.1 | |
126 | [0.2.0]: https://github.com/oauth-xx/oauth2/compare/v0.1.1...v0.2.0 | |
127 | [0.3.0]: https://github.com/oauth-xx/oauth2/compare/v0.2.0...v0.3.0 | |
128 | [0.4.0]: https://github.com/oauth-xx/oauth2/compare/v0.3.0...v0.4.0 | |
129 | [0.4.1]: https://github.com/oauth-xx/oauth2/compare/v0.4.0...v0.4.1 | |
130 | [0.5.0]: https://github.com/oauth-xx/oauth2/compare/v0.4.1...v0.5.0 | |
131 | [1.0.0]: https://github.com/oauth-xx/oauth2/compare/v0.9.4...v1.0.0 | |
132 | [1.1.0]: https://github.com/oauth-xx/oauth2/compare/v1.0.0...v1.1.0 | |
133 | [1.2.0]: https://github.com/oauth-xx/oauth2/compare/v1.1.0...v1.2.0 | |
134 | [1.3.0]: https://github.com/oauth-xx/oauth2/compare/v1.2.0...v1.3.0 | |
135 | [1.3.1]: https://github.com/oauth-xx/oauth2/compare/v1.3.0...v1.3.1 | |
136 | [1.4.0]: https://github.com/oauth-xx/oauth2/compare/v1.3.1...v1.4.0 | |
137 | [1.4.1]: https://github.com/oauth-xx/oauth2/compare/v1.4.0...v1.4.1 | |
138 | [unreleased]: https://github.com/oauth-xx/oauth2/compare/v1.4.0...1-4-stable |
0 | # Contributor Covenant Code of Conduct | |
1 | ||
2 | ## Our Pledge | |
3 | ||
4 | In the interest of fostering an open and welcoming environment, we as | |
5 | contributors and maintainers pledge to making participation in our project and | |
6 | our community a harassment-free experience for everyone, regardless of age, body | |
7 | size, disability, ethnicity, gender identity and expression, level of experience, | |
8 | nationality, personal appearance, race, religion, or sexual identity and | |
9 | orientation. | |
10 | ||
11 | ## Our Standards | |
12 | ||
13 | Examples of behavior that contributes to creating a positive environment | |
14 | include: | |
15 | ||
16 | * Using welcoming and inclusive language | |
17 | * Being respectful of differing viewpoints and experiences | |
18 | * Gracefully accepting constructive criticism | |
19 | * Focusing on what is best for the community | |
20 | * Showing empathy towards other community members | |
21 | ||
22 | Examples of unacceptable behavior by participants include: | |
23 | ||
24 | * The use of sexualized language or imagery and unwelcome sexual attention or | |
25 | advances | |
26 | * Trolling, insulting/derogatory comments, and personal or political attacks | |
27 | * Public or private harassment | |
28 | * Publishing others' private information, such as a physical or electronic | |
29 | address, without explicit permission | |
30 | * Other conduct which could reasonably be considered inappropriate in a | |
31 | professional setting | |
32 | ||
33 | ## Our Responsibilities | |
34 | ||
35 | Project maintainers are responsible for clarifying the standards of acceptable | |
36 | behavior and are expected to take appropriate and fair corrective action in | |
37 | response to any instances of unacceptable behavior. | |
38 | ||
39 | Project maintainers have the right and responsibility to remove, edit, or | |
40 | reject comments, commits, code, wiki edits, issues, and other contributions | |
41 | that are not aligned to this Code of Conduct, or to ban temporarily or | |
42 | permanently any contributor for other behaviors that they deem inappropriate, | |
43 | threatening, offensive, or harmful. | |
44 | ||
45 | ## Scope | |
46 | ||
47 | This Code of Conduct applies both within project spaces and in public spaces | |
48 | when an individual is representing the project or its community. Examples of | |
49 | representing a project or community include using an official project e-mail | |
50 | address, posting via an official social media account, or acting as an appointed | |
51 | representative at an online or offline event. Representation of a project may be | |
52 | further defined and clarified by project maintainers. | |
53 | ||
54 | ## Enforcement | |
55 | ||
56 | Instances of abusive, harassing, or otherwise unacceptable behavior may be | |
57 | reported by contacting the project team at peter.boling@gmail.com. All | |
58 | complaints will be reviewed and investigated and will result in a response that | |
59 | is deemed necessary and appropriate to the circumstances. The project team is | |
60 | obligated to maintain confidentiality with regard to the reporter of an incident. | |
61 | Further details of specific enforcement policies may be posted separately. | |
62 | ||
63 | Project maintainers who do not follow or enforce the Code of Conduct in good | |
64 | faith may face temporary or permanent repercussions as determined by other | |
65 | members of the project's leadership. | |
66 | ||
67 | ## Attribution | |
68 | ||
69 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, | |
70 | available at [http://contributor-covenant.org/version/1/4][version] | |
71 | ||
72 | [homepage]: http://contributor-covenant.org | |
73 | [version]: http://contributor-covenant.org/version/1/4/ |
0 | 0 | source 'https://rubygems.org' |
1 | ||
2 | git_source(:github) { |repo_name| "https://github.com/#{repo_name}" } | |
1 | 3 | |
2 | 4 | gem 'faraday', '~> 0.9.2', :platforms => [:jruby_18, :ruby_18] |
3 | 5 | gem 'jwt', '< 1.5.2', :platforms => [:jruby_18, :ruby_18] |
4 | 6 | gem 'rake', '< 11.0' |
5 | 7 | gem 'rdoc', '~> 4.2.2' |
6 | 8 | |
7 | group :development do | |
8 | gem 'pry' | |
9 | end | |
9 | group :test do | |
10 | ruby_version = Gem::Version.new(RUBY_VERSION) | |
11 | if ruby_version >= Gem::Version.new('2.1') | |
12 | # TODO: Upgrade to >= 0.59 when we drop Rubies below 2.2 | |
13 | # Error: Unsupported Ruby version 2.1 found in `TargetRubyVersion` parameter (in .rubocop.yml). 2.1-compatible analysis was dropped after version 0.58. | |
14 | # Supported versions: 2.2, 2.3, 2.4, 2.5 | |
15 | gem 'rubocop', '~> 0.57.0' | |
16 | gem 'rubocop-rspec', '~> 1.27.0' # last version that can use rubocop < 0.58 | |
17 | end | |
18 | gem 'pry', '~> 0.11' if ruby_version >= Gem::Version.new('2.0') | |
19 | gem 'rspec-pending_for' | |
10 | 20 | |
11 | group :test do | |
12 | 21 | gem 'addressable', '~> 2.3.8' |
13 | 22 | gem 'backports' |
14 | 23 | gem 'coveralls' |
15 | 24 | gem 'rack', '~> 1.2', :platforms => [:jruby_18, :jruby_19, :ruby_18, :ruby_19, :ruby_20, :ruby_21] |
16 | 25 | gem 'rspec', '>= 3' |
17 | gem 'rubocop', '>= 0.37', :platforms => [:ruby_20, :ruby_21, :ruby_22, :ruby_23, :ruby_24] | |
18 | 26 | gem 'simplecov', '>= 0.9' |
19 | 27 | |
20 | 28 | platforms :jruby_18, :ruby_18 do |
0 | MIT License | |
1 | ||
2 | Copyright (c) 2011 - 2013 Michael Bleigh and Intridea, Inc. | |
3 | Copyright (c) 2017 - 2018 oauth-xx organization, https://github.com/oauth-xx | |
4 | ||
5 | Permission is hereby granted, free of charge, to any person obtaining a copy | |
6 | of this software and associated documentation files (the "Software"), to deal | |
7 | in the Software without restriction, including without limitation the rights | |
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
9 | copies of the Software, and to permit persons to whom the Software is | |
10 | furnished to do so, subject to the following conditions: | |
11 | ||
12 | The above copyright notice and this permission notice shall be included in all | |
13 | copies or substantial portions of the Software. | |
14 | ||
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | |
21 | SOFTWARE. |
0 | Copyright (c) 2011-2013 Michael Bleigh and Intridea, Inc. | |
1 | ||
2 | Permission is hereby granted, free of charge, to any person obtaining | |
3 | a copy of this software and associated documentation files (the | |
4 | "Software"), to deal in the Software without restriction, including | |
5 | without limitation the rights to use, copy, modify, merge, publish, | |
6 | distribute, sublicense, and/or sell copies of the Software, and to | |
7 | permit persons to whom the Software is furnished to do so, subject to | |
8 | the following conditions: | |
9 | ||
10 | The above copyright notice and this permission notice shall be | |
11 | included in all copies or substantial portions of the Software. | |
12 | ||
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
14 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
15 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
16 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | |
17 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | |
18 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | |
19 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
0 | 0 | # OAuth2 |
1 | 1 | |
2 | 2 | [![Gem Version](http://img.shields.io/gem/v/oauth2.svg)][gem] |
3 | [![Build Status](http://img.shields.io/travis/intridea/oauth2.svg)][travis] | |
4 | [![Dependency Status](http://img.shields.io/gemnasium/intridea/oauth2.svg)][gemnasium] | |
5 | [![Code Climate](http://img.shields.io/codeclimate/github/intridea/oauth2.svg)][codeclimate] | |
3 | [![Total Downloads](https://img.shields.io/gem/dt/oauth2.svg)][gem] | |
4 | [![Downloads Today](https://img.shields.io/gem/rt/oauth2.svg)][gem] | |
5 | [![Build Status](http://img.shields.io/travis/oauth-xx/oauth2.svg)][travis] | |
6 | 6 | [![Coverage Status](http://img.shields.io/coveralls/intridea/oauth2.svg)][coveralls] |
7 | [![Maintainability](https://api.codeclimate.com/v1/badges/688c612528ff90a46955/maintainability)][codeclimate-maintainability] | |
8 | [![Depfu](https://badges.depfu.com/badges/6d34dc1ba682bbdf9ae2a97848241743/count.svg)][depfu] | |
9 | [![Open Source Helpers](https://www.codetriage.com/oauth-xx/oauth2/badges/users.svg)][code-triage] | |
10 | [![Chat](https://img.shields.io/gitter/room/oauth-xx/oauth2.svg)](https://gitter.im/oauth-xx/oauth2) | |
11 | [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)][source-license] | |
12 | [![Documentation](http://inch-ci.org/github/oauth-xx/oauth2.png)][inch-ci] | |
7 | 13 | |
8 | 14 | [gem]: https://rubygems.org/gems/oauth2 |
9 | [travis]: http://travis-ci.org/intridea/oauth2 | |
10 | [gemnasium]: https://gemnasium.com/intridea/oauth2 | |
11 | [codeclimate]: https://codeclimate.com/github/intridea/oauth2 | |
12 | [coveralls]: https://coveralls.io/r/intridea/oauth2 | |
13 | ||
14 | A Ruby wrapper for the OAuth 2.0 specification. | |
15 | [travis]: http://travis-ci.org/oauth-xx/oauth2 | |
16 | [coveralls]: https://coveralls.io/r/oauth-xx/oauth2 | |
17 | [codeclimate-maintainability]: https://codeclimate.com/github/oauth-xx/oauth2/maintainability | |
18 | [depfu]: https://depfu.com/github/oauth-xx/oauth2 | |
19 | [source-license]: https://opensource.org/licenses/MIT | |
20 | [inch-ci]: http://inch-ci.org/github/oauth-xx/oauth2 | |
21 | [code-triage]: https://www.codetriage.com/oauth-xx/oauth2 | |
22 | ||
23 | A Ruby wrapper for the [OAuth 2.0 specification][oauth2-spec]. | |
24 | ||
25 | [oauth2-spec]: https://oauth.net/2/ | |
15 | 26 | |
16 | 27 | ## Installation |
17 | gem install oauth2 | |
28 | ||
29 | Add this line to your application's Gemfile: | |
30 | ||
31 | ```ruby | |
32 | gem 'oauth2' | |
33 | ``` | |
34 | ||
35 | And then execute: | |
36 | ||
37 | $ bundle | |
38 | ||
39 | Or install it yourself as: | |
40 | ||
41 | $ gem install oauth2 | |
18 | 42 | |
19 | 43 | ## Resources |
44 | ||
20 | 45 | * [View Source on GitHub][code] |
21 | 46 | * [Report Issues on GitHub][issues] |
22 | 47 | * [Read More at the Wiki][wiki] |
23 | 48 | |
24 | [code]: https://github.com/intridea/oauth2 | |
25 | [issues]: https://github.com/intridea/oauth2/issues | |
26 | [wiki]: https://wiki.github.com/intridea/oauth2 | |
49 | [code]: https://github.com/oauth-xx/oauth2 | |
50 | [issues]: https://github.com/oauth-xx/oauth2/issues | |
51 | [wiki]: https://github.com/oauth-xx/oauth2/wiki | |
27 | 52 | |
28 | 53 | ## Usage Examples |
29 | 54 | |
99 | 124 | requests for tokens for any Authentication grant type. |
100 | 125 | |
101 | 126 | ## Supported Ruby Versions |
127 | ||
102 | 128 | This library aims to support and is [tested against][travis] the following Ruby |
103 | 129 | implementations: |
130 | ||
131 | ### Rubies with support ending at Oauth2 2.x | |
104 | 132 | |
105 | 133 | * Ruby 1.9.3 |
106 | 134 | * Ruby 2.0.0 |
107 | 135 | * Ruby 2.1 |
108 | 136 | * Ruby 2.2 |
109 | * Ruby 2.3 | |
137 | * [JRuby 1.7][jruby-1.7] (targets MRI v1.9) | |
138 | * [JRuby 9.0][jruby-9.0] (targets MRI v2.0) | |
139 | ||
140 | --- | |
141 | ||
142 | ### Rubies with continued support past Oauth2 2.x | |
143 | ||
144 | * Ruby 2.3 - Support through version 3.x series | |
110 | 145 | * Ruby 2.4 |
111 | * [JRuby 9K][jruby] | |
112 | ||
113 | [jruby]: http://jruby.org/ | |
146 | * Ruby 2.5 | |
147 | * [JRuby 9.1][jruby-9.1] (targets MRI v2.3) | |
148 | * [JRuby 9.2][jruby-9.2] (targets MRI v2.5) | |
149 | ||
150 | [jruby-1.7]: https://www.jruby.org/2017/05/11/jruby-1-7-27.html | |
151 | [jruby-9.0]: https://www.jruby.org/2016/01/26/jruby-9-0-5-0.html | |
152 | [jruby-9.1]: https://www.jruby.org/2017/05/16/jruby-9-1-9-0.html | |
153 | [jruby-9.2]: https://www.jruby.org/2018/05/24/jruby-9-2-0-0.html | |
114 | 154 | |
115 | 155 | If something doesn't work on one of these interpreters, it's a bug. |
116 | 156 | |
125 | 165 | fashion. If critical issues for a particular implementation exist at the time |
126 | 166 | of a major release, support for that Ruby version may be dropped. |
127 | 167 | |
168 | ## Versioning | |
169 | ||
170 | This library aims to adhere to [Semantic Versioning 2.0.0][semver]. | |
171 | Violations of this scheme should be reported as bugs. Specifically, | |
172 | if a minor or patch version is released that breaks backward | |
173 | compatibility, a new version should be immediately released that | |
174 | restores compatibility. Breaking changes to the public API will | |
175 | only be introduced with new major versions. | |
176 | ||
177 | As a result of this policy, you can (and should) specify a | |
178 | dependency on this gem using the [Pessimistic Version Constraint][pvc] with two digits of precision. | |
179 | ||
180 | For example: | |
181 | ||
182 | ```ruby | |
183 | spec.add_dependency 'oauth2', '~> 1.4' | |
184 | ``` | |
185 | ||
186 | [semver]: http://semver.org/ | |
187 | [pvc]: http://guides.rubygems.org/patterns/#pessimistic-version-constraint | |
188 | ||
128 | 189 | ## License |
129 | Copyright (c) 2011-2013 Michael Bleigh and Intridea, Inc. See [LICENSE][] for | |
130 | details. | |
131 | ||
132 | [license]: LICENSE.md | |
190 | ||
191 | [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)][source-license] | |
192 | ||
193 | - Copyright (c) 2011-2013 Michael Bleigh and Intridea, Inc. | |
194 | - Copyright (c) 2017-2018 [oauth-xx organization][oauth-xx] | |
195 | - See [LICENSE][license] for details. | |
196 | ||
197 | [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Foauth-xx%2Foauth2.svg?type=large)][fossa2] | |
198 | ||
199 | [license]: LICENSE | |
200 | [oauth-xx]: https://github.com/oauth-xx | |
201 | [fossa2]: https://app.fossa.io/projects/git%2Bgithub.com%2Foauth-xx%2Foauth2?ref=badge_large | |
202 | ||
203 | ## Development | |
204 | ||
205 | After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. | |
206 | ||
207 | To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org). | |
208 | ||
209 | ## Contributing | |
210 | ||
211 | Bug reports and pull requests are welcome on GitHub at https://github.com/oauth-xx/oauth2. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct. | |
212 | ||
213 | ## Code of Conduct | |
214 | ||
215 | Everyone interacting in the OAuth2 project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/oauth-xx/oauth2/blob/master/CODE_OF_CONDUCT.md). |
0 | require 'bundler' | |
1 | Bundler::GemHelper.install_tasks | |
0 | # encoding: utf-8 | |
2 | 1 | |
3 | require 'rspec/core/rake_task' | |
4 | RSpec::Core::RakeTask.new(:spec) | |
2 | # !/usr/bin/env rake | |
5 | 3 | |
4 | require 'bundler/gem_tasks' | |
5 | ||
6 | begin | |
7 | require 'wwtd/tasks' | |
8 | rescue LoadError | |
9 | puts 'failed to load wwtd' | |
10 | end | |
11 | ||
12 | begin | |
13 | require 'rspec/core/rake_task' | |
14 | RSpec::Core::RakeTask.new(:spec) | |
15 | rescue LoadError | |
16 | task :spec do | |
17 | warn 'rspec is disabled' | |
18 | end | |
19 | end | |
6 | 20 | task :test => :spec |
21 | ||
22 | begin | |
23 | require 'rubocop/rake_task' | |
24 | RuboCop::RakeTask.new do |task| | |
25 | task.options = ['-D'] # Display the name of the failing cops | |
26 | end | |
27 | rescue LoadError | |
28 | task :rubocop do | |
29 | warn 'RuboCop is disabled' | |
30 | end | |
31 | end | |
7 | 32 | |
8 | 33 | namespace :doc do |
9 | 34 | require 'rdoc/task' |
16 | 41 | end |
17 | 42 | end |
18 | 43 | |
19 | begin | |
20 | require 'rubocop/rake_task' | |
21 | RuboCop::RakeTask.new do |task| | |
22 | task.options = ['-D'] # Display the name of the failing cops | |
23 | end | |
24 | rescue LoadError | |
25 | task :rubocop do | |
26 | $stderr.puts 'RuboCop is disabled' | |
27 | end | |
28 | end | |
29 | ||
30 | task :default => [:spec, :rubocop] | |
44 | task :default => [:test, :rubocop] |
0 | source 'https://rubygems.org' | |
1 | ||
2 | gem 'faraday', '0.9.2' | |
3 | ||
4 | group :test do | |
5 | gem 'rake' | |
6 | gem 'rspec' | |
7 | gem 'rspec-pending_for' | |
8 | end | |
9 | ||
10 | gemspec :path => '../' |
0 | PATH | |
1 | remote: .. | |
2 | specs: | |
3 | oauth2 (1.4.0) | |
4 | faraday (>= 0.8, < 0.16.0) | |
5 | jwt (>= 1.0, < 3.0) | |
6 | multi_json (~> 1.3) | |
7 | multi_xml (~> 0.5) | |
8 | rack (>= 1.2, < 3) | |
9 | ||
10 | GEM | |
11 | remote: https://rubygems.org/ | |
12 | specs: | |
13 | addressable (2.4.0) | |
14 | backports (3.11.4) | |
15 | coveralls (0.8.22) | |
16 | json (>= 1.8, < 3) | |
17 | simplecov (~> 0.16.1) | |
18 | term-ansicolor (~> 1.3) | |
19 | thor (~> 0.19.4) | |
20 | tins (~> 1.6) | |
21 | diff-lcs (1.3) | |
22 | docile (1.3.1) | |
23 | faraday (0.9.2) | |
24 | multipart-post (>= 1.2, < 3) | |
25 | json (2.1.0-java) | |
26 | jwt (1.5.6) | |
27 | multi_json (1.13.1) | |
28 | multi_xml (0.6.0) | |
29 | multipart-post (2.0.0) | |
30 | rack (1.6.10) | |
31 | rake (12.2.1) | |
32 | rdoc (5.1.0) | |
33 | rspec (3.8.0) | |
34 | rspec-core (~> 3.8.0) | |
35 | rspec-expectations (~> 3.8.0) | |
36 | rspec-mocks (~> 3.8.0) | |
37 | rspec-core (3.8.0) | |
38 | rspec-support (~> 3.8.0) | |
39 | rspec-expectations (3.8.2) | |
40 | diff-lcs (>= 1.2.0, < 2.0) | |
41 | rspec-support (~> 3.8.0) | |
42 | rspec-mocks (3.8.0) | |
43 | diff-lcs (>= 1.2.0, < 2.0) | |
44 | rspec-support (~> 3.8.0) | |
45 | rspec-pending_for (0.1.13) | |
46 | rspec-core | |
47 | ruby_engine (~> 1.0) | |
48 | ruby_version (~> 1.0) | |
49 | rspec-support (3.8.0) | |
50 | ruby_engine (1.0.1) | |
51 | ruby_version (1.0.1) | |
52 | simplecov (0.16.1) | |
53 | docile (~> 1.1) | |
54 | json (>= 1.8, < 3) | |
55 | simplecov-html (~> 0.10.0) | |
56 | simplecov-html (0.10.2) | |
57 | term-ansicolor (1.3.2) | |
58 | tins (~> 1.0) | |
59 | thor (0.19.4) | |
60 | tins (1.6.0) | |
61 | wwtd (1.3.0) | |
62 | ||
63 | PLATFORMS | |
64 | java | |
65 | ||
66 | DEPENDENCIES | |
67 | addressable (~> 2.3) | |
68 | backports (~> 3.11) | |
69 | bundler (~> 1.16) | |
70 | coveralls (~> 0.8) | |
71 | faraday (= 0.9.2) | |
72 | oauth2! | |
73 | rake | |
74 | rdoc (>= 5.0, < 7) | |
75 | rspec | |
76 | rspec-pending_for | |
77 | wwtd | |
78 | ||
79 | BUNDLED WITH | |
80 | 1.16.6 |
0 | source 'https://rubygems.org' | |
1 | ||
2 | gem 'faraday', '0.9.2' | |
3 | ||
4 | group :test do | |
5 | gem 'rake' | |
6 | gem 'rspec' | |
7 | gem 'rspec-pending_for' | |
8 | gem 'rubocop', '~> 0.53.0' | |
9 | gem 'rubocop-rspec', '~> 1.24.0' | |
10 | end | |
11 | ||
12 | gemspec :path => '../' |
0 | source 'https://rubygems.org' | |
1 | ||
2 | gem 'faraday', '0.9.2' | |
3 | ||
4 | group :development do | |
5 | gem 'pry' | |
6 | end | |
7 | ||
8 | group :test do | |
9 | gem 'rake' | |
10 | gem 'rspec' | |
11 | gem 'rspec-pending_for' | |
12 | gem 'rubocop', '~> 0.53.0' | |
13 | gem 'rubocop-rspec', '~> 1.24.0' | |
14 | end | |
15 | ||
16 | gemspec :path => '../' |
0 | PATH | |
1 | remote: .. | |
2 | specs: | |
3 | oauth2 (1.4.0) | |
4 | faraday (>= 0.8, < 0.16.0) | |
5 | jwt (>= 1.0, < 3.0) | |
6 | multi_json (~> 1.3) | |
7 | multi_xml (~> 0.5) | |
8 | rack (>= 1.2, < 3) | |
9 | ||
10 | GEM | |
11 | remote: https://rubygems.org/ | |
12 | specs: | |
13 | addressable (2.5.2) | |
14 | public_suffix (>= 2.0.2, < 4.0) | |
15 | ast (2.4.0) | |
16 | backports (3.11.4) | |
17 | coderay (1.1.2) | |
18 | coveralls (0.8.22) | |
19 | json (>= 1.8, < 3) | |
20 | simplecov (~> 0.16.1) | |
21 | term-ansicolor (~> 1.3) | |
22 | thor (~> 0.19.4) | |
23 | tins (~> 1.6) | |
24 | diff-lcs (1.3) | |
25 | docile (1.3.1) | |
26 | faraday (0.9.2) | |
27 | multipart-post (>= 1.2, < 3) | |
28 | ffi (1.9.25-java) | |
29 | json (2.1.0-java) | |
30 | jwt (2.1.0) | |
31 | method_source (0.9.0) | |
32 | multi_json (1.13.1) | |
33 | multi_xml (0.6.0) | |
34 | multipart-post (2.0.0) | |
35 | parallel (1.12.1) | |
36 | parser (2.5.1.2) | |
37 | ast (~> 2.4.0) | |
38 | powerpack (0.1.2) | |
39 | pry (0.11.3-java) | |
40 | coderay (~> 1.1.0) | |
41 | method_source (~> 0.9.0) | |
42 | spoon (~> 0.0) | |
43 | public_suffix (3.0.3) | |
44 | rack (2.0.5) | |
45 | rainbow (3.0.0) | |
46 | rake (12.3.1) | |
47 | rdoc (6.0.4) | |
48 | rspec (3.8.0) | |
49 | rspec-core (~> 3.8.0) | |
50 | rspec-expectations (~> 3.8.0) | |
51 | rspec-mocks (~> 3.8.0) | |
52 | rspec-core (3.8.0) | |
53 | rspec-support (~> 3.8.0) | |
54 | rspec-expectations (3.8.2) | |
55 | diff-lcs (>= 1.2.0, < 2.0) | |
56 | rspec-support (~> 3.8.0) | |
57 | rspec-mocks (3.8.0) | |
58 | diff-lcs (>= 1.2.0, < 2.0) | |
59 | rspec-support (~> 3.8.0) | |
60 | rspec-pending_for (0.1.13) | |
61 | rspec-core | |
62 | ruby_engine (~> 1.0) | |
63 | ruby_version (~> 1.0) | |
64 | rspec-support (3.8.0) | |
65 | rubocop (0.53.0) | |
66 | parallel (~> 1.10) | |
67 | parser (>= 2.5) | |
68 | powerpack (~> 0.1) | |
69 | rainbow (>= 2.2.2, < 4.0) | |
70 | ruby-progressbar (~> 1.7) | |
71 | unicode-display_width (~> 1.0, >= 1.0.1) | |
72 | rubocop-rspec (1.24.0) | |
73 | rubocop (>= 0.53.0) | |
74 | ruby-progressbar (1.10.0) | |
75 | ruby_engine (1.0.1) | |
76 | ruby_version (1.0.1) | |
77 | simplecov (0.16.1) | |
78 | docile (~> 1.1) | |
79 | json (>= 1.8, < 3) | |
80 | simplecov-html (~> 0.10.0) | |
81 | simplecov-html (0.10.2) | |
82 | spoon (0.0.6) | |
83 | ffi | |
84 | term-ansicolor (1.6.0) | |
85 | tins (~> 1.0) | |
86 | thor (0.19.4) | |
87 | tins (1.16.3) | |
88 | unicode-display_width (1.4.0) | |
89 | wwtd (1.3.0) | |
90 | ||
91 | PLATFORMS | |
92 | java | |
93 | ||
94 | DEPENDENCIES | |
95 | addressable (~> 2.3) | |
96 | backports (~> 3.11) | |
97 | bundler (~> 1.16) | |
98 | coveralls (~> 0.8) | |
99 | faraday (= 0.9.2) | |
100 | oauth2! | |
101 | pry | |
102 | rake | |
103 | rdoc (>= 5.0, < 7) | |
104 | rspec | |
105 | rspec-pending_for | |
106 | rubocop (~> 0.53.0) | |
107 | rubocop-rspec (~> 1.24.0) | |
108 | wwtd | |
109 | ||
110 | BUNDLED WITH | |
111 | 1.16.4 |
0 | source 'https://rubygems.org' | |
1 | ||
2 | gem 'faraday', '0.9.2' | |
3 | ||
4 | group :development do | |
5 | gem 'pry' | |
6 | end | |
7 | ||
8 | group :test do | |
9 | gem 'rake' | |
10 | gem 'rspec' | |
11 | gem 'rspec-pending_for' | |
12 | gem 'rubocop', '~> 0.53.0' | |
13 | gem 'rubocop-rspec', '~> 1.24.0' | |
14 | end | |
15 | ||
16 | gemspec :path => '../' |
0 | PATH | |
1 | remote: .. | |
2 | specs: | |
3 | oauth2 (1.4.0) | |
4 | faraday (>= 0.8, < 0.16.0) | |
5 | jwt (>= 1.0, < 3.0) | |
6 | multi_json (~> 1.3) | |
7 | multi_xml (~> 0.5) | |
8 | rack (>= 1.2, < 3) | |
9 | ||
10 | GEM | |
11 | remote: https://rubygems.org/ | |
12 | specs: | |
13 | addressable (2.5.2) | |
14 | public_suffix (>= 2.0.2, < 4.0) | |
15 | ast (2.4.0) | |
16 | backports (3.11.4) | |
17 | coderay (1.1.2) | |
18 | coveralls (0.8.22) | |
19 | json (>= 1.8, < 3) | |
20 | simplecov (~> 0.16.1) | |
21 | term-ansicolor (~> 1.3) | |
22 | thor (~> 0.19.4) | |
23 | tins (~> 1.6) | |
24 | diff-lcs (1.3) | |
25 | docile (1.3.1) | |
26 | faraday (0.9.2) | |
27 | multipart-post (>= 1.2, < 3) | |
28 | ffi (1.9.25-java) | |
29 | json (2.1.0-java) | |
30 | jwt (2.1.0) | |
31 | method_source (0.9.0) | |
32 | multi_json (1.13.1) | |
33 | multi_xml (0.6.0) | |
34 | multipart-post (2.0.0) | |
35 | parallel (1.12.1) | |
36 | parser (2.5.1.2) | |
37 | ast (~> 2.4.0) | |
38 | powerpack (0.1.2) | |
39 | pry (0.11.3-java) | |
40 | coderay (~> 1.1.0) | |
41 | method_source (~> 0.9.0) | |
42 | spoon (~> 0.0) | |
43 | public_suffix (3.0.3) | |
44 | rack (2.0.5) | |
45 | rainbow (3.0.0) | |
46 | rake (12.3.1) | |
47 | rdoc (6.0.4) | |
48 | rspec (3.8.0) | |
49 | rspec-core (~> 3.8.0) | |
50 | rspec-expectations (~> 3.8.0) | |
51 | rspec-mocks (~> 3.8.0) | |
52 | rspec-core (3.8.0) | |
53 | rspec-support (~> 3.8.0) | |
54 | rspec-expectations (3.8.2) | |
55 | diff-lcs (>= 1.2.0, < 2.0) | |
56 | rspec-support (~> 3.8.0) | |
57 | rspec-mocks (3.8.0) | |
58 | diff-lcs (>= 1.2.0, < 2.0) | |
59 | rspec-support (~> 3.8.0) | |
60 | rspec-pending_for (0.1.13) | |
61 | rspec-core | |
62 | ruby_engine (~> 1.0) | |
63 | ruby_version (~> 1.0) | |
64 | rspec-support (3.8.0) | |
65 | rubocop (0.53.0) | |
66 | parallel (~> 1.10) | |
67 | parser (>= 2.5) | |
68 | powerpack (~> 0.1) | |
69 | rainbow (>= 2.2.2, < 4.0) | |
70 | ruby-progressbar (~> 1.7) | |
71 | unicode-display_width (~> 1.0, >= 1.0.1) | |
72 | rubocop-rspec (1.24.0) | |
73 | rubocop (>= 0.53.0) | |
74 | ruby-progressbar (1.10.0) | |
75 | ruby_engine (1.0.1) | |
76 | ruby_version (1.0.1) | |
77 | simplecov (0.16.1) | |
78 | docile (~> 1.1) | |
79 | json (>= 1.8, < 3) | |
80 | simplecov-html (~> 0.10.0) | |
81 | simplecov-html (0.10.2) | |
82 | spoon (0.0.6) | |
83 | ffi | |
84 | term-ansicolor (1.6.0) | |
85 | tins (~> 1.0) | |
86 | thor (0.19.4) | |
87 | tins (1.16.3) | |
88 | unicode-display_width (1.4.0) | |
89 | wwtd (1.3.0) | |
90 | ||
91 | PLATFORMS | |
92 | java | |
93 | ||
94 | DEPENDENCIES | |
95 | addressable (~> 2.3) | |
96 | backports (~> 3.11) | |
97 | bundler (~> 1.16) | |
98 | coveralls (~> 0.8) | |
99 | faraday (= 0.9.2) | |
100 | oauth2! | |
101 | pry | |
102 | rake | |
103 | rdoc (>= 5.0, < 7) | |
104 | rspec | |
105 | rspec-pending_for | |
106 | rubocop (~> 0.53.0) | |
107 | rubocop-rspec (~> 1.24.0) | |
108 | wwtd | |
109 | ||
110 | BUNDLED WITH | |
111 | 1.16.4 |
0 | source 'https://rubygems.org' | |
1 | ||
2 | gem 'faraday', '0.9.2' | |
3 | ||
4 | group :development do | |
5 | gem 'pry' | |
6 | end | |
7 | ||
8 | group :test do | |
9 | gem 'rake' | |
10 | gem 'rspec' | |
11 | gem 'rspec-pending_for' | |
12 | gem 'rubocop', '~> 0.53.0' | |
13 | gem 'rubocop-rspec', '~> 1.24.0' | |
14 | end | |
15 | ||
16 | gemspec :path => '../' |
0 | source 'https://rubygems.org' | |
1 | ||
2 | gem 'faraday', '0.9.2' | |
3 | ||
4 | gem 'json', '< 2.0' | |
5 | gem 'rack', '~> 1.2' | |
6 | gem 'term-ansicolor', '< 1.4.0' | |
7 | gem 'tins', '< 1.7' | |
8 | ||
9 | group :test do | |
10 | gem 'rake' | |
11 | gem 'rspec' | |
12 | gem 'rspec-pending_for' | |
13 | end | |
14 | ||
15 | gemspec :path => '../' |
0 | PATH | |
1 | remote: .. | |
2 | specs: | |
3 | oauth2 (1.4.0) | |
4 | faraday (>= 0.8, < 0.16.0) | |
5 | jwt (>= 1.0, < 3.0) | |
6 | multi_json (~> 1.3) | |
7 | multi_xml (~> 0.5) | |
8 | rack (>= 1.2, < 3) | |
9 | ||
10 | GEM | |
11 | remote: https://rubygems.org/ | |
12 | specs: | |
13 | addressable (2.4.0) | |
14 | backports (3.11.4) | |
15 | coveralls (0.8.22) | |
16 | json (>= 1.8, < 3) | |
17 | simplecov (~> 0.16.1) | |
18 | term-ansicolor (~> 1.3) | |
19 | thor (~> 0.19.4) | |
20 | tins (~> 1.6) | |
21 | diff-lcs (1.3) | |
22 | docile (1.3.1) | |
23 | faraday (0.9.2) | |
24 | multipart-post (>= 1.2, < 3) | |
25 | json (1.8.6) | |
26 | jwt (1.5.6) | |
27 | multi_json (1.13.1) | |
28 | multi_xml (0.6.0) | |
29 | multipart-post (2.0.0) | |
30 | rack (1.6.10) | |
31 | rake (12.2.1) | |
32 | rdoc (5.1.0) | |
33 | rspec (3.8.0) | |
34 | rspec-core (~> 3.8.0) | |
35 | rspec-expectations (~> 3.8.0) | |
36 | rspec-mocks (~> 3.8.0) | |
37 | rspec-core (3.8.0) | |
38 | rspec-support (~> 3.8.0) | |
39 | rspec-expectations (3.8.2) | |
40 | diff-lcs (>= 1.2.0, < 2.0) | |
41 | rspec-support (~> 3.8.0) | |
42 | rspec-mocks (3.8.0) | |
43 | diff-lcs (>= 1.2.0, < 2.0) | |
44 | rspec-support (~> 3.8.0) | |
45 | rspec-pending_for (0.1.13) | |
46 | rspec-core | |
47 | ruby_engine (~> 1.0) | |
48 | ruby_version (~> 1.0) | |
49 | rspec-support (3.8.0) | |
50 | ruby_engine (1.0.1) | |
51 | ruby_version (1.0.1) | |
52 | simplecov (0.16.1) | |
53 | docile (~> 1.1) | |
54 | json (>= 1.8, < 3) | |
55 | simplecov-html (~> 0.10.0) | |
56 | simplecov-html (0.10.2) | |
57 | term-ansicolor (1.3.2) | |
58 | tins (~> 1.0) | |
59 | thor (0.19.4) | |
60 | tins (1.6.0) | |
61 | wwtd (1.3.0) | |
62 | ||
63 | PLATFORMS | |
64 | ruby | |
65 | ||
66 | DEPENDENCIES | |
67 | addressable (~> 2.3) | |
68 | backports (~> 3.11) | |
69 | bundler (~> 1.16) | |
70 | coveralls (~> 0.8) | |
71 | faraday (= 0.9.2) | |
72 | json (< 2.0) | |
73 | oauth2! | |
74 | rack (~> 1.2) | |
75 | rake | |
76 | rdoc (>= 5.0, < 7) | |
77 | rspec | |
78 | rspec-pending_for | |
79 | term-ansicolor (< 1.4.0) | |
80 | tins (< 1.7) | |
81 | wwtd | |
82 | ||
83 | BUNDLED WITH | |
84 | 1.16.2 |
0 | source 'https://rubygems.org' | |
1 | ||
2 | gem 'faraday', '0.9.2' | |
3 | ||
4 | gem 'rack', '~> 1.2' | |
5 | ||
6 | group :development do | |
7 | gem 'pry' | |
8 | end | |
9 | ||
10 | group :test do | |
11 | gem 'rake' | |
12 | gem 'rspec' | |
13 | gem 'rspec-pending_for' | |
14 | end | |
15 | ||
16 | gemspec :path => '../' |
0 | PATH | |
1 | remote: .. | |
2 | specs: | |
3 | oauth2 (1.4.0) | |
4 | faraday (>= 0.8, < 0.16.0) | |
5 | jwt (>= 1.0, < 3.0) | |
6 | multi_json (~> 1.3) | |
7 | multi_xml (~> 0.5) | |
8 | rack (>= 1.2, < 3) | |
9 | ||
10 | GEM | |
11 | remote: https://rubygems.org/ | |
12 | specs: | |
13 | addressable (2.5.2) | |
14 | public_suffix (>= 2.0.2, < 4.0) | |
15 | backports (3.11.4) | |
16 | coderay (1.1.2) | |
17 | coveralls (0.8.22) | |
18 | json (>= 1.8, < 3) | |
19 | simplecov (~> 0.16.1) | |
20 | term-ansicolor (~> 1.3) | |
21 | thor (~> 0.19.4) | |
22 | tins (~> 1.6) | |
23 | diff-lcs (1.3) | |
24 | docile (1.3.1) | |
25 | faraday (0.9.2) | |
26 | multipart-post (>= 1.2, < 3) | |
27 | json (2.1.0) | |
28 | jwt (1.5.6) | |
29 | method_source (0.9.0) | |
30 | multi_json (1.13.1) | |
31 | multi_xml (0.6.0) | |
32 | multipart-post (2.0.0) | |
33 | pry (0.11.3) | |
34 | coderay (~> 1.1.0) | |
35 | method_source (~> 0.9.0) | |
36 | public_suffix (2.0.5) | |
37 | rack (1.6.10) | |
38 | rake (12.3.1) | |
39 | rdoc (5.1.0) | |
40 | rspec (3.8.0) | |
41 | rspec-core (~> 3.8.0) | |
42 | rspec-expectations (~> 3.8.0) | |
43 | rspec-mocks (~> 3.8.0) | |
44 | rspec-core (3.8.0) | |
45 | rspec-support (~> 3.8.0) | |
46 | rspec-expectations (3.8.2) | |
47 | diff-lcs (>= 1.2.0, < 2.0) | |
48 | rspec-support (~> 3.8.0) | |
49 | rspec-mocks (3.8.0) | |
50 | diff-lcs (>= 1.2.0, < 2.0) | |
51 | rspec-support (~> 3.8.0) | |
52 | rspec-pending_for (0.1.13) | |
53 | rspec-core | |
54 | ruby_engine (~> 1.0) | |
55 | ruby_version (~> 1.0) | |
56 | rspec-support (3.8.0) | |
57 | ruby_engine (1.0.1) | |
58 | ruby_version (1.0.1) | |
59 | simplecov (0.16.1) | |
60 | docile (~> 1.1) | |
61 | json (>= 1.8, < 3) | |
62 | simplecov-html (~> 0.10.0) | |
63 | simplecov-html (0.10.2) | |
64 | term-ansicolor (1.6.0) | |
65 | tins (~> 1.0) | |
66 | thor (0.19.4) | |
67 | tins (1.16.3) | |
68 | wwtd (1.3.0) | |
69 | ||
70 | PLATFORMS | |
71 | ruby | |
72 | ||
73 | DEPENDENCIES | |
74 | addressable (~> 2.3) | |
75 | backports (~> 3.11) | |
76 | bundler (~> 1.16) | |
77 | coveralls (~> 0.8) | |
78 | faraday (= 0.9.2) | |
79 | oauth2! | |
80 | pry | |
81 | rack (~> 1.2) | |
82 | rake | |
83 | rdoc (>= 5.0, < 7) | |
84 | rspec | |
85 | rspec-pending_for | |
86 | wwtd | |
87 | ||
88 | BUNDLED WITH | |
89 | 1.16.2 |
0 | source 'https://rubygems.org' | |
1 | ||
2 | gem 'faraday', '0.9.2' | |
3 | ||
4 | gem 'rack', '~> 1.2' | |
5 | ||
6 | group :development do | |
7 | gem 'pry' | |
8 | end | |
9 | ||
10 | group :test do | |
11 | gem 'rake' | |
12 | gem 'rspec' | |
13 | gem 'rspec-pending_for' | |
14 | gem 'rubocop', '~> 0.53.0' | |
15 | gem 'rubocop-rspec', '~> 1.24.0' | |
16 | end | |
17 | ||
18 | gemspec :path => '../' |
0 | PATH | |
1 | remote: .. | |
2 | specs: | |
3 | oauth2 (1.4.0) | |
4 | faraday (>= 0.8, < 0.16.0) | |
5 | jwt (>= 1.0, < 3.0) | |
6 | multi_json (~> 1.3) | |
7 | multi_xml (~> 0.5) | |
8 | rack (>= 1.2, < 3) | |
9 | ||
10 | GEM | |
11 | remote: https://rubygems.org/ | |
12 | specs: | |
13 | addressable (2.5.2) | |
14 | public_suffix (>= 2.0.2, < 4.0) | |
15 | ast (2.4.0) | |
16 | backports (3.11.4) | |
17 | coderay (1.1.2) | |
18 | coveralls (0.8.22) | |
19 | json (>= 1.8, < 3) | |
20 | simplecov (~> 0.16.1) | |
21 | term-ansicolor (~> 1.3) | |
22 | thor (~> 0.19.4) | |
23 | tins (~> 1.6) | |
24 | diff-lcs (1.3) | |
25 | docile (1.3.1) | |
26 | faraday (0.9.2) | |
27 | multipart-post (>= 1.2, < 3) | |
28 | json (2.1.0) | |
29 | jwt (2.1.0) | |
30 | method_source (0.9.0) | |
31 | multi_json (1.13.1) | |
32 | multi_xml (0.6.0) | |
33 | multipart-post (2.0.0) | |
34 | parallel (1.12.1) | |
35 | parser (2.5.1.2) | |
36 | ast (~> 2.4.0) | |
37 | powerpack (0.1.2) | |
38 | pry (0.11.3) | |
39 | coderay (~> 1.1.0) | |
40 | method_source (~> 0.9.0) | |
41 | public_suffix (3.0.3) | |
42 | rack (1.6.10) | |
43 | rainbow (3.0.0) | |
44 | rake (12.3.1) | |
45 | rdoc (5.1.0) | |
46 | rspec (3.8.0) | |
47 | rspec-core (~> 3.8.0) | |
48 | rspec-expectations (~> 3.8.0) | |
49 | rspec-mocks (~> 3.8.0) | |
50 | rspec-core (3.8.0) | |
51 | rspec-support (~> 3.8.0) | |
52 | rspec-expectations (3.8.2) | |
53 | diff-lcs (>= 1.2.0, < 2.0) | |
54 | rspec-support (~> 3.8.0) | |
55 | rspec-mocks (3.8.0) | |
56 | diff-lcs (>= 1.2.0, < 2.0) | |
57 | rspec-support (~> 3.8.0) | |
58 | rspec-pending_for (0.1.13) | |
59 | rspec-core | |
60 | ruby_engine (~> 1.0) | |
61 | ruby_version (~> 1.0) | |
62 | rspec-support (3.8.0) | |
63 | rubocop (0.53.0) | |
64 | parallel (~> 1.10) | |
65 | parser (>= 2.5) | |
66 | powerpack (~> 0.1) | |
67 | rainbow (>= 2.2.2, < 4.0) | |
68 | ruby-progressbar (~> 1.7) | |
69 | unicode-display_width (~> 1.0, >= 1.0.1) | |
70 | rubocop-rspec (1.24.0) | |
71 | rubocop (>= 0.53.0) | |
72 | ruby-progressbar (1.10.0) | |
73 | ruby_engine (1.0.1) | |
74 | ruby_version (1.0.1) | |
75 | simplecov (0.16.1) | |
76 | docile (~> 1.1) | |
77 | json (>= 1.8, < 3) | |
78 | simplecov-html (~> 0.10.0) | |
79 | simplecov-html (0.10.2) | |
80 | term-ansicolor (1.6.0) | |
81 | tins (~> 1.0) | |
82 | thor (0.19.4) | |
83 | tins (1.16.3) | |
84 | unicode-display_width (1.4.0) | |
85 | wwtd (1.3.0) | |
86 | ||
87 | PLATFORMS | |
88 | ruby | |
89 | ||
90 | DEPENDENCIES | |
91 | addressable (~> 2.3) | |
92 | backports (~> 3.11) | |
93 | bundler (~> 1.16) | |
94 | coveralls (~> 0.8) | |
95 | faraday (= 0.9.2) | |
96 | oauth2! | |
97 | pry | |
98 | rack (~> 1.2) | |
99 | rake | |
100 | rdoc (>= 5.0, < 7) | |
101 | rspec | |
102 | rspec-pending_for | |
103 | rubocop (~> 0.53.0) | |
104 | rubocop-rspec (~> 1.24.0) | |
105 | wwtd | |
106 | ||
107 | BUNDLED WITH | |
108 | 1.16.2 |
0 | source 'https://rubygems.org' | |
1 | ||
2 | gem 'faraday', '0.9.2' | |
3 | ||
4 | group :development do | |
5 | gem 'pry' | |
6 | end | |
7 | ||
8 | group :test do | |
9 | gem 'rake' | |
10 | gem 'rspec' | |
11 | gem 'rspec-pending_for' | |
12 | gem 'rubocop', '~> 0.53.0' | |
13 | gem 'rubocop-rspec', '~> 1.24.0' | |
14 | end | |
15 | ||
16 | gemspec :path => '../' |
0 | PATH | |
1 | remote: .. | |
2 | specs: | |
3 | oauth2 (1.4.0) | |
4 | faraday (>= 0.8, < 0.16.0) | |
5 | jwt (>= 1.0, < 3.0) | |
6 | multi_json (~> 1.3) | |
7 | multi_xml (~> 0.5) | |
8 | rack (>= 1.2, < 3) | |
9 | ||
10 | GEM | |
11 | remote: https://rubygems.org/ | |
12 | specs: | |
13 | addressable (2.5.2) | |
14 | public_suffix (>= 2.0.2, < 4.0) | |
15 | ast (2.4.0) | |
16 | backports (3.11.4) | |
17 | coderay (1.1.2) | |
18 | coveralls (0.8.22) | |
19 | json (>= 1.8, < 3) | |
20 | simplecov (~> 0.16.1) | |
21 | term-ansicolor (~> 1.3) | |
22 | thor (~> 0.19.4) | |
23 | tins (~> 1.6) | |
24 | diff-lcs (1.3) | |
25 | docile (1.3.1) | |
26 | faraday (0.9.2) | |
27 | multipart-post (>= 1.2, < 3) | |
28 | json (2.1.0) | |
29 | jwt (2.1.0) | |
30 | method_source (0.9.0) | |
31 | multi_json (1.13.1) | |
32 | multi_xml (0.6.0) | |
33 | multipart-post (2.0.0) | |
34 | parallel (1.12.1) | |
35 | parser (2.5.1.2) | |
36 | ast (~> 2.4.0) | |
37 | powerpack (0.1.2) | |
38 | pry (0.11.3) | |
39 | coderay (~> 1.1.0) | |
40 | method_source (~> 0.9.0) | |
41 | public_suffix (3.0.3) | |
42 | rack (2.0.5) | |
43 | rainbow (3.0.0) | |
44 | rake (12.3.1) | |
45 | rdoc (6.0.4) | |
46 | rspec (3.8.0) | |
47 | rspec-core (~> 3.8.0) | |
48 | rspec-expectations (~> 3.8.0) | |
49 | rspec-mocks (~> 3.8.0) | |
50 | rspec-core (3.8.0) | |
51 | rspec-support (~> 3.8.0) | |
52 | rspec-expectations (3.8.2) | |
53 | diff-lcs (>= 1.2.0, < 2.0) | |
54 | rspec-support (~> 3.8.0) | |
55 | rspec-mocks (3.8.0) | |
56 | diff-lcs (>= 1.2.0, < 2.0) | |
57 | rspec-support (~> 3.8.0) | |
58 | rspec-pending_for (0.1.13) | |
59 | rspec-core | |
60 | ruby_engine (~> 1.0) | |
61 | ruby_version (~> 1.0) | |
62 | rspec-support (3.8.0) | |
63 | rubocop (0.53.0) | |
64 | parallel (~> 1.10) | |
65 | parser (>= 2.5) | |
66 | powerpack (~> 0.1) | |
67 | rainbow (>= 2.2.2, < 4.0) | |
68 | ruby-progressbar (~> 1.7) | |
69 | unicode-display_width (~> 1.0, >= 1.0.1) | |
70 | rubocop-rspec (1.24.0) | |
71 | rubocop (>= 0.53.0) | |
72 | ruby-progressbar (1.10.0) | |
73 | ruby_engine (1.0.1) | |
74 | ruby_version (1.0.1) | |
75 | simplecov (0.16.1) | |
76 | docile (~> 1.1) | |
77 | json (>= 1.8, < 3) | |
78 | simplecov-html (~> 0.10.0) | |
79 | simplecov-html (0.10.2) | |
80 | term-ansicolor (1.6.0) | |
81 | tins (~> 1.0) | |
82 | thor (0.19.4) | |
83 | tins (1.16.3) | |
84 | unicode-display_width (1.4.0) | |
85 | wwtd (1.3.0) | |
86 | ||
87 | PLATFORMS | |
88 | ruby | |
89 | ||
90 | DEPENDENCIES | |
91 | addressable (~> 2.3) | |
92 | backports (~> 3.11) | |
93 | bundler (~> 1.16) | |
94 | coveralls (~> 0.8) | |
95 | faraday (= 0.9.2) | |
96 | oauth2! | |
97 | pry | |
98 | rake | |
99 | rdoc (>= 5.0, < 7) | |
100 | rspec | |
101 | rspec-pending_for | |
102 | rubocop (~> 0.53.0) | |
103 | rubocop-rspec (~> 1.24.0) | |
104 | wwtd | |
105 | ||
106 | BUNDLED WITH | |
107 | 1.16.2 |
0 | source 'https://rubygems.org' | |
1 | ||
2 | gem 'faraday', '0.9.2' | |
3 | ||
4 | group :development do | |
5 | gem 'pry' | |
6 | end | |
7 | ||
8 | group :test do | |
9 | gem 'rake' | |
10 | gem 'rspec' | |
11 | gem 'rspec-pending_for' | |
12 | gem 'rubocop', '~> 0.53.0' | |
13 | gem 'rubocop-rspec', '~> 1.24.0' | |
14 | end | |
15 | ||
16 | gemspec :path => '../' |
0 | PATH | |
1 | remote: .. | |
2 | specs: | |
3 | oauth2 (1.4.0) | |
4 | faraday (>= 0.8, < 0.16.0) | |
5 | jwt (>= 1.0, < 3.0) | |
6 | multi_json (~> 1.3) | |
7 | multi_xml (~> 0.5) | |
8 | rack (>= 1.2, < 3) | |
9 | ||
10 | GEM | |
11 | remote: https://rubygems.org/ | |
12 | specs: | |
13 | addressable (2.5.2) | |
14 | public_suffix (>= 2.0.2, < 4.0) | |
15 | ast (2.4.0) | |
16 | backports (3.11.4) | |
17 | coderay (1.1.2) | |
18 | coveralls (0.8.22) | |
19 | json (>= 1.8, < 3) | |
20 | simplecov (~> 0.16.1) | |
21 | term-ansicolor (~> 1.3) | |
22 | thor (~> 0.19.4) | |
23 | tins (~> 1.6) | |
24 | diff-lcs (1.3) | |
25 | docile (1.3.1) | |
26 | faraday (0.9.2) | |
27 | multipart-post (>= 1.2, < 3) | |
28 | json (2.1.0) | |
29 | jwt (2.1.0) | |
30 | method_source (0.9.0) | |
31 | multi_json (1.13.1) | |
32 | multi_xml (0.6.0) | |
33 | multipart-post (2.0.0) | |
34 | parallel (1.12.1) | |
35 | parser (2.5.1.2) | |
36 | ast (~> 2.4.0) | |
37 | powerpack (0.1.2) | |
38 | pry (0.11.3) | |
39 | coderay (~> 1.1.0) | |
40 | method_source (~> 0.9.0) | |
41 | public_suffix (3.0.3) | |
42 | rack (2.0.5) | |
43 | rainbow (3.0.0) | |
44 | rake (12.3.1) | |
45 | rdoc (6.0.4) | |
46 | rspec (3.8.0) | |
47 | rspec-core (~> 3.8.0) | |
48 | rspec-expectations (~> 3.8.0) | |
49 | rspec-mocks (~> 3.8.0) | |
50 | rspec-core (3.8.0) | |
51 | rspec-support (~> 3.8.0) | |
52 | rspec-expectations (3.8.2) | |
53 | diff-lcs (>= 1.2.0, < 2.0) | |
54 | rspec-support (~> 3.8.0) | |
55 | rspec-mocks (3.8.0) | |
56 | diff-lcs (>= 1.2.0, < 2.0) | |
57 | rspec-support (~> 3.8.0) | |
58 | rspec-pending_for (0.1.13) | |
59 | rspec-core | |
60 | ruby_engine (~> 1.0) | |
61 | ruby_version (~> 1.0) | |
62 | rspec-support (3.8.0) | |
63 | rubocop (0.53.0) | |
64 | parallel (~> 1.10) | |
65 | parser (>= 2.5) | |
66 | powerpack (~> 0.1) | |
67 | rainbow (>= 2.2.2, < 4.0) | |
68 | ruby-progressbar (~> 1.7) | |
69 | unicode-display_width (~> 1.0, >= 1.0.1) | |
70 | rubocop-rspec (1.24.0) | |
71 | rubocop (>= 0.53.0) | |
72 | ruby-progressbar (1.10.0) | |
73 | ruby_engine (1.0.1) | |
74 | ruby_version (1.0.1) | |
75 | simplecov (0.16.1) | |
76 | docile (~> 1.1) | |
77 | json (>= 1.8, < 3) | |
78 | simplecov-html (~> 0.10.0) | |
79 | simplecov-html (0.10.2) | |
80 | term-ansicolor (1.6.0) | |
81 | tins (~> 1.0) | |
82 | thor (0.19.4) | |
83 | tins (1.16.3) | |
84 | unicode-display_width (1.4.0) | |
85 | wwtd (1.3.0) | |
86 | ||
87 | PLATFORMS | |
88 | ruby | |
89 | ||
90 | DEPENDENCIES | |
91 | addressable (~> 2.3) | |
92 | backports (~> 3.11) | |
93 | bundler (~> 1.16) | |
94 | coveralls (~> 0.8) | |
95 | faraday (= 0.9.2) | |
96 | oauth2! | |
97 | pry | |
98 | rake | |
99 | rdoc (>= 5.0, < 7) | |
100 | rspec | |
101 | rspec-pending_for | |
102 | rubocop (~> 0.53.0) | |
103 | rubocop-rspec (~> 1.24.0) | |
104 | wwtd | |
105 | ||
106 | BUNDLED WITH | |
107 | 1.16.2 |
0 | source 'https://rubygems.org' | |
1 | ||
2 | gem 'faraday', '0.9.2' | |
3 | ||
4 | group :development do | |
5 | gem 'pry' | |
6 | end | |
7 | ||
8 | group :test do | |
9 | gem 'rake' | |
10 | gem 'rspec' | |
11 | gem 'rspec-pending_for' | |
12 | gem 'rubocop', '~> 0.53.0' | |
13 | gem 'rubocop-rspec', '~> 1.24.0' | |
14 | end | |
15 | ||
16 | gemspec :path => '../' |
0 | PATH | |
1 | remote: .. | |
2 | specs: | |
3 | oauth2 (1.4.0) | |
4 | faraday (>= 0.8, < 0.16.0) | |
5 | jwt (>= 1.0, < 3.0) | |
6 | multi_json (~> 1.3) | |
7 | multi_xml (~> 0.5) | |
8 | rack (>= 1.2, < 3) | |
9 | ||
10 | GEM | |
11 | remote: https://rubygems.org/ | |
12 | specs: | |
13 | addressable (2.5.2) | |
14 | public_suffix (>= 2.0.2, < 4.0) | |
15 | ast (2.4.0) | |
16 | backports (3.11.4) | |
17 | coderay (1.1.2) | |
18 | coveralls (0.8.22) | |
19 | json (>= 1.8, < 3) | |
20 | simplecov (~> 0.16.1) | |
21 | term-ansicolor (~> 1.3) | |
22 | thor (~> 0.19.4) | |
23 | tins (~> 1.6) | |
24 | diff-lcs (1.3) | |
25 | docile (1.3.1) | |
26 | faraday (0.9.2) | |
27 | multipart-post (>= 1.2, < 3) | |
28 | json (2.1.0) | |
29 | jwt (2.1.0) | |
30 | method_source (0.9.0) | |
31 | multi_json (1.13.1) | |
32 | multi_xml (0.6.0) | |
33 | multipart-post (2.0.0) | |
34 | parallel (1.12.1) | |
35 | parser (2.5.1.2) | |
36 | ast (~> 2.4.0) | |
37 | powerpack (0.1.2) | |
38 | pry (0.11.3) | |
39 | coderay (~> 1.1.0) | |
40 | method_source (~> 0.9.0) | |
41 | public_suffix (3.0.3) | |
42 | rack (2.0.5) | |
43 | rainbow (3.0.0) | |
44 | rake (12.3.1) | |
45 | rdoc (6.0.4) | |
46 | rspec (3.8.0) | |
47 | rspec-core (~> 3.8.0) | |
48 | rspec-expectations (~> 3.8.0) | |
49 | rspec-mocks (~> 3.8.0) | |
50 | rspec-core (3.8.0) | |
51 | rspec-support (~> 3.8.0) | |
52 | rspec-expectations (3.8.2) | |
53 | diff-lcs (>= 1.2.0, < 2.0) | |
54 | rspec-support (~> 3.8.0) | |
55 | rspec-mocks (3.8.0) | |
56 | diff-lcs (>= 1.2.0, < 2.0) | |
57 | rspec-support (~> 3.8.0) | |
58 | rspec-pending_for (0.1.13) | |
59 | rspec-core | |
60 | ruby_engine (~> 1.0) | |
61 | ruby_version (~> 1.0) | |
62 | rspec-support (3.8.0) | |
63 | rubocop (0.53.0) | |
64 | parallel (~> 1.10) | |
65 | parser (>= 2.5) | |
66 | powerpack (~> 0.1) | |
67 | rainbow (>= 2.2.2, < 4.0) | |
68 | ruby-progressbar (~> 1.7) | |
69 | unicode-display_width (~> 1.0, >= 1.0.1) | |
70 | rubocop-rspec (1.24.0) | |
71 | rubocop (>= 0.53.0) | |
72 | ruby-progressbar (1.10.0) | |
73 | ruby_engine (1.0.1) | |
74 | ruby_version (1.0.1) | |
75 | simplecov (0.16.1) | |
76 | docile (~> 1.1) | |
77 | json (>= 1.8, < 3) | |
78 | simplecov-html (~> 0.10.0) | |
79 | simplecov-html (0.10.2) | |
80 | term-ansicolor (1.6.0) | |
81 | tins (~> 1.0) | |
82 | thor (0.19.4) | |
83 | tins (1.16.3) | |
84 | unicode-display_width (1.4.0) | |
85 | wwtd (1.3.0) | |
86 | ||
87 | PLATFORMS | |
88 | ruby | |
89 | ||
90 | DEPENDENCIES | |
91 | addressable (~> 2.3) | |
92 | backports (~> 3.11) | |
93 | bundler (~> 1.16) | |
94 | coveralls (~> 0.8) | |
95 | faraday (= 0.9.2) | |
96 | oauth2! | |
97 | pry | |
98 | rake | |
99 | rdoc (>= 5.0, < 7) | |
100 | rspec | |
101 | rspec-pending_for | |
102 | rubocop (~> 0.53.0) | |
103 | rubocop-rspec (~> 1.24.0) | |
104 | wwtd | |
105 | ||
106 | BUNDLED WITH | |
107 | 1.16.2 |
0 | source 'https://rubygems.org' | |
1 | ||
2 | gem 'faraday', '0.9.2' | |
3 | ||
4 | group :development do | |
5 | gem 'pry' | |
6 | end | |
7 | ||
8 | group :test do | |
9 | gem 'rake' | |
10 | gem 'rspec' | |
11 | gem 'rspec-pending_for' | |
12 | gem 'rubocop', '~> 0.53.0' | |
13 | gem 'rubocop-rspec', '~> 1.24.0' | |
14 | end | |
15 | ||
16 | gemspec :path => '../' |
0 | PATH | |
1 | remote: .. | |
2 | specs: | |
3 | oauth2 (1.4.0) | |
4 | faraday (>= 0.8, < 0.16.0) | |
5 | jwt (>= 1.0, < 3.0) | |
6 | multi_json (~> 1.3) | |
7 | multi_xml (~> 0.5) | |
8 | rack (>= 1.2, < 3) | |
9 | ||
10 | GEM | |
11 | remote: https://rubygems.org/ | |
12 | specs: | |
13 | addressable (2.5.2) | |
14 | public_suffix (>= 2.0.2, < 4.0) | |
15 | ast (2.4.0) | |
16 | backports (3.11.4) | |
17 | coderay (1.1.2) | |
18 | coveralls (0.8.22) | |
19 | json (>= 1.8, < 3) | |
20 | simplecov (~> 0.16.1) | |
21 | term-ansicolor (~> 1.3) | |
22 | thor (~> 0.19.4) | |
23 | tins (~> 1.6) | |
24 | diff-lcs (1.3) | |
25 | docile (1.3.1) | |
26 | faraday (0.9.2) | |
27 | multipart-post (>= 1.2, < 3) | |
28 | json (2.1.0) | |
29 | jwt (2.1.0) | |
30 | method_source (0.9.0) | |
31 | multi_json (1.13.1) | |
32 | multi_xml (0.6.0) | |
33 | multipart-post (2.0.0) | |
34 | parallel (1.12.1) | |
35 | parser (2.5.1.2) | |
36 | ast (~> 2.4.0) | |
37 | powerpack (0.1.2) | |
38 | pry (0.11.3) | |
39 | coderay (~> 1.1.0) | |
40 | method_source (~> 0.9.0) | |
41 | public_suffix (3.0.3) | |
42 | rack (2.0.5) | |
43 | rainbow (3.0.0) | |
44 | rake (12.3.1) | |
45 | rdoc (6.0.4) | |
46 | rspec (3.8.0) | |
47 | rspec-core (~> 3.8.0) | |
48 | rspec-expectations (~> 3.8.0) | |
49 | rspec-mocks (~> 3.8.0) | |
50 | rspec-core (3.8.0) | |
51 | rspec-support (~> 3.8.0) | |
52 | rspec-expectations (3.8.2) | |
53 | diff-lcs (>= 1.2.0, < 2.0) | |
54 | rspec-support (~> 3.8.0) | |
55 | rspec-mocks (3.8.0) | |
56 | diff-lcs (>= 1.2.0, < 2.0) | |
57 | rspec-support (~> 3.8.0) | |
58 | rspec-pending_for (0.1.13) | |
59 | rspec-core | |
60 | ruby_engine (~> 1.0) | |
61 | ruby_version (~> 1.0) | |
62 | rspec-support (3.8.0) | |
63 | rubocop (0.53.0) | |
64 | parallel (~> 1.10) | |
65 | parser (>= 2.5) | |
66 | powerpack (~> 0.1) | |
67 | rainbow (>= 2.2.2, < 4.0) | |
68 | ruby-progressbar (~> 1.7) | |
69 | unicode-display_width (~> 1.0, >= 1.0.1) | |
70 | rubocop-rspec (1.24.0) | |
71 | rubocop (>= 0.53.0) | |
72 | ruby-progressbar (1.10.0) | |
73 | ruby_engine (1.0.1) | |
74 | ruby_version (1.0.1) | |
75 | simplecov (0.16.1) | |
76 | docile (~> 1.1) | |
77 | json (>= 1.8, < 3) | |
78 | simplecov-html (~> 0.10.0) | |
79 | simplecov-html (0.10.2) | |
80 | term-ansicolor (1.6.0) | |
81 | tins (~> 1.0) | |
82 | thor (0.19.4) | |
83 | tins (1.16.3) | |
84 | unicode-display_width (1.4.0) | |
85 | wwtd (1.3.0) | |
86 | ||
87 | PLATFORMS | |
88 | ruby | |
89 | ||
90 | DEPENDENCIES | |
91 | addressable (~> 2.3) | |
92 | backports (~> 3.11) | |
93 | bundler (~> 1.16) | |
94 | coveralls (~> 0.8) | |
95 | faraday (= 0.9.2) | |
96 | oauth2! | |
97 | pry | |
98 | rake | |
99 | rdoc (>= 5.0, < 7) | |
100 | rspec | |
101 | rspec-pending_for | |
102 | rubocop (~> 0.53.0) | |
103 | rubocop-rspec (~> 1.24.0) | |
104 | wwtd | |
105 | ||
106 | BUNDLED WITH | |
107 | 1.16.5 |
0 | source 'https://rubygems.org' | |
1 | ||
2 | gem 'faraday', '0.9.2' | |
3 | ||
4 | group :development do | |
5 | gem 'pry' | |
6 | end | |
7 | ||
8 | group :test do | |
9 | gem 'rake' | |
10 | gem 'rspec' | |
11 | gem 'rspec-pending_for' | |
12 | gem 'rubocop', '~> 0.53.0' | |
13 | gem 'rubocop-rspec', '~> 1.24.0' | |
14 | end | |
15 | ||
16 | gemspec :path => '../' |
0 | PATH | |
1 | remote: .. | |
2 | specs: | |
3 | oauth2 (1.4.0) | |
4 | faraday (>= 0.8, < 0.16.0) | |
5 | jwt (>= 1.0, < 3.0) | |
6 | multi_json (~> 1.3) | |
7 | multi_xml (~> 0.5) | |
8 | rack (>= 1.2, < 3) | |
9 | ||
10 | GEM | |
11 | remote: https://rubygems.org/ | |
12 | specs: | |
13 | addressable (2.5.2) | |
14 | public_suffix (>= 2.0.2, < 4.0) | |
15 | ast (2.4.0) | |
16 | backports (3.11.4) | |
17 | coderay (1.1.2) | |
18 | coveralls (0.8.22) | |
19 | json (>= 1.8, < 3) | |
20 | simplecov (~> 0.16.1) | |
21 | term-ansicolor (~> 1.3) | |
22 | thor (~> 0.19.4) | |
23 | tins (~> 1.6) | |
24 | diff-lcs (1.3) | |
25 | docile (1.3.1) | |
26 | faraday (0.9.2) | |
27 | multipart-post (>= 1.2, < 3) | |
28 | json (2.1.0) | |
29 | jwt (2.1.0) | |
30 | method_source (0.9.0) | |
31 | multi_json (1.13.1) | |
32 | multi_xml (0.6.0) | |
33 | multipart-post (2.0.0) | |
34 | parallel (1.12.1) | |
35 | parser (2.5.1.2) | |
36 | ast (~> 2.4.0) | |
37 | powerpack (0.1.2) | |
38 | pry (0.11.3) | |
39 | coderay (~> 1.1.0) | |
40 | method_source (~> 0.9.0) | |
41 | public_suffix (3.0.3) | |
42 | rack (2.0.5) | |
43 | rainbow (3.0.0) | |
44 | rake (12.3.1) | |
45 | rdoc (6.0.4) | |
46 | rspec (3.8.0) | |
47 | rspec-core (~> 3.8.0) | |
48 | rspec-expectations (~> 3.8.0) | |
49 | rspec-mocks (~> 3.8.0) | |
50 | rspec-core (3.8.0) | |
51 | rspec-support (~> 3.8.0) | |
52 | rspec-expectations (3.8.2) | |
53 | diff-lcs (>= 1.2.0, < 2.0) | |
54 | rspec-support (~> 3.8.0) | |
55 | rspec-mocks (3.8.0) | |
56 | diff-lcs (>= 1.2.0, < 2.0) | |
57 | rspec-support (~> 3.8.0) | |
58 | rspec-pending_for (0.1.13) | |
59 | rspec-core | |
60 | ruby_engine (~> 1.0) | |
61 | ruby_version (~> 1.0) | |
62 | rspec-support (3.8.0) | |
63 | rubocop (0.53.0) | |
64 | parallel (~> 1.10) | |
65 | parser (>= 2.5) | |
66 | powerpack (~> 0.1) | |
67 | rainbow (>= 2.2.2, < 4.0) | |
68 | ruby-progressbar (~> 1.7) | |
69 | unicode-display_width (~> 1.0, >= 1.0.1) | |
70 | rubocop-rspec (1.24.0) | |
71 | rubocop (>= 0.53.0) | |
72 | ruby-progressbar (1.10.0) | |
73 | ruby_engine (1.0.1) | |
74 | ruby_version (1.0.1) | |
75 | simplecov (0.16.1) | |
76 | docile (~> 1.1) | |
77 | json (>= 1.8, < 3) | |
78 | simplecov-html (~> 0.10.0) | |
79 | simplecov-html (0.10.2) | |
80 | term-ansicolor (1.6.0) | |
81 | tins (~> 1.0) | |
82 | thor (0.19.4) | |
83 | tins (1.16.3) | |
84 | unicode-display_width (1.4.0) | |
85 | wwtd (1.3.0) | |
86 | ||
87 | PLATFORMS | |
88 | ruby | |
89 | ||
90 | DEPENDENCIES | |
91 | addressable (~> 2.3) | |
92 | backports (~> 3.11) | |
93 | bundler (~> 1.16) | |
94 | coveralls (~> 0.8) | |
95 | faraday (= 0.9.2) | |
96 | oauth2! | |
97 | pry | |
98 | rake | |
99 | rdoc (>= 5.0, < 7) | |
100 | rspec | |
101 | rspec-pending_for | |
102 | rubocop (~> 0.53.0) | |
103 | rubocop-rspec (~> 1.24.0) | |
104 | wwtd | |
105 | ||
106 | BUNDLED WITH | |
107 | 1.16.4 |
110 | 110 | |
111 | 111 | # No-op since we need the verb and path |
112 | 112 | # and the MAC always goes in a header |
113 | def token=(_) | |
113 | def token=(_noop) | |
114 | 114 | end |
115 | 115 | |
116 | 116 | # Base64.strict_encode64 is not available on Ruby 1.8.7 |
0 | 0 | module OAuth2 |
1 | 1 | module Version |
2 | module_function | |
2 | module_function | |
3 | 3 | |
4 | 4 | # The major version |
5 | 5 | # |
19 | 19 | # |
20 | 20 | # @return [Integer] |
21 | 21 | def patch |
22 | 0 | |
22 | 1 | |
23 | 23 | end |
24 | 24 | |
25 | 25 | # The pre-release version, if any |
34 | 34 | # @return [Hash] |
35 | 35 | def to_h |
36 | 36 | { |
37 | :major => major, | |
38 | :minor => minor, | |
39 | :patch => patch, | |
40 | :pre => pre, | |
37 | :major => major, | |
38 | :minor => minor, | |
39 | :patch => patch, | |
40 | :pre => pre, | |
41 | 41 | } |
42 | 42 | end |
43 | 43 |
4 | 4 | require 'oauth2/version' |
5 | 5 | |
6 | 6 | Gem::Specification.new do |spec| |
7 | spec.add_dependency 'faraday', ['>= 0.8', '< 0.13'] | |
8 | spec.add_dependency 'jwt', '~> 1.0' | |
7 | spec.add_dependency 'faraday', ['>= 0.8', '< 0.16.0'] | |
8 | spec.add_dependency 'jwt', ['>= 1.0', '< 3.0'] | |
9 | 9 | spec.add_dependency 'multi_json', '~> 1.3' |
10 | 10 | spec.add_dependency 'multi_xml', '~> 0.5' |
11 | 11 | spec.add_dependency 'rack', ['>= 1.2', '< 3'] |
12 | spec.add_development_dependency 'bundler', '~> 1.0' | |
13 | spec.authors = ['Michael Bleigh', 'Erik Michaels-Ober'] | |
12 | ||
13 | spec.authors = ['Peter Boling', 'Michael Bleigh', 'Erik Michaels-Ober'] | |
14 | 14 | spec.description = 'A Ruby wrapper for the OAuth 2.0 protocol built with a similar style to the original OAuth spec.' |
15 | spec.email = ['michael@intridea.com', 'sferik@gmail.com'] | |
16 | spec.files = %w[.document CONTRIBUTING.md LICENSE.md README.md oauth2.gemspec] + Dir['lib/**/*.rb'] | |
17 | spec.homepage = 'http://github.com/intridea/oauth2' | |
15 | spec.email = ['peter.boling@gmail.com'] | |
16 | spec.homepage = 'https://github.com/oauth-xx/oauth2' | |
18 | 17 | spec.licenses = %w[MIT] |
19 | 18 | spec.name = 'oauth2' |
20 | spec.require_paths = %w[lib] | |
19 | spec.required_ruby_version = '>= 1.9.0' | |
21 | 20 | spec.required_rubygems_version = '>= 1.3.5' |
22 | 21 | spec.summary = 'A Ruby wrapper for the OAuth 2.0 protocol.' |
23 | 22 | spec.version = OAuth2::Version |
23 | ||
24 | spec.require_paths = %w[lib] | |
25 | spec.bindir = 'exe' | |
26 | spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } | |
27 | spec.files = `git ls-files -z`.split("\x0").reject do |f| | |
28 | f.match(%r{^(bin|test|spec|features)/}) | |
29 | end | |
30 | ||
31 | spec.add_development_dependency 'addressable', '~> 2.3' | |
32 | spec.add_development_dependency 'backports', '~> 3.11' | |
33 | spec.add_development_dependency 'bundler', '~> 1.16' | |
34 | spec.add_development_dependency 'coveralls', '~> 0.8' | |
35 | spec.add_development_dependency 'rake', '~> 12.3' | |
36 | spec.add_development_dependency 'rdoc', ['>= 5.0', '< 7'] | |
37 | spec.add_development_dependency 'rspec', '~> 3.0' | |
38 | spec.add_development_dependency 'wwtd' | |
24 | 39 | end |
5 | 5 | |
6 | 6 | SimpleCov.start do |
7 | 7 | add_filter '/spec' |
8 | minimum_coverage(95.33) | |
8 | minimum_coverage(95) | |
9 | 9 | end |
10 | 10 | end |
11 | 11 |
0 | 0 | require 'helper' |
1 | 1 | |
2 | 2 | describe AccessToken do |
3 | subject { described_class.new(client, token) } | |
4 | ||
3 | 5 | let(:token) { 'monkey' } |
4 | 6 | let(:refresh_body) { MultiJson.encode(:access_token => 'refreshed_foo', :expires_in => 600, :refresh_token => 'refresh_bar') } |
5 | 7 | let(:client) do |
16 | 18 | end |
17 | 19 | end |
18 | 20 | |
19 | subject { AccessToken.new(client, token) } | |
20 | ||
21 | 21 | describe '#initialize' do |
22 | 22 | it 'assigns client and token' do |
23 | 23 | expect(subject.client).to eq(client) |
25 | 25 | end |
26 | 26 | |
27 | 27 | it 'assigns extra params' do |
28 | target = AccessToken.new(client, token, 'foo' => 'bar') | |
28 | target = described_class.new(client, token, 'foo' => 'bar') | |
29 | 29 | expect(target.params).to include('foo') |
30 | 30 | expect(target.params['foo']).to eq('bar') |
31 | 31 | end |
39 | 39 | |
40 | 40 | it 'initializes with a Hash' do |
41 | 41 | hash = {:access_token => token, :expires_at => Time.now.to_i + 200, 'foo' => 'bar'} |
42 | target = AccessToken.from_hash(client, hash) | |
42 | target = described_class.from_hash(client, hash) | |
43 | 43 | assert_initialized_token(target) |
44 | 44 | end |
45 | 45 | |
46 | it 'does not modify opts hash' do | |
46 | it 'from_hash does not modify opts hash' do | |
47 | 47 | hash = {:access_token => token, :expires_at => Time.now.to_i} |
48 | 48 | hash_before = hash.dup |
49 | AccessToken.from_hash(client, hash) | |
49 | described_class.from_hash(client, hash) | |
50 | 50 | expect(hash).to eq(hash_before) |
51 | 51 | end |
52 | 52 | |
53 | 53 | it 'initalizes with a form-urlencoded key/value string' do |
54 | 54 | kvform = "access_token=#{token}&expires_at=#{Time.now.to_i + 200}&foo=bar" |
55 | target = AccessToken.from_kvform(client, kvform) | |
55 | target = described_class.from_kvform(client, kvform) | |
56 | 56 | assert_initialized_token(target) |
57 | 57 | end |
58 | 58 | |
59 | 59 | it 'sets options' do |
60 | target = AccessToken.new(client, token, :param_name => 'foo', :header_format => 'Bearer %', :mode => :body) | |
60 | target = described_class.new(client, token, :param_name => 'foo', :header_format => 'Bearer %', :mode => :body) | |
61 | 61 | expect(target.options[:param_name]).to eq('foo') |
62 | 62 | expect(target.options[:header_format]).to eq('Bearer %') |
63 | 63 | expect(target.options[:mode]).to eq(:body) |
66 | 66 | it 'does not modify opts hash' do |
67 | 67 | opts = {:param_name => 'foo', :header_format => 'Bearer %', :mode => :body} |
68 | 68 | opts_before = opts.dup |
69 | AccessToken.new(client, token, opts) | |
69 | described_class.new(client, token, opts) | |
70 | 70 | expect(opts).to eq(opts_before) |
71 | 71 | end |
72 | 72 | |
73 | 73 | it 'initializes with a string expires_at' do |
74 | 74 | hash = {:access_token => token, :expires_at => '1361396829', 'foo' => 'bar'} |
75 | target = AccessToken.from_hash(client, hash) | |
75 | target = described_class.from_hash(client, hash) | |
76 | 76 | assert_initialized_token(target) |
77 | 77 | expect(target.expires_at).to be_a(Integer) |
78 | 78 | end |
79 | 79 | end |
80 | 80 | |
81 | 81 | describe '#request' do |
82 | context ':mode => :header' do | |
82 | context 'with :mode => :header' do | |
83 | 83 | before do |
84 | 84 | subject.options[:mode] = :header |
85 | 85 | end |
91 | 91 | end |
92 | 92 | end |
93 | 93 | |
94 | context ':mode => :query' do | |
94 | context 'with :mode => :query' do | |
95 | 95 | before do |
96 | 96 | subject.options[:mode] = :query |
97 | 97 | end |
103 | 103 | end |
104 | 104 | end |
105 | 105 | |
106 | context ':mode => :body' do | |
106 | context 'with :mode => :body' do | |
107 | 107 | before do |
108 | 108 | subject.options[:mode] = :body |
109 | 109 | end |
118 | 118 | |
119 | 119 | describe '#expires?' do |
120 | 120 | it 'is false if there is no expires_at' do |
121 | expect(AccessToken.new(client, token)).not_to be_expires | |
121 | expect(described_class.new(client, token)).not_to be_expires | |
122 | 122 | end |
123 | 123 | |
124 | 124 | it 'is true if there is an expires_in' do |
125 | expect(AccessToken.new(client, token, :refresh_token => 'abaca', :expires_in => 600)).to be_expires | |
125 | expect(described_class.new(client, token, :refresh_token => 'abaca', :expires_in => 600)).to be_expires | |
126 | 126 | end |
127 | 127 | |
128 | 128 | it 'is true if there is an expires_at' do |
129 | expect(AccessToken.new(client, token, :refresh_token => 'abaca', :expires_in => Time.now.getutc.to_i + 600)).to be_expires | |
129 | expect(described_class.new(client, token, :refresh_token => 'abaca', :expires_in => Time.now.getutc.to_i + 600)).to be_expires | |
130 | 130 | end |
131 | 131 | end |
132 | 132 | |
133 | 133 | describe '#expired?' do |
134 | 134 | it 'is false if there is no expires_in or expires_at' do |
135 | expect(AccessToken.new(client, token)).not_to be_expired | |
135 | expect(described_class.new(client, token)).not_to be_expired | |
136 | 136 | end |
137 | 137 | |
138 | 138 | it 'is false if expires_in is in the future' do |
139 | expect(AccessToken.new(client, token, :refresh_token => 'abaca', :expires_in => 10_800)).not_to be_expired | |
139 | expect(described_class.new(client, token, :refresh_token => 'abaca', :expires_in => 10_800)).not_to be_expired | |
140 | 140 | end |
141 | 141 | |
142 | 142 | it 'is true if expires_at is in the past' do |
143 | access = AccessToken.new(client, token, :refresh_token => 'abaca', :expires_in => 600) | |
143 | access = described_class.new(client, token, :refresh_token => 'abaca', :expires_in => 600) | |
144 | 144 | @now = Time.now + 10_800 |
145 | 145 | allow(Time).to receive(:now).and_return(@now) |
146 | 146 | expect(access).to be_expired |
149 | 149 | |
150 | 150 | describe '#refresh!' do |
151 | 151 | let(:access) do |
152 | AccessToken.new(client, token, :refresh_token => 'abaca', | |
153 | :expires_in => 600, | |
154 | :param_name => 'o_param') | |
152 | described_class.new(client, token, :refresh_token => 'abaca', | |
153 | :expires_in => 600, | |
154 | :param_name => 'o_param') | |
155 | 155 | end |
156 | 156 | |
157 | 157 | it 'returns a refresh token with appropriate values carried over' do |
174 | 174 | describe '#to_hash' do |
175 | 175 | it 'return a hash equals to the hash used to initialize access token' do |
176 | 176 | hash = {:access_token => token, :refresh_token => 'foobar', :expires_at => Time.now.to_i + 200, 'foo' => 'bar'} |
177 | access_token = AccessToken.from_hash(client, hash.clone) | |
177 | access_token = described_class.from_hash(client, hash.clone) | |
178 | 178 | expect(access_token.to_hash).to eq(hash) |
179 | 179 | end |
180 | 180 | end |
0 | 0 | require 'helper' |
1 | 1 | |
2 | 2 | describe OAuth2::Authenticator do |
3 | subject do | |
4 | described_class.new(client_id, client_secret, mode) | |
5 | end | |
6 | ||
3 | 7 | let(:client_id) { 'foo' } |
4 | 8 | let(:client_secret) { 'bar' } |
5 | 9 | let(:mode) { :undefined } |
6 | ||
7 | subject do | |
8 | OAuth2::Authenticator.new(client_id, client_secret, mode) | |
9 | end | |
10 | 10 | |
11 | 11 | it 'raises NotImplementedError for unknown authentication mode' do |
12 | 12 | expect { subject.apply({}) }.to raise_error(NotImplementedError) |
3 | 3 | require 'nkf' |
4 | 4 | |
5 | 5 | describe OAuth2::Client do |
6 | let!(:error_value) { 'invalid_token' } | |
7 | let!(:error_description_value) { 'bad bad token' } | |
8 | ||
9 | 6 | subject do |
10 | OAuth2::Client.new('abc', 'def', :site => 'https://api.example.com') do |builder| | |
7 | described_class.new('abc', 'def', :site => 'https://api.example.com') do |builder| | |
11 | 8 | builder.adapter :test do |stub| |
12 | 9 | stub.get('/success') { |env| [200, {'Content-Type' => 'text/awesome'}, 'yay'] } |
13 | 10 | stub.get('/reflect') { |env| [200, {}, env[:body]] } |
24 | 21 | end |
25 | 22 | end |
26 | 23 | |
24 | let!(:error_value) { 'invalid_token' } | |
25 | let!(:error_description_value) { 'bad bad token' } | |
26 | ||
27 | 27 | describe '#initialize' do |
28 | 28 | it 'assigns id and secret' do |
29 | 29 | expect(subject.id).to eq('abc') |
50 | 50 | |
51 | 51 | expect(builder).to receive(:adapter).with(:test) |
52 | 52 | |
53 | OAuth2::Client.new('abc', 'def') do |client| | |
53 | described_class.new('abc', 'def') do |client| | |
54 | 54 | client.adapter :test |
55 | 55 | end.connection |
56 | 56 | end |
60 | 60 | end |
61 | 61 | |
62 | 62 | it 'allows true/false for raise_errors option' do |
63 | client = OAuth2::Client.new('abc', 'def', :site => 'https://api.example.com', :raise_errors => false) | |
63 | client = described_class.new('abc', 'def', :site => 'https://api.example.com', :raise_errors => false) | |
64 | 64 | expect(client.options[:raise_errors]).to be false |
65 | client = OAuth2::Client.new('abc', 'def', :site => 'https://api.example.com', :raise_errors => true) | |
65 | client = described_class.new('abc', 'def', :site => 'https://api.example.com', :raise_errors => true) | |
66 | 66 | expect(client.options[:raise_errors]).to be true |
67 | 67 | end |
68 | 68 | |
69 | 69 | it 'allows override of raise_errors option' do |
70 | client = OAuth2::Client.new('abc', 'def', :site => 'https://api.example.com', :raise_errors => true) do |builder| | |
70 | client = described_class.new('abc', 'def', :site => 'https://api.example.com', :raise_errors => true) do |builder| | |
71 | 71 | builder.adapter :test do |stub| |
72 | 72 | stub.get('/notfound') { |env| [404, {}, nil] } |
73 | 73 | end |
79 | 79 | end |
80 | 80 | |
81 | 81 | it 'allows get/post for access_token_method option' do |
82 | client = OAuth2::Client.new('abc', 'def', :site => 'https://api.example.com', :access_token_method => :get) | |
82 | client = described_class.new('abc', 'def', :site => 'https://api.example.com', :access_token_method => :get) | |
83 | 83 | expect(client.options[:access_token_method]).to eq(:get) |
84 | client = OAuth2::Client.new('abc', 'def', :site => 'https://api.example.com', :access_token_method => :post) | |
84 | client = described_class.new('abc', 'def', :site => 'https://api.example.com', :access_token_method => :post) | |
85 | 85 | expect(client.options[:access_token_method]).to eq(:post) |
86 | 86 | end |
87 | 87 | |
88 | 88 | it 'does not mutate the opts hash argument' do |
89 | 89 | opts = {:site => 'http://example.com/'} |
90 | 90 | opts2 = opts.dup |
91 | OAuth2::Client.new 'abc', 'def', opts | |
91 | described_class.new 'abc', 'def', opts | |
92 | 92 | expect(opts).to eq(opts2) |
93 | 93 | end |
94 | 94 | end |
127 | 127 | end |
128 | 128 | |
129 | 129 | it 'does not add the redirect_uri param to the auth_code token exchange request' do |
130 | client = OAuth2::Client.new('abc', 'def', :site => 'https://api.example.com') do |builder| | |
130 | client = described_class.new('abc', 'def', :site => 'https://api.example.com') do |builder| | |
131 | 131 | builder.adapter :test do |stub| |
132 | 132 | stub.post('/oauth/token', auth_code_params) do |
133 | 133 | [200, {'Content-Type' => 'application/json'}, '{"access_token":"token"}'] |
146 | 146 | end |
147 | 147 | |
148 | 148 | it 'adds the redirect_uri param to the auth_code token exchange request' do |
149 | client = OAuth2::Client.new('abc', 'def', :redirect_uri => 'https://site.com/oauth/callback', :site => 'https://api.example.com') do |builder| | |
149 | client = described_class.new('abc', 'def', :redirect_uri => 'https://site.com/oauth/callback', :site => 'https://api.example.com') do |builder| | |
150 | 150 | builder.adapter :test do |stub| |
151 | 151 | stub.post('/oauth/token', auth_code_params.merge('redirect_uri' => 'https://site.com/oauth/callback')) do |
152 | 152 | [200, {'Content-Type' => 'application/json'}, '{"access_token":"token"}'] |
224 | 224 | it 're-encodes response body in the error message' do |
225 | 225 | begin |
226 | 226 | subject.request(:get, '/ascii_8bit_encoding') |
227 | rescue => ex | |
227 | rescue StandardError => ex | |
228 | 228 | expect(ex.message.encoding.name).to eq('UTF-8') |
229 | 229 | expect(ex.message).to eq("invalid_request: é\n{\"error\":\"invalid_request\",\"error_description\":\"��\"}") |
230 | 230 | end |
301 | 301 | |
302 | 302 | context 'with SSL options' do |
303 | 303 | subject do |
304 | cli = OAuth2::Client.new('abc', 'def', :site => 'https://api.example.com', :ssl => {:ca_file => 'foo.pem'}) | |
304 | cli = described_class.new('abc', 'def', :site => 'https://api.example.com', :ssl => {:ca_file => 'foo.pem'}) | |
305 | 305 | cli.connection.build do |b| |
306 | 306 | b.adapter :test |
307 | 307 | end |
0 | 0 | require 'helper' |
1 | 1 | |
2 | 2 | describe MACToken do |
3 | subject { described_class.new(client, token, 'abc123') } | |
4 | ||
3 | 5 | let(:token) { 'monkey' } |
4 | 6 | let(:client) do |
5 | 7 | Client.new('abc', 'def', :site => 'https://api.example.com') do |builder| |
11 | 13 | end |
12 | 14 | end |
13 | 15 | end |
14 | ||
15 | subject { MACToken.new(client, token, 'abc123') } | |
16 | 16 | |
17 | 17 | describe '#initialize' do |
18 | 18 | it 'assigns client and token' do |
29 | 29 | end |
30 | 30 | |
31 | 31 | it 'handles hmac-sha-256' do |
32 | mac = MACToken.new(client, token, 'abc123', :algorithm => 'hmac-sha-256') | |
32 | mac = described_class.new(client, token, 'abc123', :algorithm => 'hmac-sha-256') | |
33 | 33 | expect(mac.algorithm).to be_instance_of(OpenSSL::Digest::SHA256) |
34 | 34 | end |
35 | 35 | |
36 | 36 | it 'handles hmac-sha-1' do |
37 | mac = MACToken.new(client, token, 'abc123', :algorithm => 'hmac-sha-1') | |
37 | mac = described_class.new(client, token, 'abc123', :algorithm => 'hmac-sha-1') | |
38 | 38 | expect(mac.algorithm).to be_instance_of(OpenSSL::Digest::SHA1) |
39 | 39 | end |
40 | 40 | |
41 | 41 | it 'raises on improper algorithm' do |
42 | expect { MACToken.new(client, token, 'abc123', :algorithm => 'invalid-sha') }.to raise_error(ArgumentError) | |
42 | expect { described_class.new(client, token, 'abc123', :algorithm => 'invalid-sha') }.to raise_error(ArgumentError) | |
43 | 43 | end |
44 | 44 | end |
45 | 45 | |
56 | 56 | header = subject.header('get', 'https://www.example.com/hello') |
57 | 57 | duplicate_header = subject.header('get', 'https://www.example.com/hello') |
58 | 58 | |
59 | expect(header).to_not eq(duplicate_header) | |
59 | expect(header).not_to eq(duplicate_header) | |
60 | 60 | end |
61 | 61 | |
62 | 62 | it 'generates the proper format' do |
87 | 87 | end |
88 | 88 | |
89 | 89 | describe '.from_access_token' do |
90 | subject { described_class.from_access_token(access_token, 'hello') } | |
91 | ||
90 | 92 | let(:access_token) do |
91 | 93 | AccessToken.new( |
92 | 94 | client, token, |
96 | 98 | :random => 1 |
97 | 99 | ) |
98 | 100 | end |
99 | ||
100 | subject { MACToken.from_access_token(access_token, 'hello') } | |
101 | 101 | |
102 | 102 | it 'initializes client, token, and secret properly' do |
103 | 103 | expect(subject.client).to eq(client) |
22 | 22 | :status => 200, |
23 | 23 | :body => 'baz') |
24 | 24 | end |
25 | ||
25 | 26 | before do |
26 | OAuth2::Response.register_parser(:foobar, 'application/foo-bar') do |body| | |
27 | described_class.register_parser(:foobar, 'application/foo-bar') do |body| | |
27 | 28 | "foobar #{body}" |
28 | 29 | end |
29 | 30 | end |
30 | 31 | |
31 | 32 | it 'adds to the content types and parsers' do |
32 | expect(OAuth2::Response.send(:class_variable_get, :@@parsers).keys).to include(:foobar) | |
33 | expect(OAuth2::Response.send(:class_variable_get, :@@content_types).keys).to include('application/foo-bar') | |
33 | expect(described_class.send(:class_variable_get, :@@parsers).keys).to include(:foobar) | |
34 | expect(described_class.send(:class_variable_get, :@@content_types).keys).to include('application/foo-bar') | |
34 | 35 | end |
35 | 36 | |
36 | 37 | it 'is able to parse that content type automatically' do |
37 | expect(OAuth2::Response.new(response).parsed).to eq('foobar baz') | |
38 | expect(described_class.new(response).parsed).to eq('foobar baz') | |
38 | 39 | end |
39 | 40 | end |
40 | 41 | |
74 | 75 | end |
75 | 76 | end |
76 | 77 | |
77 | context 'xml parser registration' do | |
78 | context 'with xml parser registration' do | |
78 | 79 | it 'tries to load multi_xml and use it' do |
79 | expect(OAuth2::Response.send(:class_variable_get, :@@parsers)[:xml]).not_to be_nil | |
80 | expect(described_class.send(:class_variable_get, :@@parsers)[:xml]).not_to be_nil | |
80 | 81 | end |
81 | 82 | |
82 | 83 | it 'is able to parse xml' do |
84 | 85 | body = '<?xml version="1.0" standalone="yes" ?><foo><bar>baz</bar></foo>' |
85 | 86 | |
86 | 87 | response = double('response', :headers => headers, :body => body) |
87 | expect(OAuth2::Response.new(response).parsed).to eq('foo' => {'bar' => 'baz'}) | |
88 | expect(described_class.new(response).parsed).to eq('foo' => {'bar' => 'baz'}) | |
88 | 89 | end |
89 | 90 | end |
90 | 91 | end |
0 | 0 | require 'helper' |
1 | 1 | |
2 | 2 | describe OAuth2::Strategy::Assertion do |
3 | subject { client.assertion } | |
4 | ||
3 | 5 | let(:client) do |
4 | 6 | cli = OAuth2::Client.new('abc', 'def', :site => 'http://api.example.com') |
5 | 7 | cli.connection.build do |b| |
18 | 20 | end |
19 | 21 | |
20 | 22 | let(:params) { {:hmac_secret => 'foo'} } |
21 | ||
22 | subject { client.assertion } | |
23 | 23 | |
24 | 24 | describe '#authorize_url' do |
25 | 25 | it 'raises NotImplementedError' do |
2 | 2 | require 'helper' |
3 | 3 | |
4 | 4 | describe OAuth2::Strategy::AuthCode do |
5 | subject { client.auth_code } | |
6 | ||
5 | 7 | let(:code) { 'sushi' } |
6 | 8 | let(:kvform_token) { 'expires_in=600&access_token=salmon&refresh_token=trout&extra_param=steve' } |
7 | 9 | let(:facebook_token) { kvform_token.gsub('_in', '') } |
34 | 36 | end |
35 | 37 | end |
36 | 38 | |
37 | subject { client.auth_code } | |
38 | ||
39 | 39 | describe '#authorize_url' do |
40 | 40 | it 'includes the client_id' do |
41 | 41 | expect(subject.authorize_url).to include('client_id=abc') |
59 | 59 | client.options[:token_method] = :post |
60 | 60 | end |
61 | 61 | |
62 | it 'should not raise an error' do | |
63 | expect { subject.get_token(code) }.to_not raise_error | |
62 | it 'does not raise an error' do | |
63 | expect { subject.get_token(code) }.not_to raise_error | |
64 | 64 | end |
65 | 65 | |
66 | it 'should not create an error instance' do | |
67 | expect(OAuth2::Error).to_not receive(:new) | |
66 | it 'does not create an error instance' do | |
67 | expect(OAuth2::Error).not_to receive(:new) | |
68 | 68 | |
69 | 69 | subject.get_token(code) |
70 | 70 | end |
1 | 1 | |
2 | 2 | describe OAuth2::Strategy::Base do |
3 | 3 | it 'initializes with a Client' do |
4 | expect { OAuth2::Strategy::Base.new(OAuth2::Client.new('abc', 'def')) }.not_to raise_error | |
4 | expect { described_class.new(OAuth2::Client.new('abc', 'def')) }.not_to raise_error | |
5 | 5 | end |
6 | 6 | end |
0 | 0 | require 'helper' |
1 | 1 | |
2 | 2 | describe OAuth2::Strategy::ClientCredentials do |
3 | subject { client.client_credentials } | |
4 | ||
3 | 5 | let(:kvform_token) { 'expires_in=600&access_token=salmon&refresh_token=trout' } |
4 | 6 | let(:json_token) { '{"expires_in":600,"access_token":"salmon","refresh_token":"trout"}' } |
5 | 7 | |
27 | 29 | end |
28 | 30 | end |
29 | 31 | end |
30 | ||
31 | subject { client.client_credentials } | |
32 | 32 | |
33 | 33 | describe '#authorize_url' do |
34 | 34 | it 'raises NotImplementedError' do |
0 | 0 | require 'helper' |
1 | 1 | |
2 | 2 | describe OAuth2::Strategy::Implicit do |
3 | subject { client.implicit } | |
4 | ||
3 | 5 | let(:client) { OAuth2::Client.new('abc', 'def', :site => 'http://api.example.com') } |
4 | ||
5 | subject { client.implicit } | |
6 | 6 | |
7 | 7 | describe '#authorize_url' do |
8 | 8 | it 'includes the client_id' do |
0 | 0 | require 'helper' |
1 | 1 | |
2 | 2 | describe OAuth2::Strategy::Password do |
3 | subject { client.password } | |
4 | ||
3 | 5 | let(:client) do |
4 | 6 | cli = OAuth2::Client.new('abc', 'def', :site => 'http://api.example.com') |
5 | 7 | cli.connection.build do |b| |
16 | 18 | end |
17 | 19 | cli |
18 | 20 | end |
19 | subject { client.password } | |
20 | 21 | |
21 | 22 | describe '#authorize_url' do |
22 | 23 | it 'raises NotImplementedError' do |