exvo-auth 0.3.4 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/exvo-auth.gemspec +2 -2
- data/lib/exvo_auth/config.rb +16 -0
- data/lib/exvo_auth/controllers/rails.rb +1 -1
- data/lib/exvo_auth/strategies/base.rb +6 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.4.0
|
data/exvo-auth.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{exvo-auth}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.4.0"
|
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"]
|
12
|
-
s.date = %q{2010-07-
|
12
|
+
s.date = %q{2010-07-08}
|
13
13
|
s.description = %q{Sign in with Exvo account}
|
14
14
|
s.email = %q{jacek.becela@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/exvo_auth/config.rb
CHANGED
@@ -14,4 +14,20 @@ module ExvoAuth::Config
|
|
14
14
|
def self.callback_key=(callback_key)
|
15
15
|
@@callback_key = callback_key
|
16
16
|
end
|
17
|
+
|
18
|
+
def self.client_id=(client_id)
|
19
|
+
@@client_id = client_id
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.client_id
|
23
|
+
@@client_id
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.client_secret=(client_secret)
|
27
|
+
@@client_secret = client_secret
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.client_secret
|
31
|
+
@@client_secret
|
32
|
+
end
|
17
33
|
end
|
@@ -2,7 +2,7 @@ module ExvoAuth::Controllers::Rails
|
|
2
2
|
def self.included(base)
|
3
3
|
base.send :include, ExvoAuth::Controllers::Base
|
4
4
|
base.send :include, InstanceMethods
|
5
|
-
base.helper_method :current_user, :signed_in?, :sign_in_path, :sign_up_path
|
5
|
+
base.helper_method :current_user, :signed_in?, :sign_in_path, :sign_up_path, :sign_out_url
|
6
6
|
end
|
7
7
|
|
8
8
|
module InstanceMethods
|
@@ -1,6 +1,11 @@
|
|
1
1
|
class ExvoAuth::Strategies::Base < OmniAuth::Strategies::OAuth2
|
2
|
-
def initialize(app, name, app_id, app_secret, options = {})
|
2
|
+
def initialize(app, name, app_id = ExvoAuth::Config.client_id, app_secret = ExvoAuth::Config.client_secret, options = {})
|
3
3
|
options[:site] ||= ExvoAuth::Config.host
|
4
|
+
|
5
|
+
if options[:site].nil? || app_id.nil? || app_secret.nil?
|
6
|
+
raise(ArgumentError, "Please configure host, client_id and client_secret")
|
7
|
+
end
|
8
|
+
|
4
9
|
super(app, name, app_id, app_secret, options)
|
5
10
|
end
|
6
11
|
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
- 3
|
8
7
|
- 4
|
9
|
-
|
8
|
+
- 0
|
9
|
+
version: 0.4.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Jacek Becela
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-07-
|
17
|
+
date: 2010-07-08 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|