factory_bot_instrumentation 1.1.4 → 1.1.5
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: 5e200ee9b6c940652aa1655e8be54bc38815e8ed59678315984320d34292e7c6
|
4
|
+
data.tar.gz: 0a74dd73fecc873a368010fdb6e445dda7d3be012452553bc552de1968140965
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c79689fbe92b67f676532e0876b88352011193220409019dc630efdc75b6da971809a7d15333c8b6789f627e5b0239964ae0834c0f6748a71ae7860469f8b94b
|
7
|
+
data.tar.gz: d2bdbbf8c0e74e6335fa68a9b58f62dc48685e8a835bbcaaaca117e80cbfd89e61f48656030802afffd9ce202ee41f83ac9c245fbc2ddccf60cb0081c905f3e6
|
data/CHANGELOG.md
CHANGED
@@ -89,14 +89,15 @@ module FactoryBot
|
|
89
89
|
config_file = FactoryBot::Instrumentation.configuration.config_file.to_s
|
90
90
|
template = ERB.new(Pathname.new(config_file).read)
|
91
91
|
load_method = YAML.respond_to?(:unsafe_load) ? :unsafe_load : :load
|
92
|
-
YAML.send(load_method, template.result(binding))[Rails.env]
|
92
|
+
YAML.send(load_method, template.result(binding))[Rails.env] || {}
|
93
93
|
end
|
94
94
|
|
95
95
|
# Map all the instrumentation scenarios into groups and pass them back.
|
96
96
|
#
|
97
97
|
# @return [Hash{String => Array}] the grouped scenarios
|
98
98
|
def scenarios
|
99
|
-
instrumentation['scenarios']
|
99
|
+
res = (instrumentation['scenarios'] || [])
|
100
|
+
res.each_with_object({}) do |scenario, memo|
|
100
101
|
group = scenario_group(scenario['name'])
|
101
102
|
scenario['group'] = group
|
102
103
|
memo[group] = [] unless memo.key? group
|
@@ -108,7 +109,7 @@ module FactoryBot
|
|
108
109
|
#
|
109
110
|
# @return [Hash{Regexp => String}] the group mapping
|
110
111
|
def groups
|
111
|
-
instrumentation['groups'].transform_keys do |key|
|
112
|
+
(instrumentation['groups'] || {}).transform_keys do |key|
|
112
113
|
Regexp.new(Regexp.quote(key))
|
113
114
|
end
|
114
115
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: factory_bot_instrumentation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hermann Mayer
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: factory_bot
|