devise_invitable 0.3.4 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -8,12 +8,12 @@ GEM
8
8
  remote: http://rubygems.org/
9
9
  specs:
10
10
  abstract (1.0.0)
11
- actionmailer (3.0.0)
12
- actionpack (= 3.0.0)
11
+ actionmailer (3.0.1)
12
+ actionpack (= 3.0.1)
13
13
  mail (~> 2.2.5)
14
- actionpack (3.0.0)
15
- activemodel (= 3.0.0)
16
- activesupport (= 3.0.0)
14
+ actionpack (3.0.1)
15
+ activemodel (= 3.0.1)
16
+ activesupport (= 3.0.1)
17
17
  builder (~> 2.1.2)
18
18
  erubis (~> 2.6.6)
19
19
  i18n (~> 0.4.1)
@@ -21,80 +21,89 @@ GEM
21
21
  rack-mount (~> 0.6.12)
22
22
  rack-test (~> 0.5.4)
23
23
  tzinfo (~> 0.3.23)
24
- activemodel (3.0.0)
25
- activesupport (= 3.0.0)
24
+ activemodel (3.0.1)
25
+ activesupport (= 3.0.1)
26
26
  builder (~> 2.1.2)
27
27
  i18n (~> 0.4.1)
28
- activerecord (3.0.0)
29
- activemodel (= 3.0.0)
30
- activesupport (= 3.0.0)
28
+ activerecord (3.0.1)
29
+ activemodel (= 3.0.1)
30
+ activesupport (= 3.0.1)
31
31
  arel (~> 1.0.0)
32
32
  tzinfo (~> 0.3.23)
33
- activeresource (3.0.0)
34
- activemodel (= 3.0.0)
35
- activesupport (= 3.0.0)
36
- activesupport (3.0.0)
33
+ activeresource (3.0.1)
34
+ activemodel (= 3.0.1)
35
+ activesupport (= 3.0.1)
36
+ activesupport (3.0.1)
37
37
  arel (1.0.1)
38
38
  activesupport (~> 3.0.0)
39
39
  bcrypt-ruby (2.1.2)
40
40
  builder (2.1.2)
41
- capybara (0.3.9)
41
+ capybara (0.4.0)
42
+ celerity (>= 0.7.9)
42
43
  culerity (>= 0.2.4)
43
44
  mime-types (>= 1.16)
44
45
  nokogiri (>= 1.3.3)
45
46
  rack (>= 1.0.0)
46
47
  rack-test (>= 0.5.4)
47
- selenium-webdriver (>= 0.0.3)
48
+ selenium-webdriver (>= 0.0.27)
49
+ xpath (~> 0.1.2)
50
+ celerity (0.8.2)
51
+ childprocess (0.1.3)
52
+ ffi (~> 0.6.3)
48
53
  culerity (0.2.12)
49
- devise (1.1.2)
54
+ devise (1.1.3)
50
55
  bcrypt-ruby (~> 2.1.2)
51
56
  warden (~> 0.10.7)
52
57
  erubis (2.6.6)
53
58
  abstract (>= 1.0.0)
54
59
  ffi (0.6.3)
55
60
  rake (>= 0.8.7)
56
- i18n (0.4.1)
61
+ i18n (0.4.2)
57
62
  json_pure (1.4.6)
58
- mail (2.2.6)
63
+ mail (2.2.9)
59
64
  activesupport (>= 2.3.6)
60
- mime-types
61
- treetop (>= 1.4.5)
65
+ i18n (~> 0.4.1)
66
+ mime-types (~> 1.16)
67
+ treetop (~> 1.4.8)
62
68
  mime-types (1.16)
63
- mocha (0.9.8)
69
+ mocha (0.9.9)
64
70
  rake
65
71
  nokogiri (1.4.3.1)
66
72
  polyglot (0.3.1)
67
73
  rack (1.2.1)
68
74
  rack-mount (0.6.13)
69
75
  rack (>= 1.0.0)
70
- rack-test (0.5.4)
76
+ rack-test (0.5.6)
71
77
  rack (>= 1.0)
72
- rails (3.0.0)
73
- actionmailer (= 3.0.0)
74
- actionpack (= 3.0.0)
75
- activerecord (= 3.0.0)
76
- activeresource (= 3.0.0)
77
- activesupport (= 3.0.0)
78
+ rails (3.0.1)
79
+ actionmailer (= 3.0.1)
80
+ actionpack (= 3.0.1)
81
+ activerecord (= 3.0.1)
82
+ activeresource (= 3.0.1)
83
+ activesupport (= 3.0.1)
78
84
  bundler (~> 1.0.0)
