factory_bot_instrumentation 3.2.0 → 3.3.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: a3ffdbe89a6d52f2e42501cda7e16486837898cc3e98b11eecc4259f4c62ca13
4
- data.tar.gz: ea11aa96c68c2d8b0b5d82b93a1b4b2f1d558c2cf5a3180ff39f4bd2733d840e
3
+ metadata.gz: f6cb0a2508a5fce9ba25a3891aa668d6765bd0a2189591484df573f25fa03dc1
4
+ data.tar.gz: f86305471ca4e6c7910b77d4da559588aa356f6f951c722becd627a510adf3ee
5
5
  SHA512:
6
- metadata.gz: 1f3bac980f8316e752de81f09afc1434a26eff5778d4906910de50efcc3f2a0a5ae2b6ebaa8e4e62b590380c6de08c8961df56fe1a8915c126da495c853407e8
7
- data.tar.gz: d4d79cfd4b72f5ca9d9d54afe4f684837ce68bf1b99f789d07d52fd52f03319a6549bac8ddfdf98234776fbdfff933ea3630912e792104a625819031c70a9829
6
+ metadata.gz: 2e6525a87cd479a8474a67420066fa44a7eb9413432c875af9ad9418bbca0a26d798633ce2e8df5d81009cabca2c5c066a3ff507d26f2c8d7122ebf81e820ab3
7
+ data.tar.gz: e16988ba17fc501c6f7b2f070a81051d8d0c07e58899778aec6801af0d11053a16c5a00526958d512f4661af7931d7118106dff9300af828fc871fc382eb7fbf
data/.simplecov CHANGED
@@ -1,15 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'simplecov-html'
4
- require 'simplecov_json_formatter'
3
+ # Fail the run on any deprecated SimpleCov spelling instead of just
4
+ # warning, so an old configuration cannot creep back in unnoticed.
5
+ SimpleCov.deprecations :raise
5
6
 
6
- SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new(
7
- [
8
- SimpleCov::Formatter::HTMLFormatter,
9
- SimpleCov::Formatter::JSONFormatter
10
- ]
11
- )
12
-
13
- SimpleCov.start 'test_frameworks' do
14
- add_filter '/vendor/bundle/'
15
- end
7
+ # Shared SimpleCov configuration only, the coverage tracking itself is
8
+ # started from the spec helper.
9
+ SimpleCov.formats :html
data/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  * TODO: Replace this bullet point with an actual description of a change.
4
4
 
5
+ ### 3.3.0 (28 September 2026)
6
+
7
+ * Upgraded the simplecov gem to 1.3 ([#50](https://github.com/hausgold/factory_bot_instrumentation/pull/50))
8
+
9
+ ### 3.2.1 (26 June 2026)
10
+
11
+ * Disabled parameter wrapping to silence spurious unpermitted parameter log
12
+ warnings ([#49](https://github.com/hausgold/factory_bot_instrumentation/pull/49))
13
+
5
14
  ### 3.2.0 (19 June 2026)
6
15
 
7
16
  * Improved the title and navigation title on the Instrumentation UI ([#48](https://github.com/hausgold/factory_bot_instrumentation/pull/48))
data/Gemfile CHANGED
@@ -18,7 +18,7 @@ gem 'rspec-rails', '~> 7.1'
18
18
  gem 'rubocop'
19
19
  gem 'rubocop-rails'
20
20
  gem 'rubocop-rspec'
21
- gem 'simplecov', '>= 0.22'
21
+ gem 'simplecov', '~> 1.3'
22
22
  gem 'sqlite3', '~> 2.7'
23
23
  gem 'timecop', '>= 0.9.6'
24
24
  gem 'yard', '>= 0.9.28'
@@ -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
- data = params.permit(:factory, traits: [])
56
-
57
- overwrite = if Rails::VERSION::MAJOR >= 5
58
- params.to_unsafe_h.fetch(:overwrite, {})
59
- .deep_symbolize_keys
60
- else
61
- params.fetch('overwrite', {}).deep_symbolize_keys
62
- end
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,
@@ -12,7 +12,7 @@ gem "rspec-rails", "~> 7.1"
12
12
  gem "rubocop"
13
13
  gem "rubocop-rails"
14
14
  gem "rubocop-rspec"
15
- gem "simplecov", ">= 0.22"
15
+ gem "simplecov", "~> 1.3"
16
16
  gem "sqlite3", "~> 2.7"
17
17
  gem "timecop", ">= 0.9.6"
18
18
  gem "yard", ">= 0.9.28"
@@ -4,7 +4,7 @@ module FactoryBot
4
4
  # The gem version details.
5
5
  module Instrumentation
6
6
  # The version of the +factory_bot_instrumentation+ gem
7
- VERSION = '3.2.0'
7
+ VERSION = '3.3.0'
8
8
 
9
9
  class << self
10
10
  # Returns the version of gem as a string.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: factory_bot_instrumentation
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.0
4
+ version: 3.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hermann Mayer
@@ -161,7 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
161
161
  - !ruby/object:Gem::Version
162
162
  version: '0'
163
163
  requirements: []
164
- rubygems_version: 4.0.11
164
+ rubygems_version: 4.0.20
165
165
  specification_version: 4
166
166
  summary: Allow your testers to generate test data on demand
167
167
  test_files: []