sorcery 0.8.5 → 0.8.6

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.

Files changed (119) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.travis.yml +60 -4
  4. data/CHANGELOG.md +15 -1
  5. data/Gemfile +9 -18
  6. data/Gemfile.rails4 +8 -10
  7. data/README.md +31 -11
  8. data/VERSION +1 -1
  9. data/gemfiles/active_record-rails41.gemfile +6 -0
  10. data/gemfiles/mongo_mapper-rails41.gemfile +8 -0
  11. data/gemfiles/mongoid-rails41.gemfile +11 -0
  12. data/lib/sorcery.rb +20 -28
  13. data/lib/sorcery/controller.rb +6 -11
  14. data/lib/sorcery/controller/submodules/external.rb +30 -15
  15. data/lib/sorcery/controller/submodules/session_timeout.rb +1 -1
  16. data/lib/sorcery/model.rb +102 -70
  17. data/lib/sorcery/model/adapters/active_record.rb +7 -2
  18. data/lib/sorcery/model/adapters/datamapper.rb +123 -0
  19. data/lib/sorcery/model/adapters/mongo_mapper.rb +8 -4
  20. data/lib/sorcery/model/adapters/mongoid.rb +6 -6
  21. data/lib/sorcery/model/submodules/activity_logging.rb +24 -0
  22. data/lib/sorcery/model/submodules/brute_force_protection.rb +16 -0
  23. data/lib/sorcery/model/submodules/remember_me.rb +19 -4
  24. data/lib/sorcery/model/submodules/reset_password.rb +30 -13
  25. data/lib/sorcery/model/submodules/user_activation.rb +53 -22
  26. data/lib/sorcery/{controller/submodules/external/protocols → protocols}/certs/ca-bundle.crt +0 -0
  27. data/lib/sorcery/protocols/oauth.rb +42 -0
  28. data/lib/sorcery/protocols/oauth2.rb +47 -0
  29. data/lib/sorcery/providers/base.rb +27 -0
  30. data/lib/sorcery/providers/facebook.rb +63 -0
  31. data/lib/sorcery/providers/github.rb +51 -0
  32. data/lib/sorcery/providers/google.rb +51 -0
  33. data/lib/sorcery/providers/linkedin.rb +66 -0
  34. data/lib/sorcery/providers/liveid.rb +53 -0
  35. data/lib/sorcery/providers/twitter.rb +59 -0
  36. data/lib/sorcery/providers/vk.rb +61 -0
  37. data/lib/sorcery/providers/xing.rb +64 -0
  38. data/lib/sorcery/test_helpers/internal.rb +3 -3
  39. data/lib/sorcery/test_helpers/internal/rails.rb +14 -3
  40. data/lib/sorcery/test_helpers/rails.rb +1 -10
  41. data/lib/sorcery/test_helpers/rails/controller.rb +17 -0
  42. data/lib/sorcery/test_helpers/rails/integration.rb +26 -0
  43. data/sorcery.gemspec +14 -18
  44. data/spec/active_record/controller_activity_logging_spec.rb +5 -116
  45. data/spec/active_record/controller_brute_force_protection_spec.rb +69 -47
  46. data/spec/active_record/controller_http_basic_auth_spec.rb +24 -18
  47. data/spec/active_record/controller_oauth2_spec.rb +112 -187
  48. data/spec/active_record/controller_oauth_spec.rb +41 -37
  49. data/spec/active_record/controller_remember_me_spec.rb +39 -38
  50. data/spec/active_record/controller_session_timeout_spec.rb +31 -16
  51. data/spec/active_record/controller_spec.rb +4 -178
  52. data/spec/active_record/integration_spec.rb +1 -1
  53. data/spec/active_record/user_activation_spec.rb +1 -1
  54. data/spec/active_record/user_activity_logging_spec.rb +1 -1
  55. data/spec/active_record/user_brute_force_protection_spec.rb +1 -1
  56. data/spec/active_record/user_oauth_spec.rb +1 -1
  57. data/spec/active_record/user_remember_me_spec.rb +1 -1
  58. data/spec/active_record/user_reset_password_spec.rb +1 -1
  59. data/spec/active_record/user_spec.rb +7 -8
  60. data/spec/datamapper/controller_activity_logging_spec.rb +17 -0
  61. data/spec/datamapper/controller_spec.rb +8 -0
  62. data/spec/datamapper/user_activation_spec.rb +10 -0
  63. data/spec/datamapper/user_activity_logging_spec.rb +9 -0
  64. data/spec/datamapper/user_brute_force_protection_spec.rb +9 -0
  65. data/spec/datamapper/user_oauth_spec.rb +9 -0
  66. data/spec/datamapper/user_remember_me_spec.rb +8 -0
  67. data/spec/datamapper/user_reset_password_spec.rb +8 -0
  68. data/spec/datamapper/user_spec.rb +27 -0
  69. data/spec/mongo_mapper/controller_spec.rb +4 -171
  70. data/spec/mongo_mapper/user_activation_spec.rb +1 -2
  71. data/spec/mongo_mapper/user_activity_logging_spec.rb +1 -1
  72. data/spec/mongo_mapper/user_brute_force_protection_spec.rb +1 -1
  73. data/spec/mongo_mapper/user_oauth_spec.rb +1 -1
  74. data/spec/mongo_mapper/user_remember_me_spec.rb +1 -1
  75. data/spec/mongo_mapper/user_reset_password_spec.rb +1 -1
  76. data/spec/mongo_mapper/user_spec.rb +7 -8
  77. data/spec/mongoid/controller_activity_logging_spec.rb +4 -99
  78. data/spec/mongoid/controller_spec.rb +4 -182
  79. data/spec/mongoid/user_activation_spec.rb +1 -2
  80. data/spec/mongoid/user_activity_logging_spec.rb +1 -2
  81. data/spec/mongoid/user_brute_force_protection_spec.rb +1 -2
  82. data/spec/mongoid/user_oauth_spec.rb +1 -2
  83. data/spec/mongoid/user_remember_me_spec.rb +1 -2
  84. data/spec/mongoid/user_reset_password_spec.rb +1 -2
  85. data/spec/mongoid/user_spec.rb +8 -9
  86. data/spec/orm/active_record.rb +2 -0
  87. data/spec/orm/datamapper.rb +34 -0
  88. data/spec/orm/mongo_mapper.rb +1 -0
  89. data/spec/orm/mongoid.rb +1 -0
  90. data/spec/rails_app/app/controllers/sorcery_controller.rb +64 -59
  91. data/spec/rails_app/app/datamapper/authentication.rb +8 -0
  92. data/spec/rails_app/app/datamapper/user.rb +7 -0
  93. data/spec/rails_app/config/routes.rb +18 -13
  94. data/spec/shared_examples/controller_activity_logging_shared_examples.rb +125 -0
  95. data/spec/shared_examples/controller_oauth2_shared_examples.rb +32 -36
  96. data/spec/shared_examples/controller_oauth_shared_examples.rb +19 -26
  97. data/spec/shared_examples/controller_shared_examples.rb +203 -0
  98. data/spec/shared_examples/user_activation_shared_examples.rb +107 -90
  99. data/spec/shared_examples/user_activity_logging_shared_examples.rb +10 -10
  100. data/spec/shared_examples/user_brute_force_protection_shared_examples.rb +14 -13
  101. data/spec/shared_examples/user_oauth_shared_examples.rb +23 -15
  102. data/spec/shared_examples/user_remember_me_shared_examples.rb +32 -23
  103. data/spec/shared_examples/user_reset_password_shared_examples.rb +136 -115
  104. data/spec/shared_examples/user_shared_examples.rb +206 -146
  105. data/spec/sorcery_crypto_providers_spec.rb +28 -28
  106. data/spec/spec_helper.rb +15 -6
  107. metadata +83 -127
  108. data/lib/sorcery/controller/submodules/external/protocols/oauth1.rb +0 -46
  109. data/lib/sorcery/controller/submodules/external/protocols/oauth2.rb +0 -50
  110. data/lib/sorcery/controller/submodules/external/providers/base.rb +0 -21
  111. data/lib/sorcery/controller/submodules/external/providers/facebook.rb +0 -99
  112. data/lib/sorcery/controller/submodules/external/providers/github.rb +0 -93
  113. data/lib/sorcery/controller/submodules/external/providers/google.rb +0 -92
  114. data/lib/sorcery/controller/submodules/external/providers/linkedin.rb +0 -103
  115. data/lib/sorcery/controller/submodules/external/providers/liveid.rb +0 -93
  116. data/lib/sorcery/controller/submodules/external/providers/twitter.rb +0 -94
  117. data/lib/sorcery/controller/submodules/external/providers/vk.rb +0 -101
  118. data/lib/sorcery/controller/submodules/external/providers/xing.rb +0 -98
  119. data/lib/sorcery/test_helpers.rb +0 -5
