omniauth-oauth2 1.3.1 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 414a1411316ba3f8463a30120106b6a89bb62c50
4
- data.tar.gz: 6c2e2383286d4f5ed5e86daf82d74dda2611d716
3
+ metadata.gz: 0e32b47809789079fefb676477c2068c5847c8c9
4
+ data.tar.gz: 8bff0bfc6b4a45c5da7cb3a9eb93d3c20cacd4f2
5
5
  SHA512:
6
- metadata.gz: b62f9e18f9b832f556de30b1a3f085c26266dbd108c9244d441320960e4e0e6e30fb3e9ffe5addf1adf687cab8999f255c0351e3efb2a2daef1cc21e450c1f1f
7
- data.tar.gz: b83fb3b97ef73310a898d204eed6f6501eba58535eb8829129a239f2a349ea0620cb78477697f1a75e3fcf1d600f40763340dcb27be80c12c7aff382949fce16
6
+ metadata.gz: b5ffee16532d167a95ad5cf152cdddb219365da8ef87c6ff34c943cc999e02e25b0db2fb43a9067ec11659ad39108ebd1930aa44f55a94bcb5aba05befd3e427
7
+ data.tar.gz: 4417d7eedb1880ba3af05f2cddedcfc894dc1f286b0760d98433dfffcbf51eff8725c371e6fd1f82ddb7a73d13fa87ee753e1fee03ee26a6dbed48ca6aee3884
data/.rubocop.yml CHANGED
@@ -1,3 +1,9 @@
1
+ Layout/AccessModifierIndentation:
2
+ EnforcedStyle: outdent
3
+
4
+ Layout/SpaceInsideHashLiteralBraces:
5
+ EnforcedStyle: no_space
6
+
1
7
  Metrics/BlockNesting:
2
8
  Max: 2
3
9
 
@@ -13,9 +19,6 @@ Metrics/ParameterLists:
13
19
  Max: 4
14
20
  CountKeywordArgs: true
15
21
 
16
- Style/AccessModifierIndentation:
17
- EnforcedStyle: outdent
18
-
19
22
  Style/CollectionMethods:
20
23
  PreferredMethods:
21
24
  map: 'collect'
@@ -29,14 +32,24 @@ Style/Documentation:
29
32
  Style/DoubleNegation:
30
33
  Enabled: false
31
34
 
35
+ Style/ExpandPathArguments:
36
+ Enabled: false
37
+
32
38
  Style/HashSyntax:
33
39
  EnforcedStyle: hash_rockets
34
40
 
35
- Style/SpaceInsideHashLiteralBraces:
36
- EnforcedStyle: no_space
41
+ Style/StderrPuts:
42
+ Enabled: false
37
43
 
38
44
  Style/StringLiterals:
39
45
  EnforcedStyle: double_quotes
40
46
 
41
- Style/TrailingComma:
42
- EnforcedStyleForMultiline: 'comma'
47
+ Style/TrailingCommaInArguments:
48
+ EnforcedStyleForMultiline: comma
49
+
50
+ Style/TrailingCommaInHashLiteral:
51
+ EnforcedStyleForMultiline: comma
52
+
53
+ Style/TrailingCommaInArrayLiteral:
54
+ EnforcedStyleForMultiline: comma
55
+
data/.travis.yml CHANGED
@@ -1,18 +1,19 @@
1
- before_install: gem install bundler
1
+ bundler_args: --without development
2
+ before_install:
3
+ - gem update --system
4
+ - gem update bundler
5
+ cache: bundler
2
6
  env:
3
7
  global:
4
8
  - JRUBY_OPTS="$JRUBY_OPTS --debug"
5
9
  language: ruby
6
10
  rvm:
7
- - 1.8.7
8
- - 1.9.3
9
- - 2.0.0
10
- - 2.1
11
- - 2.2
12
- - jruby-18mode
13
- - jruby-19mode
11
+ - jruby-9000
12
+ - 2.2.9
13
+ - 2.3.5
14
+ - 2.4.4
15
+ - 2.5.3
14
16
  - jruby-head
