compony 0.5.1 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -0
  3. data/README.md +33 -0
  4. data/VERSION +1 -1
  5. data/compony.gemspec +4 -4
  6. data/config/routes.rb +9 -6
  7. data/doc/ComponentGenerator.html +3 -3
  8. data/doc/Components.html +3 -3
  9. data/doc/ComponentsGenerator.html +3 -3
  10. data/doc/Compony/Component.html +3 -3
  11. data/doc/Compony/ComponentMixins/Default/Labelling.html +3 -3
  12. data/doc/Compony/ComponentMixins/Default/Standalone/ResourcefulVerbDsl.html +3 -3
  13. data/doc/Compony/ComponentMixins/Default/Standalone/StandaloneDsl.html +40 -28
  14. data/doc/Compony/ComponentMixins/Default/Standalone/VerbDsl.html +3 -3
  15. data/doc/Compony/ComponentMixins/Default/Standalone.html +3 -3
  16. data/doc/Compony/ComponentMixins/Default.html +3 -3
  17. data/doc/Compony/ComponentMixins/Resourceful.html +3 -3
  18. data/doc/Compony/ComponentMixins.html +3 -3
  19. data/doc/Compony/Components/Button.html +11 -7
  20. data/doc/Compony/Components/Destroy.html +3 -3
  21. data/doc/Compony/Components/Edit.html +3 -3
  22. data/doc/Compony/Components/Form.html +148 -77
  23. data/doc/Compony/Components/New.html +3 -3
  24. data/doc/Compony/Components/WithForm.html +3 -3
  25. data/doc/Compony/Components.html +3 -3
  26. data/doc/Compony/ControllerMixin.html +3 -3
  27. data/doc/Compony/Engine.html +3 -3
  28. data/doc/Compony/MethodAccessibleHash.html +3 -3
  29. data/doc/Compony/ModelFields/Anchormodel.html +3 -3
  30. data/doc/Compony/ModelFields/Association.html +4 -4
  31. data/doc/Compony/ModelFields/Attachment.html +3 -3
  32. data/doc/Compony/ModelFields/Base.html +3 -3
  33. data/doc/Compony/ModelFields/Boolean.html +3 -3
  34. data/doc/Compony/ModelFields/Color.html +3 -3
  35. data/doc/Compony/ModelFields/Currency.html +3 -3
  36. data/doc/Compony/ModelFields/Date.html +3 -3
  37. data/doc/Compony/ModelFields/Datetime.html +3 -3
  38. data/doc/Compony/ModelFields/Decimal.html +3 -3
  39. data/doc/Compony/ModelFields/Email.html +3 -3
  40. data/doc/Compony/ModelFields/Float.html +3 -3
  41. data/doc/Compony/ModelFields/Integer.html +3 -3
  42. data/doc/Compony/ModelFields/Percentage.html +3 -3
  43. data/doc/Compony/ModelFields/Phone.html +3 -3
  44. data/doc/Compony/ModelFields/RichText.html +3 -3
  45. data/doc/Compony/ModelFields/String.html +3 -3
  46. data/doc/Compony/ModelFields/Text.html +3 -3
  47. data/doc/Compony/ModelFields/Time.html +3 -3
  48. data/doc/Compony/ModelFields/Url.html +3 -3
  49. data/doc/Compony/ModelFields.html +3 -3
  50. data/doc/Compony/ModelMixin.html +3 -3
  51. data/doc/Compony/NaturalOrdering.html +3 -3
  52. data/doc/Compony/RequestContext.html +3 -3
  53. data/doc/Compony/Version.html +3 -3
  54. data/doc/Compony/ViewHelpers.html +32 -14
  55. data/doc/Compony.html +4 -4
  56. data/doc/ComponyController.html +3 -3
  57. data/doc/_index.html +4 -4
  58. data/doc/class_list.html +6 -3
  59. data/doc/css/full_list.css +3 -3
  60. data/doc/css/style.css +6 -0
  61. data/doc/file.README.html +36 -3
  62. data/doc/file_list.html +5 -2
  63. data/doc/frames.html +10 -5
  64. data/doc/index.html +36 -3
  65. data/doc/js/app.js +294 -264
  66. data/doc/js/full_list.js +30 -4
  67. data/doc/method_list.html +152 -141
  68. data/doc/top-level-namespace.html +3 -3
  69. data/lib/compony/component_mixins/default/standalone/standalone_dsl.rb +7 -1
  70. data/lib/compony/components/button.rb +5 -3
  71. data/lib/compony/components/form.rb +9 -1
  72. data/lib/compony/model_fields/association.rb +1 -1
  73. data/lib/compony/view_helpers.rb +12 -4
  74. data/lib/compony.rb +1 -1
  75. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c39bdd69d9086e8b0b6cd76efa53c4c26327d540c814ec7d89d72b4a5e16b792
4
- data.tar.gz: 87a0825429e03111aa260e688a54c45d1c296efce68b225cee100036ab627023
3
+ metadata.gz: c45d409dec136ce06cf7b04d44089d87463331b952babc63f33bd43a02b74ab3
4
+ data.tar.gz: 63a1803653878ccaa020ffba945a2aa75e91d6a26d2e7afd9b6c76effcbb5d09
5
5
  SHA512:
6
- metadata.gz: 534cd84ccc5d6de9f7ccc570d4b571b0f6f62cc3ca166375f92ba21bcf19fab989904a003db0336862a6b641289c506f524fd71274fd9aec24709029d9a91ad6
7
- data.tar.gz: df5ff5b6ba7c2dd1e8141549684314621a1a993ac5322ca0e95e00cd8a0abd017a76c3a7a01abec6b90125393aa906506d23dc7c3f20090851e3a2a4baf4d47c
6
+ metadata.gz: c16b6ade9c9f92fa3dd1e73753ca4b9d063c31bf4cbf443ad8a25b8ecb6935648fcf3c88dac5176ccf7a2e8b797024e1a2b7dbd65a4f82353c2e2c32601452e3
7
+ data.tar.gz: 7270d80d8f365b6024865b7e51009a5de4de0c53e95bcf0b46649103915c3e200503b10820fde3a453be8b9f50df40dc32b2f4f1df7ae87af3e0d67d7a162fd0
data/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ # 0.5.3
2
+
3
+ - Support `standalone_name` in `Compony.button` and `compony_link`
4
+ - Support passing component classes directly to `compony_link`
5
+ - Support `button_params` in regular buttons
6
+ - Support `value` in submit buttons
7
+ - Support `disable!` and `disabled: true` in Form, disabling all inputs
8
+
9
+ # 0.5.2
10
+
11
+ - Add `constraints` to `standalone`
12
+ - Add `scope` and `scope_args` to `standalone`
13
+ - Set default `label_method` to `label` when generating a `simple_form` input for `:association`
14
+
1
15
  # 0.5.1
2
16
 
3
17
  - Correctly handle `ActiveType::Object` virtual fields in Rails 7.2
data/README.md CHANGED
@@ -654,6 +654,36 @@ Rails controller redirects can be issued both in a verb DSL's `respond` block an
654
654
  - If you want to redirect depending on the HTTP verb, use `respond`.
655
655
  - If you want to redirect depending on params, state, time etc. **independently of the HTTP verb**, use `before_render`, as this is more convenient than writing a standalone -> verb -> respond tree.
656
656
 
657
+ ### Path constraints
658
+
659
+ When calling `standalone`, you may specify the keyword `constraints` that will be passed to the route. For example:
660
+
661
+ ```ruby
662
+ # In your component
663
+ standelone path: '/:lang', constraints: { lang: /([a-z]{2})?/i }
664
+
665
+ # This will automatically lead to a route of this form:
666
+ get ':lang', constraints: { lang: /([a-z]{2})?/i }
667
+ ```
668
+
669
+ ### Passing scopes
670
+
671
+ When calling `standalone`, you may specify the keyword `scope` to wrap the component's Rails route into a route scope. Additionally, you may specify a hash `scope_args`, which will be passed as keyword arguments to the `scope` call in the route:
672
+
673
+ ```ruby
674
+ # In your component
675
+ standalone path: '/welcome', scope: '(:lang)', scope_args: { lang: /([a-z]{2})?/i } do
676
+ verb :get do
677
+ # ....
678
+ end
679
+ end
680
+
681
+ # This will automatically lead to a route of this form:
682
+ scope '(:lang)', lang: /([a-z]{2})?/i do
683
+ get 'welcome', to: 'compony#your_component'
684
+ end
685
+ ```
686
+
657
687
  ## Inheritance
658
688
 
659
689
  When inheriting from another component class, `setup` can be called in the child as well in order to overwrite specified configurations. The parent's `setup` block will be run first, then the child's, then the grand-child's and so on.
@@ -982,6 +1012,7 @@ Examples:
982
1012
 
983
1013
  ```ruby
984
1014
  compony_link(:index, :users) # "View all users" -> 'users/index'
1015
+ compony_link(Components::Users::Index) # same as above
985
1016
  compony_link(:index, :users, label_opts: { format: :short }) # "All" -> 'users/index'
986
1017
  compony_link(:show, User.first) # "View John Doe" -> 'users/show/1'
987
1018
  compony_link(:destroy, User.first, method: :delete) # "Delete John Doe" -> 'users/destroy/1'
@@ -1322,6 +1353,7 @@ The following DSL calls are provided by the Form component:
1322
1353
  - Typically required: `schema_fields` takes the names of fields as a whitelist for strong parameters. Together with model fields, this will completely auto-generate a Schemacop schema suitable for validating this form. If your argument list gets too long, you can use multiple calls to `schema_field` instead to declare your fields one by one on separate lines.
1323
1354
  - Optional: `schema_line` takes a single Schemacop line. Use this for custom whitelisting of an argument, e.g. if you have an input that does not have a corresponding model field.
1324
1355
  - Optional: `schema` allows you to instead fully define your own custom Schemacop V3 schema manually. Note that this disables all of the above schema calls.
1356
+ - Optional: `disable!` causes generated inputs to be disabled. Alternatively, `disabled: true` can be passed to the initializer to achieve the same result.
1325
1357
 
1326
1358
  The `form_fields` block acts much like a content block and you will use Dyny there. Two additional methods are made available exclusively inside the block:
1327
1359
 
@@ -1507,6 +1539,7 @@ Compony is Free Software under the LGPLv3 and you are most welcome to contribute
1507
1539
  - Feasibility:
1508
1540
  - The feasibility framework does not yet enforce prevention, but only has effects on buttons. Actions should be structured more explicitly such that prevention becomes as tight as authorization.
1509
1541
  - Feasibility for links is not yet implemented.
1542
+ - Compony is not compatible with `tailwindcss-rails`. This is likely due to Tailwind automatically removing any CSS that is not used by the application and the usage detection not picking up Compony components, as their content is not provided in views.
1510
1543
 
1511
1544
  # Acknowledgements
1512
1545
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.1
1
+ 0.5.3
data/compony.gemspec CHANGED
@@ -2,19 +2,19 @@
2
2
  # This file is auto-generated via: 'rake gemspec'.
3
3
 
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: compony 0.5.1 ruby lib
5
+ # stub: compony 0.5.3 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "compony".freeze
9
- s.version = "0.5.1".freeze
9
+ s.version = "0.5.3".freeze
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
13
13
  s.authors = ["Sandro Kalbermatter".freeze, "contributors".freeze]
14
- s.date = "2024-09-16"
14
+ s.date = "2024-12-20"
15
15
  s.files = [".gitignore".freeze, ".ruby-version".freeze, ".yardopts".freeze, "CHANGELOG.md".freeze, "Gemfile".freeze, "Gemfile.lock".freeze, "LICENSE".freeze, "README.md".freeze, "Rakefile".freeze, "TODO.md".freeze, "VERSION".freeze, "app/controllers/compony_controller.rb".freeze, "compony.gemspec".freeze, "config/locales/de.yml".freeze, "config/locales/en.yml".freeze, "config/locales/fr.yml".freeze, "config/routes.rb".freeze, "doc/ComponentGenerator.html".freeze, "doc/Components.html".freeze, "doc/ComponentsGenerator.html".freeze, "doc/Compony.html".freeze, "doc/Compony/Component.html".freeze, "doc/Compony/ComponentMixins.html".freeze, "doc/Compony/ComponentMixins/Default.html".freeze, "doc/Compony/ComponentMixins/Default/Labelling.html".freeze, "doc/Compony/ComponentMixins/Default/Standalone.html".freeze, "doc/Compony/ComponentMixins/Default/Standalone/ResourcefulVerbDsl.html".freeze, "doc/Compony/ComponentMixins/Default/Standalone/StandaloneDsl.html".freeze, "doc/Compony/ComponentMixins/Default/Standalone/VerbDsl.html".freeze, "doc/Compony/ComponentMixins/Resourceful.html".freeze, "doc/Compony/Components.html".freeze, "doc/Compony/Components/Button.html".freeze, "doc/Compony/Components/Destroy.html".freeze, "doc/Compony/Components/Edit.html".freeze, "doc/Compony/Components/Form.html".freeze, "doc/Compony/Components/New.html".freeze, "doc/Compony/Components/WithForm.html".freeze, "doc/Compony/ControllerMixin.html".freeze, "doc/Compony/Engine.html".freeze, "doc/Compony/MethodAccessibleHash.html".freeze, "doc/Compony/ModelFields.html".freeze, "doc/Compony/ModelFields/Anchormodel.html".freeze, "doc/Compony/ModelFields/Association.html".freeze, "doc/Compony/ModelFields/Attachment.html".freeze, "doc/Compony/ModelFields/Base.html".freeze, "doc/Compony/ModelFields/Boolean.html".freeze, "doc/Compony/ModelFields/Color.html".freeze, "doc/Compony/ModelFields/Currency.html".freeze, "doc/Compony/ModelFields/Date.html".freeze, "doc/Compony/ModelFields/Datetime.html".freeze, "doc/Compony/ModelFields/Decimal.html".freeze, "doc/Compony/ModelFields/Email.html".freeze, "doc/Compony/ModelFields/Float.html".freeze, "doc/Compony/ModelFields/Integer.html".freeze, "doc/Compony/ModelFields/Percentage.html".freeze, "doc/Compony/ModelFields/Phone.html".freeze, "doc/Compony/ModelFields/RichText.html".freeze, "doc/Compony/ModelFields/String.html".freeze, "doc/Compony/ModelFields/Text.html".freeze, "doc/Compony/ModelFields/Time.html".freeze, "doc/Compony/ModelFields/Url.html".freeze, "doc/Compony/ModelMixin.html".freeze, "doc/Compony/NaturalOrdering.html".freeze, "doc/Compony/RequestContext.html".freeze, "doc/Compony/Version.html".freeze, "doc/Compony/ViewHelpers.html".freeze, "doc/ComponyController.html".freeze, "doc/_index.html".freeze, "doc/class_list.html".freeze, "doc/css/common.css".freeze, "doc/css/full_list.css".freeze, "doc/css/style.css".freeze, "doc/file.README.html".freeze, "doc/file_list.html".freeze, "doc/frames.html".freeze, "doc/imgs/intro-example-destroy.png".freeze, "doc/imgs/intro-example-edit.png".freeze, "doc/imgs/intro-example-index.png".freeze, "doc/imgs/intro-example-new.png".freeze, "doc/imgs/intro-example-show.png".freeze, "doc/index.html".freeze, "doc/js/app.js".freeze, "doc/js/full_list.js".freeze, "doc/js/jquery.js".freeze, "doc/method_list.html".freeze, "doc/resourceful_lifecycle.graphml".freeze, "doc/resourceful_lifecycle.pdf".freeze, "doc/resourceful_lifecycle.png".freeze, "doc/top-level-namespace.html".freeze, "lib/compony.rb".freeze, "lib/compony/component.rb".freeze, "lib/compony/component_mixins/default/labelling.rb".freeze, "lib/compony/component_mixins/default/standalone.rb".freeze, "lib/compony/component_mixins/default/standalone/resourceful_verb_dsl.rb".freeze, "lib/compony/component_mixins/default/standalone/standalone_dsl.rb".freeze, "lib/compony/component_mixins/default/standalone/verb_dsl.rb".freeze, "lib/compony/component_mixins/resourceful.rb".freeze, "lib/compony/components/button.rb".freeze, "lib/compony/components/destroy.rb".freeze, "lib/compony/components/edit.rb".freeze, "lib/compony/components/form.rb".freeze, "lib/compony/components/new.rb".freeze, "lib/compony/components/with_form.rb".freeze, "lib/compony/controller_mixin.rb".freeze, "lib/compony/engine.rb".freeze, "lib/compony/method_accessible_hash.rb".freeze, "lib/compony/model_fields/anchormodel.rb".freeze, "lib/compony/model_fields/association.rb".freeze, "lib/compony/model_fields/attachment.rb".freeze, "lib/compony/model_fields/base.rb".freeze, "lib/compony/model_fields/boolean.rb".freeze, "lib/compony/model_fields/color.rb".freeze, "lib/compony/model_fields/currency.rb".freeze, "lib/compony/model_fields/date.rb".freeze, "lib/compony/model_fields/datetime.rb".freeze, "lib/compony/model_fields/decimal.rb".freeze, "lib/compony/model_fields/email.rb".freeze, "lib/compony/model_fields/float.rb".freeze, "lib/compony/model_fields/integer.rb".freeze, "lib/compony/model_fields/percentage.rb".freeze, "lib/compony/model_fields/phone.rb".freeze, "lib/compony/model_fields/rich_text.rb".freeze, "lib/compony/model_fields/string.rb".freeze, "lib/compony/model_fields/text.rb".freeze, "lib/compony/model_fields/time.rb".freeze, "lib/compony/model_fields/url.rb".freeze, "lib/compony/model_mixin.rb".freeze, "lib/compony/natural_ordering.rb".freeze, "lib/compony/request_context.rb".freeze, "lib/compony/version.rb".freeze, "lib/compony/view_helpers.rb".freeze, "lib/generators/component/USAGE".freeze, "lib/generators/component/component_generator.rb".freeze, "lib/generators/component/templates/component.rb.erb".freeze, "lib/generators/component/templates/destroy.rb.erb".freeze, "lib/generators/component/templates/edit.rb.erb".freeze, "lib/generators/component/templates/form.rb.erb".freeze, "lib/generators/component/templates/new.rb.erb".freeze, "lib/generators/components/USAGE".freeze, "lib/generators/components/components_generator.rb".freeze, "logo.svg".freeze]
16
16
  s.required_ruby_version = Gem::Requirement.new(">= 3.3.5".freeze)
17
- s.rubygems_version = "3.5.18".freeze
17
+ s.rubygems_version = "3.5.22".freeze
18
18
  s.summary = "Compony is a Gem that allows you to write your Rails application in component-style fashion. It combines a controller action and route along \\ with its view into a single Ruby class. This allows writing much DRYer code, using inheritance even in views and much easier refactoring for your Rails \\ applications, helping you to keep the code clean as the application evolves.".freeze
19
19
 
20
20
  s.specification_version = 4
data/config/routes.rb CHANGED
@@ -6,12 +6,15 @@ Rails.application.routes.draw do
6
6
  # Standalone configs are already grouped in a hash, one entry per name/path
7
7
  comp.standalone_configs.each_value do |standalone_config|
8
8
  next if standalone_config[:path].blank? # Ignore incomplete standalone configs (these come from parent classes )
9
- match(
10
- standalone_config.path,
11
- to: "compony##{standalone_config.rails_action_name}",
12
- as: standalone_config.path_helper_name,
13
- via: standalone_config.verbs.keys
14
- )
9
+ scope standalone_config[:scope], **standalone_config[:scope_args] do
10
+ match(
11
+ standalone_config.path,
12
+ constraints: standalone_config[:constraints],
13
+ to: "compony##{standalone_config.rails_action_name}",
14
+ as: standalone_config.path_helper_name,
15
+ via: standalone_config.verbs.keys
16
+ )
17
+ end
15
18
  end
16
19
  end
17
20
  end
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: ComponentGenerator
8
8
 
9
- &mdash; Documentation by YARD 0.9.34
9
+ &mdash; Documentation by YARD 0.9.37
10
10
 
11
11
  </title>
12
12
 
@@ -221,9 +221,9 @@
221
221
  </div>
222
222
 
223
223
  <div id="footer">
224
- Generated on Mon Sep 16 14:57:52 2024 by
224
+ Generated on Fri Dec 20 13:46:33 2024 by
225
225
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
226
- 0.9.34 (ruby-3.3.5).
226
+ 0.9.37 (ruby-3.3.5).
227
227
  </div>
228
228
 
229
229
  </div>
data/doc/Components.html CHANGED
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Components
8
8
 
9
- &mdash; Documentation by YARD 0.9.34
9
+ &mdash; Documentation by YARD 0.9.37
10
10
 
11
11
  </title>
12
12
 
@@ -95,9 +95,9 @@
95
95
  </div>
96
96
 
97
97
  <div id="footer">
98
- Generated on Mon Sep 16 14:57:51 2024 by
98
+ Generated on Fri Dec 20 13:46:33 2024 by
99
99
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
100
- 0.9.34 (ruby-3.3.5).
100
+ 0.9.37 (ruby-3.3.5).
101
101
  </div>
102
102
 
103
103
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: ComponentsGenerator
8
8
 
9
- &mdash; Documentation by YARD 0.9.34
9
+ &mdash; Documentation by YARD 0.9.37
10
10
 
11
11
  </title>
12
12
 
@@ -193,9 +193,9 @@
193
193
  </div>
194
194
 
195
195
  <div id="footer">
196
- Generated on Mon Sep 16 14:57:52 2024 by
196
+ Generated on Fri Dec 20 13:46:33 2024 by
197
197
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
198
- 0.9.34 (ruby-3.3.5).
198
+ 0.9.37 (ruby-3.3.5).
199
199
  </div>
200
200
 
201
201
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: Compony::Component
8
8
 
9
- &mdash; Documentation by YARD 0.9.34
9
+ &mdash; Documentation by YARD 0.9.37
10
10
 
11
11
  </title>
12
12
 
@@ -2503,9 +2503,9 @@
2503
2503
  </div>
2504
2504
 
2505
2505
  <div id="footer">
2506
- Generated on Mon Sep 16 14:57:51 2024 by
2506
+ Generated on Fri Dec 20 13:46:33 2024 by
2507
2507
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2508
- 0.9.34 (ruby-3.3.5).
2508
+ 0.9.37 (ruby-3.3.5).
2509
2509
  </div>
2510
2510
 
2511
2511
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Compony::ComponentMixins::Default::Labelling
8
8
 
9
- &mdash; Documentation by YARD 0.9.34
9
+ &mdash; Documentation by YARD 0.9.37
10
10
 
11
11
  </title>
12
12
 
@@ -396,9 +396,9 @@
396
396
  </div>
397
397
 
398
398
  <div id="footer">
399
- Generated on Mon Sep 16 14:57:51 2024 by
399
+ Generated on Fri Dec 20 13:46:33 2024 by
400
400
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
401
- 0.9.34 (ruby-3.3.5).
401
+ 0.9.37 (ruby-3.3.5).
402
402
  </div>
403
403
 
404
404
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: Compony::ComponentMixins::Default::Standalone::ResourcefulVerbDsl
8
8
 
9
- &mdash; Documentation by YARD 0.9.34
9
+ &mdash; Documentation by YARD 0.9.37
10
10
 
11
11
  </title>
12
12
 
@@ -529,9 +529,9 @@
529
529
  </div>
530
530
 
531
531
  <div id="footer">
532
- Generated on Mon Sep 16 14:57:52 2024 by
532
+ Generated on Fri Dec 20 13:46:34 2024 by
533
533
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
534
- 0.9.34 (ruby-3.3.5).
534
+ 0.9.37 (ruby-3.3.5).
535
535
  </div>
536
536
 
537
537
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: Compony::ComponentMixins::Default::Standalone::StandaloneDsl
8
8
 
9
- &mdash; Documentation by YARD 0.9.34
9
+ &mdash; Documentation by YARD 0.9.37
10
10
 
11
11
  </title>
12
12
 
@@ -130,7 +130,7 @@
130
130
  <li class="public ">
131
131
  <span class="summary_signature">
132
132
 
133
- <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(component, name = nil, provide_defaults:, path: nil) &#x21d2; StandaloneDsl </a>
133
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(component, name = nil, provide_defaults:, path: nil, constraints: nil, scope: nil, scope_args: {}) &#x21d2; StandaloneDsl </a>
134
134
 
135
135
 
136
136
 
@@ -259,7 +259,7 @@
259
259
  <div class="method_details first">
260
260
  <h3 class="signature first" id="initialize-instance_method">
261
261
 
262
- #<strong>initialize</strong>(component, name = nil, provide_defaults:, path: nil) &#x21d2; <tt><span class='object_link'><a href="" title="Compony::ComponentMixins::Default::Standalone::StandaloneDsl (class)">StandaloneDsl</a></span></tt>
262
+ #<strong>initialize</strong>(component, name = nil, provide_defaults:, path: nil, constraints: nil, scope: nil, scope_args: {}) &#x21d2; <tt><span class='object_link'><a href="" title="Compony::ComponentMixins::Default::Standalone::StandaloneDsl (class)">StandaloneDsl</a></span></tt>
263
263
 
264
264
 
265
265
 
@@ -291,17 +291,23 @@
291
291
  15
292
292
  16
293
293
  17
294
- 18</pre>
294
+ 18
295
+ 19
296
+ 20
297
+ 21</pre>
295
298
  </td>
296
299
  <td>
297
300
  <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/default/standalone/standalone_dsl.rb', line 9</span>
298
301
 
299
- <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_component'>component</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>provide_defaults:</span><span class='comma'>,</span> <span class='label'>path:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
302
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_component'>component</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>provide_defaults:</span><span class='comma'>,</span> <span class='label'>path:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>constraints:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>scope:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>scope_args:</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
300
303
  <span class='kw'>super</span><span class='lparen'>(</span><span class='rparen'>)</span>
301
304
  <span class='ivar'>@component</span> <span class='op'>=</span> <span class='id identifier rubyid_component'>component</span>
302
305
  <span class='ivar'>@name</span> <span class='op'>=</span> <span class='id identifier rubyid_name'>name</span><span class='op'>&amp;.</span><span class='id identifier rubyid_to_sym'>to_sym</span>
303
306
  <span class='ivar'>@provide_defaults</span> <span class='op'>=</span> <span class='id identifier rubyid_provide_defaults'>provide_defaults</span>
304
307
  <span class='ivar'>@path</span> <span class='op'>=</span> <span class='id identifier rubyid_path'>path</span>
308
+ <span class='ivar'>@constraints</span> <span class='op'>=</span> <span class='id identifier rubyid_constraints'>constraints</span>
309
+ <span class='ivar'>@scope</span> <span class='op'>=</span> <span class='id identifier rubyid_scope'>scope</span>
310
+ <span class='ivar'>@scope_args</span> <span class='op'>=</span> <span class='id identifier rubyid_scope_args'>scope_args</span>
305
311
  <span class='ivar'>@verbs</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
306
312
  <span class='ivar'>@skip_authentication</span> <span class='op'>=</span> <span class='kw'>false</span>
307
313
  <span class='ivar'>@layout</span> <span class='op'>=</span> <span class='kw'>true</span> <span class='comment'># can be overriden by false or a string
@@ -364,12 +370,12 @@
364
370
  <pre class="lines">
365
371
 
366
372
 
367
- 66
368
- 67
369
- 68</pre>
373
+ 72
374
+ 73
375
+ 74</pre>
370
376
  </td>
371
377
  <td>
372
- <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/default/standalone/standalone_dsl.rb', line 66</span>
378
+ <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/default/standalone/standalone_dsl.rb', line 72</span>
373
379
 
374
380
  <span class='kw'>def</span> <span class='id identifier rubyid_layout'>layout</span><span class='lparen'>(</span><span class='id identifier rubyid_layout'>layout</span><span class='rparen'>)</span>
375
381
  <span class='ivar'>@layout</span> <span class='op'>=</span> <span class='id identifier rubyid_layout'>layout</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
@@ -405,12 +411,12 @@
405
411
  <pre class="lines">
406
412
 
407
413
 
408
- 58
409
- 59
410
- 60</pre>
414
+ 64
415
+ 65
416
+ 66</pre>
411
417
  </td>
412
418
  <td>
413
- <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/default/standalone/standalone_dsl.rb', line 58</span>
419
+ <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/default/standalone/standalone_dsl.rb', line 64</span>
414
420
 
415
421
  <span class='kw'>def</span> <span class='id identifier rubyid_skip_authentication!'>skip_authentication!</span>
416
422
  <span class='ivar'>@skip_authentication</span> <span class='op'>=</span> <span class='kw'>true</span>
@@ -446,9 +452,6 @@
446
452
  <pre class="lines">
447
453
 
448
454
 
449
- 21
450
- 22
451
- 23
452
455
  24
453
456
  25
454
457
  26
@@ -458,10 +461,16 @@
458
461
  30
459
462
  31
460
463
  32
461
- 33</pre>
464
+ 33
465
+ 34
466
+ 35
467
+ 36
468
+ 37
469
+ 38
470
+ 39</pre>
462
471
  </td>
463
472
  <td>
464
- <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/default/standalone/standalone_dsl.rb', line 21</span>
473
+ <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/default/standalone/standalone_dsl.rb', line 24</span>
465
474
 
466
475
  <span class='kw'>def</span> <span class='id identifier rubyid_to_conf'>to_conf</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
467
476
  <span class='id identifier rubyid_evaluate'>evaluate</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
@@ -469,6 +478,9 @@
469
478
  </span> <span class='kw'>return</span> <span class='lbrace'>{</span>
470
479
  <span class='label'>name:</span> <span class='ivar'>@name</span><span class='comma'>,</span>
471
480
  <span class='label'>path:</span> <span class='ivar'>@path</span><span class='comma'>,</span>
481
+ <span class='label'>constraints:</span> <span class='ivar'>@constraints</span><span class='comma'>,</span>
482
+ <span class='label'>scope:</span> <span class='ivar'>@scope</span><span class='comma'>,</span>
483
+ <span class='label'>scope_args:</span> <span class='ivar'>@scope_args</span><span class='comma'>,</span>
472
484
  <span class='label'>verbs:</span> <span class='ivar'>@verbs</span><span class='comma'>,</span>
473
485
  <span class='label'>rails_action_name:</span> <span class='const'><span class='object_link'><a href="../../../../Compony.html" title="Compony (module)">Compony</a></span></span><span class='period'>.</span><span class='id identifier rubyid_rails_action_name'><span class='object_link'><a href="../../../../Compony.html#rails_action_name-class_method" title="Compony.rails_action_name (method)">rails_action_name</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_comp_name'>comp_name</span><span class='comma'>,</span> <span class='id identifier rubyid_family_name'>family_name</span><span class='comma'>,</span> <span class='ivar'>@name</span><span class='rparen'>)</span><span class='comma'>,</span>
474
486
  <span class='label'>path_helper_name:</span> <span class='const'><span class='object_link'><a href="../../../../Compony.html" title="Compony (module)">Compony</a></span></span><span class='period'>.</span><span class='id identifier rubyid_path_helper_name'><span class='object_link'><a href="../../../../Compony.html#path_helper_name-class_method" title="Compony.path_helper_name (method)">path_helper_name</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_comp_name'>comp_name</span><span class='comma'>,</span> <span class='id identifier rubyid_family_name'>family_name</span><span class='comma'>,</span> <span class='ivar'>@name</span><span class='rparen'>)</span><span class='comma'>,</span>
@@ -534,12 +546,6 @@
534
546
  <pre class="lines">
535
547
 
536
548
 
537
- 40
538
- 41
539
- 42
540
- 43
541
- 44
542
- 45
543
549
  46
544
550
  47
545
551
  48
@@ -548,10 +554,16 @@
548
554
  51
549
555
  52
550
556
  53
551
- 54</pre>
557
+ 54
558
+ 55
559
+ 56
560
+ 57
561
+ 58
562
+ 59
563
+ 60</pre>
552
564
  </td>
553
565
  <td>
554
- <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/default/standalone/standalone_dsl.rb', line 40</span>
566
+ <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/default/standalone/standalone_dsl.rb', line 46</span>
555
567
 
556
568
  <span class='kw'>def</span> <span class='id identifier rubyid_verb'>verb</span><span class='lparen'>(</span><span class='id identifier rubyid_verb'>verb</span><span class='comma'>,</span> <span class='op'>*</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_nargs'>nargs</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='rparen'>)</span>
557
569
  <span class='id identifier rubyid_verb'>verb</span> <span class='op'>=</span> <span class='id identifier rubyid_verb'>verb</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span>
@@ -578,9 +590,9 @@
578
590
  </div>
579
591
 
580
592
  <div id="footer">
581
- Generated on Mon Sep 16 14:57:52 2024 by
593
+ Generated on Fri Dec 20 13:46:34 2024 by
582
594
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
583
- 0.9.34 (ruby-3.3.5).
595
+ 0.9.37 (ruby-3.3.5).
584
596
  </div>
585
597
 
586
598
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: Compony::ComponentMixins::Default::Standalone::VerbDsl
8
8
 
9
- &mdash; Documentation by YARD 0.9.34
9
+ &mdash; Documentation by YARD 0.9.37
10
10
 
11
11
  </title>
12
12
 
@@ -567,9 +567,9 @@
567
567
  </div>
568
568
 
569
569
  <div id="footer">
570
- Generated on Mon Sep 16 14:57:52 2024 by
570
+ Generated on Fri Dec 20 13:46:34 2024 by
571
571
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
572
- 0.9.34 (ruby-3.3.5).
572
+ 0.9.37 (ruby-3.3.5).
573
573
  </div>
574
574
 
575
575
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Compony::ComponentMixins::Default::Standalone
8
8
 
9
- &mdash; Documentation by YARD 0.9.34
9
+ &mdash; Documentation by YARD 0.9.37
10
10
 
11
11
  </title>
12
12
 
@@ -682,9 +682,9 @@
682
682
  </div>
683
683
 
684
684
  <div id="footer">
685
- Generated on Mon Sep 16 14:57:51 2024 by
685
+ Generated on Fri Dec 20 13:46:33 2024 by
686
686
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
687
- 0.9.34 (ruby-3.3.5).
687
+ 0.9.37 (ruby-3.3.5).
688
688
  </div>
689
689
 
690
690
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Compony::ComponentMixins::Default
8
8
 
9
- &mdash; Documentation by YARD 0.9.34
9
+ &mdash; Documentation by YARD 0.9.37
10
10
 
11
11
  </title>
12
12
 
@@ -116,9 +116,9 @@
116
116
  </div>
117
117
 
118
118
  <div id="footer">
119
- Generated on Mon Sep 16 14:57:51 2024 by
119
+ Generated on Fri Dec 20 13:46:33 2024 by
120
120
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
121
- 0.9.34 (ruby-3.3.5).
121
+ 0.9.37 (ruby-3.3.5).
122
122
  </div>
123
123
 
124
124
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Compony::ComponentMixins::Resourceful
8
8
 
9
- &mdash; Documentation by YARD 0.9.34
9
+ &mdash; Documentation by YARD 0.9.37
10
10
 
11
11
  </title>
12
12
 
@@ -1183,9 +1183,9 @@
1183
1183
  </div>
1184
1184
 
1185
1185
  <div id="footer">
1186
- Generated on Mon Sep 16 14:57:51 2024 by
1186
+ Generated on Fri Dec 20 13:46:33 2024 by
1187
1187
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1188
- 0.9.34 (ruby-3.3.5).
1188
+ 0.9.37 (ruby-3.3.5).
1189
1189
  </div>
1190
1190
 
1191
1191
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Compony::ComponentMixins
8
8
 
9
- &mdash; Documentation by YARD 0.9.34
9
+ &mdash; Documentation by YARD 0.9.37
10
10
 
11
11
  </title>
12
12
 
@@ -116,9 +116,9 @@
116
116
  </div>
117
117
 
118
118
  <div id="footer">
119
- Generated on Mon Sep 16 14:57:51 2024 by
119
+ Generated on Fri Dec 20 13:46:33 2024 by
120
120
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
121
- 0.9.34 (ruby-3.3.5).
121
+ 0.9.37 (ruby-3.3.5).
122
122
  </div>
123
123
 
124
124
  </div>