strong_form 0.0.5 → 0.0.6
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/CHANGELOG.md +8 -0
- data/lib/strong_form/tag.rb +4 -1
- data/lib/strong_form/version.rb +1 -1
- data/spec/dummy/app/views/base/_user_fields.html.haml +1 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/20151116150723_add_roles_to_users.rb +5 -0
- data/spec/dummy/db/schema.rb +2 -1
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +7 -0
- data/spec/dummy/log/test.log +4244 -0
- data/spec/examples.txt +58 -56
- data/spec/features/strong_form_spec.rb +8 -3
- metadata +3 -1
data/spec/examples.txt
CHANGED
@@ -1,59 +1,61 @@
|
|
1
1
|
example_id | status | run_time |
|
2
2
|
------------------------------------------------ | ------ | --------------- |
|
3
|
-
./spec/features/strong_form_spec.rb[1:1:1:1] | passed | 0.
|
4
|
-
./spec/features/strong_form_spec.rb[1:1:1:2] | passed | 0.
|
5
|
-
./spec/features/strong_form_spec.rb[1:1:1:3] | passed | 0.
|
6
|
-
./spec/features/strong_form_spec.rb[1:1:1:4] | passed | 0.
|
7
|
-
./spec/features/strong_form_spec.rb[1:1:
|
8
|
-
./spec/features/strong_form_spec.rb[1:1:2:
|
9
|
-
./spec/features/strong_form_spec.rb[1:1:2:
|
10
|
-
./spec/features/strong_form_spec.rb[1:1:2:
|
11
|
-
./spec/features/strong_form_spec.rb[1:
|
12
|
-
./spec/features/strong_form_spec.rb[1:
|
13
|
-
./spec/features/strong_form_spec.rb[1:2:1:1:
|
14
|
-
./spec/features/strong_form_spec.rb[1:2:1:1:
|
15
|
-
./spec/features/strong_form_spec.rb[1:2:1:1:
|
16
|
-
./spec/features/strong_form_spec.rb[1:2:1:1:
|
17
|
-
./spec/features/strong_form_spec.rb[1:2:
|
18
|
-
./spec/features/strong_form_spec.rb[1:2:
|
19
|
-
./spec/features/strong_form_spec.rb[1:2:2:1:
|
20
|
-
./spec/features/strong_form_spec.rb[1:2:2:1:
|
21
|
-
./spec/features/strong_form_spec.rb[1:2:2:
|
22
|
-
./spec/features/strong_form_spec.rb[1:2:2:
|
23
|
-
./spec/features/strong_form_spec.rb[1:2:
|
24
|
-
./spec/features/strong_form_spec.rb[1:2:
|
25
|
-
./spec/features/strong_form_spec.rb[1:2:3:1:
|
26
|
-
./spec/features/strong_form_spec.rb[1:2:3:1:
|
27
|
-
./spec/features/strong_form_spec.rb[1:2:3:
|
28
|
-
./spec/features/strong_form_spec.rb[1:2:3:
|
29
|
-
./spec/features/strong_form_spec.rb[1:3:1]
|
30
|
-
./spec/features/strong_form_spec.rb[1:3:2]
|
31
|
-
./spec/features/strong_form_spec.rb[1:3:
|
32
|
-
./spec/features/strong_form_spec.rb[1:3:
|
33
|
-
./spec/features/strong_form_spec.rb[1:
|
34
|
-
./spec/features/strong_form_spec.rb[1:4
|
35
|
-
./spec/features/strong_form_spec.rb[1:4:
|
36
|
-
./spec/features/strong_form_spec.rb[1:4:
|
37
|
-
./spec/features/strong_form_spec.rb[1:
|
38
|
-
./spec/features/strong_form_spec.rb[1:
|
39
|
-
./spec/features/strong_form_spec.rb[1:5:
|
40
|
-
./spec/features/strong_form_spec.rb[1:5:2:1:
|
41
|
-
./spec/features/strong_form_spec.rb[1:5:2:1:
|
42
|
-
./spec/features/strong_form_spec.rb[1:5:2:1:
|
43
|
-
./spec/features/strong_form_spec.rb[1:5:2:2:
|
44
|
-
./spec/features/strong_form_spec.rb[1:5:
|
45
|
-
./spec/features/strong_form_spec.rb[1:5:
|
46
|
-
./spec/features/strong_form_spec.rb[1:5:3:
|
47
|
-
./spec/features/strong_form_spec.rb[1:5:
|
48
|
-
./spec/features/strong_form_spec.rb[1:5:
|
49
|
-
./spec/features/strong_form_spec.rb[1:5:4:1:
|
50
|
-
./spec/features/strong_form_spec.rb[1:5:4:1:
|
51
|
-
./spec/features/strong_form_spec.rb[1:5:4:1:
|
52
|
-
./spec/features/strong_form_spec.rb[1:5:4:1:
|
53
|
-
./spec/features/strong_form_spec.rb[1:5:4:
|
54
|
-
./spec/features/strong_form_spec.rb[1:5:
|
55
|
-
./spec/
|
56
|
-
./spec/
|
57
|
-
./spec/models/user_spec.rb[1:1:
|
58
|
-
./spec/models/user_spec.rb[1:1:2:
|
3
|
+
./spec/features/strong_form_spec.rb[1:1:1:1] | passed | 0.01067 seconds |
|
4
|
+
./spec/features/strong_form_spec.rb[1:1:1:2] | passed | 0.00616 seconds |
|
5
|
+
./spec/features/strong_form_spec.rb[1:1:1:3] | passed | 0.00511 seconds |
|
6
|
+
./spec/features/strong_form_spec.rb[1:1:1:4] | passed | 0.00667 seconds |
|
7
|
+
./spec/features/strong_form_spec.rb[1:1:1:5] | passed | 0.00572 seconds |
|
8
|
+
./spec/features/strong_form_spec.rb[1:1:2:1] | passed | 0.00559 seconds |
|
9
|
+
./spec/features/strong_form_spec.rb[1:1:2:2] | passed | 0.0087 seconds |
|
10
|
+
./spec/features/strong_form_spec.rb[1:1:2:3] | passed | 0.00777 seconds |
|
11
|
+
./spec/features/strong_form_spec.rb[1:1:2:4] | passed | 0.00573 seconds |
|
12
|
+
./spec/features/strong_form_spec.rb[1:1:2:5] | passed | 0.00687 seconds |
|
13
|
+
./spec/features/strong_form_spec.rb[1:2:1:1:1] | passed | 0.01619 seconds |
|
14
|
+
./spec/features/strong_form_spec.rb[1:2:1:1:2] | passed | 0.00673 seconds |
|
15
|
+
./spec/features/strong_form_spec.rb[1:2:1:1:3] | passed | 0.01024 seconds |
|
16
|
+
./spec/features/strong_form_spec.rb[1:2:1:1:4] | passed | 0.00664 seconds |
|
17
|
+
./spec/features/strong_form_spec.rb[1:2:1:1:5] | passed | 0.00915 seconds |
|
18
|
+
./spec/features/strong_form_spec.rb[1:2:1:1:6] | passed | 0.02026 seconds |
|
19
|
+
./spec/features/strong_form_spec.rb[1:2:2:1:1] | passed | 0.00704 seconds |
|
20
|
+
./spec/features/strong_form_spec.rb[1:2:2:1:2] | passed | 0.00783 seconds |
|
21
|
+
./spec/features/strong_form_spec.rb[1:2:2:1:3] | passed | 0.01374 seconds |
|
22
|
+
./spec/features/strong_form_spec.rb[1:2:2:1:4] | passed | 0.00728 seconds |
|
23
|
+
./spec/features/strong_form_spec.rb[1:2:2:2:1] | passed | 0.01156 seconds |
|
24
|
+
./spec/features/strong_form_spec.rb[1:2:2:2:2] | passed | 0.00947 seconds |
|
25
|
+
./spec/features/strong_form_spec.rb[1:2:3:1:1] | passed | 0.00916 seconds |
|
26
|
+
./spec/features/strong_form_spec.rb[1:2:3:1:2] | passed | 0.00793 seconds |
|
27
|
+
./spec/features/strong_form_spec.rb[1:2:3:1:3] | passed | 0.01403 seconds |
|
28
|
+
./spec/features/strong_form_spec.rb[1:2:3:1:4] | passed | 0.02731 seconds |
|
29
|
+
./spec/features/strong_form_spec.rb[1:2:3:2:1] | passed | 0.01094 seconds |
|
30
|
+
./spec/features/strong_form_spec.rb[1:2:3:2:2] | passed | 0.00922 seconds |
|
31
|
+
./spec/features/strong_form_spec.rb[1:3:1] | passed | 0.16025 seconds |
|
32
|
+
./spec/features/strong_form_spec.rb[1:3:2] | passed | 0.00584 seconds |
|
33
|
+
./spec/features/strong_form_spec.rb[1:3:3] | passed | 0.00594 seconds |
|
34
|
+
./spec/features/strong_form_spec.rb[1:3:4] | passed | 0.00676 seconds |
|
35
|
+
./spec/features/strong_form_spec.rb[1:4:1:1:1] | passed | 0.01197 seconds |
|
36
|
+
./spec/features/strong_form_spec.rb[1:4:1:1:2] | passed | 0.01235 seconds |
|
37
|
+
./spec/features/strong_form_spec.rb[1:4:2:1:1] | passed | 0.00929 seconds |
|
38
|
+
./spec/features/strong_form_spec.rb[1:4:2:1:2] | passed | 0.01231 seconds |
|
39
|
+
./spec/features/strong_form_spec.rb[1:5:1] | passed | 0.00973 seconds |
|
40
|
+
./spec/features/strong_form_spec.rb[1:5:2:1:1:1] | passed | 0.00835 seconds |
|
41
|
+
./spec/features/strong_form_spec.rb[1:5:2:1:1:2] | passed | 0.00739 seconds |
|
42
|
+
./spec/features/strong_form_spec.rb[1:5:2:1:2:1] | passed | 0.00579 seconds |
|
43
|
+
./spec/features/strong_form_spec.rb[1:5:2:1:2:2] | passed | 0.00627 seconds |
|
44
|
+
./spec/features/strong_form_spec.rb[1:5:2:1:3] | passed | 0.00795 seconds |
|
45
|
+
./spec/features/strong_form_spec.rb[1:5:2:2:1] | passed | 0.00992 seconds |
|
46
|
+
./spec/features/strong_form_spec.rb[1:5:3:1:1] | passed | 0.00913 seconds |
|
47
|
+
./spec/features/strong_form_spec.rb[1:5:3:1:2] | passed | 0.00641 seconds |
|
48
|
+
./spec/features/strong_form_spec.rb[1:5:3:2:1] | passed | 0.00704 seconds |
|
49
|
+
./spec/features/strong_form_spec.rb[1:5:4:1:1] | passed | 0.00964 seconds |
|
50
|
+
./spec/features/strong_form_spec.rb[1:5:4:1:2] | passed | 0.00954 seconds |
|
51
|
+
./spec/features/strong_form_spec.rb[1:5:4:1:3] | passed | 0.00599 seconds |
|
52
|
+
./spec/features/strong_form_spec.rb[1:5:4:1:4] | passed | 0.00598 seconds |
|
53
|
+
./spec/features/strong_form_spec.rb[1:5:4:1:5] | passed | 0.0079 seconds |
|
54
|
+
./spec/features/strong_form_spec.rb[1:5:4:1:6] | passed | 0.00813 seconds |
|
55
|
+
./spec/features/strong_form_spec.rb[1:5:4:2:1] | passed | 0.00759 seconds |
|
56
|
+
./spec/features/strong_form_spec.rb[1:5:5:1:1] | passed | 0.01743 seconds |
|
57
|
+
./spec/models/user_spec.rb[1:1:1:1] | passed | 0.00037 seconds |
|
58
|
+
./spec/models/user_spec.rb[1:1:2:1] | passed | 0.00039 seconds |
|
59
|
+
./spec/models/user_spec.rb[1:1:2:2] | passed | 0.00567 seconds |
|
60
|
+
./spec/models/user_spec.rb[1:1:2:3] | passed | 0.00045 seconds |
|
59
61
|
./spec/models/user_spec.rb[1:1:2:4] | passed | 0.00038 seconds |
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'rails_helper'
|
2
2
|
|
3
3
|
def all_user_attributes
|
4
|
-
%i(first_name last_name gender description)
|
4
|
+
%i(first_name last_name gender description roles)
|
5
5
|
end
|
6
6
|
|
7
7
|
def all_addresses_attributes
|
@@ -31,13 +31,13 @@ RSpec.describe 'strong form' do
|
|
31
31
|
before(:each) do
|
32
32
|
new_user = User.new
|
33
33
|
allow(User).to receive(:new) do
|
34
|
-
new_user.permitted_attributes = [:last_name]
|
34
|
+
new_user.permitted_attributes = [:last_name, roles: []]
|
35
35
|
new_user
|
36
36
|
end
|
37
37
|
subject
|
38
38
|
end
|
39
39
|
|
40
|
-
(all_user_attributes - %i(last_name)).each do |attr|
|
40
|
+
(all_user_attributes - %i(last_name roles)).each do |attr|
|
41
41
|
it "should disable #{attr}" do
|
42
42
|
expect(page.find('[name="user[' + attr.to_s + ']"]')[:disabled])
|
43
43
|
.to be_truthy
|
@@ -48,6 +48,11 @@ RSpec.describe 'strong form' do
|
|
48
48
|
expect(page.find('[name="user[last_name]"]')[:disabled])
|
49
49
|
.to be_falsy
|
50
50
|
end
|
51
|
+
|
52
|
+
it 'should enable roles' do
|
53
|
+
expect(page.find('[name="user[roles]"]')[:disabled])
|
54
|
+
.to be_falsy
|
55
|
+
end
|
51
56
|
end
|
52
57
|
end
|
53
58
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: strong_form
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Markus Doits
|
@@ -174,6 +174,7 @@ files:
|
|
174
174
|
- spec/dummy/db/migrate/20150626095843_create_users.rb
|
175
175
|
- spec/dummy/db/migrate/20150626104120_create_addresses.rb
|
176
176
|
- spec/dummy/db/migrate/20150626132542_create_tags.rb
|
177
|
+
- spec/dummy/db/migrate/20151116150723_add_roles_to_users.rb
|
177
178
|
- spec/dummy/db/schema.rb
|
178
179
|
- spec/dummy/db/test.sqlite3
|
179
180
|
- spec/dummy/log/development.log
|
@@ -296,6 +297,7 @@ test_files:
|
|
296
297
|
- spec/dummy/db/migrate/20150626095843_create_users.rb
|
297
298
|
- spec/dummy/db/migrate/20150626104120_create_addresses.rb
|
298
299
|
- spec/dummy/db/migrate/20150626132542_create_tags.rb
|
300
|
+
- spec/dummy/db/migrate/20151116150723_add_roles_to_users.rb
|
299
301
|
- spec/dummy/db/schema.rb
|
300
302
|
- spec/dummy/db/test.sqlite3
|
301
303
|
- spec/dummy/log/development.log
|