omniauth-bonnier-oauth2 1.0.0 → 1.1.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: e5bf7cb54d4c4958d7767badfc50b97f5a8fea08
4
- data.tar.gz: ca8ffcd6108045ee9a3dbfb441160d8fa6f726f5
3
+ metadata.gz: be3ca573b622bd4c02f3e84fb559d344aa770cd0
4
+ data.tar.gz: 398ade077628d8911763c3acc533a90a9d93f516
5
5
  SHA512:
6
- metadata.gz: d0cce74da31b15794eb431f5478e53e0158134284a125f765fbfa237c363883375b4ac3860c69391ae58ba08b6c3b1f0be34bcf3c85325f64a3708491127e93b
7
- data.tar.gz: 796b450625006908a24895a617902ea0688aa01e4f1a1132b144512ab9846d0507d408b21ffa900a209f387ef51def72f6b83837daafae458fdf123dbba6c9f4
6
+ metadata.gz: e7ca0c28413038b10019d58b495e11ce0250634d594750c25a91bf34e973551e3193b6da2f3fe5935fe50814d3cd841d23a68d52ffa6da6058ada08e850f63f2
7
+ data.tar.gz: 8564eb1b867c8e7a5ca838ef54700d42114003a05a0a07e489298503f63fdfaa606c088976f1064881c4ad0b5edfdb3dec6253d63315967cd48c85f16815083a
data/.gitignore ADDED
@@ -0,0 +1 @@
1
+ /pkg
data/.ruby-gemset ADDED
@@ -0,0 +1 @@
1
+ omniauth-bonnier-oauth2
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.2.0
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- omniauth-bonnier-oauth2 (0.0.1)
4
+ omniauth-bonnier-oauth2 (1.1.0)
5
5
  omniauth-oauth2
6
6
 
7
7
  GEM
@@ -12,10 +12,10 @@ GEM
12
12
  safe_yaml (~> 1.0.0)
13
13
  diff-lcs (1.2.5)
14
14
  docile (1.1.5)
15
- faraday (0.9.0)
15
+ faraday (0.9.1)
16
16
  multipart-post (>= 1.2, < 3)
17
- hashie (3.3.2)
18
- jwt (1.2.0)
17
+ hashie (3.4.1)
18
+ jwt (1.4.1)
19
19
  multi_json (1.10.1)
20
20
  multi_xml (0.5.5)
21
21
  multipart-post (2.0.0)
@@ -59,6 +59,7 @@ PLATFORMS
59
59
  ruby
60
60
 
61
61
  DEPENDENCIES
62
+ bundler
62
63
  omniauth-bonnier-oauth2!
63
64
  rack-test
64
65
  rake
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module BonnierOauth2
3
- VERSION = "1.0.0"
3
+ VERSION = "1.1.0"
4
4
  end
5
5
  end
@@ -1 +1 @@
1
- require File.join('omniauth', 'strategies', 'bonnier_oauth2')
1
+ require 'omniauth/strategies/bonnier_oauth2'
@@ -3,9 +3,11 @@ require 'omniauth-oauth2'
3
3
  module OmniAuth
4
4
  module Strategies
5
5
  class BonnierOauth2 < OmniAuth::Strategies::OAuth2
6
+ args [:client_id, :client_secret, :site]
7
+
8
+ option :site
6
9
  option :name, "bonnier_oauth2"
7
10
  option :client_options, {
8
- :site => 'http://localhost:3000',
9
11
  :authorize_url => '/api/oauth/authorize',
10
12
  :token_url => '/api/oauth/token'
11
13
  }
@@ -29,6 +31,10 @@ module OmniAuth
29
31
  def raw_info
30
32
  @raw_info ||= access_token.get('/api/v2/users/current.json').parsed
31
33
  end
34
+
35
+ def client
36
+ ::OAuth2::Client.new(options.client_id, options.client_secret, deep_symbolize(options.client_options).merge(site: options.site))
37
+ end
32
38
  end
33
39
  end
34
40
  end
@@ -1 +1 @@
1
- require File.join('omniauth', 'bonnier_oauth2')
1
+ require 'omniauth/bonnier_oauth2'
@@ -17,6 +17,7 @@ Gem::Specification.new do |s|
17
17
  s.add_development_dependency 'rack-test'
18
18
  s.add_development_dependency 'simplecov'
19
19
  s.add_development_dependency 'webmock'
20
+ s.add_development_dependency 'bundler'
20
21
  s.executables = `git ls-files -- bin/*`.split("\n").map{|f| File.basename(f)}
21
22
  s.files = `git ls-files`.split("\n")
22
23
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-bonnier-oauth2
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bonnier Publications - Interactive
@@ -94,13 +94,30 @@ dependencies:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: bundler
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
97
111
  description: Bonnier OAuth2 strategy for OmniAuth 1.x
98
112
  email:
99
113
  executables: []
100
114
  extensions: []
101
115
  extra_rdoc_files: []
102
116
  files:
117
+ - ".gitignore"
103
118
  - ".rspec"
119
+ - ".ruby-gemset"
120
+ - ".ruby-version"
104
121
  - Gemfile
105
122
  - Gemfile.lock
106
123
  - README.md