@@ -9,20 +9,20 @@ describe "Crypto Providers wrappers" do
9
9
  end
10
10
 
11
11
  it "encrypt works via wrapper like normal lib" do
12
- Sorcery::CryptoProviders::MD5.encrypt('Noam Ben-Ari').should == Digest::MD5.hexdigest('Noam Ben-Ari')
12
+ expect(Sorcery::CryptoProviders::MD5.encrypt 'Noam Ben-Ari').to eq Digest::MD5.hexdigest('Noam Ben-Ari')
13
13
  end
14
14
 
15
15
  it "works with multiple stretches" do
16
16
  Sorcery::CryptoProviders::MD5.stretches = 3
17
- Sorcery::CryptoProviders::MD5.encrypt('Noam Ben-Ari').should == Digest::MD5.hexdigest(Digest::MD5.hexdigest(Digest::MD5.hexdigest('Noam Ben-Ari')))
17
+ expect(Sorcery::CryptoProviders::MD5.encrypt 'Noam Ben-Ari').to eq Digest::MD5.hexdigest(Digest::MD5.hexdigest(Digest::MD5.hexdigest('Noam Ben-Ari')))
18
18
  end
19
19
 
20
20
  it "matches? returns true when matches" do
21
- Sorcery::CryptoProviders::MD5.matches?(Digest::MD5.hexdigest('Noam Ben-Ari'), 'Noam Ben-Ari').should be_true
21
+ expect(Sorcery::CryptoProviders::MD5.matches? Digest::MD5.hexdigest('Noam Ben-Ari'), 'Noam Ben-Ari').to be true
22
22
  end
