compony 0.6.4 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/Gemfile.lock +1 -1
- data/README.md +6 -0
- data/VERSION +1 -1
- data/compony.gemspec +3 -3
- data/doc/ComponentGenerator.html +1 -1
- data/doc/Components.html +1 -1
- data/doc/ComponentsGenerator.html +1 -1
- data/doc/Compony/Component.html +247 -156
- data/doc/Compony/ComponentMixins/Default/Labelling.html +1 -1
- data/doc/Compony/ComponentMixins/Default/Standalone/ResourcefulVerbDsl.html +1 -1
- data/doc/Compony/ComponentMixins/Default/Standalone/StandaloneDsl.html +1 -1
- data/doc/Compony/ComponentMixins/Default/Standalone/VerbDsl.html +1 -1
- data/doc/Compony/ComponentMixins/Default/Standalone.html +1 -1
- data/doc/Compony/ComponentMixins/Default.html +1 -1
- data/doc/Compony/ComponentMixins/Resourceful.html +1 -1
- data/doc/Compony/ComponentMixins.html +1 -1
- data/doc/Compony/Components/Button.html +2 -2
- data/doc/Compony/Components/Destroy.html +2 -2
- data/doc/Compony/Components/Edit.html +2 -2
- data/doc/Compony/Components/Form.html +2 -2
- data/doc/Compony/Components/Index.html +2 -2
- data/doc/Compony/Components/List.html +2 -2
- data/doc/Compony/Components/New.html +2 -2
- data/doc/Compony/Components/Show.html +2 -2
- data/doc/Compony/Components/WithForm.html +19 -21
- data/doc/Compony/Components.html +1 -1
- data/doc/Compony/ControllerMixin.html +1 -1
- data/doc/Compony/Engine.html +1 -1
- data/doc/Compony/MethodAccessibleHash.html +1 -1
- data/doc/Compony/ModelFields/Anchormodel.html +1 -1
- data/doc/Compony/ModelFields/Association.html +1 -1
- data/doc/Compony/ModelFields/Attachment.html +1 -1
- data/doc/Compony/ModelFields/Base.html +1 -1
- data/doc/Compony/ModelFields/Boolean.html +1 -1
- data/doc/Compony/ModelFields/Color.html +1 -1
- data/doc/Compony/ModelFields/Currency.html +1 -1
- data/doc/Compony/ModelFields/Date.html +1 -1
- data/doc/Compony/ModelFields/Datetime.html +1 -1
- data/doc/Compony/ModelFields/Decimal.html +1 -1
- data/doc/Compony/ModelFields/Email.html +1 -1
- data/doc/Compony/ModelFields/Float.html +1 -1
- data/doc/Compony/ModelFields/Integer.html +1 -1
- data/doc/Compony/ModelFields/Percentage.html +1 -1
- data/doc/Compony/ModelFields/Phone.html +1 -1
- data/doc/Compony/ModelFields/RichText.html +1 -1
- data/doc/Compony/ModelFields/String.html +1 -1
- data/doc/Compony/ModelFields/Text.html +1 -1
- data/doc/Compony/ModelFields/Time.html +1 -1
- data/doc/Compony/ModelFields/Url.html +1 -1
- data/doc/Compony/ModelFields.html +1 -1
- data/doc/Compony/ModelMixin.html +1 -1
- data/doc/Compony/NaturalOrdering.html +1 -1
- data/doc/Compony/RequestContext.html +1 -1
- data/doc/Compony/Version.html +1 -1
- data/doc/Compony/ViewHelpers.html +1 -1
- data/doc/Compony.html +44 -42
- data/doc/ComponyController.html +1 -1
- data/doc/_index.html +1 -1
- data/doc/file.README.html +7 -1
- data/doc/index.html +7 -1
- data/doc/method_list.html +109 -101
- data/doc/top-level-namespace.html +1 -1
- data/lib/compony/component.rb +30 -8
- data/lib/compony/components/with_form.rb +1 -2
- data/lib/compony.rb +9 -8
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2eb1aa6e1437a93c6ecaba6fe39bca1f38dc9f3c5b2f64bc7bfeaba35b1df531
|
|
4
|
+
data.tar.gz: 58ff003601a8b4cabe7bfcf0dd0669e496778949251abe1022fbbb2d10b6114f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 805e0ecdd02f8dbbecd8d28253960d734ad8fc504efbf61c362a579ce6f36cd502067e40f88ea8cf94af8defd84b5cf56a727487bc7d4abbf0d67b6a0a56a0b9
|
|
7
|
+
data.tar.gz: c81f256fa241c2eaad5767f97c257c6ab5754b9c19ce72054fa6dc67e82c951e029575698b8a82b40ba087559ef5af9fb12cc04868c59eec625be5a0743c2f84
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
# 0.7.0
|
|
2
|
+
|
|
3
|
+
- Rename Component's internal `path` to `id_path` to distinguish it from Rails paths, as well as `path_hash` to `id_path_hash`
|
|
4
|
+
- (internal change): switch `WithForm`'s default `submit_path` block to `Compony.path` logic
|
|
5
|
+
- Implement new component DSL method `path`, closes #13
|
|
6
|
+
- The method allows components to define the path pointing towards them (the default behavior corresponds to that of `Compony.path` of previous versions)
|
|
7
|
+
- Adjust `Compony.path` to instanciate the target component and use the `path` block rather than come up with the path on its own
|
|
8
|
+
|
|
9
|
+
## Steps to take
|
|
10
|
+
|
|
11
|
+
- If using the methods formerly called `path` or `path_hash`, rename them to `id_path` respectively `id_path_hash`.
|
|
12
|
+
|
|
1
13
|
# 0.6.4
|
|
2
14
|
|
|
3
15
|
- Replace Feasibility's error message generation in case of dependent errors by a logic that fits fastgettext's modern pluralization
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -998,6 +998,12 @@ link_to 'See user page', Compony.path(:show, :users, id: 1) # -> 'users/show/1'
|
|
|
998
998
|
|
|
999
999
|
Note that the generated paths in the example are just for illustration purposes. The paths point to whatever path you configure in the target component's default standalone config. Also, this example is not how you should generate links to components, as is explained in the next subsection.
|
|
1000
1000
|
|
|
1001
|
+
#### Customizing path generation
|
|
1002
|
+
|
|
1003
|
+
By implementing `path do ... end` inside the `setup` method of a component, you can override the way paths to that component are generated. Customizing the path generation will affect all mentioned methods mentioned here involving paths, such as `Compony.path`, `compony_link`, `Compony.button`, `compony_button` etc.
|
|
1004
|
+
|
|
1005
|
+
This is an advanced usage. Refer to the default implementation of `Component`'s `path_block` to see an exmple.
|
|
1006
|
+
|
|
1001
1007
|
### Generating a link to a component
|
|
1002
1008
|
|
|
1003
1009
|
In order to allow a user to visit another component, don't implement your links and buttons manually. Instead, use Compony's links and buttons, as those extract information from the target component, avoiding redundant code and making refactoring much easier.
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.
|
|
1
|
+
0.7.0
|
data/compony.gemspec
CHANGED
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
# This file is auto-generated via: 'rake gemspec'.
|
|
3
3
|
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
|
5
|
-
# stub: compony 0.
|
|
5
|
+
# stub: compony 0.7.0 ruby lib
|
|
6
6
|
|
|
7
7
|
Gem::Specification.new do |s|
|
|
8
8
|
s.name = "compony".freeze
|
|
9
|
-
s.version = "0.
|
|
9
|
+
s.version = "0.7.0".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 = "2025-11-
|
|
14
|
+
s.date = "2025-11-14"
|
|
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/Index.html".freeze, "doc/Compony/Components/List.html".freeze, "doc/Compony/Components/New.html".freeze, "doc/Compony/Components/Show.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/index.rb".freeze, "lib/compony/components/list.rb".freeze, "lib/compony/components/new.rb".freeze, "lib/compony/components/show.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/index.rb.erb".freeze, "lib/generators/component/templates/list.rb.erb".freeze, "lib/generators/component/templates/new.rb.erb".freeze, "lib/generators/component/templates/show.rb.erb".freeze, "lib/generators/component/templates/with_base_component.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
17
|
s.rubygems_version = "3.5.16".freeze
|
data/doc/ComponentGenerator.html
CHANGED
|
@@ -249,7 +249,7 @@
|
|
|
249
249
|
</div>
|
|
250
250
|
|
|
251
251
|
<div id="footer">
|
|
252
|
-
Generated on
|
|
252
|
+
Generated on Fri Nov 14 15:08:17 2025 by
|
|
253
253
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
254
254
|
0.9.34 (ruby-3.3.5).
|
|
255
255
|
</div>
|
data/doc/Components.html
CHANGED
|
@@ -193,7 +193,7 @@
|
|
|
193
193
|
</div>
|
|
194
194
|
|
|
195
195
|
<div id="footer">
|
|
196
|
-
Generated on
|
|
196
|
+
Generated on Fri Nov 14 15:08:17 2025 by
|
|
197
197
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
198
198
|
0.9.34 (ruby-3.3.5).
|
|
199
199
|
</div>
|