devise 1.4.2 → 1.4.3

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of devise might be problematic. Click here for more details.

Files changed (71) hide show
  1. data/.gitignore +3 -1
  2. data/.travis.yml +3 -2
  3. data/CHANGELOG.rdoc +16 -1
  4. data/Gemfile +4 -2
  5. data/README.rdoc +2 -2
  6. data/Rakefile +1 -1
  7. data/app/controllers/devise/confirmations_controller.rb +7 -1
  8. data/app/controllers/devise/registrations_controller.rb +8 -2
  9. data/app/controllers/devise/sessions_controller.rb +6 -4
  10. data/app/views/devise/confirmations/new.html.erb +3 -3
  11. data/app/views/devise/passwords/edit.html.erb +5 -5
  12. data/app/views/devise/passwords/new.html.erb +3 -3
  13. data/app/views/devise/registrations/edit.html.erb +9 -9
  14. data/app/views/devise/registrations/new.html.erb +7 -7
  15. data/app/views/devise/sessions/new.html.erb +6 -6
  16. data/app/views/devise/unlocks/new.html.erb +3 -3
  17. data/config/locales/en.yml +4 -0
  18. data/devise.gemspec +1 -1
  19. data/lib/devise.rb +11 -6
  20. data/lib/devise/controllers/helpers.rb +1 -0
  21. data/lib/devise/controllers/url_helpers.rb +20 -11
  22. data/lib/devise/hooks/timeoutable.rb +1 -1
  23. data/lib/devise/mailers/helpers.rb +9 -2
  24. data/lib/devise/mapping.rb +8 -1
  25. data/lib/devise/models/authenticatable.rb +9 -0
  26. data/lib/devise/models/confirmable.rb +8 -3
  27. data/lib/devise/models/database_authenticatable.rb +3 -0
  28. data/lib/devise/models/lockable.rb +5 -5
  29. data/lib/devise/models/recoverable.rb +10 -3
  30. data/lib/devise/models/trackable.rb +1 -1
  31. data/lib/devise/models/validatable.rb +1 -1
  32. data/lib/devise/rails.rb +13 -0
  33. data/lib/devise/rails/routes.rb +22 -10
  34. data/lib/devise/rails/warden_compat.rb +5 -10
  35. data/lib/devise/schema.rb +5 -3
  36. data/lib/devise/strategies/token_authenticatable.rb +5 -1
  37. data/lib/devise/version.rb +1 -1
  38. data/lib/generators/active_record/devise_generator.rb +10 -5
  39. data/lib/generators/active_record/templates/migration_existing.rb +34 -0
  40. data/lib/generators/devise/orm_helpers.rb +8 -0
  41. data/lib/generators/templates/devise.rb +12 -5
  42. data/lib/generators/templates/simple_form_for/registrations/edit.html.erb +1 -1
  43. data/lib/generators/templates/simple_form_for/registrations/new.html.erb +3 -3
  44. data/test/controllers/helpers_test.rb +1 -1
  45. data/test/generators/active_record_generator_test.rb +13 -0
  46. data/test/generators/mongoid_generator_test.rb +4 -3
  47. data/test/helpers/devise_helper_test.rb +10 -2
  48. data/test/integration/authenticatable_test.rb +17 -0
  49. data/test/integration/confirmable_test.rb +10 -1
  50. data/test/integration/lockable_test.rb +1 -1
  51. data/test/integration/recoverable_test.rb +12 -3
  52. data/test/integration/registerable_test.rb +10 -2
  53. data/test/integration/token_authenticatable_test.rb +11 -0
  54. data/test/mailers/confirmation_instructions_test.rb +6 -0
  55. data/test/mailers/reset_password_instructions_test.rb +6 -0
  56. data/test/mailers/unlock_instructions_test.rb +6 -0
  57. data/test/models/confirmable_test.rb +2 -2
  58. data/test/models/encryptable_test.rb +4 -2
  59. data/test/models/validatable_test.rb +3 -2
  60. data/test/models_test.rb +9 -11
  61. data/test/orm/mongoid.rb +3 -0
  62. data/test/rails_app/app/active_record/user.rb +0 -2
  63. data/test/rails_app/app/mailers/users/mailer.rb +3 -0
  64. data/test/rails_app/app/mongoid/shim.rb +0 -5
  65. data/test/rails_app/config/application.rb +1 -0
  66. data/test/rails_app/config/initializers/devise.rb +3 -2
  67. data/test/rails_app/config/routes.rb +1 -1
  68. data/test/rails_app/lib/shared_user.rb +1 -0
  69. metadata +12 -12
  70. data/Gemfile.lock +0 -158
  71. data/lib/devise/email.rb +0 -23