23
23
 
24
24
  it "matches? returns false when no match" do
25
- Sorcery::CryptoProviders::MD5.matches?(Digest::MD5.hexdigest('Noam Ben-Ari'), 'Some Dude').should be_false
25
+ expect(Sorcery::CryptoProviders::MD5.matches? Digest::MD5.hexdigest('Noam Ben-Ari'), 'Some Dude').to be false
26
26
  end
27
27
 
28
28
  end
@@ -39,25 +39,25 @@ describe "Crypto Providers wrappers" do
39
39
  end
40
40
 
41
41
  it "encrypt works via wrapper like normal lib" do
42
- Sorcery::CryptoProviders::SHA1.encrypt('Noam Ben-Ari').should == @digest
42
+ expect(Sorcery::CryptoProviders::SHA1.encrypt 'Noam Ben-Ari').to eq @digest
43
43
  end
44
44
 
45
45
  it "works with multiple stretches" do
46
46
  Sorcery::CryptoProviders::SHA1.stretches = 3
47
- Sorcery::CryptoProviders::SHA1.encrypt('Noam Ben-Ari').should == Digest::SHA1.hexdigest(Digest::SHA1.hexdigest(Digest::SHA1.hexdigest('Noam Ben-Ari')))
47
+ expect(Sorcery::CryptoProviders::SHA1.encrypt 'Noam Ben-Ari').to eq Digest::SHA1.hexdigest(Digest::SHA1.hexdigest(Digest::SHA1.hexdigest('Noam Ben-Ari')))
48
48
  end
49
49
 
50
50
  it "matches? returns true when matches" do
51
- Sorcery::CryptoProviders::SHA1.matches?(@digest, 'Noam Ben-Ari').should be_true
51
+ expect(Sorcery::CryptoProviders::SHA1.matches? @digest, 'Noam Ben-Ari').to be true
52
52
  end
53
53
 
54
54
  it "matches? returns false when no match" do
55
- Sorcery::CryptoProviders::SHA1.matches?(@digest, 'Some Dude').should be_false
55
+ expect(Sorcery::CryptoProviders::SHA1.matches? @digest, 'Some Dude').to be false
56
56
  end
57
57
 
58
58
  it "matches password encrypted using salt and join token from upstream" do
59
59
  Sorcery::CryptoProviders::SHA1.join_token = "test"
60
- Sorcery::CryptoProviders::SHA1.encrypt(['password', 'gq18WBnJYNh2arkC1kgH']).should == '894b5bf1643b8d0e1b2eaddb22426be7036dab70'
60
+ expect(Sorcery::CryptoProviders::SHA1.encrypt ['password', 'gq18WBnJYNh2arkC1kgH']).to eq '894b5bf1643b8d0e1b2eaddb22426be7036dab70'
61
61
  end
62
62
  end
63
63
 
@@ -73,20 +73,20 @@ describe "Crypto Providers wrappers" do
73
73
  end
74
74
 
75
75
  it "encrypt works via wrapper like normal lib" do
76
- Sorcery::CryptoProviders::SHA256.encrypt('Noam Ben-Ari').should == @digest
76
+ expect(Sorcery::CryptoProviders::SHA256.encrypt 'Noam Ben-Ari').to eq @digest
77
77
  end
78
78
 
79
79
  it "works with multiple stretches" do
80
80
  Sorcery::CryptoProviders::SHA256.stretches = 3
81
- Sorcery::CryptoProviders::SHA256.encrypt('Noam Ben-Ari').should == Digest::SHA256.hexdigest(Digest::SHA256.hexdigest(Digest::SHA256.hexdigest('Noam Ben-Ari')))
81
+ expect(Sorcery::CryptoProviders::SHA256.encrypt 'Noam Ben-Ari').to eq Digest::SHA256.hexdigest(Digest::SHA256.hexdigest(Digest::SHA256.hexdigest('Noam Ben-Ari')))
82
82
  end
83
83
 
84
84
  it "matches? returns true when matches" do
85
- Sorcery::CryptoProviders::SHA256.matches?(@digest, 'Noam Ben-Ari').should be_true
85
+ expect(Sorcery::CryptoProviders::SHA256.matches? @digest, 'Noam Ben-Ari').to be true
86
86
  end
87
87
 
88
88
  it "matches? returns false when no match" do
89
- Sorcery::CryptoProviders::SHA256.matches?(@digest, 'Some Dude').should be_false
89
+ expect(Sorcery::CryptoProviders::SHA256.matches? @digest, 'Some Dude').to be false
90
90
  end
91
91
 
