abyme 0.6.1 → 0.6.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.DS_Store +0 -0
- data/CHANGELOG.md +108 -51
- data/Gemfile.lock +101 -96
- data/abyme.gemspec +5 -3
- data/lib/abyme/model.rb +1 -1
- data/lib/abyme/version.rb +1 -1
- data/lib/abyme/view_helpers.rb +15 -2
- data/lib/generators/abyme/view/view_generator.rb +14 -10
- data/lib/templates/erb/scaffold/_form.html.erb +15 -0
- metadata +21 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 380781ef1fe05c0f22184cda0d225b5be7d26d1c79f32bb8d79b9245cb33fb3d
|
4
|
+
data.tar.gz: 8f91337ca76f7bfe75440191cb517fe577484f18a76bb00151cae93f289db0cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c436e9f762efcba90ba2a1350af131c37f1e4225ba55529b634760e01a3173512d7395359eba6c2b25b5c06b078b731732e90776c5375ee847f77268ac39e42d
|
7
|
+
data.tar.gz: a355cb770cafe56942a31232afeae185855b15f27e1f6a923840ef41c8fe880f805c624993121bf2fd0c31db540185b2c2d98eb2189f8fa7487afbb1b5f1ef46
|
data/.DS_Store
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
@@ -1,113 +1,170 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
## [
|
3
|
+
## [v0.6.4](https://github.com/eki-177/abyme/tree/v0.6.4) (2021-07-03)
|
4
4
|
|
5
|
-
[Full Changelog](https://github.com/
|
5
|
+
[Full Changelog](https://github.com/eki-177/abyme/compare/v0.6.3...v0.6.4)
|
6
6
|
|
7
7
|
**Merged pull requests:**
|
8
8
|
|
9
|
-
-
|
9
|
+
- Use simple\_fields\_for inside a SimpleForm::FormBuilder [\#38](https://github.com/eki-177/abyme/pull/38) ([bear-in-mind](https://github.com/bear-in-mind))
|
10
10
|
|
11
|
-
## [v0.
|
11
|
+
## [v0.6.3](https://github.com/eki-177/abyme/tree/v0.6.3) (2021-06-24)
|
12
12
|
|
13
|
-
[Full Changelog](https://github.com/
|
13
|
+
[Full Changelog](https://github.com/eki-177/abyme/compare/v0.6.2...v0.6.3)
|
14
|
+
|
15
|
+
## [v0.6.2](https://github.com/eki-177/abyme/tree/v0.6.2) (2021-06-23)
|
16
|
+
|
17
|
+
[Full Changelog](https://github.com/eki-177/abyme/compare/v0.6.1...v0.6.2)
|
18
|
+
|
19
|
+
**Implemented enhancements:**
|
20
|
+
|
21
|
+
- Make it possible to pass named or namespaced associations [\#28](https://github.com/eki-177/abyme/issues/28)
|
22
|
+
|
23
|
+
**Merged pull requests:**
|
24
|
+
|
25
|
+
- hotfix [\#37](https://github.com/eki-177/abyme/pull/37) ([bear-in-mind](https://github.com/bear-in-mind))
|
26
|
+
|
27
|
+
## [v0.6.1](https://github.com/eki-177/abyme/tree/v0.6.1) (2021-06-23)
|
28
|
+
|
29
|
+
[Full Changelog](https://github.com/eki-177/abyme/compare/v0.6.0...v0.6.1)
|
30
|
+
|
31
|
+
**Merged pull requests:**
|
32
|
+
|
33
|
+
- Named associations [\#36](https://github.com/eki-177/abyme/pull/36) ([bear-in-mind](https://github.com/bear-in-mind))
|
34
|
+
|
35
|
+
## [v0.6.0](https://github.com/eki-177/abyme/tree/v0.6.0) (2021-06-15)
|
36
|
+
|
37
|
+
[Full Changelog](https://github.com/eki-177/abyme/compare/v0.3.0...v0.6.0)
|
38
|
+
|
39
|
+
**Merged pull requests:**
|
40
|
+
|
41
|
+
- Resource generator [\#35](https://github.com/eki-177/abyme/pull/35) ([bear-in-mind](https://github.com/bear-in-mind))
|
42
|
+
- Tests for view generator" [\#33](https://github.com/eki-177/abyme/pull/33) ([bear-in-mind](https://github.com/bear-in-mind))
|
43
|
+
- stimulus generator [\#32](https://github.com/eki-177/abyme/pull/32) ([ghbozz](https://github.com/ghbozz))
|
44
|
+
- Switching to microbundle [\#31](https://github.com/eki-177/abyme/pull/31) ([bear-in-mind](https://github.com/bear-in-mind))
|
45
|
+
- View generator [\#25](https://github.com/eki-177/abyme/pull/25) ([ghbozz](https://github.com/ghbozz))
|
46
|
+
- Generators : Controller & Model [\#24](https://github.com/eki-177/abyme/pull/24) ([bear-in-mind](https://github.com/bear-in-mind))
|
47
|
+
|
48
|
+
## [v0.3.0](https://github.com/eki-177/abyme/tree/v0.3.0) (2021-03-12)
|
49
|
+
|
50
|
+
[Full Changelog](https://github.com/eki-177/abyme/compare/v0.5.1...v0.3.0)
|
51
|
+
|
52
|
+
**Fixed bugs:**
|
53
|
+
|
54
|
+
- Helpers in application\_helper don't seem to be available inside partials [\#20](https://github.com/eki-177/abyme/issues/20)
|
55
|
+
|
56
|
+
**Merged pull requests:**
|
57
|
+
|
58
|
+
- Switching to Pika to build yarn package [\#30](https://github.com/eki-177/abyme/pull/30) ([bear-in-mind](https://github.com/bear-in-mind))
|
59
|
+
|
60
|
+
## [v0.5.1](https://github.com/eki-177/abyme/tree/v0.5.1) (2021-02-26)
|
61
|
+
|
62
|
+
[Full Changelog](https://github.com/eki-177/abyme/compare/v0.5.0...v0.5.1)
|
63
|
+
|
64
|
+
**Merged pull requests:**
|
65
|
+
|
66
|
+
- retro compatibility with former public method names [\#26](https://github.com/eki-177/abyme/pull/26) ([bear-in-mind](https://github.com/bear-in-mind))
|
67
|
+
|
68
|
+
## [v0.5.0](https://github.com/eki-177/abyme/tree/v0.5.0) (2021-02-26)
|
69
|
+
|
70
|
+
[Full Changelog](https://github.com/eki-177/abyme/compare/v0.2.5...v0.5.0)
|
14
71
|
|
15
72
|
**Merged pull requests:**
|
16
73
|
|
17
|
-
- Dynamic strong params for nested attributes [\#23](https://github.com/
|
74
|
+
- Dynamic strong params for nested attributes [\#23](https://github.com/eki-177/abyme/pull/23) ([bear-in-mind](https://github.com/bear-in-mind))
|
18
75
|
|
19
|
-
## [v0.2.5](https://github.com/
|
76
|
+
## [v0.2.5](https://github.com/eki-177/abyme/tree/v0.2.5) (2021-02-12)
|
20
77
|
|
21
|
-
[Full Changelog](https://github.com/
|
78
|
+
[Full Changelog](https://github.com/eki-177/abyme/compare/v0.4.0...v0.2.5)
|
22
79
|
|
23
|
-
## [v0.4.0](https://github.com/
|
80
|
+
## [v0.4.0](https://github.com/eki-177/abyme/tree/v0.4.0) (2021-02-12)
|
24
81
|
|
25
|
-
[Full Changelog](https://github.com/
|
82
|
+
[Full Changelog](https://github.com/eki-177/abyme/compare/v0.2.4...v0.4.0)
|
26
83
|
|
27
84
|
**Merged pull requests:**
|
28
85
|
|
29
|
-
- Bump nokogiri from 1.10.10 to 1.11.1 [\#22](https://github.com/
|
30
|
-
- Methods naming change & FormBuilder extension [\#21](https://github.com/
|
31
|
-
- Solved JS compile bug [\#19](https://github.com/
|
86
|
+
- Bump nokogiri from 1.10.10 to 1.11.1 [\#22](https://github.com/eki-177/abyme/pull/22) ([dependabot[bot]](https://github.com/apps/dependabot))
|
87
|
+
- Methods naming change & FormBuilder extension [\#21](https://github.com/eki-177/abyme/pull/21) ([bear-in-mind](https://github.com/bear-in-mind))
|
88
|
+
- Solved JS compile bug [\#19](https://github.com/eki-177/abyme/pull/19) ([bear-in-mind](https://github.com/bear-in-mind))
|
32
89
|
|
33
|
-
## [v0.2.4](https://github.com/
|
90
|
+
## [v0.2.4](https://github.com/eki-177/abyme/tree/v0.2.4) (2020-10-18)
|
34
91
|
|
35
|
-
[Full Changelog](https://github.com/
|
92
|
+
[Full Changelog](https://github.com/eki-177/abyme/compare/v0.2.3...v0.2.4)
|
36
93
|
|
37
94
|
**Merged pull requests:**
|
38
95
|
|
39
|
-
- Abymebuilder doc [\#18](https://github.com/
|
40
|
-
- Last fix [\#17](https://github.com/
|
41
|
-
- Drop demo [\#16](https://github.com/
|
42
|
-
- Coveralls [\#15](https://github.com/
|
43
|
-
- changing action name [\#14](https://github.com/
|
44
|
-
- fixing button default text when auto mode [\#13](https://github.com/
|
45
|
-
- travis and rake update [\#12](https://github.com/
|
46
|
-
- Autonomous Spec [\#11](https://github.com/
|
96
|
+
- Abymebuilder doc [\#18](https://github.com/eki-177/abyme/pull/18) ([ghbozz](https://github.com/ghbozz))
|
97
|
+
- Last fix [\#17](https://github.com/eki-177/abyme/pull/17) ([bear-in-mind](https://github.com/bear-in-mind))
|
98
|
+
- Drop demo [\#16](https://github.com/eki-177/abyme/pull/16) ([bear-in-mind](https://github.com/bear-in-mind))
|
99
|
+
- Coveralls [\#15](https://github.com/eki-177/abyme/pull/15) ([bear-in-mind](https://github.com/bear-in-mind))
|
100
|
+
- changing action name [\#14](https://github.com/eki-177/abyme/pull/14) ([bear-in-mind](https://github.com/bear-in-mind))
|
101
|
+
- fixing button default text when auto mode [\#13](https://github.com/eki-177/abyme/pull/13) ([ghbozz](https://github.com/ghbozz))
|
102
|
+
- travis and rake update [\#12](https://github.com/eki-177/abyme/pull/12) ([bear-in-mind](https://github.com/bear-in-mind))
|
103
|
+
- Autonomous Spec [\#11](https://github.com/eki-177/abyme/pull/11) ([bear-in-mind](https://github.com/bear-in-mind))
|
47
104
|
|
48
|
-
## [v0.2.3](https://github.com/
|
105
|
+
## [v0.2.3](https://github.com/eki-177/abyme/tree/v0.2.3) (2020-10-15)
|
49
106
|
|
50
|
-
[Full Changelog](https://github.com/
|
107
|
+
[Full Changelog](https://github.com/eki-177/abyme/compare/v0.2.2...v0.2.3)
|
51
108
|
|
52
|
-
## [v0.2.2](https://github.com/
|
109
|
+
## [v0.2.2](https://github.com/eki-177/abyme/tree/v0.2.2) (2020-10-15)
|
53
110
|
|
54
|
-
[Full Changelog](https://github.com/
|
111
|
+
[Full Changelog](https://github.com/eki-177/abyme/compare/v0.2.1...v0.2.2)
|
55
112
|
|
56
113
|
**Merged pull requests:**
|
57
114
|
|
58
|
-
- Dummy app setup \(incomplete\) [\#10](https://github.com/
|
115
|
+
- Dummy app setup \(incomplete\) [\#10](https://github.com/eki-177/abyme/pull/10) ([bear-in-mind](https://github.com/bear-in-mind))
|
59
116
|
|
60
|
-
## [v0.2.1](https://github.com/
|
117
|
+
## [v0.2.1](https://github.com/eki-177/abyme/tree/v0.2.1) (2020-10-15)
|
61
118
|
|
62
|
-
[Full Changelog](https://github.com/
|
119
|
+
[Full Changelog](https://github.com/eki-177/abyme/compare/0.2.0...v0.2.1)
|
63
120
|
|
64
121
|
**Merged pull requests:**
|
65
122
|
|
66
|
-
- fix partial path [\#9](https://github.com/
|
123
|
+
- fix partial path [\#9](https://github.com/eki-177/abyme/pull/9) ([ghbozz](https://github.com/ghbozz))
|
67
124
|
|
68
|
-
## [0.2.0](https://github.com/
|
125
|
+
## [0.2.0](https://github.com/eki-177/abyme/tree/0.2.0) (2020-10-14)
|
69
126
|
|
70
|
-
[Full Changelog](https://github.com/
|
127
|
+
[Full Changelog](https://github.com/eki-177/abyme/compare/v0.2.0...0.2.0)
|
71
128
|
|
72
129
|
**Merged pull requests:**
|
73
130
|
|
74
|
-
- End of doc [\#8](https://github.com/
|
131
|
+
- End of doc [\#8](https://github.com/eki-177/abyme/pull/8) ([bear-in-mind](https://github.com/bear-in-mind))
|
75
132
|
|
76
|
-
## [v0.2.0](https://github.com/
|
133
|
+
## [v0.2.0](https://github.com/eki-177/abyme/tree/v0.2.0) (2020-10-14)
|
77
134
|
|
78
|
-
[Full Changelog](https://github.com/
|
135
|
+
[Full Changelog](https://github.com/eki-177/abyme/compare/0.1.3...v0.2.0)
|
79
136
|
|
80
137
|
**Merged pull requests:**
|
81
138
|
|
82
|
-
- limit & min count options [\#7](https://github.com/
|
83
|
-
- Documentation end [\#6](https://github.com/
|
84
|
-
- add limit feature [\#5](https://github.com/
|
139
|
+
- limit & min count options [\#7](https://github.com/eki-177/abyme/pull/7) ([ghbozz](https://github.com/ghbozz))
|
140
|
+
- Documentation end [\#6](https://github.com/eki-177/abyme/pull/6) ([bear-in-mind](https://github.com/bear-in-mind))
|
141
|
+
- add limit feature [\#5](https://github.com/eki-177/abyme/pull/5) ([ghbozz](https://github.com/ghbozz))
|
85
142
|
|
86
|
-
## [0.1.3](https://github.com/
|
143
|
+
## [0.1.3](https://github.com/eki-177/abyme/tree/0.1.3) (2020-10-13)
|
87
144
|
|
88
|
-
[Full Changelog](https://github.com/
|
145
|
+
[Full Changelog](https://github.com/eki-177/abyme/compare/v0.1.2...0.1.3)
|
89
146
|
|
90
|
-
## [v0.1.2](https://github.com/
|
147
|
+
## [v0.1.2](https://github.com/eki-177/abyme/tree/v0.1.2) (2020-10-13)
|
91
148
|
|
92
|
-
[Full Changelog](https://github.com/
|
149
|
+
[Full Changelog](https://github.com/eki-177/abyme/compare/0.1.1...v0.1.2)
|
93
150
|
|
94
151
|
**Merged pull requests:**
|
95
152
|
|
96
|
-
- basic lifecycle events [\#4](https://github.com/
|
153
|
+
- basic lifecycle events [\#4](https://github.com/eki-177/abyme/pull/4) ([ghbozz](https://github.com/ghbozz))
|
97
154
|
|
98
|
-
## [0.1.1](https://github.com/
|
155
|
+
## [0.1.1](https://github.com/eki-177/abyme/tree/0.1.1) (2020-10-12)
|
99
156
|
|
100
|
-
[Full Changelog](https://github.com/
|
157
|
+
[Full Changelog](https://github.com/eki-177/abyme/compare/v0.1.1...0.1.1)
|
101
158
|
|
102
|
-
## [v0.1.1](https://github.com/
|
159
|
+
## [v0.1.1](https://github.com/eki-177/abyme/tree/v0.1.1) (2020-10-12)
|
103
160
|
|
104
|
-
[Full Changelog](https://github.com/
|
161
|
+
[Full Changelog](https://github.com/eki-177/abyme/compare/9b99709cd8f84e9401adb8ba6f59f0074e2f416b...v0.1.1)
|
105
162
|
|
106
163
|
**Merged pull requests:**
|
107
164
|
|
108
|
-
- Gem Content [\#3](https://github.com/
|
109
|
-
- install generator for stimulus init setup [\#2](https://github.com/
|
110
|
-
- Update rake requirement from ~\> 10.0 to ~\> 13.0 [\#1](https://github.com/
|
165
|
+
- Gem Content [\#3](https://github.com/eki-177/abyme/pull/3) ([bear-in-mind](https://github.com/bear-in-mind))
|
166
|
+
- install generator for stimulus init setup [\#2](https://github.com/eki-177/abyme/pull/2) ([ghbozz](https://github.com/ghbozz))
|
167
|
+
- Update rake requirement from ~\> 10.0 to ~\> 13.0 [\#1](https://github.com/eki-177/abyme/pull/1) ([dependabot[bot]](https://github.com/apps/dependabot))
|
111
168
|
|
112
169
|
|
113
170
|
|
data/Gemfile.lock
CHANGED
@@ -1,80 +1,85 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
abyme (0.6.
|
4
|
+
abyme (0.6.5)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
|
-
actioncable (6.
|
10
|
-
actionpack (= 6.
|
9
|
+
actioncable (6.1.4.4)
|
10
|
+
actionpack (= 6.1.4.4)
|
11
|
+
activesupport (= 6.1.4.4)
|
11
12
|
nio4r (~> 2.0)
|
12
13
|
websocket-driver (>= 0.6.1)
|
13
|
-
actionmailbox (6.
|
14
|
-
actionpack (= 6.
|
15
|
-
activejob (= 6.
|
16
|
-
activerecord (= 6.
|
17
|
-
activestorage (= 6.
|
18
|
-
activesupport (= 6.
|
14
|
+
actionmailbox (6.1.4.4)
|
15
|
+
actionpack (= 6.1.4.4)
|
16
|
+
activejob (= 6.1.4.4)
|
17
|
+
activerecord (= 6.1.4.4)
|
18
|
+
activestorage (= 6.1.4.4)
|
19
|
+
activesupport (= 6.1.4.4)
|
19
20
|
mail (>= 2.7.1)
|
20
|
-
actionmailer (6.
|
21
|
-
actionpack (= 6.
|
22
|
-
actionview (= 6.
|
23
|
-
activejob (= 6.
|
21
|
+
actionmailer (6.1.4.4)
|
22
|
+
actionpack (= 6.1.4.4)
|
23
|
+
actionview (= 6.1.4.4)
|
24
|
+
activejob (= 6.1.4.4)
|
25
|
+
activesupport (= 6.1.4.4)
|
24
26
|
mail (~> 2.5, >= 2.5.4)
|
25
27
|
rails-dom-testing (~> 2.0)
|
26
|
-
actionpack (6.
|
27
|
-
actionview (= 6.
|
28
|
-
activesupport (= 6.
|
29
|
-
rack (~> 2.0, >= 2.0.
|
28
|
+
actionpack (6.1.4.4)
|
29
|
+
actionview (= 6.1.4.4)
|
30
|
+
activesupport (= 6.1.4.4)
|
31
|
+
rack (~> 2.0, >= 2.0.9)
|
30
32
|
rack-test (>= 0.6.3)
|
31
33
|
rails-dom-testing (~> 2.0)
|
32
34
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
33
|
-
actiontext (6.
|
34
|
-
actionpack (= 6.
|
35
|
-
activerecord (= 6.
|
36
|
-
activestorage (= 6.
|
37
|
-
activesupport (= 6.
|
35
|
+
actiontext (6.1.4.4)
|
36
|
+
actionpack (= 6.1.4.4)
|
37
|
+
activerecord (= 6.1.4.4)
|
38
|
+
activestorage (= 6.1.4.4)
|
39
|
+
activesupport (= 6.1.4.4)
|
38
40
|
nokogiri (>= 1.8.5)
|
39
|
-
actionview (6.
|
40
|
-
activesupport (= 6.
|
41
|
+
actionview (6.1.4.4)
|
42
|
+
activesupport (= 6.1.4.4)
|
41
43
|
builder (~> 3.1)
|
42
44
|
erubi (~> 1.4)
|
43
45
|
rails-dom-testing (~> 2.0)
|
44
46
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
45
|
-
activejob (6.
|
46
|
-
activesupport (= 6.
|
47
|
+
activejob (6.1.4.4)
|
48
|
+
activesupport (= 6.1.4.4)
|
47
49
|
globalid (>= 0.3.6)
|
48
|
-
activemodel (6.
|
49
|
-
activesupport (= 6.
|
50
|
-
activerecord (6.
|
51
|
-
activemodel (= 6.
|
52
|
-
activesupport (= 6.
|
53
|
-
activestorage (6.
|
54
|
-
actionpack (= 6.
|
55
|
-
activejob (= 6.
|
56
|
-
activerecord (= 6.
|
50
|
+
activemodel (6.1.4.4)
|
51
|
+
activesupport (= 6.1.4.4)
|
52
|
+
activerecord (6.1.4.4)
|
53
|
+
activemodel (= 6.1.4.4)
|
54
|
+
activesupport (= 6.1.4.4)
|
55
|
+
activestorage (6.1.4.4)
|
56
|
+
actionpack (= 6.1.4.4)
|
57
|
+
activejob (= 6.1.4.4)
|
58
|
+
activerecord (= 6.1.4.4)
|
59
|
+
activesupport (= 6.1.4.4)
|
57
60
|
marcel (~> 1.0.0)
|
58
|
-
|
61
|
+
mini_mime (>= 1.1.0)
|
62
|
+
activesupport (6.1.4.4)
|
59
63
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
60
|
-
i18n (>=
|
61
|
-
minitest (
|
62
|
-
tzinfo (~>
|
63
|
-
zeitwerk (~> 2.
|
64
|
-
addressable (2.
|
64
|
+
i18n (>= 1.6, < 2)
|
65
|
+
minitest (>= 5.1)
|
66
|
+
tzinfo (~> 2.0)
|
67
|
+
zeitwerk (~> 2.3)
|
68
|
+
addressable (2.8.0)
|
65
69
|
public_suffix (>= 2.0.2, < 5.0)
|
66
70
|
bindex (0.8.1)
|
67
71
|
builder (3.2.4)
|
68
72
|
byebug (11.1.3)
|
69
|
-
capybara (3.
|
73
|
+
capybara (3.36.0)
|
70
74
|
addressable
|
75
|
+
matrix
|
71
76
|
mini_mime (>= 0.1.3)
|
72
77
|
nokogiri (~> 1.8)
|
73
78
|
rack (>= 1.6.0)
|
74
79
|
rack-test (>= 0.6.3)
|
75
80
|
regexp_parser (>= 1.5, < 3.0)
|
76
81
|
xpath (~> 3.2)
|
77
|
-
childprocess (
|
82
|
+
childprocess (4.1.0)
|
78
83
|
coderay (1.1.3)
|
79
84
|
concurrent-ruby (1.1.9)
|
80
85
|
crass (1.0.6)
|
@@ -88,23 +93,22 @@ GEM
|
|
88
93
|
generator_spec (0.9.4)
|
89
94
|
activesupport (>= 3.0.0)
|
90
95
|
railties (>= 3.0.0)
|
91
|
-
globalid (0.
|
92
|
-
activesupport (>=
|
93
|
-
i18n (1.8.
|
96
|
+
globalid (1.0.0)
|
97
|
+
activesupport (>= 5.0)
|
98
|
+
i18n (1.8.11)
|
94
99
|
concurrent-ruby (~> 1.0)
|
95
|
-
loofah (2.
|
100
|
+
loofah (2.13.0)
|
96
101
|
crass (~> 1.0.2)
|
97
102
|
nokogiri (>= 1.5.9)
|
98
103
|
mail (2.7.1)
|
99
104
|
mini_mime (>= 0.1.1)
|
100
|
-
marcel (1.0.
|
105
|
+
marcel (1.0.2)
|
106
|
+
matrix (0.4.2)
|
101
107
|
method_source (1.0.0)
|
102
|
-
mini_mime (1.1.
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
nokogiri (1.11.7)
|
107
|
-
mini_portile2 (~> 2.5.0)
|
108
|
+
mini_mime (1.1.2)
|
109
|
+
minitest (5.15.0)
|
110
|
+
nio4r (2.5.8)
|
111
|
+
nokogiri (1.12.5-x86_64-darwin)
|
108
112
|
racc (~> 1.4)
|
109
113
|
pry (0.13.1)
|
110
114
|
coderay (~> 1.1)
|
@@ -113,26 +117,26 @@ GEM
|
|
113
117
|
byebug (~> 11.0)
|
114
118
|
pry (~> 0.13.0)
|
115
119
|
public_suffix (4.0.6)
|
116
|
-
puma (5.
|
120
|
+
puma (5.5.2)
|
117
121
|
nio4r (~> 2.0)
|
118
|
-
racc (1.
|
122
|
+
racc (1.6.0)
|
119
123
|
rack (2.2.3)
|
120
124
|
rack-test (1.1.0)
|
121
125
|
rack (>= 1.0, < 3)
|
122
|
-
rails (6.
|
123
|
-
actioncable (= 6.
|
124
|
-
actionmailbox (= 6.
|
125
|
-
actionmailer (= 6.
|
126
|
-
actionpack (= 6.
|
127
|
-
actiontext (= 6.
|
128
|
-
actionview (= 6.
|
129
|
-
activejob (= 6.
|
130
|
-
activemodel (= 6.
|
131
|
-
activerecord (= 6.
|
132
|
-
activestorage (= 6.
|
133
|
-
activesupport (= 6.
|
134
|
-
bundler (>= 1.
|
135
|
-
railties (= 6.
|
126
|
+
rails (6.1.4.4)
|
127
|
+
actioncable (= 6.1.4.4)
|
128
|
+
actionmailbox (= 6.1.4.4)
|
129
|
+
actionmailer (= 6.1.4.4)
|
130
|
+
actionpack (= 6.1.4.4)
|
131
|
+
actiontext (= 6.1.4.4)
|
132
|
+
actionview (= 6.1.4.4)
|
133
|
+
activejob (= 6.1.4.4)
|
134
|
+
activemodel (= 6.1.4.4)
|
135
|
+
activerecord (= 6.1.4.4)
|
136
|
+
activestorage (= 6.1.4.4)
|
137
|
+
activesupport (= 6.1.4.4)
|
138
|
+
bundler (>= 1.15.0)
|
139
|
+
railties (= 6.1.4.4)
|
136
140
|
sprockets-rails (>= 2.0.0)
|
137
141
|
rails-controller-testing (1.0.5)
|
138
142
|
actionpack (>= 5.0.1.rc1)
|
@@ -141,16 +145,17 @@ GEM
|
|
141
145
|
rails-dom-testing (2.0.3)
|
142
146
|
activesupport (>= 4.2.0)
|
143
147
|
nokogiri (>= 1.6)
|
144
|
-
rails-html-sanitizer (1.
|
148
|
+
rails-html-sanitizer (1.4.2)
|
145
149
|
loofah (~> 2.3)
|
146
|
-
railties (6.
|
147
|
-
actionpack (= 6.
|
148
|
-
activesupport (= 6.
|
150
|
+
railties (6.1.4.4)
|
151
|
+
actionpack (= 6.1.4.4)
|
152
|
+
activesupport (= 6.1.4.4)
|
149
153
|
method_source
|
150
|
-
rake (>= 0.
|
151
|
-
thor (
|
152
|
-
rake (13.0.
|
153
|
-
regexp_parser (2.
|
154
|
+
rake (>= 0.13)
|
155
|
+
thor (~> 1.0)
|
156
|
+
rake (13.0.6)
|
157
|
+
regexp_parser (2.2.0)
|
158
|
+
rexml (3.2.5)
|
154
159
|
rspec-core (3.10.1)
|
155
160
|
rspec-support (~> 3.10.0)
|
156
161
|
rspec-expectations (3.10.1)
|
@@ -159,7 +164,7 @@ GEM
|
|
159
164
|
rspec-mocks (3.10.2)
|
160
165
|
diff-lcs (>= 1.2.0, < 2.0)
|
161
166
|
rspec-support (~> 3.10.0)
|
162
|
-
rspec-rails (5.0.
|
167
|
+
rspec-rails (5.0.2)
|
163
168
|
actionpack (>= 5.2)
|
164
169
|
activesupport (>= 5.2)
|
165
170
|
railties (>= 5.2)
|
@@ -167,10 +172,11 @@ GEM
|
|
167
172
|
rspec-expectations (~> 3.10)
|
168
173
|
rspec-mocks (~> 3.10)
|
169
174
|
rspec-support (~> 3.10)
|
170
|
-
rspec-support (3.10.
|
171
|
-
rubyzip (2.3.
|
172
|
-
selenium-webdriver (
|
173
|
-
childprocess (>= 0.5, <
|
175
|
+
rspec-support (3.10.3)
|
176
|
+
rubyzip (2.3.2)
|
177
|
+
selenium-webdriver (4.1.0)
|
178
|
+
childprocess (>= 0.5, < 5.0)
|
179
|
+
rexml (~> 3.2, >= 3.2.5)
|
174
180
|
rubyzip (>= 1.2.2)
|
175
181
|
simple_form (5.1.0)
|
176
182
|
actionpack (>= 5.2)
|
@@ -185,44 +191,43 @@ GEM
|
|
185
191
|
sprockets (4.0.2)
|
186
192
|
concurrent-ruby (~> 1.0)
|
187
193
|
rack (> 1, < 3)
|
188
|
-
sprockets-rails (3.
|
189
|
-
actionpack (>=
|
190
|
-
activesupport (>=
|
194
|
+
sprockets-rails (3.4.2)
|
195
|
+
actionpack (>= 5.2)
|
196
|
+
activesupport (>= 5.2)
|
191
197
|
sprockets (>= 3.0.0)
|
192
198
|
sqlite3 (1.4.2)
|
193
199
|
thor (1.1.0)
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
web-console (4.1.0)
|
200
|
+
tzinfo (2.0.4)
|
201
|
+
concurrent-ruby (~> 1.0)
|
202
|
+
web-console (4.2.0)
|
198
203
|
actionview (>= 6.0.0)
|
199
204
|
activemodel (>= 6.0.0)
|
200
205
|
bindex (>= 0.4.0)
|
201
206
|
railties (>= 6.0.0)
|
202
|
-
webdrivers (
|
207
|
+
webdrivers (5.0.0)
|
203
208
|
nokogiri (~> 1.6)
|
204
209
|
rubyzip (>= 1.3.0)
|
205
|
-
selenium-webdriver (
|
210
|
+
selenium-webdriver (~> 4.0)
|
206
211
|
websocket-driver (0.7.5)
|
207
212
|
websocket-extensions (>= 0.1.0)
|
208
213
|
websocket-extensions (0.1.5)
|
209
214
|
xpath (3.2.0)
|
210
215
|
nokogiri (~> 1.8)
|
211
|
-
zeitwerk (2.
|
216
|
+
zeitwerk (2.5.1)
|
212
217
|
|
213
218
|
PLATFORMS
|
214
|
-
|
219
|
+
x86_64-darwin-19
|
215
220
|
|
216
221
|
DEPENDENCIES
|
217
222
|
abyme!
|
218
|
-
bundler (~> 2
|
223
|
+
bundler (~> 2)
|
219
224
|
byebug
|
220
225
|
capybara
|
221
226
|
database_cleaner-active_record
|
222
227
|
generator_spec
|
223
228
|
pry-byebug
|
224
229
|
puma
|
225
|
-
rails (~> 6.
|
230
|
+
rails (~> 6.1)
|
226
231
|
rails-controller-testing
|
227
232
|
rake (~> 13.0)
|
228
233
|
rspec-rails
|
data/abyme.gemspec
CHANGED
@@ -26,7 +26,10 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
27
27
|
spec.require_paths = ["lib"]
|
28
28
|
|
29
|
-
|
29
|
+
# SimpleForm dependency is only required for test purposes and optional behaviour
|
30
|
+
spec.add_development_dependency 'simple_form'
|
31
|
+
|
32
|
+
spec.add_development_dependency "bundler", "~> 2"
|
30
33
|
spec.add_development_dependency "rake", "~> 13.0"
|
31
34
|
# Tests
|
32
35
|
spec.add_development_dependency "rspec-rails"
|
@@ -38,11 +41,10 @@ Gem::Specification.new do |spec|
|
|
38
41
|
|
39
42
|
# Dummy app
|
40
43
|
spec.add_development_dependency "sqlite3"
|
41
|
-
spec.add_development_dependency 'rails', "~> 6.
|
44
|
+
spec.add_development_dependency 'rails', "~> 6.1"
|
42
45
|
spec.add_development_dependency 'pry-byebug'
|
43
46
|
spec.add_development_dependency 'byebug'
|
44
47
|
spec.add_development_dependency 'web-console'
|
45
|
-
spec.add_development_dependency 'simple_form'
|
46
48
|
|
47
49
|
spec.add_development_dependency 'puma'
|
48
50
|
spec.add_development_dependency 'simplecov'
|
data/lib/abyme/model.rb
CHANGED
@@ -46,7 +46,7 @@ module Abyme
|
|
46
46
|
@association = association
|
47
47
|
@attributes_list = attributes
|
48
48
|
@permit = permit
|
49
|
-
@association_class = association_class_name || @association.to_s.classify.constantize
|
49
|
+
@association_class = association_class_name&.safe_constantize || @association.to_s.classify.constantize
|
50
50
|
end
|
51
51
|
|
52
52
|
def build_attributes
|
data/lib/abyme/version.rb
CHANGED
data/lib/abyme/view_helpers.rb
CHANGED
@@ -113,7 +113,7 @@ module Abyme
|
|
113
113
|
|
114
114
|
content_tag(:div, build_attributes(wrapper_default, options[:wrapper_html])) do
|
115
115
|
content_tag(:template, class: "abyme--#{association.to_s.singularize}_template", data: {abyme_target: "template"}) do
|
116
|
-
form
|
116
|
+
fields_for_builder form, association, form.object.send(association).build, child_index: "NEW_RECORD" do |f|
|
117
117
|
content_tag(:div, build_attributes(fields_default, basic_fields_markup(options[:fields_html], association))) do
|
118
118
|
# Here, if a block is passed, we're passing the association fields to it, rather than the form itself
|
119
119
|
# block_given? ? yield(f) : render(options[:partial] || "abyme/#{association.to_s.singularize}_fields", f: f)
|
@@ -182,7 +182,7 @@ module Abyme
|
|
182
182
|
end
|
183
183
|
|
184
184
|
content_tag(:div, options[:wrapper_html]) do
|
185
|
-
form
|
185
|
+
fields_for_builder(form, association, records) do |f|
|
186
186
|
content_tag(:div, build_attributes(fields_default, basic_fields_markup(options[:fields_html], association))) do
|
187
187
|
block_given? ? yield(f) : render_association_partial(association, f, options[:partial])
|
188
188
|
end
|
@@ -213,6 +213,19 @@ module Abyme
|
|
213
213
|
|
214
214
|
private
|
215
215
|
|
216
|
+
# FORM BUILDER SELECTION
|
217
|
+
|
218
|
+
# If form builder inherits from SimpleForm, we should use its fields_for helper to keep the wrapper options
|
219
|
+
# :nocov:
|
220
|
+
def fields_for_builder(form, association, records, options = {}, &block)
|
221
|
+
if defined?(SimpleForm) && form.instance_of?(SimpleForm::FormBuilder)
|
222
|
+
form.simple_fields_for(association, records, options, &block)
|
223
|
+
else
|
224
|
+
form.fields_for(association, records, options, &block)
|
225
|
+
end
|
226
|
+
end
|
227
|
+
# :nocov:
|
228
|
+
|
216
229
|
# CREATE_BUTTON
|
217
230
|
|
218
231
|
# this helper is call by either add_associated_record or remove_associated_record
|
@@ -1,13 +1,14 @@
|
|
1
|
-
require
|
1
|
+
require "rails/generators"
|
2
2
|
|
3
3
|
module Abyme
|
4
4
|
module Generators
|
5
5
|
class ViewGenerator < Rails::Generators::Base
|
6
|
-
source_root File.expand_path(
|
6
|
+
source_root File.expand_path("templates", __dir__)
|
7
7
|
|
8
8
|
argument :association, type: :string, required: true, banner: "association association"
|
9
9
|
argument :attributes, type: :array, default: [], banner: "field field"
|
10
10
|
|
11
|
+
# :nocov:
|
11
12
|
def create_partial_file
|
12
13
|
create_file partial_file_path
|
13
14
|
if defined?(SimpleForm)
|
@@ -16,13 +17,15 @@ module Abyme
|
|
16
17
|
insert_fields
|
17
18
|
end
|
18
19
|
end
|
20
|
+
# :nocov:
|
19
21
|
|
20
22
|
private
|
21
23
|
|
22
24
|
def partial_file_path
|
23
|
-
Rails.root.join(
|
25
|
+
Rails.root.join("app", "views", "abyme", "_#{association.downcase.singularize}_fields.html.erb")
|
24
26
|
end
|
25
27
|
|
28
|
+
# :nocov:
|
26
29
|
def insert_fields(builder = nil)
|
27
30
|
return unless File.exist? partial_file_path
|
28
31
|
if builder == :simple_form
|
@@ -31,14 +34,15 @@ module Abyme
|
|
31
34
|
insert_into_file(partial_file_path, "<%# Insert #{association.downcase} fields below %>\n" << default_keys)
|
32
35
|
end
|
33
36
|
end
|
37
|
+
# :nocov:
|
34
38
|
|
35
39
|
def simple_form_fields
|
36
|
-
if attributes.include?(
|
37
|
-
|
40
|
+
inputs = if attributes.include?("all_attributes")
|
41
|
+
rejected_keys(association.classify.constantize.new.attributes.keys).map do |key|
|
38
42
|
"<%= f.input :#{key} %>"
|
39
43
|
end
|
40
44
|
else
|
41
|
-
|
45
|
+
attributes.map do |key|
|
42
46
|
"<%= f.input :#{key} %>"
|
43
47
|
end
|
44
48
|
end
|
@@ -47,7 +51,7 @@ module Abyme
|
|
47
51
|
end
|
48
52
|
|
49
53
|
def rejected_keys(keys)
|
50
|
-
keys.reject { |key| [
|
54
|
+
keys.reject { |key| ["id", "created_at", "updated_at"].include?(key) || key.match(/_id/) }
|
51
55
|
end
|
52
56
|
|
53
57
|
def header
|
@@ -55,10 +59,10 @@ module Abyme
|
|
55
59
|
end
|
56
60
|
|
57
61
|
def default_keys
|
58
|
-
%
|
62
|
+
%(
|
59
63
|
<%= f.hidden_field :_destroy %>
|
60
|
-
<%= remove_associated_record content: "Remove #{association.downcase}" %>
|
61
|
-
|
64
|
+
<%= remove_associated_record content: "Remove #{association.downcase.singularize}" %>
|
65
|
+
)
|
62
66
|
end
|
63
67
|
end
|
64
68
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<%# frozen_string_literal: true %>
|
2
|
+
<%%= simple_form_for(@<%= singular_table_name %>) do |f| %>
|
3
|
+
<%%= f.error_notification %>
|
4
|
+
<%%= f.error_notification message: f.object.errors[:base].to_sentence if f.object.errors[:base].present? %>
|
5
|
+
|
6
|
+
<div class="form-inputs">
|
7
|
+
<%- attributes.each do |attribute| -%>
|
8
|
+
<%%= f.<%= attribute.reference? ? :association : :input %> :<%= attribute.name %> %>
|
9
|
+
<%- end -%>
|
10
|
+
</div>
|
11
|
+
|
12
|
+
<div class="form-actions">
|
13
|
+
<%%= f.button :submit %>
|
14
|
+
</div>
|
15
|
+
<%% end %>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: abyme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Romain Sanson
|
@@ -9,22 +9,36 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-
|
12
|
+
date: 2021-12-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: simple_form
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - ">="
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '0'
|
21
|
+
type: :development
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '0'
|
14
28
|
- !ruby/object:Gem::Dependency
|
15
29
|
name: bundler
|
16
30
|
requirement: !ruby/object:Gem::Requirement
|
17
31
|
requirements:
|
18
32
|
- - "~>"
|
19
33
|
- !ruby/object:Gem::Version
|
20
|
-
version: '2
|
34
|
+
version: '2'
|
21
35
|
type: :development
|
22
36
|
prerelease: false
|
23
37
|
version_requirements: !ruby/object:Gem::Requirement
|
24
38
|
requirements:
|
25
39
|
- - "~>"
|
26
40
|
- !ruby/object:Gem::Version
|
27
|
-
version: '2
|
41
|
+
version: '2'
|
28
42
|
- !ruby/object:Gem::Dependency
|
29
43
|
name: rake
|
30
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -143,14 +157,14 @@ dependencies:
|
|
143
157
|
requirements:
|
144
158
|
- - "~>"
|
145
159
|
- !ruby/object:Gem::Version
|
146
|
-
version: 6.
|
160
|
+
version: '6.1'
|
147
161
|
type: :development
|
148
162
|
prerelease: false
|
149
163
|
version_requirements: !ruby/object:Gem::Requirement
|
150
164
|
requirements:
|
151
165
|
- - "~>"
|
152
166
|
- !ruby/object:Gem::Version
|
153
|
-
version: 6.
|
167
|
+
version: '6.1'
|
154
168
|
- !ruby/object:Gem::Dependency
|
155
169
|
name: pry-byebug
|
156
170
|
requirement: !ruby/object:Gem::Requirement
|
@@ -193,20 +207,6 @@ dependencies:
|
|
193
207
|
- - ">="
|
194
208
|
- !ruby/object:Gem::Version
|
195
209
|
version: '0'
|
196
|
-
- !ruby/object:Gem::Dependency
|
197
|
-
name: simple_form
|
198
|
-
requirement: !ruby/object:Gem::Requirement
|
199
|
-
requirements:
|
200
|
-
- - ">="
|
201
|
-
- !ruby/object:Gem::Version
|
202
|
-
version: '0'
|
203
|
-
type: :development
|
204
|
-
prerelease: false
|
205
|
-
version_requirements: !ruby/object:Gem::Requirement
|
206
|
-
requirements:
|
207
|
-
- - ">="
|
208
|
-
- !ruby/object:Gem::Version
|
209
|
-
version: '0'
|
210
210
|
- !ruby/object:Gem::Dependency
|
211
211
|
name: puma
|
212
212
|
requirement: !ruby/object:Gem::Requirement
|
@@ -300,6 +300,7 @@ files:
|
|
300
300
|
- lib/generators/abyme/stimulus/stimulus_generator.rb
|
301
301
|
- lib/generators/abyme/view/USAGE
|
302
302
|
- lib/generators/abyme/view/view_generator.rb
|
303
|
+
- lib/templates/erb/scaffold/_form.html.erb
|
303
304
|
- node_modules/.yarn-integrity
|
304
305
|
- package-lock.json
|
305
306
|
- package.json
|