exvo-auth 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.0
1
+ 0.4.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.4.0"
8
+ s.version = "0.4.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"]
@@ -1,12 +1,14 @@
1
1
  class ExvoAuth::Strategies::Base < OmniAuth::Strategies::OAuth2
2
- def initialize(app, name, app_id = ExvoAuth::Config.client_id, app_secret = ExvoAuth::Config.client_secret, options = {})
3
- options[:site] ||= ExvoAuth::Config.host
2
+ def initialize(app, name, options = {})
3
+ options[:site] ||= ExvoAuth::Config.host
4
+ options[:client_id] ||= ExvoAuth::Config.client_id
5
+ options[:client_secret] ||= ExvoAuth::Config.client_secret
4
6
 
5
- if options[:site].nil? || app_id.nil? || app_secret.nil?
7
+ if options[:site].nil? || options[:client_id].nil? || options[:client_secret].nil?
6
8
  raise(ArgumentError, "Please configure host, client_id and client_secret")
7
9
  end
8
10
 
9
- super(app, name, app_id, app_secret, options)
11
+ super(app, name, options.delete(:client_id), options.delete(:client_secret), options)
10
12
  end
11
13
 
12
14
  def user_data
@@ -1,6 +1,6 @@
1
1
  class ExvoAuth::Strategies::Interactive < ExvoAuth::Strategies::Base
2
- def initialize(app, app_id, app_secret, options = {})
3
- super(app, :interactive, app_id, app_secret, options)
2
+ def initialize(app, options = {})
3
+ super(app, :interactive, options)
4
4
  end
5
5
 
6
6
  def request_phase(options = {})
@@ -1,6 +1,6 @@
1
1
  class ExvoAuth::Strategies::NonInteractive < ExvoAuth::Strategies::Base
2
- def initialize(app, app_id, app_secret, options = {})
3
- super(app, :non_interactive, app_id, app_secret, options)
2
+ def initialize(app, options = {})
3
+ super(app, :non_interactive, options)
4
4
  end
5
5
 
6
6
  def request_phase(options = {})
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 4
8
- - 0
9
- version: 0.4.0
8
+ - 1
9
+ version: 0.4.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jacek Becela