push_type_auth 0.1.0.beta3 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/controllers/push_type/profiles_controller.rb +50 -0
- data/app/views/push_type/profiles/edit.html.haml +46 -0
- data/config/routes.rb +2 -0
- data/lib/push_type/auth/engine.rb +0 -1
- data/lib/tasks/push_type_tasks.rake +26 -4
- data/test/controllers/concerns/push_type/authentication_methods_test.rb +15 -0
- data/test/controllers/concerns/push_type/invitation_methods_test.rb +11 -0
- data/test/controllers/push_type/profiles_controller_test.rb +33 -0
- data/test/controllers/push_type/users_controller_test.rb +24 -0
- data/test/dummy/config/secrets.yml +2 -2
- data/test/dummy/db/migrate/{20141205213533_create_push_type_users.push_type.rb → 20150102204443_create_push_type_users.push_type.rb} +0 -0
- data/test/dummy/db/migrate/{20141205213534_create_push_type_nodes.push_type.rb → 20150102204444_create_push_type_nodes.push_type.rb} +0 -0
- data/test/dummy/db/migrate/{20141205213535_create_push_type_node_hierarchies.push_type.rb → 20150102204445_create_push_type_node_hierarchies.push_type.rb} +0 -0
- data/test/dummy/db/migrate/{20141205213536_create_push_type_assets.push_type.rb → 20150102204446_create_push_type_assets.push_type.rb} +0 -0
- data/test/dummy/db/migrate/{20141205213537_devise_extend_push_type_users.push_type_auth.rb → 20150102204447_devise_extend_push_type_users.push_type_auth.rb} +0 -0
- data/test/dummy/db/schema.rb +1 -1
- data/test/dummy/log/test.log +696 -269
- data/test/dummy/tmp/cache/assets/test/sass/806626419a476c98acb0fcf38feea6623fb99ce0/admin.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/806626419a476c98acb0fcf38feea6623fb99ce0/foundation_and_overrides.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/12375f1bf3d91db0a06c3fc436918949 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/b3b2a83d3d7d735130f0b029e58b29b8 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/dd803fd7a93619599c7e703c2b307411 +0 -0
- data/test/factories.rb +7 -0
- data/test/models/concerns/push_type/authenticatable_test.rb +52 -0
- metadata +46 -18
data/test/dummy/tmp/cache/assets/test/sass/806626419a476c98acb0fcf38feea6623fb99ce0/admin.scssc
CHANGED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/test/factories.rb
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
require "test_helper"
|
2
|
+
|
3
|
+
module PushType
|
4
|
+
describe Authenticatable do
|
5
|
+
|
6
|
+
let(:user) { PushType::User.new }
|
7
|
+
|
8
|
+
describe 'database_athenticatable' do
|
9
|
+
it { user.methods.include?(:password).must_equal true }
|
10
|
+
it { user.methods.include?(:password_confirmation).must_equal true }
|
11
|
+
end
|
12
|
+
|
13
|
+
describe 'confirmable' do
|
14
|
+
it { user.methods.include?(:confirm!).must_equal true }
|
15
|
+
end
|
16
|
+
|
17
|
+
describe 'recoverable' do
|
18
|
+
it { user.methods.include?(:reset_password!).must_equal true }
|
19
|
+
end
|
20
|
+
|
21
|
+
describe 'rememberable' do
|
22
|
+
it { user.methods.include?(:remember_me).must_equal true }
|
23
|
+
end
|
24
|
+
|
25
|
+
describe 'trackable' do
|
26
|
+
it { user.methods.include?(:update_tracked_fields!).must_equal true }
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'validatable' do
|
30
|
+
it { user.methods.include?(:password_required?).must_equal true }
|
31
|
+
it { user.methods.include?(:email_required?).must_equal true }
|
32
|
+
end
|
33
|
+
|
34
|
+
describe '#password_required?' do
|
35
|
+
subject { user.send(:password_required?) }
|
36
|
+
describe 'with new user' do
|
37
|
+
let(:user) { PushType::User.new }
|
38
|
+
it { subject.must_equal false }
|
39
|
+
end
|
40
|
+
describe 'with existing user and clean password' do
|
41
|
+
let(:user) { FactoryGirl.create :user }
|
42
|
+
it { subject.must_equal false }
|
43
|
+
end
|
44
|
+
describe 'with existing user and dirty password' do
|
45
|
+
let(:user) { FactoryGirl.create :user }
|
46
|
+
before { user.password = 'newpassword' }
|
47
|
+
it { subject.must_equal true }
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
52
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: push_type_auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Russell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: push_type_core
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.1.0
|
19
|
+
version: 0.1.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.1.0
|
26
|
+
version: 0.1.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: push_type_admin
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.1.0
|
33
|
+
version: 0.1.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.1.0
|
40
|
+
version: 0.1.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: devise
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 3.4.1
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: highline
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: minitest-rails
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -107,6 +121,7 @@ files:
|
|
107
121
|
- app/controllers/concerns/push_type/invitation_methods.rb
|
108
122
|
- app/controllers/push_type/confirmations_controller.rb
|
109
123
|
- app/controllers/push_type/passwords_controller.rb
|
124
|
+
- app/controllers/push_type/profiles_controller.rb
|
110
125
|
- app/controllers/push_type/sessions_controller.rb
|
111
126
|
- app/helpers/push_type/auth_helper.rb
|
112
127
|
- app/models/concerns/push_type/authenticatable.rb
|
@@ -119,6 +134,7 @@ files:
|
|
119
134
|
- app/views/push_type/confirmations/show.html.haml
|
120
135
|
- app/views/push_type/passwords/edit.html.haml
|
121
136
|
- app/views/push_type/passwords/new.html.haml
|
137
|
+
- app/views/push_type/profiles/edit.html.haml
|
122
138
|
- app/views/push_type/sessions/new.html.haml
|
123
139
|
- app/views/push_type/users/_meta_table.html.haml
|
124
140
|
- config/initializers/devise.rb
|
@@ -129,7 +145,11 @@ files:
|
|
129
145
|
- lib/push_type/auth/engine.rb
|
130
146
|
- lib/push_type_auth.rb
|
131
147
|
- lib/tasks/push_type_tasks.rake
|
148
|
+
- test/controllers/concerns/push_type/authentication_methods_test.rb
|
149
|
+
- test/controllers/concerns/push_type/invitation_methods_test.rb
|
132
150
|
- test/controllers/push_type/confirmations_controller_test.rb
|
151
|
+
- test/controllers/push_type/profiles_controller_test.rb
|
152
|
+
- test/controllers/push_type/users_controller_test.rb
|
133
153
|
- test/dummy/README.rdoc
|
134
154
|
- test/dummy/Rakefile
|
135
155
|
- test/dummy/app/assets/javascripts/application.js
|
@@ -162,11 +182,11 @@ files:
|
|
162
182
|
- test/dummy/config/locales/en.yml
|
163
183
|
- test/dummy/config/routes.rb
|
164
184
|
- test/dummy/config/secrets.yml
|
165
|
-
- test/dummy/db/migrate/
|
166
|
-
- test/dummy/db/migrate/
|
167
|
-
- test/dummy/db/migrate/
|
168
|
-
- test/dummy/db/migrate/
|
169
|
-
- test/dummy/db/migrate/
|
185
|
+
- test/dummy/db/migrate/20150102204443_create_push_type_users.push_type.rb
|
186
|
+
- test/dummy/db/migrate/20150102204444_create_push_type_nodes.push_type.rb
|
187
|
+
- test/dummy/db/migrate/20150102204445_create_push_type_node_hierarchies.push_type.rb
|
188
|
+
- test/dummy/db/migrate/20150102204446_create_push_type_assets.push_type.rb
|
189
|
+
- test/dummy/db/migrate/20150102204447_devise_extend_push_type_users.push_type_auth.rb
|
170
190
|
- test/dummy/db/schema.rb
|
171
191
|
- test/dummy/db/seeds.rb
|
172
192
|
- test/dummy/log/test.log
|
@@ -338,6 +358,8 @@ files:
|
|
338
358
|
- test/dummy/tmp/cache/assets/test/sprockets/fa7e1f9a13f606e2603a17f8e00aa32a
|
339
359
|
- test/dummy/tmp/cache/assets/test/sprockets/fcce52ee43ecad8cb3f18fc8f13a66b7
|
340
360
|
- test/dummy/tmp/cache/assets/test/sprockets/fd5e59fed8301f86b74e551534fce2b2
|
361
|
+
- test/factories.rb
|
362
|
+
- test/models/concerns/push_type/authenticatable_test.rb
|
341
363
|
- test/test_helper.rb
|
342
364
|
homepage: http://type.pushcode.com
|
343
365
|
licenses:
|
@@ -354,9 +376,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
354
376
|
version: '0'
|
355
377
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
356
378
|
requirements:
|
357
|
-
- - "
|
379
|
+
- - ">="
|
358
380
|
- !ruby/object:Gem::Version
|
359
|
-
version:
|
381
|
+
version: '0'
|
360
382
|
requirements: []
|
361
383
|
rubyforge_project:
|
362
384
|
rubygems_version: 2.4.5
|
@@ -364,7 +386,11 @@ signing_key:
|
|
364
386
|
specification_version: 4
|
365
387
|
summary: Provides authentication to the PushType content management system using Devise.
|
366
388
|
test_files:
|
389
|
+
- test/controllers/concerns/push_type/authentication_methods_test.rb
|
390
|
+
- test/controllers/concerns/push_type/invitation_methods_test.rb
|
367
391
|
- test/controllers/push_type/confirmations_controller_test.rb
|
392
|
+
- test/controllers/push_type/profiles_controller_test.rb
|
393
|
+
- test/controllers/push_type/users_controller_test.rb
|
368
394
|
- test/dummy/app/assets/javascripts/application.js
|
369
395
|
- test/dummy/app/assets/stylesheets/application.css
|
370
396
|
- test/dummy/app/controllers/application_controller.rb
|
@@ -395,11 +421,11 @@ test_files:
|
|
395
421
|
- test/dummy/config/routes.rb
|
396
422
|
- test/dummy/config/secrets.yml
|
397
423
|
- test/dummy/config.ru
|
398
|
-
- test/dummy/db/migrate/
|
399
|
-
- test/dummy/db/migrate/
|
400
|
-
- test/dummy/db/migrate/
|
401
|
-
- test/dummy/db/migrate/
|
402
|
-
- test/dummy/db/migrate/
|
424
|
+
- test/dummy/db/migrate/20150102204443_create_push_type_users.push_type.rb
|
425
|
+
- test/dummy/db/migrate/20150102204444_create_push_type_nodes.push_type.rb
|
426
|
+
- test/dummy/db/migrate/20150102204445_create_push_type_node_hierarchies.push_type.rb
|
427
|
+
- test/dummy/db/migrate/20150102204446_create_push_type_assets.push_type.rb
|
428
|
+
- test/dummy/db/migrate/20150102204447_devise_extend_push_type_users.push_type_auth.rb
|
403
429
|
- test/dummy/db/schema.rb
|
404
430
|
- test/dummy/db/seeds.rb
|
405
431
|
- test/dummy/log/test.log
|
@@ -573,4 +599,6 @@ test_files:
|
|
573
599
|
- test/dummy/tmp/cache/assets/test/sprockets/fa7e1f9a13f606e2603a17f8e00aa32a
|
574
600
|
- test/dummy/tmp/cache/assets/test/sprockets/fcce52ee43ecad8cb3f18fc8f13a66b7
|
575
601
|
- test/dummy/tmp/cache/assets/test/sprockets/fd5e59fed8301f86b74e551534fce2b2
|
602
|
+
- test/factories.rb
|
603
|
+
- test/models/concerns/push_type/authenticatable_test.rb
|
576
604
|
- test/test_helper.rb
|