compony 0.10.1 → 0.11.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.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -0
  3. data/Gemfile.lock +1 -1
  4. data/VERSION +1 -1
  5. data/compony.gemspec +3 -3
  6. data/doc/ComponentGenerator.html +1 -1
  7. data/doc/Components.html +1 -1
  8. data/doc/ComponentsGenerator.html +1 -1
  9. data/doc/Compony/Component.html +1 -1
  10. data/doc/Compony/ComponentMixins/Default/Labelling.html +1 -1
  11. data/doc/Compony/ComponentMixins/Default/Standalone/ResourcefulVerbDsl.html +1 -1
  12. data/doc/Compony/ComponentMixins/Default/Standalone/StandaloneDsl.html +1 -1
  13. data/doc/Compony/ComponentMixins/Default/Standalone/VerbDsl.html +1 -1
  14. data/doc/Compony/ComponentMixins/Default/Standalone.html +1 -1
  15. data/doc/Compony/ComponentMixins/Default.html +1 -1
  16. data/doc/Compony/ComponentMixins/Resourceful.html +25 -94
  17. data/doc/Compony/ComponentMixins.html +1 -1
  18. data/doc/Compony/Components/Buttons/CssButton.html +1 -1
  19. data/doc/Compony/Components/Buttons/Link.html +1 -1
  20. data/doc/Compony/Components/Buttons.html +1 -1
  21. data/doc/Compony/Components/Destroy.html +2 -2
  22. data/doc/Compony/Components/Edit.html +2 -2
  23. data/doc/Compony/Components/Form.html +1 -1
  24. data/doc/Compony/Components/Index.html +2 -2
  25. data/doc/Compony/Components/List.html +2 -2
  26. data/doc/Compony/Components/New.html +2 -2
  27. data/doc/Compony/Components/Show.html +47 -22
  28. data/doc/Compony/Components/WithForm.html +1 -1
  29. data/doc/Compony/Components.html +1 -1
  30. data/doc/Compony/ControllerMixin.html +1 -1
  31. data/doc/Compony/Engine.html +1 -1
  32. data/doc/Compony/Intent.html +75 -63
  33. data/doc/Compony/ManageIntentsDsl.html +16 -12
  34. data/doc/Compony/MethodAccessibleHash.html +1 -1
  35. data/doc/Compony/ModelFields/Anchormodel.html +1 -1
  36. data/doc/Compony/ModelFields/Association.html +1 -1
  37. data/doc/Compony/ModelFields/Attachment.html +1 -1
  38. data/doc/Compony/ModelFields/Base.html +1 -1
  39. data/doc/Compony/ModelFields/Boolean.html +1 -1
  40. data/doc/Compony/ModelFields/Color.html +1 -1
  41. data/doc/Compony/ModelFields/Currency.html +1 -1
  42. data/doc/Compony/ModelFields/Date.html +1 -1
  43. data/doc/Compony/ModelFields/Datetime.html +1 -1
  44. data/doc/Compony/ModelFields/Decimal.html +1 -1
  45. data/doc/Compony/ModelFields/Email.html +1 -1
  46. data/doc/Compony/ModelFields/Float.html +1 -1
  47. data/doc/Compony/ModelFields/Integer.html +1 -1
  48. data/doc/Compony/ModelFields/Percentage.html +1 -1
  49. data/doc/Compony/ModelFields/Phone.html +1 -1
  50. data/doc/Compony/ModelFields/RichText.html +1 -1
  51. data/doc/Compony/ModelFields/String.html +1 -1
  52. data/doc/Compony/ModelFields/Text.html +1 -1
  53. data/doc/Compony/ModelFields/Time.html +1 -1
  54. data/doc/Compony/ModelFields/Url.html +1 -1
  55. data/doc/Compony/ModelFields.html +1 -1
  56. data/doc/Compony/ModelMixin.html +1 -1
  57. data/doc/Compony/NaturalOrdering.html +1 -1
  58. data/doc/Compony/RequestContext.html +1 -1
  59. data/doc/Compony/Version.html +1 -1
  60. data/doc/Compony/ViewHelpers.html +1 -1
  61. data/doc/Compony/VirtualModel.html +1 -1
  62. data/doc/Compony.html +1 -1
  63. data/doc/ComponyController.html +1 -1
  64. data/doc/_index.html +1 -1
  65. data/doc/file.README.html +1 -1
  66. data/doc/guide/resourceful.md +1 -11
  67. data/doc/index.html +1 -1
  68. data/doc/method_list.html +66 -74
  69. data/doc/top-level-namespace.html +1 -1
  70. data/lib/compony/component_mixins/resourceful.rb +0 -7
  71. data/lib/compony/components/index.rb +1 -1
  72. data/lib/compony/components/show.rb +3 -1
  73. data/lib/compony/intent.rb +8 -2
  74. data/lib/compony/manage_intents_dsl.rb +6 -4
  75. metadata +2 -2
@@ -12,11 +12,13 @@ module Compony
12
12
  # Adds or replaces an intent to those exposed by the component based on the intent name (override the name if you need to avoid a naming collision).
13
13
  # Intents specified this way can be retrieved and rendered by the parent component or by calling `root_intents` in case of standalone access.
14
14
  # @param [Symbol] before If specified, will insert the intent before the other. When replacing, an element keeps its position unless `before:`` is passed.
15
- def add(*, before: nil, **)
16
- intent = Compony.intent(*, **@intent_opts, **)
15
+ def add(*args, before: nil, **kwargs)
16
+ intent = Compony.intent(*args, **@intent_opts, **kwargs)
17
17
  @exposed_intents.natural_push(intent.name, intent, before:)
18
- rescue NameError # Ignore if the component is not actually defined
19
- return nil
18
+ rescue NameError => e # Ignore if the component is not actually defined
19
+ Rails.logger.debug do
20
+ "Skipping intent for arguments #{args.inspect}, #{kwargs.inspect}: #{e.inspect}."
21
+ end
20
22
  end
21
23
 
22
24
  # DSL method
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: compony
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.1
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sandro Kalbermatter
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2025-12-08 00:00:00.000000000 Z
12
+ date: 2025-12-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: yard