omniauth-bike-index 1.0.1 → 1.0.2

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: 4904847b367892ffa7711c26f0ec6d6df8fd25d3
4
- data.tar.gz: 96c8d478c2e4845b5223a0756f27ff6cd051edcb
3
+ metadata.gz: 2b9f71d1accda40fe004527d75fb4dcb27405778
4
+ data.tar.gz: 1b835a88e689729fb5373def5334bb764beccfc2
5
5
  SHA512:
6
- metadata.gz: 7d6395ff98fdb48179672b1f425619952859bc96b2fff388cf22e668431aafe9e8a63a5de320061cc7676505d0afd4f4878bc470fc7d699e8c6ec4c5b4ddab54
7
- data.tar.gz: ad745ff6b887f1d01fbdffc4f3822c5fcc18c74b44b4c3a3c6c36d10dfaae9aeb507bbe679b2dfabbd6e257c0aba2c0bfdce981f6ff7f2573520494aed973be8
6
+ metadata.gz: e4c05ea146dc05cafbd9ffd7f64016435123337765bd4717cc44b88e1247c8ee5b3fc6892af701c2f6e0391ba84a3c6a9a9872511e201cf6f3f9dd77e1486a09
7
+ data.tar.gz: f649544f7a5b0db02764fefb79193a6076bdff68e465e5ba0ac91120a808ba52f953152447489df677d4661824d412ebd8fa70086fef966b2b978606ab848d97
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module BikeIndex
3
- VERSION = '1.0.1'
3
+ VERSION = "1.0.2"
4
4
  end
5
5
  end
@@ -1,43 +1,43 @@
1
- require 'omniauth-oauth2'
1
+ require "omniauth-oauth2"
2
2
 
3
3
  module OmniAuth
4
4
  module Strategies
5
5
  class BikeIndex < OmniAuth::Strategies::OAuth2
6
6
  option :name, :bike_index
7
- DEFAULT_SCOPE = 'public'
8
- option :client_options, site: 'https://bikeindex.org', authorize_url: '/oauth/authorize'
7
+ DEFAULT_SCOPE = "public"
8
+ option :client_options, site: "https://bikeindex.org", authorize_url: "/oauth/authorize"
9
9
 
10
- uid { raw_info['id'] }
10
+ uid { raw_info["id"] }
11
11
 
12
12
  info do
13
13
  prune!(
14
- 'nickname' => raw_info['user']['username'],
15
- 'bike_ids' => raw_info['bike_ids'],
16
- 'email' => raw_info['user']['email'],
17
- 'name' => raw_info['user']['name'],
18
- 'twitter' => raw_info['user']['twitter'],
19
- 'image' => raw_info['user']['image'],
14
+ "nickname" => raw_info["user"]["username"],
15
+ "bike_ids" => raw_info["bike_ids"],
16
+ "email" => raw_info["user"]["email"],
17
+ "name" => raw_info["user"]["name"],
18
+ "twitter" => raw_info["user"]["twitter"],
19
+ "image" => raw_info["user"]["image"],
20
20
  )
21
21
  end
22
22
 
23
23
  extra do
24
24
  hash = {}
25
- hash['raw_info'] = raw_info unless skip_info?
25
+ hash["raw_info"] = raw_info unless skip_info?
26
26
  prune! hash
27
27
  end
28
28
 
29
29
  def raw_info
30
- @raw_info ||= access_token.get('/api/v3/me').parsed || {}
30
+ @raw_info ||= access_token.get("/api/v3/me").parsed || {}
31
31
  end
32
32
 
33
33
  def request_phase
34
- options[:authorize_params] = { scope: (options['scope'] || DEFAULT_SCOPE) }
34
+ options[:authorize_params] = { scope: (options["scope"] || DEFAULT_SCOPE), partner: options["partner"] }
35
35
  super
36
36
  end
37
37
 
38
38
  # https://github.com/omniauth/omniauth-oauth2/issues/81
39
39
  def callback_url
40
- full_host + script_name + callback_path
40
+ full_host + script_name + callback_path
41
41
  end
42
42
 
43
43
  private
@@ -50,4 +50,4 @@ module OmniAuth
50
50
  end
51
51
  end
52
52
  end
53
- end
53
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-bike-index
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seth Herr
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-13 00:00:00.000000000 Z
11
+ date: 2018-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth