authpwn_rails 0.21.1 → 0.22.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +2 -4
  3. data/Gemfile +6 -6
  4. data/Gemfile.lock +69 -65
  5. data/{Gemfile.rails4 → Gemfile.rails5} +7 -6
  6. data/{README.rdoc → README.md} +21 -13
  7. data/Rakefile +1 -1
  8. data/VERSION +1 -1
  9. data/app/models/tokens/email_verification.rb +2 -2
  10. data/app/models/tokens/password_reset.rb +1 -1
  11. data/authpwn_rails.gemspec +26 -28
  12. data/lib/authpwn_rails/generators/templates/001_create_users.rb +1 -1
  13. data/lib/authpwn_rails/generators/templates/003_create_credentials.rb +2 -2
  14. data/lib/authpwn_rails/generators/templates/session/forbidden.html.erb +1 -1
  15. data/lib/authpwn_rails/generators/templates/session/home.html.erb +3 -2
  16. data/lib/authpwn_rails/generators/templates/session_controller_test.rb +11 -11
  17. data/lib/authpwn_rails/generators/templates/session_mailer_test.rb +2 -10
  18. data/lib/authpwn_rails/http_basic.rb +4 -4
  19. data/lib/authpwn_rails/http_token.rb +1 -1
  20. data/lib/authpwn_rails/session.rb +4 -4
  21. data/lib/authpwn_rails/session_controller.rb +6 -10
  22. data/test/{test_extensions_test.rb → action_controller_test_extensions_test.rb} +4 -5
  23. data/test/cookie_controller_test.rb +52 -42
  24. data/test/credentials/api_token_test.rb +2 -2
  25. data/test/credentials/email_verification_token_test.rb +2 -2
  26. data/test/credentials/omni_auth_uid_credential_test.rb +3 -4
  27. data/test/credentials/one_time_token_credential_test.rb +6 -6
  28. data/test/credentials/password_reset_token_test.rb +3 -3
  29. data/test/credentials/session_uid_token_test.rb +2 -2
  30. data/test/credentials/token_crendential_test.rb +3 -3
  31. data/test/fixtures/bare_session/forbidden.html.erb +1 -1
  32. data/test/fixtures/bare_session/home.html.erb +3 -2
  33. data/test/fixtures/bare_session/welcome.html.erb +1 -1
  34. data/test/helpers/db_setup.rb +2 -2
  35. data/test/helpers/test_order.rb +1 -3
  36. data/test/http_basic_controller_test.rb +24 -12
  37. data/test/http_token_controller_test.rb +24 -12
  38. data/test/session_controller_api_test.rb +140 -164
  39. data/test/session_mailer_api_test.rb +2 -10
  40. metadata +19 -27
  41. data/Gemfile.rails41 +0 -18
  42. data/Gemfile.rails42 +0 -18
@@ -41,11 +41,7 @@ class SessionMailerApiTest < ActionMailer::TestCase
41
41
  test 'email verification email contents' do
42
42
  email_draft = SessionMailer.email_verification_email @verification_token,
43
43
  @root_url
44
- if email_draft.respond_to? :deliver_now
45
- email = email_draft.deliver_now
46
- else
47
- email = email_draft.deliver
48
- end
44
+ email = email_draft.deliver_now
49
45
  assert !ActionMailer::Base.deliveries.empty?
50
46
 
51
47
  assert_equal 'test.host e-mail verification', email.subject
@@ -58,11 +54,7 @@ class SessionMailerApiTest < ActionMailer::TestCase
58
54
  test 'password reset email contents' do
59
55
  email_draft = SessionMailer.reset_password_email @reset_email,
60
56
  @reset_token, @root_url
61
- if email_draft.respond_to? :deliver_now
62
- email = email_draft.deliver_now
63
- else
64
- email = email_draft.deliver
65
- end
57
+ email = email_draft.deliver_now
66
58
  assert !ActionMailer::Base.deliveries.empty?
67
59
 
68
60
  assert_equal 'test.host password reset', email.subject
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authpwn_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.1
4
+ version: 0.22.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Costan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-03 00:00:00.000000000 Z
11
+ date: 2016-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: base32
@@ -30,20 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 4.0.13
34
- - - "~>"
35
- - !ruby/object:Gem::Version
36
- version: '4.0'
33
+ version: 5.0.0.1
37
34
  type: :runtime
38
35
  prerelease: false
39
36
  version_requirements: !ruby/object:Gem::Requirement
40
37
  requirements:
41
38
  - - ">="
42
39
  - !ruby/object:Gem::Version
43
- version: 4.0.13
44
- - - "~>"
45
- - !ruby/object:Gem::Version
46
- version: '4.0'
40
+ version: 5.0.0.1
47
41
  - !ruby/object:Gem::Dependency
48
42
  name: bundler
49
43
  requirement: !ruby/object:Gem::Requirement
@@ -78,14 +72,14 @@ dependencies:
78
72
  requirements:
79
73
  - - ">="
80
74
  - !ruby/object:Gem::Version
81
- version: 2.0.1
75
+ version: 2.1.1
82
76
  type: :development
83
77
  prerelease: false
84
78
  version_requirements: !ruby/object:Gem::Requirement
85
79
  requirements:
86
80
  - - ">="
87
81
  - !ruby/object:Gem::Version
88
- version: 2.0.1
82
+ version: 2.1.1
89
83
  - !ruby/object:Gem::Dependency
90
84
  name: simplecov
91
85
  requirement: !ruby/object:Gem::Requirement
@@ -106,14 +100,14 @@ dependencies:
106
100
  requirements:
107
101
  - - ">="
108
102
  - !ruby/object:Gem::Version
109
- version: 0.3.20
103
+ version: 0.4.4
110
104
  type: :development
111
105
  prerelease: false
112
106
  version_requirements: !ruby/object:Gem::Requirement
113
107
  requirements:
114
108
  - - ">="
115
109
  - !ruby/object:Gem::Version
116
- version: 0.3.20
110
+ version: 0.4.4
117
111
  - !ruby/object:Gem::Dependency
118
112
  name: omniauth
119
113
  requirement: !ruby/object:Gem::Requirement
@@ -134,42 +128,42 @@ dependencies:
134
128
  requirements:
135
129
  - - ">="
136
130
  - !ruby/object:Gem::Version
137
- version: 0.18.4
131
+ version: 0.19.0
138
132
  type: :development
139
133
  prerelease: false
140
134
  version_requirements: !ruby/object:Gem::Requirement
141
135
  requirements:
142
136
  - - ">="
143
137
  - !ruby/object:Gem::Version
144
- version: 0.18.4
138
+ version: 0.19.0
145
139
  - !ruby/object:Gem::Dependency
146
140
  name: rake
147
141
  requirement: !ruby/object:Gem::Requirement
148
142
  requirements:
149
143
  - - ">="
150
144
  - !ruby/object:Gem::Version
151
- version: 11.1.1
145
+ version: 11.3.0
152
146
  type: :development
153
147
  prerelease: false
154
148
  version_requirements: !ruby/object:Gem::Requirement
155
149
  requirements:
156
150
  - - ">="
157
151
  - !ruby/object:Gem::Version
158
- version: 11.1.1
152
+ version: 11.3.0
159
153
  - !ruby/object:Gem::Dependency
160
154
  name: sqlite3
161
155
  requirement: !ruby/object:Gem::Requirement
162
156
  requirements:
163
157
  - - ">="
164
158
  - !ruby/object:Gem::Version
165
- version: 1.3.11
159
+ version: 1.3.12
166
160
  type: :development
167
161
  prerelease: false
168
162
  version_requirements: !ruby/object:Gem::Requirement
169
163
  requirements:
170
164
  - - ">="
171
165
  - !ruby/object:Gem::Version
172
- version: 1.3.11
166
+ version: 1.3.12
173
167
  - !ruby/object:Gem::Dependency
174
168
  name: rubysl
175
169
  requirement: !ruby/object:Gem::Requirement
@@ -218,18 +212,16 @@ executables: []
218
212
  extensions: []
219
213
  extra_rdoc_files:
220
214
  - LICENSE
221
- - README.rdoc
215
+ - README.md
222
216
  files:
223
217
  - ".document"
224
218
  - ".project"
225
219
  - ".travis.yml"
226
220
  - Gemfile
227
221
  - Gemfile.lock
228
- - Gemfile.rails4
229
- - Gemfile.rails41
230
- - Gemfile.rails42
222
+ - Gemfile.rails5
231
223
  - LICENSE
232
- - README.rdoc
224
+ - README.md
233
225
  - Rakefile
234
226
  - VERSION
235
227
  - app/helpers/session_helper.rb
@@ -287,6 +279,7 @@ files:
287
279
  - lib/authpwn_rails/user_extensions/email_field.rb
288
280
  - lib/authpwn_rails/user_extensions/password_field.rb
289
281
  - lib/authpwn_rails/user_model.rb
282
+ - test/action_controller_test_extensions_test.rb
290
283
  - test/cookie_controller_test.rb
291
284
  - test/credentials/api_token_test.rb
292
285
  - test/credentials/email_credential_test.rb
@@ -324,7 +317,6 @@ files:
324
317
  - test/session_mailer_api_test.rb
325
318
  - test/session_mailer_test.rb
326
319
  - test/session_test.rb
327
- - test/test_extensions_test.rb
328
320
  - test/test_helper.rb
329
321
  - test/user_extensions/api_token_field_test.rb
330
322
  - test/user_extensions/email_field_test.rb
@@ -353,5 +345,5 @@ rubyforge_project:
353
345
  rubygems_version: 2.5.1
354
346
  signing_key:
355
347
  specification_version: 4
356
- summary: User authentication for Rails 4 applications.
348
+ summary: User authentication for Rails 5 applications.
357
349
  test_files: []
@@ -1,18 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'base32', '>= 0.3.2'
4
- gem 'rails', '~> 4.1.16'
5
-
6
- group :development do
7
- gem 'bundler', '>= 1.6.6'
8
- gem 'mocha', '>= 1.1.0'
9
- gem 'jeweler', '>= 2.0.1'
10
- gem 'simplecov', '>= 0'
11
- gem 'mysql2', '~> 0.3.20'
12
- gem 'omniauth', '>= 1.3.1'
13
- gem 'pg', '>= 0.18.4'
14
- gem 'sqlite3', '>= 1.3.11'
15
- gem 'rubysl', platforms: [:rbx]
16
- gem 'rubysl-bundler', platforms: [:rbx]
17
- gem 'rubysl-rake', platforms: [:rbx]
18
- end
@@ -1,18 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'base32', '>= 0.3.2'
4
- gem 'rails', '~> 4.2.7'
5
-
6
- group :development do
7
- gem 'bundler', '>= 1.6.6'
8
- gem 'mocha', '>= 1.1.0'
9
- gem 'jeweler', '>= 2.0.1'
10
- gem 'simplecov', '>= 0'
11
- gem 'mysql2', '>= 0.4.2'
12
- gem 'omniauth', '>= 1.3.1'
13
- gem 'pg', '>= 0.18.4'
14
- gem 'sqlite3', '>= 1.3.11'
15
- gem 'rubysl', platforms: [:rbx]
16
- gem 'rubysl-bundler', platforms: [:rbx]
17
- gem 'rubysl-rake', platforms: [:rbx]
18
- end