omniauth-bike-index 1.0.4 → 1.0.5

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
  SHA256:
3
- metadata.gz: ed476813826660c5afabb02e43fc77d9a423ed63dd9eeeb0864c2fd256876a46
4
- data.tar.gz: 161e4b546c49eaa0e54728593d3d597e1ec0372374615d9a9fed19e5d4256083
3
+ metadata.gz: 01d745f15c082b6b8906b5643f130d20f39bbc66b7425b563a2b12b3f85f17d1
4
+ data.tar.gz: 39c97a47c2950793af76588ad1697b49ae653fdd08714198162a7f97b4e8f6a2
5
5
  SHA512:
6
- metadata.gz: b19d2b3b2d040381ddba62e61ce7db388f54396958353f8c48f07597864fcf35c446aaf3948f83a48769910add600f91186f67c9a28322a62e576e0fd43a8742
7
- data.tar.gz: 990b71281d87975209be63f652e261fb24d2ec304c3b0217e1dc98ef1f7604a1f0f48bfd2ce177bc6f14b98fa90fc45a89106ebe6917080f642aa29029377f00
6
+ metadata.gz: 6dfcab4f77621d617a78870bd923379fdc2f311b33dab85549f8fc8df08668876d1d9d78671fbc4f2aeb4a42b52774e0826788a54acbca66b08630ea1d165b37
7
+ data.tar.gz: 4b53ab68270c7c2634bafecedc156314cc1023036e44e83a94b578f49a87eda4393ca15464983bd6490b251665a8d6128023fcc0be2324963ebb583a6ffc1608
data/.gitignore CHANGED
@@ -19,4 +19,7 @@ tmp
19
19
  .rspec
20
20
  .ruby-*
21
21
 
22
+ # ASDF ruby versions
23
+ .tool-versions
24
+
22
25
  info.markdown
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module BikeIndex
3
- VERSION = "1.0.4"
3
+ VERSION = "1.0.5"
4
4
  end
5
5
  end
@@ -31,11 +31,20 @@ module OmniAuth
31
31
  @raw_info ||= access_token.get("/api/v3/me").parsed || {}
32
32
  end
33
33
 
34
+ def param_or_option(key)
35
+ # omniauth.params are the parameters passed in to the URL
36
+ # (e.g. company in /users/auth/bike_index?company=Metro)
37
+ # So for partner, company and unauthenticated_redirect it tries those params, then goes from settings
38
+ session["omniauth.params"] && session["omniauth.params"][key] ||
39
+ option[key]
40
+ end
41
+
34
42
  def request_phase
35
43
  options[:authorize_params] = {
36
44
  scope: (options["scope"] || DEFAULT_SCOPE),
37
- partner: options["partner"],
38
- unauthenticated_redirect: options["unauthenticated_redirect"]
45
+ partner: param_or_option("partner"),
46
+ company: param_or_option("company"),
47
+ unauthenticated_redirect: param_or_option("unauthenticated_redirect")
39
48
  }
40
49
  super
41
50
  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.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seth Herr
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-31 00:00:00.000000000 Z
11
+ date: 2021-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth
@@ -104,8 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
104
  - !ruby/object:Gem::Version
105
105
  version: '0'
106
106
  requirements: []
107
- rubyforge_project:
108
- rubygems_version: 2.7.6.2
107
+ rubygems_version: 3.0.3
109
108
  signing_key:
110
109
  specification_version: 4
111
110
  summary: Bike Index strategy for OmniAuth