omniauth-oauth2 1.4.0 → 1.5.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: c67fe41a9f73381bfe2508f48a5d7631db4d52b3
4
- data.tar.gz: 42be96f41a3a53ef47ee01818bf4785ac8ec2dc1
3
+ metadata.gz: b10f5718de27b490cf3d5ec7f353540ffba5f502
4
+ data.tar.gz: 83c8192af6408344b0735c4ed30418f6f0377c61
5
5
  SHA512:
6
- metadata.gz: 967e76c8a0654283e0e0610c1260781736475d945e4fac63262c1acd900f4a70828dad325e73949578b39d902649e4ce920f6b41dc6b6e809d407e706abb779f
7
- data.tar.gz: bf0a2d0579591dc2e9793b72c02ca6bc20729b4e18bbee3041c0e0a054ef50a18218d30456a104b50b1e438a94fe36ba0b4f570b89bdca8b6452e6d4b4b1db6a
6
+ metadata.gz: 95f86ca6fcc8adc4fcddd16ac2a9e19ae70a3b5545021527c6620e56994d6ce2113dcda3aca61b26fbb120337c723eabddb3b2d5ae3e27f019d24bcf1a1b5487
7
+ data.tar.gz: 0a9dbce2fa3424a19bd12cdd1e9f8ad4a5987f594742b5023ad7cbb5558464a4596e45035e946e5213f495db51a57345ec8f65d7abe287ab6d2332f0e728f014
@@ -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'
@@ -32,11 +35,14 @@ Style/DoubleNegation:
32
35
  Style/HashSyntax:
33
36
  EnforcedStyle: hash_rockets
34
37
 
35
- Style/SpaceInsideHashLiteralBraces:
36
- EnforcedStyle: no_space
38
+ Style/StderrPuts:
39
+ Enabled: false
37
40
 
38
41
  Style/StringLiterals:
39
42
  EnforcedStyle: double_quotes
40
43
 
41
- Style/TrailingComma:
42
- EnforcedStyleForMultiline: 'comma'
44
+ Style/TrailingCommaInArguments:
45
+ EnforcedStyleForMultiline: comma
46
+
47
+ Style/TrailingCommaInLiteral:
48
+ EnforcedStyleForMultiline: comma
@@ -4,15 +4,12 @@ env:
4
4
  - JRUBY_OPTS="$JRUBY_OPTS --debug"
5
5
  language: ruby
6
6
  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
7
+ - jruby-9000
8
+ - 2.1.10 # EOL Soon
9
+ - 2.2.6
10
+ - 2.3.3
11
+ - 2.4.0
14
12
  - jruby-head
15
- - rbx-2
16
13
  - ruby-head
17
14
  matrix:
18
15
  allow_failures:
data/Gemfile CHANGED
@@ -1,17 +1,18 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- gem "rake"
3
+ gem "rake", "~> 10.5"
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.7.3", :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", "~> 1.0"
15
16
  end
16
17
 
17
18
  # Specify your gem's dependencies in omniauth-oauth2.gemspec
data/README.md CHANGED
@@ -1,8 +1,8 @@
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
8
 
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]
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module OAuth2
3
- VERSION = "1.4.0"
3
+ VERSION = "1.5.0".freeze
4
4
  end
5
5
  end
@@ -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
@@ -38,9 +38,9 @@ module OmniAuth
38
38
 
39
39
  credentials do
40
40
  hash = {"token" => access_token.token}
41
- hash.merge!("refresh_token" => access_token.refresh_token) if access_token.expires? && access_token.refresh_token
42
- hash.merge!("expires_at" => access_token.expires_at) if access_token.expires?
43
- 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?
44
44
  hash
45
45
  end
46
46
 
@@ -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"
6
+ gem.add_dependency "oauth2", "~> 1.1"
7
7
  gem.add_dependency "omniauth", "~> 1.2"
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.4.0
4
+ version: 1.5.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-10-21 00:00:00.000000000 Z
13
+ date: 2017-12-13 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: oauth2
@@ -17,14 +18,14 @@ 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
@@ -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.