92
92
  end
@@ -103,20 +103,20 @@ describe "Crypto Providers wrappers" do
103
103
  end
104
104
 
105
105
  it "encrypt works via wrapper like normal lib" do
106
- Sorcery::CryptoProviders::SHA512.encrypt('Noam Ben-Ari').should == @digest
106
+ expect(Sorcery::CryptoProviders::SHA512.encrypt 'Noam Ben-Ari').to eq @digest
107
107
  end
108
108
 
109
109
  it "works with multiple stretches" do
110
110
  Sorcery::CryptoProviders::SHA512.stretches = 3
111
- Sorcery::CryptoProviders::SHA512.encrypt('Noam Ben-Ari').should == Digest::SHA512.hexdigest(Digest::SHA512.hexdigest(Digest::SHA512.hexdigest('Noam Ben-Ari')))
111
+ expect(Sorcery::CryptoProviders::SHA512.encrypt 'Noam Ben-Ari').to eq Digest::SHA512.hexdigest(Digest::SHA512.hexdigest(Digest::SHA512.hexdigest('Noam Ben-Ari')))
112
112
  end
113
113
 
114
114
  it "matches? returns true when matches" do
115
- Sorcery::CryptoProviders::SHA512.matches?(@digest, 'Noam Ben-Ari').should be_true
115
+ expect(Sorcery::CryptoProviders::SHA512.matches? @digest, 'Noam Ben-Ari').to be true
116
116
  end
117
117
 
118
118
  it "matches? returns false when no match" do
119
- Sorcery::CryptoProviders::SHA512.matches?(@digest, 'Some Dude').should be_false
119
+ expect(Sorcery::CryptoProviders::SHA512.matches? @digest, 'Some Dude').to be false
120
120
  end
121
121
 
122
122
  end
@@ -134,22 +134,22 @@ describe "Crypto Providers wrappers" do
134
134
  end
135
135
 
136
136
  it "encrypt works via wrapper like normal lib" do
137
- Sorcery::CryptoProviders::AES256.encrypt('Noam Ben-Ari').should == @digest
137
+ expect(Sorcery::CryptoProviders::AES256.encrypt 'Noam Ben-Ari').to eq @digest
138
138
  end
139
139
 
140
140
  it "matches? returns true when matches" do
141
- Sorcery::CryptoProviders::AES256.matches?(@digest, 'Noam Ben-Ari').should be_true
141
+ expect(Sorcery::CryptoProviders::AES256.matches? @digest, 'Noam Ben-Ari').to be true
142
142
  end
143
143
 
144
144
  it "matches? returns false when no match" do
145
- Sorcery::CryptoProviders::AES256.matches?(@digest, 'Some Dude').should be_false
145
+ expect(Sorcery::CryptoProviders::AES256.matches? @digest, 'Some Dude').to be false
146
146
  end
147
147
 
148
148
  it "can be decrypted" do
149
149
  aes = OpenSSL::Cipher::Cipher.new("AES-256-ECB")
150
150
  aes.decrypt
151
151
  aes.key = @key
152
- (aes.update(@digest.unpack("m").first) + aes.final).should == "Noam Ben-Ari"
152
+ expect(aes.update(@digest.unpack("m").first) + aes.final).to eq "Noam Ben-Ari"
153
153
  end
154
154
 
155
155
  end
@@ -165,32 +165,32 @@ describe "Crypto Providers wrappers" do
165
165
  Sorcery::CryptoProviders::BCrypt.reset!
166
166
  end
167
167
 
168
- it "should be comparable with original secret" do
169
- BCrypt::Password.new(Sorcery::CryptoProviders::BCrypt.encrypt('Noam Ben-Ari')).should == 'Noam Ben-Ari'
168
+ it "is comparable with original secret" do
169
+ expect(BCrypt::Password.new Sorcery::CryptoProviders::BCrypt.encrypt('Noam Ben-Ari')).to eq 'Noam Ben-Ari'
170
170
  end
171
171
 
172
172
  it "works with multiple costs" do
173
173
  Sorcery::CryptoProviders::BCrypt.cost = 3
174
- BCrypt::Password.new(Sorcery::CryptoProviders::BCrypt.encrypt('Noam Ben-Ari')).should == 'Noam Ben-Ari'
174
+ expect(BCrypt::Password.new(Sorcery::CryptoProviders::BCrypt.encrypt 'Noam Ben-Ari')).to eq 'Noam Ben-Ari'
175
175
  end
176
176
 
177
177
  it "matches? returns true when matches" do
178
- Sorcery::CryptoProviders::BCrypt.matches?(@digest, 'Noam Ben-Ari').should be_true
178
+ expect(Sorcery::CryptoProviders::BCrypt.matches? @digest, 'Noam Ben-Ari').to be true
179
179
  end
180
180
 
181
181
  it "matches? returns false when no match" do
182
- Sorcery::CryptoProviders::BCrypt.matches?(@digest, 'Some Dude').should be_false
182
+ expect(Sorcery::CryptoProviders::BCrypt.matches? @digest, 'Some Dude').to be false
183
183
  end