@@ -2,7 +2,8 @@
2
2
  # four configuration values can also be set straight in your models.
3
3
  Devise.setup do |config|
4
4
  # ==> Mailer Configuration
5
- # Configure the e-mail address which will be shown in DeviseMailer.
5
+ # Configure the e-mail address which will be shown in Devise::Mailer,
6
+ # note that it will be overwritten if you use your own mailer class with default "from" parameter.
6
7
  config.mailer_sender = "please-change-me@config-initializers-devise.com"
7
8
 
8
9
  # Configure the class responsible to send e-mails.
@@ -35,7 +36,7 @@ Devise.setup do |config|
35
36
  # These keys will be downcased upon creating or modifying a user and when used
36
37
  # to authenticate or find a user. Default is :email.
37
38
  config.case_insensitive_keys = [ :email ]
38
-
39
+
39
40
  # Configure which authentication keys should have whitespace stripped.
40
41
  # These keys will have whitespace before and after removed upon creating or
41
42
  # modifying a user and when used to authenticate or find a user. Default is :email.
@@ -4,7 +4,7 @@ Rails.application.routes.draw do
4
4
  get :expire, :on => :member
5
5
  get :accept, :on => :member
6
6
 
7
- authenticate :user do
7
+ authenticate do
8
8
  post :exhibit, :on => :member
9
9
  end
10
10
  end
@@ -7,6 +7,7 @@ module SharedUser
7
7
  :trackable, :validatable, :omniauthable
8
8
 
9
9
  attr_accessor :other_key
10
+ attr_accessible :username, :email, :password, :password_confirmation, :remember_me
10
11
 
11
12
  # They need to be included after Devise is called.
12
13
  extend ExtendMethods
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise
3
3
  version: !ruby/object:Gem::Version
4
- hash: 3
4
+ hash: 1
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 4
9
- - 2
10
- version: 1.4.2
9
+ - 3
10
+ version: 1.4.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Jos\xC3\xA9 Valim"
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-06-30 00:00:00 -03:00
19
+ date: 2011-08-30 00:00:00 +02:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -59,12 +59,11 @@ dependencies:
59
59
  requirements:
60
60
  - - ~>
61
61
  - !ruby/object:Gem::Version
62
- hash: 15
62
+ hash: 7
63
63
  segments:
64
- - 2
65
- - 1
66
- - 2
67
- version: 2.1.2
64
+ - 3
65
+ - 0
66
+ version: "3.0"
68
67
  type: :runtime
69
68
  version_requirements: *id003
70
69
  description: Flexible authentication solution for Rails with Warden
@@ -80,7 +79,6 @@ files:
80
79
  - .travis.yml
81
80
  - CHANGELOG.rdoc
82
81
  - Gemfile
83
- - Gemfile.lock
84
82
  - MIT-LICENSE
85
83
  - README.rdoc
86
84
  - Rakefile
@@ -112,7 +110,6 @@ files:
112
110
  - lib/devise/controllers/scoped_views.rb
113
111
  - lib/devise/controllers/shared_helpers.rb
114
112
  - lib/devise/controllers/url_helpers.rb
115
- - lib/devise/email.rb
116
113
  - lib/devise/encryptors/authlogic_sha512.rb
117
114
  - lib/devise/encryptors/base.rb
118
115
  - lib/devise/encryptors/clearance_sha1.rb
@@ -162,6 +159,7 @@ files:
162
159
  - lib/devise/version.rb
163
160
  - lib/generators/active_record/devise_generator.rb
164
161
  - lib/generators/active_record/templates/migration.rb
162
+ - lib/generators/active_record/templates/migration_existing.rb
165
163
  - lib/generators/devise/devise_generator.rb
166
164
  - lib/generators/devise/install_generator.rb
167
165
  - lib/generators/devise/orm_helpers.rb
@@ -234,6 +232,7 @@ files:
234
232
  - test/rails_app/app/controllers/users/omniauth_callbacks_controller.rb
235
233
  - test/rails_app/app/controllers/users_controller.rb
236
234
  - test/rails_app/app/helpers/application_helper.rb
235
+ - test/rails_app/app/mailers/users/mailer.rb
237
236
  - test/rails_app/app/mongoid/admin.rb
238
237
  - test/rails_app/app/mongoid/shim.rb
239
238
  - test/rails_app/app/mongoid/user.rb
@@ -309,7 +308,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
309
308
  requirements: []
310
309
 
311
310
  rubyforge_project: devise
