sorcery 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of sorcery might be problematic. Click here for more details.
- data/Gemfile.lock +1 -1
- data/README.rdoc +3 -1
- data/VERSION +1 -1
- data/lib/sorcery/controller/submodules/oauth.rb +3 -6
- data/lib/sorcery/controller/submodules/oauth/oauth1.rb +1 -0
- data/lib/sorcery/controller/submodules/oauth/oauth2.rb +1 -0
- data/lib/sorcery/model/submodules/oauth.rb +1 -1
- data/sorcery.gemspec +2 -2
- data/spec/Gemfile +1 -1
- data/spec/Gemfile.lock +2 -2
- data/spec/rails3/app_root/Gemfile +1 -1
- data/spec/rails3/app_root/Gemfile.lock +2 -2
- data/spec/rails3/app_root/spec/controller_oauth2_spec.rb +2 -2
- data/spec/rails3/app_root/spec/controller_oauth_spec.rb +2 -2
- metadata +2 -2
data/Gemfile.lock
CHANGED
data/README.rdoc
CHANGED
@@ -22,7 +22,9 @@ Hopefully, I've achieved this. If not, let me know.
|
|
22
22
|
|
23
23
|
Example app using sorcery: https://github.com/NoamB/sorcery-example-app
|
24
24
|
|
25
|
-
Documentation: http://rubydoc.info/gems/sorcery/0.
|
25
|
+
Documentation: http://rubydoc.info/gems/sorcery/0.2.0/frames
|
26
|
+
|
27
|
+
Check out the tutorials in the github wiki!
|
26
28
|
|
27
29
|
== Full Features List by module:
|
28
30
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.1
|
@@ -10,12 +10,9 @@ module Sorcery
|
|
10
10
|
Config.module_eval do
|
11
11
|
class << self
|
12
12
|
attr_reader :oauth_providers # oauth providers like twitter.
|
13
|
-
|
14
|
-
attr_accessor :authentications_class
|
15
|
-
|
13
|
+
|
16
14
|
def merge_oauth_defaults!
|
17
|
-
@defaults.merge!(:@oauth_providers => []
|
18
|
-
:@authentications_class => nil)
|
15
|
+
@defaults.merge!(:@oauth_providers => [])
|
19
16
|
end
|
20
17
|
|
21
18
|
def oauth_providers=(providers)
|
@@ -84,7 +81,7 @@ module Sorcery
|
|
84
81
|
end
|
85
82
|
Config.user_class.transaction do
|
86
83
|
@user = Config.user_class.create!(attrs)
|
87
|
-
Config.authentications_class.create!({config.authentications_user_id_attribute_name => @user.id, config.provider_attribute_name => provider, config.provider_uid_attribute_name => @user_hash[:uid]})
|
84
|
+
Config.user_class.sorcery_config.authentications_class.create!({config.authentications_user_id_attribute_name => @user.id, config.provider_attribute_name => provider, config.provider_uid_attribute_name => @user_hash[:uid]})
|
88
85
|
end
|
89
86
|
@user
|
90
87
|
end
|
@@ -22,7 +22,7 @@ module Sorcery
|
|
22
22
|
end
|
23
23
|
|
24
24
|
base.sorcery_config.instance_eval do
|
25
|
-
@defaults.merge!(:@authentications_class =>
|
25
|
+
@defaults.merge!(:@authentications_class => nil,
|
26
26
|
:@authentications_user_id_attribute_name => :user_id,
|
27
27
|
:@provider_attribute_name => :provider,
|
28
28
|
:@provider_uid_attribute_name => :uid)
|
data/sorcery.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{sorcery}
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Noam Ben Ari"]
|
12
|
-
s.date = %q{2011-03-
|
12
|
+
s.date = %q{2011-03-15}
|
13
13
|
s.description = %q{Provides common authentication needs such as signing in/out, activating by email and resetting password.}
|
14
14
|
s.email = %q{nbenari@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
data/spec/Gemfile
CHANGED
data/spec/Gemfile.lock
CHANGED
@@ -2,7 +2,7 @@ source 'http://rubygems.org'
|
|
2
2
|
|
3
3
|
gem 'rails', '3.0.3'
|
4
4
|
gem 'sqlite3-ruby', :require => 'sqlite3'
|
5
|
-
gem "sorcery", '0.1
|
5
|
+
gem "sorcery", '0.2.1', :path => '../../../'
|
6
6
|
gem 'bcrypt-ruby', '~> 2.1.4', :require => 'bcrypt'
|
7
7
|
gem 'oauth', ">= 0.4.4"
|
8
8
|
gem 'oauth2', ">= 0.1.1"
|
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ../../../
|
3
3
|
specs:
|
4
|
-
sorcery (0.1
|
4
|
+
sorcery (0.2.1)
|
5
5
|
bcrypt-ruby (~> 2.1.4)
|
6
6
|
json (>= 1.5.1)
|
7
7
|
oauth (>= 0.4.4)
|
@@ -134,6 +134,6 @@ DEPENDENCIES
|
|
134
134
|
rspec-rails
|
135
135
|
ruby-debug19
|
136
136
|
simplecov (>= 0.3.8)
|
137
|
-
sorcery (= 0.1
|
137
|
+
sorcery (= 0.2.1)!
|
138
138
|
spork (~> 0.9.0.rc)
|
139
139
|
sqlite3-ruby
|
@@ -63,7 +63,7 @@ describe ApplicationController do
|
|
63
63
|
end
|
64
64
|
|
65
65
|
it "should create a new user" do
|
66
|
-
|
66
|
+
sorcery_model_property_set(:authentications_class, Authentication)
|
67
67
|
sorcery_controller_oauth_property_set(:facebook, :user_info_mapping, {:username => "name"})
|
68
68
|
lambda do
|
69
69
|
get :test_create_from_provider, :provider => "facebook"
|
@@ -72,7 +72,7 @@ describe ApplicationController do
|
|
72
72
|
end
|
73
73
|
|
74
74
|
it "should support nested attributes" do
|
75
|
-
|
75
|
+
sorcery_model_property_set(:authentications_class, Authentication)
|
76
76
|
sorcery_controller_oauth_property_set(:facebook, :user_info_mapping, {:username => "hometown/name"})
|
77
77
|
lambda do
|
78
78
|
get :test_create_from_provider, :provider => "facebook"
|
@@ -68,7 +68,7 @@ describe ApplicationController do
|
|
68
68
|
end
|
69
69
|
|
70
70
|
it "should create a new user" do
|
71
|
-
|
71
|
+
sorcery_model_property_set(:authentications_class, Authentication)
|
72
72
|
sorcery_controller_oauth_property_set(:twitter, :user_info_mapping, {:username => "screen_name"})
|
73
73
|
lambda do
|
74
74
|
get :test_create_from_provider, :provider => "twitter"
|
@@ -77,7 +77,7 @@ describe ApplicationController do
|
|
77
77
|
end
|
78
78
|
|
79
79
|
it "should support nested attributes" do
|
80
|
-
|
80
|
+
sorcery_model_property_set(:authentications_class, Authentication)
|
81
81
|
sorcery_controller_oauth_property_set(:twitter, :user_info_mapping, {:username => "status/text"})
|
82
82
|
lambda do
|
83
83
|
get :test_create_from_provider, :provider => "twitter"
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: sorcery
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.2.
|
5
|
+
version: 0.2.1
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Noam Ben Ari
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-03-
|
13
|
+
date: 2011-03-15 00:00:00 +02:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|