15
- - rbx-2
16
17
  - ruby-head
17
18
  matrix:
18
19
  allow_failures:
data/Gemfile CHANGED
@@ -1,17 +1,18 @@
1
- source "http://rubygems.org"
1
+ source "https://rubygems.org"
2
2
 
3
- gem "rake"
3
+ gem "rake", "~> 12.0"
4
4
 
5
5
  group :test do
6
+ gem "addressable", "~> 2.3.8", :platforms => %i[jruby ruby_18]
6
7
  gem "coveralls"
7
- gem "json", :platforms => [:jruby, :ruby_18, :ruby_19]
8
- gem "mime-types", "~> 1.25", :platforms => [:jruby, :ruby_18]
8
+ gem "json", :platforms => %i[jruby ruby_18 ruby_19]
9
+ gem "mime-types", "~> 1.25", :platforms => %i[jruby ruby_18]
9
10
  gem "rack-test"
10
- gem "rest-client", "~> 1.6.0", :platforms => [:jruby, :ruby_18]
11
+ gem "rest-client", "~> 1.8.0", :platforms => %i[jruby ruby_18]
11
12
  gem "rspec", "~> 3.2"
12
- gem "rubocop", ">= 0.30", :platforms => [:ruby_19, :ruby_20, :ruby_21, :ruby_22]
13
+ gem "rubocop", ">= 0.51", :platforms => %i[ruby_19 ruby_20 ruby_21 ruby_22 ruby_23 ruby_24]
13
14
  gem "simplecov", ">= 0.9"
14
- gem "webmock"
15
+ gem "webmock", "~> 3.0"
15
16
  end
16
17
 
17
18
  # Specify your gem's dependencies in omniauth-oauth2.gemspec
data/README.md CHANGED
@@ -1,16 +1,17 @@
1
1
  # OmniAuth OAuth2
2
2
 