184
184
 
185
185
  it "respond_to?(:stretches) returns true" do
186
- Sorcery::CryptoProviders::BCrypt.respond_to?(:stretches).should be_true
186
+ expect(Sorcery::CryptoProviders::BCrypt.respond_to? :stretches).to be true
187
187
  end
188
188
 
189
189
  it "sets cost when stretches is set" do
190
190
  Sorcery::CryptoProviders::BCrypt.stretches = 4
191
191
 
192
192
  # stubbed in Sorcery::TestHelpers::Internal
193
- Sorcery::CryptoProviders::BCrypt.cost.should == 1
193
+ expect(Sorcery::CryptoProviders::BCrypt.cost).to eq 1
194
194
  end
195
195
 
196
196
  end
@@ -15,24 +15,33 @@ require 'rails/all'
15
15
  require 'rspec/rails'
16
16
  require 'timecop'
17
17
 
18
- require "rails_app/config/environment"
19
-
20
18
  require "orm/#{SORCERY_ORM}"
21
19
 
20
+ require "rails_app/config/environment"
21
+
22
22
  class TestMailer < ActionMailer::Base;end
23
23
 
24
24
  Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
25
25
 
26
26
  RSpec.configure do |config|
27
- config.include RSpec::Rails::ControllerExampleGroup, :example_group => { :file_path => /controller(.)*_spec.rb$/ }
28
-
27
+ config.include RSpec::Rails::ControllerExampleGroup, :file_path => /controller(.)*_spec.rb$/
28
+ config.filter_run_excluding :active_record => SORCERY_ORM.to_sym != :active_record
29
+ config.filter_run_excluding :mongo_mapper => SORCERY_ORM.to_sym != :mongo_mapper
30
+ config.filter_run_excluding :datamapper => SORCERY_ORM.to_sym != :datamapper
31
+ config.filter_run_excluding :mongoid => SORCERY_ORM.to_sym != :mongoid
29
32
  config.mock_with :rspec
30
33
 
31
34
  config.use_transactional_fixtures = true
32
35
 
36
+ migrations_path = Rails.root.join("db", "migrate", "core")
37
+
33
38
  config.before(:suite) do
34
39
  if SORCERY_ORM.to_sym == :active_record
35
- ActiveRecord::Migrator.migrate("#{Rails.root}/db/migrate/core")
40
+ ActiveRecord::Migrator.migrate(migrations_path)
41
+ end
42
+ if SORCERY_ORM.to_sym == :datamapper
43
+ DataMapper.auto_migrate!
44
+ DataMapper.finalize
36
45
  end
37
46
 
38
47
  if defined?(Mongoid)
@@ -42,7 +51,7 @@ RSpec.configure do |config|
42
51
 
43
52
  config.after(:suite) do
44
53
  if SORCERY_ORM.to_sym == :active_record
45
- ActiveRecord::Migrator.rollback("#{Rails.root}/db/migrate/core")
54
+ ActiveRecord::Migrator.rollback(migrations_path)
46
55
  end
47
56
  end
48
57
 
metadata CHANGED
@@ -1,232 +1,169 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sorcery
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.5
4
+ version: 0.8.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Noam Ben Ari
8
8
  - Kir Shatrov
9
+ - Grzegorz Witek
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2013-12-19 00:00:00.000000000 Z
13
+ date: 2014-06-15 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: oauth
16
17
  requirement: !ruby/object:Gem::Requirement
17
18
  requirements:
18
- - - ~>
19
+ - - "~>"
20
+ - !ruby/object:Gem::Version
21
+ version: '0.4'
22
+ - - ">="
19
23
  - !ruby/object:Gem::Version
20
24
  version: 0.4.4
21
25
  type: :runtime
22
26
  prerelease: false
23
27
  version_requirements: !ruby/object:Gem::Requirement
24
28
  requirements:
25
- - - ~>
29
+ - - "~>"
30
+ - !ruby/object:Gem::Version
31
+ version: '0.4'
32
+ - - ">="
26
33
  - !ruby/object:Gem::Version
27
34
  version: 0.4.4
28
35
  - !ruby/object:Gem::Dependency
29
36
  name: oauth2
30
37
  requirement: !ruby/object:Gem::Requirement
31
38
  requirements:
32
- - - '>='
39
+ - - ">="
33
40
  - !ruby/object:Gem::Version
34
41
  version: 0.8.0
35
- - - <
42
+ - - "<"
36
43
  - !ruby/object:Gem::Version
37
44
  version: 1.0.0
38
45
  type: :runtime
39
46
  prerelease: false
40
47
  version_requirements: !ruby/object:Gem::Requirement
41
48
  requirements:
42
- - - '>='
49
+ - - ">="
43
50
  - !ruby/object:Gem::Version
44
51
  version: 0.8.0
45
- - - <
52
+ - - "<"
46
53
  - !ruby/object:Gem::Version
47
54
  version: 1.0.0
48
55
  - !ruby/object:Gem::Dependency