79
- railties (= 3.0.0)
80
- railties (3.0.0)
81
- actionpack (= 3.0.0)
82
- activesupport (= 3.0.0)
85
+ railties (= 3.0.1)
86
+ railties (3.0.1)
87
+ actionpack (= 3.0.1)
88
+ activesupport (= 3.0.1)
83
89
  rake (>= 0.8.4)
84
90
  thor (~> 0.14.0)
85
91
  rake (0.8.7)
86
92
  rubyzip (0.9.4)
87
- selenium-webdriver (0.0.28)
88
- ffi (>= 0.6.1)
93
+ selenium-webdriver (0.0.29)
94
+ childprocess (>= 0.0.7)
95
+ ffi (~> 0.6.3)
89
96
  json_pure
90
97
  rubyzip
91
- sqlite3-ruby (1.3.1)
92
- thor (0.14.0)
98
+ sqlite3-ruby (1.3.2)
99
+ thor (0.14.3)
93
100
  treetop (1.4.8)
94
101
  polyglot (>= 0.3.1)
95
102
  tzinfo (0.3.23)
96
103
  warden (0.10.7)
97
104
  rack (>= 1.0.0)
105
+ xpath (0.1.2)
106
+ nokogiri (~> 1.3)
98
107
 
99
108
  PLATFORMS
100
109
  ruby
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.4
1
+ 0.3.5
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{devise_invitable}
8
- s.version = "0.3.4"
8
+ s.version = "0.3.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Sergio Cambra"]
12
- s.date = %q{2010-10-02}
12
+ s.date = %q{2010-11-02}
13
13
  s.description = %q{It adds support for send invitations by email (it requires to be authenticated) and accept the invitation setting the password}
14
14
  s.email = %q{sergio@entrecables.com}
15
15
  s.extra_rdoc_files = [
@@ -87,35 +87,35 @@ Gem::Specification.new do |s|
87
87
  s.rubygems_version = %q{1.3.7}
88
88
  s.summary = %q{An invitation strategy for devise}
89
89
  s.test_files = [
90
- "test/generators_test.rb",
91
- "test/test_helper.rb",
92
- "test/integration/invitable_test.rb",
93
- "test/routes_test.rb",
94
- "test/rails_app/app/helpers/application_helper.rb",
95
- "test/rails_app/app/models/octopussy.rb",
96
- "test/rails_app/app/models/user.rb",
90
+ "test/integration/invitable_test.rb",
91
+ "test/integration_tests_helper.rb",
92
+ "test/mailers/invitation_test.rb",
93
+ "test/model_tests_helper.rb",
94
+ "test/models/invitable_test.rb",
95
+ "test/models_test.rb",
97
96
  "test/rails_app/app/controllers/admins_controller.rb",
98
97
  "test/rails_app/app/controllers/application_controller.rb",
99
98
  "test/rails_app/app/controllers/home_controller.rb",
100
99
  "test/rails_app/app/controllers/users_controller.rb",
101
- "test/rails_app/config/initializers/devise.rb",
102
- "test/rails_app/config/initializers/inflections.rb",
103
- "test/rails_app/config/initializers/mime_types.rb",
104
- "test/rails_app/config/initializers/secret_token.rb",
105
- "test/rails_app/config/initializers/session_store.rb",
106
- "test/rails_app/config/initializers/backtrace_silencers.rb",
100
+ "test/rails_app/app/helpers/application_helper.rb",
101
+ "test/rails_app/app/models/user.rb",
102
+ "test/rails_app/app/models/octopussy.rb",
103
+ "test/rails_app/config/boot.rb",
107
104
  "test/rails_app/config/environment.rb",
105
+ "test/rails_app/config/environments/development.rb",
108
106
  "test/rails_app/config/environments/production.rb",
109
107
  "test/rails_app/config/environments/test.rb",
110
- "test/rails_app/config/environments/development.rb",
108
+ "test/rails_app/config/initializers/backtrace_silencers.rb",
109
+ "test/rails_app/config/initializers/inflections.rb",
110
+ "test/rails_app/config/initializers/devise.rb",
111
+ "test/rails_app/config/initializers/session_store.rb",
112
+ "test/rails_app/config/initializers/mime_types.rb",
113
+ "test/rails_app/config/initializers/secret_token.rb",
111
114
  "test/rails_app/config/routes.rb",
112
115
  "test/rails_app/config/application.rb",
113
- "test/rails_app/config/boot.rb",
114
- "test/integration_tests_helper.rb",
115
- "test/model_tests_helper.rb",
116
- "test/models_test.rb",
117
- "test/mailers/invitation_test.rb",
118
- "test/models/invitable_test.rb"
116
+ "test/routes_test.rb",
117
+ "test/test_helper.rb",
118
+ "test/generators_test.rb"
119
119
  ]
120
120
 
121
121
  if s.respond_to? :specification_version then
@@ -23,7 +23,7 @@ module Devise
23
23
  # Accept an invitation by clearing invitation token and confirming it if model
24
24
  # is confirmable
25
25
  def accept_invitation!
26
- if self.invited?
26
+ if self.invited? && self.valid?
27
27
  self.invitation_token = nil
28
28
  self.save
29
29
  end
@@ -64,7 +64,7 @@ class InvitationTest < ActionDispatch::IntegrationTest
64
64
 
65
65
  assert_equal user_invitation_path, current_path
66
66
  assert page.has_css?('#error_explanation li', :text => 'Invitation token is invalid')
67
- assert !user.reload.valid_password?('987654321')
67
+ assert_nil user.encrypted_password
68
68
  end
69
69
 
70
70
  test 'not authenticated user with valid invitation token but invalid password should not be able to set his password' do
@@ -75,7 +75,7 @@ class InvitationTest < ActionDispatch::IntegrationTest
75
75
 
76
76
  assert_equal user_invitation_path, current_path
77
77
  assert page.has_css?('#error_explanation li', :text => 'Password doesn\'t match confirmation')
78
- assert !user.reload.valid_password?('987654321')
78
+ assert_nil user.encrypted_password
79
79
  end
80
80
 
81
81
  test 'not authenticated user with valid data should be able to change his password' do
@@ -94,9 +94,9 @@ class InvitationTest < ActionDispatch::IntegrationTest
94
94
  end
95
95
  assert_equal user_invitation_path, current_path
96
96
  assert page.has_css?('#error_explanation')
97
- assert !user.reload.valid_password?('987654321')
97
+ assert_nil user.encrypted_password
98
98
 
99
- set_password :invitation_token => user.invitation_token
99
+ set_password :visit => false
100
100
  assert page.has_css?('p#notice', :text => 'Your password was set successfully. You are now signed in.')
101
101
  assert user.reload.valid_password?('987654321')
102
102
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise_invitable
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 4
10
- version: 0.3.4
9
+ - 5
10
+ version: 0.3.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sergio Cambra
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-10-02 00:00:00 +02:00
18
+ date: 2010-11-02 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -204,32 +204,32 @@ signing_key:
204
204
  specification_version: 3
205
205
  summary: An invitation strategy for devise
206
206
  test_files:
207
- - test/generators_test.rb
208
- - test/test_helper.rb
209
207
  - test/integration/invitable_test.rb
210
- - test/routes_test.rb
211
- - test/rails_app/app/helpers/application_helper.rb
212
- - test/rails_app/app/models/octopussy.rb
213
- - test/rails_app/app/models/user.rb
208
+ - test/integration_tests_helper.rb
209
+ - test/mailers/invitation_test.rb
210
+ - test/model_tests_helper.rb
211
+ - test/models/invitable_test.rb
212
+ - test/models_test.rb
214
213
  - test/rails_app/app/controllers/admins_controller.rb
215
214
  - test/rails_app/app/controllers/application_controller.rb
216
215
  - test/rails_app/app/controllers/home_controller.rb
217
216
  - test/rails_app/app/controllers/users_controller.rb
218
- - test/rails_app/config/initializers/devise.rb
219
- - test/rails_app/config/initializers/inflections.rb
220
- - test/rails_app/config/initializers/mime_types.rb
221
- - test/rails_app/config/initializers/secret_token.rb
222
- - test/rails_app/config/initializers/session_store.rb
223
- - test/rails_app/config/initializers/backtrace_silencers.rb
217
+ - test/rails_app/app/helpers/application_helper.rb
218
+ - test/rails_app/app/models/user.rb
219
+ - test/rails_app/app/models/octopussy.rb
220
+ - test/rails_app/config/boot.rb
224
221
  - test/rails_app/config/environment.rb
222
+ - test/rails_app/config/environments/development.rb
225
223
  - test/rails_app/config/environments/production.rb
226
224
  - test/rails_app/config/environments/test.rb
227
- - test/rails_app/config/environments/development.rb
225
+ - test/rails_app/config/initializers/backtrace_silencers.rb
226
+ - test/rails_app/config/initializers/inflections.rb
227
+ - test/rails_app/config/initializers/devise.rb
228
+ - test/rails_app/config/initializers/session_store.rb
229
+ - test/rails_app/config/initializers/mime_types.rb
230
+ - test/rails_app/config/initializers/secret_token.rb
228
231
  - test/rails_app/config/routes.rb
229
232
  - test/rails_app/config/application.rb
230
- - test/rails_app/config/boot.rb
231
- - test/integration_tests_helper.rb
232
- - test/model_tests_helper.rb
233
- - test/models_test.rb
234
- - test/mailers/invitation_test.rb
235
- - test/models/invitable_test.rb
233
+ - test/routes_test.rb
234
+ - test/test_helper.rb
235
+ - test/generators_test.rb