3
3
  [![Gem Version](http://img.shields.io/gem/v/omniauth-oauth2.svg)][gem]
4
- [![Build Status](http://img.shields.io/travis/intridea/omniauth-oauth2.svg)][travis]
5
- [![Dependency Status](http://img.shields.io/gemnasium/intridea/omniauth-oauth2.svg)][gemnasium]
4
+ [![Build Status](http://img.shields.io/travis/omniauth/omniauth-oauth2.svg)][travis]
5
+ [![Dependency Status](http://img.shields.io/gemnasium/omniauth/omniauth-oauth2.svg)][gemnasium]
6
6
  [![Code Climate](http://img.shields.io/codeclimate/github/intridea/omniauth-oauth2.svg)][codeclimate]
7
7
  [![Coverage Status](http://img.shields.io/coveralls/intridea/omniauth-oauth2.svg)][coveralls]
8
+ [![Security](https://hakiri.io/github/omniauth/omniauth-oauth2/master.svg)](https://hakiri.io/github/omniauth/omniauth-oauth2/master)
8
9
 
9
10
  [gem]: https://rubygems.org/gems/omniauth-oauth2
10
- [travis]: http://travis-ci.org/intridea/omniauth-oauth2
11
- [gemnasium]: https://gemnasium.com/intridea/omniauth-oauth2
12
- [codeclimate]: https://codeclimate.com/github/intridea/omniauth-oauth2
13
- [coveralls]: https://coveralls.io/r/intridea/omniauth-oauth2
11
+ [travis]: http://travis-ci.org/omniauth/omniauth-oauth2
12
+ [gemnasium]: https://gemnasium.com/github.com/omniauth/omniauth-oauth2
13
+ [codeclimate]: https://codeclimate.com/github/omniauth/omniauth-oauth2
14
+ [coveralls]: https://coveralls.io/r/omniauth/omniauth-oauth2
14
15
 
15
16
  This gem contains a generic OAuth2 strategy for OmniAuth. It is meant to serve
16
17
  as a building block strategy for other strategies and not to be used
@@ -64,4 +65,3 @@ end
64
65
 
65
66
  That's pretty much it!
66
67
 
67
- [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/intridea/omniauth-oauth2/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
data/Rakefile CHANGED
@@ -15,4 +15,4 @@ rescue LoadError
15
15
  end
16
16
  end
17
17
 
18
- task :default => [:spec, :rubocop]
18
+ task :default => %i[spec rubocop]
@@ -18,7 +18,7 @@ module OmniAuth
18
18
  OmniAuth::Strategy.included(subclass)
19
19
  end
20
20
 
21
- args [:client_id, :client_secret]
21
+ args %i[client_id client_secret]
22
22
 
23
23
  option :client_id, nil
24
24
  option :client_secret, nil
@@ -36,15 +36,11 @@ module OmniAuth
36
36
  ::OAuth2::Client.new(options.client_id, options.client_secret, deep_symbolize(options.client_options))
37
37
  end
38
38
 
39
- def callback_url
40
- full_host + script_name + callback_path
41
- end
42
-
43
39
  credentials do
44
40
  hash = {"token" => access_token.token}
45
- hash.merge!("refresh_token" => access_token.refresh_token) if access_token.expires? && access_token.refresh_token
46
- hash.merge!("expires_at" => access_token.expires_at) if access_token.expires?
47
- hash.merge!("expires" => access_token.expires?)
41
+ hash["refresh_token"] = access_token.refresh_token if access_token.expires? && access_token.refresh_token
42
+ hash["expires_at"] = access_token.expires_at if access_token.expires?
43
+ hash["expires"] = access_token.expires?
48
44
  hash
49
45
  end
50
46
 
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module OAuth2
3
- VERSION = "1.3.1"
3
+ VERSION = "1.6.0".freeze
4
4
  end
5
5
  end
@@ -3,22 +3,22 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
  require "omniauth-oauth2/version"
4
4
 
5
5
  Gem::Specification.new do |gem|
6
- gem.add_dependency "oauth2", "~> 1.0"
7
- gem.add_dependency "omniauth", "~> 1.2"
6
+ gem.add_dependency "oauth2", "~> 1.1"
7
+ gem.add_dependency "omniauth", "~> 1.9"
8
8
 
9
9
  gem.add_development_dependency "bundler", "~> 1.0"
10
10
 
11
- gem.authors = ["Michael Bleigh", "Erik Michaels-Ober"]
12
- gem.email = ["michael@intridea.com", "sferik@gmail.com"]
11
+ gem.authors = ["Michael Bleigh", "Erik Michaels-Ober", "Tom Milewski"]
12
+ gem.email = ["michael@intridea.com", "sferik@gmail.com", "tmilewski@gmail.com"]
13
13
  gem.description = "An abstract OAuth2 strategy for OmniAuth."
14
14
  gem.summary = gem.description
15
- gem.homepage = "https://github.com/intridea/omniauth-oauth2"
16
- gem.licenses = %w(MIT)
15
+ gem.homepage = "https://github.com/omniauth/omniauth-oauth2"
16
+ gem.licenses = %w[MIT]
17
17
 
18
18
  gem.executables = `git ls-files -- bin/*`.split("\n").collect { |f| File.basename(f) }
19
19
  gem.files = `git ls-files`.split("\n")
20
20
  gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
21
21
  gem.name = "omniauth-oauth2"
22
- gem.require_paths = %w(lib)
22
+ gem.require_paths = %w[lib]
23
23
  gem.version = OmniAuth::OAuth2::VERSION
24
24
  end
@@ -1,6 +1,6 @@
1
1
  require "helper"
2
2
 
3
- describe OmniAuth::Strategies::OAuth2 do
3
+ describe OmniAuth::Strategies::OAuth2 do # rubocop:disable Metrics/BlockLength
4
4
  def app
5
5
  lambda do |_env|
6
6
  [200, {}, ["Hello."]]
@@ -49,7 +49,7 @@ describe OmniAuth::Strategies::OAuth2 do
49
49
  end
50
50
 
51
51
  it "includes top-level options that are marked as :authorize_options" do
52
- instance = subject.new("abc", "def", :authorize_options => [:scope, :foo, :state], :scope => "bar", :foo => "baz")
52
+ instance = subject.new("abc", "def", :authorize_options => %i[scope foo state], :scope => "bar", :foo => "baz")
53
53
  expect(instance.authorize_params["scope"]).to eq("bar")
54
54
  expect(instance.authorize_params["foo"]).to eq("baz")
55
55
  end
@@ -70,7 +70,7 @@ describe OmniAuth::Strategies::OAuth2 do
70
70
  end
71
71
 
72
72
  it "includes top-level options that are marked as :authorize_options" do
73
- instance = subject.new("abc", "def", :token_options => [:scope, :foo], :scope => "bar", :foo => "baz")
73
+ instance = subject.new("abc", "def", :token_options => %i[scope foo], :scope => "bar", :foo => "baz")
74
74
  expect(instance.token_params).to eq("scope" => "bar", "foo" => "baz")
75
75
  end
76
76
  end
metadata CHANGED
@@ -1,15 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-oauth2
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Bleigh
8
8
  - Erik Michaels-Ober
9
+ - Tom Milewski
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2015-06-22 00:00:00.000000000 Z
13
+ date: 2018-12-14 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: oauth2
@@ -17,28 +18,28 @@ dependencies:
17
18
  requirements:
18
19
  - - "~>"
19
20
  - !ruby/object:Gem::Version
20
- version: '1.0'
21
+ version: '1.1'
21
22
  type: :runtime
22
23
  prerelease: false
23
24
  version_requirements: !ruby/object:Gem::Requirement
24
25
  requirements:
25
26
  - - "~>"
26
27
  - !ruby/object:Gem::Version
27
- version: '1.0'
28
+ version: '1.1'
28
29
  - !ruby/object:Gem::Dependency
29
30
  name: omniauth
30
31
  requirement: !ruby/object:Gem::Requirement
31
32
  requirements:
32
33
  - - "~>"
33
34
  - !ruby/object:Gem::Version
34
- version: '1.2'
35
+ version: '1.9'
35
36
  type: :runtime
36
37
  prerelease: false
37
38
  version_requirements: !ruby/object:Gem::Requirement
38
39
  requirements:
39
40
  - - "~>"
40
41
  - !ruby/object:Gem::Version
41
- version: '1.2'
42
+ version: '1.9'
42
43
  - !ruby/object:Gem::Dependency
43
44
  name: bundler
44
45
  requirement: !ruby/object:Gem::Requirement
@@ -57,6 +58,7 @@ description: An abstract OAuth2 strategy for OmniAuth.
57
58
  email:
58
59
  - michael@intridea.com
59
60
  - sferik@gmail.com
61
+ - tmilewski@gmail.com
60
62
  executables: []
61
63
  extensions: []
62
64
  extra_rdoc_files: []
@@ -75,7 +77,7 @@ files:
75
77
  - omniauth-oauth2.gemspec
76
78
  - spec/helper.rb
77
79
  - spec/omniauth/strategies/oauth2_spec.rb
78
- homepage: https://github.com/intridea/omniauth-oauth2
80
+ homepage: https://github.com/omniauth/omniauth-oauth2
79
81
  licenses:
80
82
  - MIT
81
83
  metadata: {}
@@ -95,7 +97,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
95
97
  version: '0'
96
98
  requirements: []
97
99
  rubyforge_project:
98
- rubygems_version: 2.4.8
100
+ rubygems_version: 2.6.11
99
101
  signing_key:
100
102
  specification_version: 4
101
103
  summary: An abstract OAuth2 strategy for OmniAuth.