factory_bot_instrumentation 3.2.0 → 3.2.1
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '08e3d4ce4136029c07728a5cab9d09cd70971a0309b19f2c7a45d1d803394b5c'
|
|
4
|
+
data.tar.gz: b60890e825ea6a95308ca8000e462cffaecaa2b314b9d8de097b117c7d0ee461
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7e638032848f7d4f2f601c64a6616a269471f55b133fedb275e2053ddc9167bae2913e48b9b36f30fad5748c6ef6dbe514fd0fa55285f79f94e12f1f9c96cd16
|
|
7
|
+
data.tar.gz: 58b99a21082090a8ad4d2e30ce3bafd242f87253c73e12278259d128097f4a7f0a6c191d88122caecced2e71179653132b81ab81d63197e9b519744832a49480
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
* TODO: Replace this bullet point with an actual description of a change.
|
|
4
4
|
|
|
5
|
+
### 3.2.1 (26 June 2026)
|
|
6
|
+
|
|
7
|
+
* Disabled parameter wrapping to silence spurious unpermitted parameter log
|
|
8
|
+
warnings ([#49](https://github.com/hausgold/factory_bot_instrumentation/pull/49))
|
|
9
|
+
|
|
5
10
|
### 3.2.0 (19 June 2026)
|
|
6
11
|
|
|
7
12
|
* Improved the title and navigation title on the Instrumentation UI ([#48](https://github.com/hausgold/factory_bot_instrumentation/pull/48))
|
|
@@ -4,6 +4,13 @@ module FactoryBot
|
|
|
4
4
|
module Instrumentation
|
|
5
5
|
# The Instrumentation engine controller with frontend and API actions.
|
|
6
6
|
class RootController < FactoryBot::Instrumentation::ApplicationController
|
|
7
|
+
# Disable Rails' parameter wrapping. For JSON requests it would nest
|
|
8
|
+
# a copy of the request body under a +root+ key (derived from this
|
|
9
|
+
# controller's name). There is no +Root+ model to map onto, so the
|
|
10
|
+
# wrapper only duplicates the parameters and adds a spurious
|
|
11
|
+
# "Unpermitted parameters: :root" log warning.
|
|
12
|
+
wrap_parameters false
|
|
13
|
+
|
|
7
14
|
# Show the instrumentation frontend which features the output of
|
|
8
15
|
# configured dynamic seeds scenarios. The frontend allows humans to
|
|
9
16
|
# generate new seed data on the fly.
|
|
@@ -52,14 +59,15 @@ module FactoryBot
|
|
|
52
59
|
#
|
|
53
60
|
# @return [Array<Mixed>] the FactoryBot options
|
|
54
61
|
def factory_params
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
# Read the open-ended +overwrite+ hash unfiltered, as its keys and
|
|
63
|
+
# values are arbitrary and cannot be described with strong
|
|
64
|
+
# parameters.
|
|
65
|
+
overwrite = params.to_unsafe_h.fetch(:overwrite, {})
|
|
66
|
+
.deep_symbolize_keys
|
|
67
|
+
# Strip +overwrite+ before permitting the rest, otherwise it would
|
|
68
|
+
# be reported as a spurious "Unpermitted parameters: :overwrite"
|
|
69
|
+
# log warning.
|
|
70
|
+
data = params.except(:overwrite).permit(:factory, traits: [])
|
|
63
71
|
|
|
64
72
|
[
|
|
65
73
|
data.fetch(:factory).to_sym,
|