49
- name: bcrypt-ruby
56
+ name: bcrypt
50
57
  requirement: !ruby/object:Gem::Requirement
51
58
  requirements:
52
- - - '>='
59
+ - - "~>"
53
60
  - !ruby/object:Gem::Version
54
- version: '3.0'
61
+ version: '3.1'
55
62
  type: :runtime
56
63
  prerelease: false
57
64
  version_requirements: !ruby/object:Gem::Requirement
58
65
  requirements:
59
- - - '>='
66
+ - - "~>"
60
67
  - !ruby/object:Gem::Version
61
- version: '3.0'
68
+ version: '3.1'
62
69
  - !ruby/object:Gem::Dependency
63
70
  name: abstract
64
71
  requirement: !ruby/object:Gem::Requirement
65
72
  requirements:
66
- - - '>='
73
+ - - ">="
67
74
  - !ruby/object:Gem::Version
68
75
  version: 1.0.0
69
76
  type: :development
70
77
  prerelease: false
71
78
  version_requirements: !ruby/object:Gem::Requirement
72
79
  requirements:
73
- - - '>='
80
+ - - ">="
74
81
  - !ruby/object:Gem::Version
75
82
  version: 1.0.0
76
- - !ruby/object:Gem::Dependency
77
- name: rails
78
- requirement: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - '>='
81
- - !ruby/object:Gem::Version
82
- version: 3.2.15
83
- type: :development
84
- prerelease: false
85
- version_requirements: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - '>='
88
- - !ruby/object:Gem::Version
89
- version: 3.2.15
90
83
  - !ruby/object:Gem::Dependency
91
84
  name: json
92
85
  requirement: !ruby/object:Gem::Requirement
93
86
  requirements:
94
- - - '>='
87
+ - - ">="
95
88
  - !ruby/object:Gem::Version
96
89
  version: 1.7.7
97
90
  type: :development
98
91
  prerelease: false
99
92
  version_requirements: !ruby/object:Gem::Requirement
100
93
  requirements:
101
- - - '>='
94
+ - - ">="
102
95
  - !ruby/object:Gem::Version
103
96
  version: 1.7.7
104
- - !ruby/object:Gem::Dependency
105
- name: rspec
106
- requirement: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - ~>
109
- - !ruby/object:Gem::Version
110
- version: 2.5.0
111
- type: :development
112
- prerelease: false
113
- version_requirements: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - ~>
116
- - !ruby/object:Gem::Version
117
- version: 2.5.0
118
- - !ruby/object:Gem::Dependency
119
- name: rspec-rails
120
- requirement: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - ~>
123
- - !ruby/object:Gem::Version
124
- version: 2.5.0
125
- type: :development
126
- prerelease: false
127
- version_requirements: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - ~>
130
- - !ruby/object:Gem::Version
131
- version: 2.5.0
132
- - !ruby/object:Gem::Dependency
133
- name: sqlite3
134
- requirement: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - '>='
137
- - !ruby/object:Gem::Version
138
- version: '0'
139
- type: :development
140
- prerelease: false
141
- version_requirements: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - '>='
144
- - !ruby/object:Gem::Version
145
- version: '0'
146
97
  - !ruby/object:Gem::Dependency
147
98
  name: yard
148
99
  requirement: !ruby/object:Gem::Requirement
149
100
  requirements:
150
- - - ~>
101
+ - - "~>"
151
102
  - !ruby/object:Gem::Version
152
103
  version: 0.6.0
153
104
  type: :development
154
105
  prerelease: false
155
106
  version_requirements: !ruby/object:Gem::Requirement
156
107
  requirements:
157
- - - ~>
108
+ - - "~>"
158
109
  - !ruby/object:Gem::Version
159
110
  version: 0.6.0
160
111
  - !ruby/object:Gem::Dependency
161
- name: bundler
112
+ name: timecop
162
113
  requirement: !ruby/object:Gem::Requirement
163
114
  requirements:
164
- - - '>='
115
+ - - ">="
165
116
  - !ruby/object:Gem::Version
166
- version: 1.1.0
117
+ version: '0'
167
118
  type: :development
168
119
  prerelease: false
169
120
  version_requirements: !ruby/object:Gem::Requirement
170
121
  requirements:
171
- - - '>='
122
+ - - ">="
172
123
  - !ruby/object:Gem::Version
173
- version: 1.1.0
124
+ version: '0'
174
125
  - !ruby/object:Gem::Dependency
175
126
  name: simplecov
176
127
  requirement: !ruby/object:Gem::Requirement
177
128
  requirements:
178
- - - '>='
129
+ - - ">="
179
130
  - !ruby/object:Gem::Version
180
131
  version: 0.3.8
181
132
  type: :development
182
133
  prerelease: false
183
134
  version_requirements: !ruby/object:Gem::Requirement
184
135
  requirements:
185
- - - '>='
136
+ - - ">="
186
137
  - !ruby/object:Gem::Version
187
138
  version: 0.3.8
188
139
  - !ruby/object:Gem::Dependency
