compony 0.11.12 → 0.11.14

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.
Files changed (145) hide show
  1. checksums.yaml +4 -4
  2. data/.rspec +2 -0
  3. data/CHANGELOG.md +16 -0
  4. data/CLAUDE.md +1 -0
  5. data/Gemfile +3 -0
  6. data/Gemfile.lock +145 -106
  7. data/README.md +12 -1
  8. data/Rakefile +10 -0
  9. data/TODO.md +2 -1
  10. data/VERSION +1 -1
  11. data/compony.gemspec +5 -3
  12. data/doc/ComponentGenerator.html +1 -1
  13. data/doc/Components.html +1 -1
  14. data/doc/ComponentsGenerator.html +1 -1
  15. data/doc/Compony/Component.html +1 -1
  16. data/doc/Compony/ComponentMixins/Default/Labelling.html +1 -1
  17. data/doc/Compony/ComponentMixins/Default/Standalone/ResourcefulVerbDsl.html +1 -1
  18. data/doc/Compony/ComponentMixins/Default/Standalone/StandaloneDsl.html +1 -1
  19. data/doc/Compony/ComponentMixins/Default/Standalone/VerbDsl.html +1 -1
  20. data/doc/Compony/ComponentMixins/Default/Standalone.html +1 -1
  21. data/doc/Compony/ComponentMixins/Default.html +1 -1
  22. data/doc/Compony/ComponentMixins/Resourceful.html +1 -1
  23. data/doc/Compony/ComponentMixins.html +1 -1
  24. data/doc/Compony/Components/Buttons/CssButton.html +1 -1
  25. data/doc/Compony/Components/Buttons/Link.html +1 -1
  26. data/doc/Compony/Components/Buttons.html +1 -1
  27. data/doc/Compony/Components/Destroy.html +1 -1
  28. data/doc/Compony/Components/Edit.html +1 -1
  29. data/doc/Compony/Components/Form.html +41 -41
  30. data/doc/Compony/Components/Index.html +1 -1
  31. data/doc/Compony/Components/List.html +1 -1
  32. data/doc/Compony/Components/New.html +1 -1
  33. data/doc/Compony/Components/Show.html +1 -1
  34. data/doc/Compony/Components/WithForm.html +1 -1
  35. data/doc/Compony/Components.html +1 -1
  36. data/doc/Compony/ControllerMixin.html +1 -1
  37. data/doc/Compony/Engine.html +1 -1
  38. data/doc/Compony/Intent.html +1 -1
  39. data/doc/Compony/ManageIntentsDsl.html +2 -2
  40. data/doc/Compony/MethodAccessibleHash.html +1 -1
  41. data/doc/Compony/ModelFields/Anchormodel.html +1 -1
  42. data/doc/Compony/ModelFields/Association.html +1 -1
  43. data/doc/Compony/ModelFields/Attachment.html +1 -1
  44. data/doc/Compony/ModelFields/Base.html +8 -2
  45. data/doc/Compony/ModelFields/Boolean.html +1 -1
  46. data/doc/Compony/ModelFields/Color.html +1 -1
  47. data/doc/Compony/ModelFields/Currency.html +1 -1
  48. data/doc/Compony/ModelFields/Date.html +1 -1
  49. data/doc/Compony/ModelFields/Datetime.html +1 -1
  50. data/doc/Compony/ModelFields/Decimal.html +1 -1
  51. data/doc/Compony/ModelFields/Email.html +1 -1
  52. data/doc/Compony/ModelFields/Float.html +1 -1
  53. data/doc/Compony/ModelFields/Integer.html +1 -1
  54. data/doc/Compony/ModelFields/Percentage.html +1 -1
  55. data/doc/Compony/ModelFields/Phone.html +1 -1
  56. data/doc/Compony/ModelFields/RichText.html +1 -1
  57. data/doc/Compony/ModelFields/String.html +1 -1
  58. data/doc/Compony/ModelFields/Text.html +1 -1
  59. data/doc/Compony/ModelFields/Time.html +1 -1
  60. data/doc/Compony/ModelFields/Url.html +1 -1
  61. data/doc/Compony/ModelFields.html +1 -1
  62. data/doc/Compony/ModelMixin.html +13 -13
  63. data/doc/Compony/NaturalOrdering.html +1 -1
  64. data/doc/Compony/RequestContext.html +1 -1
  65. data/doc/Compony/Version.html +1 -1
  66. data/doc/Compony/ViewHelpers.html +1 -1
  67. data/doc/Compony/VirtualModel.html +1 -1
  68. data/doc/Compony.html +276 -92
  69. data/doc/ComponyController.html +1 -1
  70. data/doc/_index.html +1 -1
  71. data/doc/file.CHANGELOG.html +89 -77
  72. data/doc/file.README.html +21 -11
  73. data/doc/file.basic_component.html +14 -14
  74. data/doc/file.cookbook.html +27 -27
  75. data/doc/file.destroy.html +2 -2
  76. data/doc/file.dsl_reference.html +199 -199
  77. data/doc/file.edit.html +3 -3
  78. data/doc/file.example.html +13 -13
  79. data/doc/file.example_advanced.html +10 -10
  80. data/doc/file.feasibility.html +2 -2
  81. data/doc/file.form.html +20 -8
  82. data/doc/file.generators.html +3 -3
  83. data/doc/file.glossary.html +44 -44
  84. data/doc/file.gotchas.html +35 -35
  85. data/doc/file.index.html +10 -10
  86. data/doc/file.inheritance.html +5 -5
  87. data/doc/file.installation.html +9 -9
  88. data/doc/file.integrations.html +46 -46
  89. data/doc/file.intents.html +11 -11
  90. data/doc/file.internal_datastructures.html +6 -6
  91. data/doc/file.list.html +35 -35
  92. data/doc/file.maintaining.html +21 -21
  93. data/doc/file.model_fields.html +3 -3
  94. data/doc/file.nesting.html +5 -5
  95. data/doc/file.new.html +3 -3
  96. data/doc/file.ownership.html +2 -2
  97. data/doc/file.patterns.html +50 -50
  98. data/doc/file.pre_built_components.html +2 -2
  99. data/doc/file.resourceful.html +5 -5
  100. data/doc/file.show.html +17 -17
  101. data/doc/file.standalone.html +12 -12
  102. data/doc/file.virtual_models.html +2 -2
  103. data/doc/file.with_form.html +23 -23
  104. data/doc/guide/pre_built_components/form.md +21 -2
  105. data/doc/index.html +21 -11
  106. data/doc/method_list.html +16 -0
  107. data/doc/top-level-namespace.html +1 -1
  108. data/lib/compony/components/form.rb +5 -4
  109. data/lib/compony/model_fields/base.rb +3 -0
  110. data/lib/compony/model_mixin.rb +3 -2
  111. data/lib/compony.rb +19 -0
  112. data/spec/README.md +22 -0
  113. data/spec/compony/component_spec.rb +80 -0
  114. data/spec/compony/components/form_spec.rb +31 -0
  115. data/spec/compony/compony_spec.rb +130 -0
  116. data/spec/compony/intent_spec.rb +94 -0
  117. data/spec/compony/method_accessible_hash_spec.rb +32 -0
  118. data/spec/compony/model_fields_spec.rb +70 -0
  119. data/spec/compony/model_mixin_spec.rb +109 -0
  120. data/spec/compony/natural_ordering_spec.rb +61 -0
  121. data/spec/dummy/app/components/statics/home.rb +17 -0
  122. data/spec/dummy/app/components/statics/secret.rb +15 -0
  123. data/spec/dummy/app/components/users/destroy.rb +2 -0
  124. data/spec/dummy/app/components/users/edit.rb +2 -0
  125. data/spec/dummy/app/components/users/form.rb +14 -0
  126. data/spec/dummy/app/components/users/index.rb +29 -0
  127. data/spec/dummy/app/components/users/new.rb +2 -0
  128. data/spec/dummy/app/components/users/show.rb +26 -0
  129. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  130. data/spec/dummy/app/models/ability.rb +7 -0
  131. data/spec/dummy/app/models/application_record.rb +4 -0
  132. data/spec/dummy/app/models/user.rb +22 -0
  133. data/spec/dummy/app/views/layouts/application.html.erb +7 -0
  134. data/spec/dummy/config/application.rb +20 -0
  135. data/spec/dummy/config/database.yml +3 -0
  136. data/spec/dummy/config/environment.rb +3 -0
  137. data/spec/dummy/config/initializers/simple_form.rb +9 -0
  138. data/spec/dummy/config/routes.rb +3 -0
  139. data/spec/dummy/db/schema.rb +14 -0
  140. data/spec/rails_helper.rb +23 -0
  141. data/spec/requests/authorization_spec.rb +16 -0
  142. data/spec/requests/plain_component_spec.rb +9 -0
  143. data/spec/requests/routing_spec.rb +20 -0
  144. data/spec/requests/users_crud_spec.rb +99 -0
  145. metadata +63 -1
@@ -144,7 +144,7 @@
144
144
  </div>
145
145
 
146
146
  <div id="footer">
147
- Generated on Tue Jun 30 22:41:21 2026 by
147
+ Generated on Wed Oct 7 10:48:21 2026 by
148
148
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
149
149
  0.9.34 (ruby-3.4.9).
150
150
  </div>
@@ -230,7 +230,7 @@
230
230
  </div>
231
231
 
232
232
  <div id="footer">
233
- Generated on Tue Jun 30 22:41:21 2026 by
233
+ Generated on Wed Oct 7 10:48:21 2026 by
234
234
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
235
235
  0.9.34 (ruby-3.4.9).
236
236
  </div>
@@ -144,7 +144,7 @@
144
144
  </div>
145
145
 
146
146
  <div id="footer">
147
- Generated on Tue Jun 30 22:41:21 2026 by
147
+ Generated on Wed Oct 7 10:48:21 2026 by
148
148
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
149
149
  0.9.34 (ruby-3.4.9).
150
150
  </div>
@@ -222,7 +222,7 @@
222
222
  </div>
223
223
 
224
224
  <div id="footer">
225
- Generated on Tue Jun 30 22:41:21 2026 by
225
+ Generated on Wed Oct 7 10:48:21 2026 by
226
226
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
227
227
  0.9.34 (ruby-3.4.9).
228
228
  </div>
@@ -222,7 +222,7 @@
222
222
  </div>
223
223
 
224
224
  <div id="footer">
225
- Generated on Tue Jun 30 22:41:21 2026 by
225
+ Generated on Wed Oct 7 10:48:21 2026 by
226
226
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
227
227
  0.9.34 (ruby-3.4.9).
228
228
  </div>
@@ -291,7 +291,7 @@
291
291
  </div>
292
292
 
293
293
  <div id="footer">
294
- Generated on Tue Jun 30 22:41:21 2026 by
294
+ Generated on Wed Oct 7 10:48:21 2026 by
295
295
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
296
296
  0.9.34 (ruby-3.4.9).
297
297
  </div>
@@ -222,7 +222,7 @@
222
222
  </div>
223
223
 
224
224
  <div id="footer">
225
- Generated on Tue Jun 30 22:41:21 2026 by
225
+ Generated on Wed Oct 7 10:48:21 2026 by
226
226
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
227
227
  0.9.34 (ruby-3.4.9).
228
228
  </div>
@@ -144,7 +144,7 @@
144
144
  </div>
145
145
 
146
146
  <div id="footer">
147
- Generated on Tue Jun 30 22:41:21 2026 by
147
+ Generated on Wed Oct 7 10:48:21 2026 by
148
148
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
149
149
  0.9.34 (ruby-3.4.9).
150
150
  </div>
@@ -144,7 +144,7 @@
144
144
  </div>
145
145
 
146
146
  <div id="footer">
147
- Generated on Tue Jun 30 22:41:21 2026 by
147
+ Generated on Wed Oct 7 10:48:21 2026 by
148
148
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
149
149
  0.9.34 (ruby-3.4.9).
150
150
  </div>
@@ -144,7 +144,7 @@
144
144
  </div>
145
145
 
146
146
  <div id="footer">
147
- Generated on Tue Jun 30 22:41:21 2026 by
147
+ Generated on Wed Oct 7 10:48:21 2026 by
148
148
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
149
149
  0.9.34 (ruby-3.4.9).
150
150
  </div>
@@ -230,7 +230,7 @@
230
230
  </div>
231
231
 
232
232
  <div id="footer">
233
- Generated on Tue Jun 30 22:41:21 2026 by
233
+ Generated on Wed Oct 7 10:48:21 2026 by
234
234
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
235
235
  0.9.34 (ruby-3.4.9).
236
236
  </div>
@@ -116,7 +116,7 @@
116
116
  </div>
117
117
 
118
118
  <div id="footer">
119
- Generated on Tue Jun 30 22:41:20 2026 by
119
+ Generated on Wed Oct 7 10:48:20 2026 by
120
120
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
121
121
  0.9.34 (ruby-3.4.9).
122
122
  </div>
@@ -269,14 +269,14 @@
269
269
  <pre class="lines">
270
270
 
271
271
 
272
- 181
273
272
  182
274
273
  183
275
274
  184
276
- 185</pre>
275
+ 185
276
+ 186</pre>
277
277
  </td>
278
278
  <td>
279
- <pre class="code"><span class="info file"># File 'lib/compony/model_mixin.rb', line 181</span>
279
+ <pre class="code"><span class="info file"># File 'lib/compony/model_mixin.rb', line 182</span>
280
280
 
281
281
  <span class='kw'>def</span> <span class='id identifier rubyid_feasibility_messages'>feasibility_messages</span><span class='lparen'>(</span><span class='id identifier rubyid_action_name'>action_name</span><span class='rparen'>)</span>
282
282
  <span class='id identifier rubyid_action_name'>action_name</span> <span class='op'>=</span> <span class='id identifier rubyid_action_name'>action_name</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span>
@@ -365,7 +365,6 @@
365
365
  <pre class="lines">
366
366
 
367
367
 
368
- 160
369
368
  161
370
369
  162
371
370
  163
@@ -381,10 +380,11 @@
381
380
  173
382
381
  174
383
382
  175
384
- 176</pre>
383
+ 176
384
+ 177</pre>
385
385
  </td>
386
386
  <td>
387
- <pre class="code"><span class="info file"># File 'lib/compony/model_mixin.rb', line 160</span>
387
+ <pre class="code"><span class="info file"># File 'lib/compony/model_mixin.rb', line 161</span>
388
388
 
389
389
  <span class='kw'>def</span> <span class='id identifier rubyid_feasible?'>feasible?</span><span class='lparen'>(</span><span class='id identifier rubyid_action_name'>action_name</span><span class='comma'>,</span> <span class='label'>recompute:</span> <span class='kw'>false</span><span class='rparen'>)</span>
390
390
  <span class='id identifier rubyid_action_name'>action_name</span> <span class='op'>=</span> <span class='id identifier rubyid_action_name'>action_name</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span>
@@ -434,12 +434,12 @@
434
434
  <pre class="lines">
435
435
 
436
436
 
437
- 198
438
437
  199
439
- 200</pre>
438
+ 200
439
+ 201</pre>
440
440
  </td>
441
441
  <td>
442
- <pre class="code"><span class="info file"># File 'lib/compony/model_mixin.rb', line 198</span>
442
+ <pre class="code"><span class="info file"># File 'lib/compony/model_mixin.rb', line 199</span>
443
443
 
444
444
  <span class='kw'>def</span> <span class='id identifier rubyid_field'>field</span><span class='lparen'>(</span><span class='id identifier rubyid_field_name'>field_name</span><span class='comma'>,</span> <span class='id identifier rubyid_controller'>controller</span><span class='rparen'>)</span>
445
445
  <span class='id identifier rubyid_fields'>fields</span><span class='lbracket'>[</span><span class='id identifier rubyid_field_name'>field_name</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_value_for'>value_for</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='label'>controller:</span><span class='rparen'>)</span>
@@ -495,14 +495,14 @@
495
495
  <pre class="lines">
496
496
 
497
497
 
498
- 191
499
498
  192
500
499
  193
501
500
  194
502
- 195</pre>
501
+ 195
502
+ 196</pre>
503
503
  </td>
504
504
  <td>
505
- <pre class="code"><span class="info file"># File 'lib/compony/model_mixin.rb', line 191</span>
505
+ <pre class="code"><span class="info file"># File 'lib/compony/model_mixin.rb', line 192</span>
506
506
 
507
507
  <span class='kw'>def</span> <span class='id identifier rubyid_full_feasibility_messages'>full_feasibility_messages</span><span class='lparen'>(</span><span class='id identifier rubyid_action_name'>action_name</span><span class='rparen'>)</span>
508
508
  <span class='id identifier rubyid_text'>text</span> <span class='op'>=</span> <span class='id identifier rubyid_feasibility_messages'>feasibility_messages</span><span class='lparen'>(</span><span class='id identifier rubyid_action_name'>action_name</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>, </span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_upcase_first'>upcase_first</span>
@@ -519,7 +519,7 @@
519
519
  </div>
520
520
 
521
521
  <div id="footer">
522
- Generated on Tue Jun 30 22:41:20 2026 by
522
+ Generated on Wed Oct 7 10:48:20 2026 by
523
523
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
524
524
  0.9.34 (ruby-3.4.9).
525
525
  </div>
@@ -290,7 +290,7 @@
290
290
  </div>
291
291
 
292
292
  <div id="footer">
293
- Generated on Tue Jun 30 22:41:21 2026 by
293
+ Generated on Wed Oct 7 10:48:21 2026 by
294
294
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
295
295
  0.9.34 (ruby-3.4.9).
296
296
  </div>
@@ -1149,7 +1149,7 @@
1149
1149
  </div>
1150
1150
 
1151
1151
  <div id="footer">
1152
- Generated on Tue Jun 30 22:41:21 2026 by
1152
+ Generated on Wed Oct 7 10:48:21 2026 by
1153
1153
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1154
1154
  0.9.34 (ruby-3.4.9).
1155
1155
  </div>
@@ -129,7 +129,7 @@
129
129
  </div>
130
130
 
131
131
  <div id="footer">
132
- Generated on Tue Jun 30 22:41:20 2026 by
132
+ Generated on Wed Oct 7 10:48:20 2026 by
133
133
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
134
134
  0.9.34 (ruby-3.4.9).
135
135
  </div>
@@ -222,7 +222,7 @@
222
222
  </div>
223
223
 
224
224
  <div id="footer">
225
- Generated on Tue Jun 30 22:41:20 2026 by
225
+ Generated on Wed Oct 7 10:48:20 2026 by
226
226
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
227
227
  0.9.34 (ruby-3.4.9).
228
228
  </div>
@@ -228,7 +228,7 @@
228
228
  </div>
229
229
 
230
230
  <div id="footer">
231
- Generated on Tue Jun 30 22:41:20 2026 by
231
+ Generated on Wed Oct 7 10:48:20 2026 by
232
232
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
233
233
  0.9.34 (ruby-3.4.9).
234
234
  </div>