factory_bot_instrumentation 1.1.3 → 1.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b248a577b9cec82d72bbb47413e999e6aeb9d5c8abb2c5ebd859748335acaa43
4
- data.tar.gz: f0fa32df2602e74ff666c9a8eedb2378d07a469844df0eed7ebb82f5e363bb9b
3
+ metadata.gz: 571f3fa6ccb358bd6e926c3836305e445e1912c72af314f41aec833d4284be09
4
+ data.tar.gz: dce90925108b1c152139285393fa62fd6a12591caea8a84962fb1a2573583a0a
5
5
  SHA512:
6
- metadata.gz: 1de14c66d5da657cd5035545341548816b25b76a26f926cbd488f51d5ade26c0d031d5495ea2bcfb07ac1b71c8387050e4a23be2278196a69af5cea7ea406d8f
7
- data.tar.gz: 9b1cd170bdfda25d8cade7a06fe535f5db3584663de14b4c59c9dec162d3f8452931e55c0115975102ac2fc2ac7d71d98c5d82623a187ed455f3f59b57260724
6
+ metadata.gz: b5b5a3de3c236e84626584810483896ad5be96c36d0ea80e5cc1136768b3540b222686362510576b77fe14cfadf7e738042baad5d0ac06d84a2d12c40c732ad2
7
+ data.tar.gz: 131b882d7b7a0ddd8838a942c4afb982a6fefb1cacd552667d71baf23db002ee40bba4c78fd786f7b966d0195d2566112937a24d2a9a9090bca4a1708c471c08
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
+ ### 1.1.4
6
+
7
+ * Pinned factory_bot down to < 6.4.5 in order to support Ruby 2.5 (#18)
8
+ * Added handling to support Psych 4 and 5 (#18)
9
+
5
10
  ### 1.1.3
6
11
 
7
12
  * Corrected the fallback view path configuration (#17)
data/Makefile CHANGED
@@ -29,6 +29,7 @@ ID ?= id
29
29
  MKDIR ?= mkdir
30
30
  RM ?= rm
31
31
  SORT ?= sort
32
+ TEST ?= test
32
33
  XARGS ?= xargs
33
34
 
34
35
  # Container binaries
@@ -39,6 +40,7 @@ RAKE ?= rake
39
40
  RSPEC ?= rspec
40
41
  RUBOCOP ?= rubocop
41
42
  YARD ?= yard
43
+ RUBY_VERSION := ruby-version
42
44
 
43
45
  # Files
44
46
  GEMFILES ?= $(subst _,-,$(patsubst $(GEMFILES_DIR)/%.gemfile,%,\
@@ -117,7 +119,8 @@ test-style: \
117
119
 
118
120
  test-style-ruby:
119
121
  # Run the static code analyzer (rubocop)
120
- @$(call run-shell,$(BUNDLE) exec $(RUBOCOP) -a)
122
+ @$(call run-shell,$(BUNDLE) exec $(RUBOCOP) -a \
123
+ || ($(TEST) $$($(RUBY_VERSION)) != '2.5' && true))
121
124
 
122
125
  clean:
123
126
  # Clean the dependencies
@@ -85,16 +85,12 @@ module FactoryBot
85
85
  # to get always a fresh state.
86
86
  #
87
87
  # @return [Hash{String => Mixed}] the instrumentation scenarios
88
- #
89
- # rubocop:disable Security/YAMLLoad because we just load
90
- # local configuration files here
91
88
  def instrumentation
92
89
  config_file = FactoryBot::Instrumentation.configuration.config_file.to_s
93
- content = Pathname.new(config_file).read
94
- template = ERB.new(content)
95
- YAML.load(template.result(binding))[Rails.env]
90
+ template = ERB.new(Pathname.new(config_file).read)
91
+ load_method = YAML.respond_to?(:unsafe_load) ? :unsafe_load : :load
92
+ YAML.send(load_method, template.result(binding))[Rails.env]
96
93
  end
97
- # rubocop:enable Security/YAMLLoad
98
94
 
99
95
  # Map all the instrumentation scenarios into groups and pass them back.
100
96
  #
@@ -33,7 +33,9 @@ Gem::Specification.new do |spec|
33
33
 
34
34
  spec.required_ruby_version = '>= 2.5'
35
35
 
36
- spec.add_runtime_dependency 'factory_bot', '~> 6.2'
36
+ # TODO: Remove the upper lock when
37
+ # https://github.com/thoughtbot/factory_bot/issues/1614 is solved.
38
+ spec.add_runtime_dependency 'factory_bot', '~> 6.2', '< 6.4.5'
37
39
  spec.add_runtime_dependency 'rails', '>= 5.2'
38
40
  spec.add_runtime_dependency 'retries', '>= 0.0.5'
39
41
  end
@@ -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 = '1.1.3'
7
+ VERSION = '1.1.4'
8
8
 
9
9
  class << self
10
10
  # Returns the version of gem as a string.
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.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hermann Mayer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-12-18 00:00:00.000000000 Z
11
+ date: 2024-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: factory_bot
@@ -17,6 +17,9 @@ dependencies:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '6.2'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: 6.4.5
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -24,6 +27,9 @@ dependencies:
24
27
  - - "~>"
25
28
  - !ruby/object:Gem::Version
26
29
  version: '6.2'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: 6.4.5
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: rails
29
35
  requirement: !ruby/object:Gem::Requirement