189
- name: timecop
190
- requirement: !ruby/object:Gem::Requirement
191
- requirements:
192
- - - '>='
193
- - !ruby/object:Gem::Version
194
- version: '0'
195
- type: :development
196
- prerelease: false
197
- version_requirements: !ruby/object:Gem::Requirement
198
- requirements:
199
- - - '>='
200
- - !ruby/object:Gem::Version
201
- version: '0'
202
- - !ruby/object:Gem::Dependency
203
- name: mongo_mapper
140
+ name: rspec
204
141
  requirement: !ruby/object:Gem::Requirement
205
142
  requirements:
206
- - - '>='
143
+ - - "~>"
207
144
  - !ruby/object:Gem::Version
208
- version: '0'
145
+ version: 3.0.0
209
146
  type: :development
210
147
  prerelease: false
211
148
  version_requirements: !ruby/object:Gem::Requirement
212
149
  requirements:
213
- - - '>='
150
+ - - "~>"
214
151
  - !ruby/object:Gem::Version
215
- version: '0'
152
+ version: 3.0.0
216
153
  - !ruby/object:Gem::Dependency
217
- name: mongoid
154
+ name: rspec-rails
218
155
  requirement: !ruby/object:Gem::Requirement
219
156
  requirements:
220
- - - ~>
157
+ - - "~>"
221
158
  - !ruby/object:Gem::Version
222
- version: 2.4.4
159
+ version: 3.0.0
223
160
  type: :development
224
161
  prerelease: false
225
162
  version_requirements: !ruby/object:Gem::Requirement
226
163
  requirements:
227
- - - ~>
164
+ - - "~>"
228
165
  - !ruby/object:Gem::Version
229
- version: 2.4.4
166
+ version: 3.0.0
230
167
  description: Provides common authentication needs such as signing in/out, activating
231
168
  by email and resetting password.
232
169
  email: nbenari@gmail.com
@@ -234,10 +171,10 @@ executables: []
234
171
  extensions: []
235
172
  extra_rdoc_files: []
236
173
  files:
237
- - .document
238
- - .gitignore
239
- - .rspec
240
- - .travis.yml
174
+ - ".document"
175
+ - ".gitignore"
176
+ - ".rspec"
177
+ - ".travis.yml"
241
178
  - CHANGELOG.md
242
179
  - Gemfile
243
180
  - Gemfile.rails4
@@ -245,6 +182,9 @@ files:
245
182
  - README.md
246
183
  - Rakefile
247
184
  - VERSION
185
+ - gemfiles/active_record-rails41.gemfile
186
+ - gemfiles/mongo_mapper-rails41.gemfile
187
+ - gemfiles/mongoid-rails41.gemfile
248
188
  - lib/generators/sorcery/USAGE
249
189
  - lib/generators/sorcery/helpers.rb
250
190
  - lib/generators/sorcery/install_generator.rb
@@ -261,18 +201,6 @@ files:
261
201
  - lib/sorcery/controller/submodules/activity_logging.rb
262
202
  - lib/sorcery/controller/submodules/brute_force_protection.rb
263
203
  - lib/sorcery/controller/submodules/external.rb
264
- - lib/sorcery/controller/submodules/external/protocols/certs/ca-bundle.crt
265
- - lib/sorcery/controller/submodules/external/protocols/oauth1.rb
266
- - lib/sorcery/controller/submodules/external/protocols/oauth2.rb
267
- - lib/sorcery/controller/submodules/external/providers/base.rb
268
- - lib/sorcery/controller/submodules/external/providers/facebook.rb
269
- - lib/sorcery/controller/submodules/external/providers/github.rb
270
- - lib/sorcery/controller/submodules/external/providers/google.rb
271
- - lib/sorcery/controller/submodules/external/providers/linkedin.rb
272
- - lib/sorcery/controller/submodules/external/providers/liveid.rb
273
- - lib/sorcery/controller/submodules/external/providers/twitter.rb
274
- - lib/sorcery/controller/submodules/external/providers/vk.rb
275
- - lib/sorcery/controller/submodules/external/providers/xing.rb
276
204
  - lib/sorcery/controller/submodules/http_basic_auth.rb
277
205
  - lib/sorcery/controller/submodules/remember_me.rb
278
206
  - lib/sorcery/controller/submodules/session_timeout.rb
@@ -286,6 +214,7 @@ files:
286
214
  - lib/sorcery/engine.rb
287
215
  - lib/sorcery/model.rb
288
216
  - lib/sorcery/model/adapters/active_record.rb
217
+ - lib/sorcery/model/adapters/datamapper.rb
289
218
  - lib/sorcery/model/adapters/mongo_mapper.rb
290
219
  - lib/sorcery/model/adapters/mongoid.rb
291
220
  - lib/sorcery/model/submodules/activity_logging.rb
@@ -295,11 +224,24 @@ files:
295
224
  - lib/sorcery/model/submodules/reset_password.rb
296
225
  - lib/sorcery/model/submodules/user_activation.rb
297
226
  - lib/sorcery/model/temporary_token.rb
