feature_pack 0.11.0 → 0.12.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4ad6b0b7d1fef825b25714c0b54b468935b5d30bbb45b1e1cdaa2f7023417345
4
- data.tar.gz: 795e0c96835d48091f3e50f0d37add2cd0b0a459a65fc592c2be527550ac3519
3
+ metadata.gz: d92c266b009fe3ae9507412f6263e0f1754cb84bb7256f69e873a6eaf0723f21
4
+ data.tar.gz: c4d068dbff7f4c2205819a842971e15f5695501231773669dc5b20a860737a58
5
5
  SHA512:
6
- metadata.gz: 0cfcaddc9bdb103bafa8be27d9c24d6034455660cac7077d58f11abf7faf095f705869fa534ded2efa02aa574f52437d871eae361c877fa6a0ab35c7ed7de51e
7
- data.tar.gz: 7bc13892f86bb7f7b720da3aa79bcdc85e482fbaa2b1e3489d96947145dd773e725dd0e170257d2e6f42c775126267313e4095089fbc4e0af691a8e206eb541d
6
+ metadata.gz: a9791aa17bd1937282dc2ad88e81259f2c1cfed7ffba2145b1f944ce96594c11c772593fb2ca91d093106fa05cbb3f5b726d8b664eced878c6b59fbaeffdfff5
7
+ data.tar.gz: 798ede982fbe741a841dfe130a125df5c2d250fd800c4a7cbde1259af93987e822de4e3f761c071b615d4638d4303c92c23333e9c367de7b678f7ed388397745
data/README.md CHANGED
@@ -162,6 +162,10 @@ extra declaration is needed in feature controllers.
162
162
  Feature controllers that don't need a group controller can still inherit
163
163
  `FeaturePack::Controller`, which requires the path to name a registered feature.
164
164
 
165
+ API-only features can inherit `FeaturePack::API::Controller` (an `ActionController::API`
166
+ subclass with no view setup). Load `feature_pack/api/controller.rb` in
167
+ `config.after_initialize` alongside the other base controllers (see SETUP.md).
168
+
165
169
  The private hooks `set_view_lookup_context_prefix` and `set_layout_paths` can be
166
170
  overridden in a group controller and apply to both group and feature requests.
167
171
 
@@ -172,7 +176,6 @@ overridden in a group controller and apply to both group and feature requests.
172
176
  - `__after_initialize.rb` hooks are no longer loaded. Move that code to a Rails
173
177
  initializer or to the group/feature controller and delete the hook files. Leftover
174
178
  files are ignored by Zeitwerk, but they are dead code.
175
- - `FeaturePack::API::Controller` was removed; inherit `ActionController::API` directly.
176
179
  - `FeaturePack.setup` now fails when `app/feature_packs` does not exist. Create the
177
180
  directory, or call `FeaturePack.setup(require_features_path: false)` to boot with no
178
181
  groups (a warning is logged).
@@ -0,0 +1,7 @@
1
+ module FeaturePack
2
+ module API
3
+ # Base controller for API-only features (no view rendering)
4
+ class Controller < ActionController::API
5
+ end
6
+ end
7
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: feature_pack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gedean Dias
@@ -55,6 +55,7 @@ files:
55
55
  - README.md
56
56
  - doc/feature_pack.md
57
57
  - lib/feature_pack.rb
58
+ - lib/feature_pack/api/controller.rb
58
59
  - lib/feature_pack/controller.rb
59
60
  - lib/feature_pack/error.rb
60
61
  - lib/feature_pack/feature_controller_setup.rb