312
- rubygems_version: 1.5.3
311
+ rubygems_version: 1.6.2
313
312
  signing_key:
314
313
  specification_version: 3
315
314
  summary: Flexible authentication solution for Rails with Warden
@@ -372,6 +371,7 @@ test_files:
372
371
  - test/rails_app/app/controllers/users/omniauth_callbacks_controller.rb
373
372
  - test/rails_app/app/controllers/users_controller.rb
374
373
  - test/rails_app/app/helpers/application_helper.rb
374
+ - test/rails_app/app/mailers/users/mailer.rb
375
375
  - test/rails_app/app/mongoid/admin.rb
376
376
  - test/rails_app/app/mongoid/shim.rb
377
377
  - test/rails_app/app/mongoid/user.rb
@@ -1,158 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- devise (1.4.1)
5
- bcrypt-ruby (~> 2.1.2)
6
- orm_adapter (~> 0.0.3)
7
- warden (~> 1.0.3)
8
-
9
- GEM
10
- remote: http://rubygems.org/
11
- specs:
12
- abstract (1.0.0)
13
- actionmailer (3.0.7)
14
- actionpack (= 3.0.7)
15
- mail (~> 2.2.15)
16
- actionpack (3.0.7)
17
- activemodel (= 3.0.7)
18
- activesupport (= 3.0.7)
19
- builder (~> 2.1.2)
20
- erubis (~> 2.6.6)
21
- i18n (~> 0.5.0)
22
- rack (~> 1.2.1)
23
- rack-mount (~> 0.6.14)
24
- rack-test (~> 0.5.7)
25
- tzinfo (~> 0.3.23)
26
- activemodel (3.0.7)
27
- activesupport (= 3.0.7)
28
- builder (~> 2.1.2)
29
- i18n (~> 0.5.0)
30
- activerecord (3.0.7)
31
- activemodel (= 3.0.7)
32
- activesupport (= 3.0.7)
33
- arel (~> 2.0.2)
34
- tzinfo (~> 0.3.23)
35
- activerecord-jdbc-adapter (1.1.1)
36
- activerecord-jdbcsqlite3-adapter (1.1.1)
37
- activerecord-jdbc-adapter (= 1.1.1)
38
- jdbc-sqlite3 (~> 3.6.0)
39
- activeresource (3.0.7)
40
- activemodel (= 3.0.7)
41
- activesupport (= 3.0.7)
42
- activesupport (3.0.7)
43
- addressable (2.2.4)
44
- arel (2.0.9)
45
- bcrypt-ruby (2.1.4)
46
- bson (1.3.0)
47
- bson_ext (1.3.0)
48
- builder (2.1.2)
49
- columnize (0.3.2)
50
- erubis (2.6.6)
51
- abstract (>= 1.0.0)
52
- faraday (0.5.7)
53
- addressable (~> 2.2.4)
54
- multipart-post (~> 1.1.0)
55
- rack (>= 1.1.0, < 2)
56
- i18n (0.5.0)
57
- jdbc-sqlite3 (3.6.14.2.056-java)
58
- linecache (0.43)
59
- mail (2.2.19)
60
- activesupport (>= 2.3.6)
61
- i18n (>= 0.4.0)
62
- mime-types (~> 1.16)
63
- treetop (~> 1.4.8)
64
- mime-types (1.16)
65
- mocha (0.9.12)
66
- mongo (1.3.0)
67
- bson (>= 1.3.0)
68
- mongoid (2.0.1)
69
- activemodel (~> 3.0)
70
- mongo (~> 1.3)
71
- tzinfo (~> 0.3.22)
72
- will_paginate (~> 3.0.pre)
73
- multi_json (0.0.5)
74
- multipart-post (1.1.0)
75
- nokogiri (1.4.3.1)
76
- nokogiri (1.4.3.1-java)
77
- weakling (>= 0.0.3)
78
- oa-core (0.2.0)
79
- rack (~> 1.1)
80
- oa-oauth (0.2.0)
81
- multi_json (~> 0.0.2)
82
- nokogiri (~> 1.4.2)
83
- oa-core (= 0.2.0)
84
- oauth (~> 0.4.0)
85
- oauth2 (~> 0.1.1)
86
- oa-openid (0.2.0)
87
- oa-core (= 0.2.0)
88
- rack-openid (~> 1.2.0)
89
- ruby-openid-apps-discovery
90
- oauth (0.4.4)
91
- oauth2 (0.1.1)
92
- faraday (~> 0.5.0)
93
- multi_json (~> 0.0.4)
94
- orm_adapter (0.0.5)
95
- polyglot (0.3.1)
96
- rack (1.2.2)
97
- rack-mount (0.6.14)
98
- rack (>= 1.0.0)
99
- rack-openid (1.2.0)
100
- rack (>= 1.1.0)
101
- ruby-openid (>= 2.1.8)
102
- rack-test (0.5.7)
103
- rack (>= 1.0)
104
- rails (3.0.7)
105
- actionmailer (= 3.0.7)
106
- actionpack (= 3.0.7)
107
- activerecord (= 3.0.7)
108
- activeresource (= 3.0.7)
109
- activesupport (= 3.0.7)
110
- bundler (~> 1.0)
111
- railties (= 3.0.7)
112
- railties (3.0.7)
113
- actionpack (= 3.0.7)
114
- activesupport (= 3.0.7)
115
- rake (>= 0.8.7)
116
- thor (~> 0.14.4)
117
- rake (0.8.7)
118
- ruby-debug (0.10.4)
119
- columnize (>= 0.1)
120
- ruby-debug-base (~> 0.10.4.0)
121
- ruby-debug-base (0.10.4)
122
- linecache (>= 0.3)
123
- ruby-openid (2.1.8)
124
- ruby-openid-apps-discovery (1.2.0)
125
- ruby-openid (>= 2.1.7)
126
- sqlite3 (1.3.3)
127
- sqlite3-ruby (1.3.3)
128
- sqlite3 (>= 1.3.3)
129
- thor (0.14.6)
130
- treetop (1.4.9)
131
- polyglot (>= 0.3.1)
132
- tzinfo (0.3.27)
133
- warden (1.0.4)
134
- rack (>= 1.0)
135
- weakling (0.0.4-java)
136
- webrat (0.7.2)
137
- nokogiri (>= 1.2.0)
138
- rack (>= 1.0)
139
- rack-test (>= 0.5.3)
140
- will_paginate (3.0.pre2)
141
-
142
- PLATFORMS
143
- java
144
- ruby
145
-
146
- DEPENDENCIES
147
- activerecord-jdbcsqlite3-adapter
148
- bson_ext (~> 1.3.0)
149
- devise!
150
- mocha
151
- mongo (~> 1.3.0)
152
- mongoid (= 2.0.1)
153
- oa-oauth (~> 0.2.0)
154
- oa-openid (~> 0.2.0)
155
- rails (~> 3.0.7)
156
- ruby-debug (>= 0.10.3)
157
- sqlite3-ruby
158
- webrat (= 0.7.2)
@@ -1,23 +0,0 @@
1
- # This e-mail validation regexes were retrieved from SixArm Ruby
2
- # e-mail validation gem (https://github.com/SixArm/sixarm_ruby_email_address_validation)
3
- # As said on https://github.com/SixArm/sixarm_ruby_email_address_validation/blob/master/LICENSE.txt,
4
- # we added it using Ruby license terms.
5
-
6
- module Devise
7
- module Email
8
- QTEXT = Regexp.new '[^\\x0d\\x22\\x5c\\x80-\\xff]', nil, 'n'
9
- DTEXT = Regexp.new '[^\\x0d\\x5b-\\x5d\\x80-\\xff]', nil, 'n'
10
- ATOM = Regexp.new '[^\\x00-\\x20\\x22\\x28\\x29\\x2c\\x2e\\x3a-\\x3c\\x3e\\x40\\x5b-\\x5d\\x7f-\\xff]+', nil, 'n'
11
- QUOTED_PAIR = Regexp.new '\\x5c[\\x00-\\x7f]', nil, 'n'
12
- DOMAIN_LITERAL = Regexp.new "\\x5b(?:#{DTEXT}|#{QUOTED_PAIR})*\\x5d", nil, 'n'
13
- QUOTED_STRING = Regexp.new "\\x22(?:#{QTEXT}|#{QUOTED_PAIR})*\\x22", nil, 'n'
14
- DOMAIN_REF = ATOM
15
- SUB_DOMAIN = "(?:#{DOMAIN_REF}|#{DOMAIN_LITERAL})"
16
- WORD = "(?:#{ATOM}|#{QUOTED_STRING})"
17
- DOMAIN = "#{SUB_DOMAIN}(?:\\x2e#{SUB_DOMAIN})*"
18
- LOCAL_PART = "#{WORD}(?:\\x2e#{WORD})*"
19
- SPEC = "#{LOCAL_PART}\\x40#{DOMAIN}"
20
- PATTERN = Regexp.new "#{SPEC}", nil, 'n'
21
- EXACT_PATTERN = Regexp.new "\\A#{SPEC}\\z", nil, 'n'
22
- end
23
- end