exvo-auth 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.0
1
+ 0.5.1
data/exvo-auth.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{exvo-auth}
8
- s.version = "0.5.0"
8
+ s.version = "0.5.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jacek Becela"]
@@ -30,4 +30,11 @@ class ExvoAuth::Strategies::Base < OmniAuth::Strategies::OAuth2
30
30
  'extra' => { 'user_hash' => user_data }
31
31
  })
32
32
  end
33
+
34
+ protected
35
+
36
+ # Have a better name? Let me know!
37
+ def unicorns_and_rainbows(hash)
38
+ hash.reject{|k, v| v.nil?}
39
+ end
33
40
  end
@@ -4,6 +4,9 @@ class ExvoAuth::Strategies::Interactive < ExvoAuth::Strategies::Base
4
4
  end
5
5
 
6
6
  def request_phase(options = {})
7
- super(:scope => request["scope"], :state => request["state"])
7
+ super(unicorns_and_rainbows(
8
+ :scope => request["scope"],
9
+ :state => request["state"]
10
+ ))
8
11
  end
9
12
  end
@@ -4,7 +4,11 @@ class ExvoAuth::Strategies::NonInteractive < ExvoAuth::Strategies::Base
4
4
  end
5
5
 
6
6
  def request_phase(options = {})
7
- redirect @client.non_interactive.authorize_url(:redirect_uri => callback_url, :scope => request["scope"], :state => request["state"])
7
+ redirect @client.non_interactive.authorize_url(unicorns_and_rainbows(
8
+ :redirect_uri => callback_url,
9
+ :scope => request["scope"],
10
+ :state => request["state"]
11
+ ))
8
12
  end
9
13
 
10
14
  def callback_url
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 5
8
- - 0
9
- version: 0.5.0
8
+ - 1
9
+ version: 0.5.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jacek Becela