227
+ - lib/sorcery/protocols/certs/ca-bundle.crt
228
+ - lib/sorcery/protocols/oauth.rb
229
+ - lib/sorcery/protocols/oauth2.rb
230
+ - lib/sorcery/providers/base.rb
231
+ - lib/sorcery/providers/facebook.rb
232
+ - lib/sorcery/providers/github.rb
233
+ - lib/sorcery/providers/google.rb
234
+ - lib/sorcery/providers/linkedin.rb
235
+ - lib/sorcery/providers/liveid.rb
236
+ - lib/sorcery/providers/twitter.rb
237
+ - lib/sorcery/providers/vk.rb
238
+ - lib/sorcery/providers/xing.rb
298
239
  - lib/sorcery/railties/tasks.rake
299
- - lib/sorcery/test_helpers.rb
300
240
  - lib/sorcery/test_helpers/internal.rb
301
241
  - lib/sorcery/test_helpers/internal/rails.rb
302
242
  - lib/sorcery/test_helpers/rails.rb
243
+ - lib/sorcery/test_helpers/rails/controller.rb
244
+ - lib/sorcery/test_helpers/rails/integration.rb
303
245
  - sorcery.gemspec
304
246
  - spec/active_record/controller_activity_logging_spec.rb
305
247
  - spec/active_record/controller_brute_force_protection_spec.rb
@@ -317,6 +259,15 @@ files:
317
259
  - spec/active_record/user_remember_me_spec.rb
318
260
  - spec/active_record/user_reset_password_spec.rb
319
261
  - spec/active_record/user_spec.rb
262
+ - spec/datamapper/controller_activity_logging_spec.rb
263
+ - spec/datamapper/controller_spec.rb
264
+ - spec/datamapper/user_activation_spec.rb
265
+ - spec/datamapper/user_activity_logging_spec.rb
266
+ - spec/datamapper/user_brute_force_protection_spec.rb
267
+ - spec/datamapper/user_oauth_spec.rb
268
+ - spec/datamapper/user_remember_me_spec.rb
269
+ - spec/datamapper/user_reset_password_spec.rb
270
+ - spec/datamapper/user_spec.rb
320
271
  - spec/mongo_mapper/controller_spec.rb
321
272
  - spec/mongo_mapper/user_activation_spec.rb
322
273
  - spec/mongo_mapper/user_activity_logging_spec.rb
@@ -335,12 +286,15 @@ files:
335
286
  - spec/mongoid/user_reset_password_spec.rb
336
287
  - spec/mongoid/user_spec.rb
337
288
  - spec/orm/active_record.rb
289
+ - spec/orm/datamapper.rb
338
290
  - spec/orm/mongo_mapper.rb
339
291
  - spec/orm/mongoid.rb
340
292
  - spec/rails_app/app/active_record/authentication.rb
341
293
  - spec/rails_app/app/active_record/user.rb
342
294
  - spec/rails_app/app/active_record/user_provider.rb
343
295
  - spec/rails_app/app/controllers/sorcery_controller.rb
296
+ - spec/rails_app/app/datamapper/authentication.rb
297
+ - spec/rails_app/app/datamapper/user.rb
344
298
  - spec/rails_app/app/helpers/application_helper.rb
345
299
  - spec/rails_app/app/mailers/sorcery_mailer.rb
346
300
  - spec/rails_app/app/mongo_mapper/authentication.rb
@@ -393,8 +347,10 @@ files:
393
347
  - spec/rails_app/public/javascripts/rails.js
394
348
  - spec/rails_app/public/robots.txt
395
349
  - spec/rails_app/public/stylesheets/.gitkeep
350
+ - spec/shared_examples/controller_activity_logging_shared_examples.rb
396
351
  - spec/shared_examples/controller_oauth2_shared_examples.rb
397
352
  - spec/shared_examples/controller_oauth_shared_examples.rb
353
+ - spec/shared_examples/controller_shared_examples.rb
398
354
  - spec/shared_examples/user_activation_shared_examples.rb
399
355
  - spec/shared_examples/user_activity_logging_shared_examples.rb
400
356
  - spec/shared_examples/user_brute_force_protection_shared_examples.rb
@@ -415,19 +371,19 @@ require_paths:
415
371
  - lib
416
372
  required_ruby_version: !ruby/object:Gem::Requirement
417
373
  requirements:
418
- - - '>='
374
+ - - ">="
419
375
  - !ruby/object:Gem::Version
420
376
  version: 1.9.3
421
377
  required_rubygems_version: !ruby/object:Gem::Requirement
422
378
  requirements:
423
- - - '>='
379
+ - - ">="
424
380
  - !ruby/object:Gem::Version
425
381
  version: '0'
426
382
  requirements: []
427
383
  rubyforge_project:
428
- rubygems_version: 2.0.3
384
+ rubygems_version: 2.2.1
429
385
  signing_key:
430
386
  specification_version: 4
431
- summary: Magical authentication for Rails 3 applications
387
+ summary: Magical authentication for Rails 3 & 4 applications
432
388
  test_files: []
433
389
  has_rdoc: