factory_bot_instrumentation 1.5.1 → 1.6.0

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: 64c8bfd7239e2b0011f69809680abfd6066fa6f41fc274527fa552555f20608a
4
- data.tar.gz: a833f35d400e028b82623f72e4248101f977afb811c4a8f0ec0224f5a916f38b
3
+ metadata.gz: 143f452a5a40851cbc8a3cbb6efd6c233f4f736c1e196a9a03bd96a5707b6159
4
+ data.tar.gz: e5ed5f34de9cfdcc4e7699f536559dc3c865280fdfdfeafb078cdfe7c24ab2f6
5
5
  SHA512:
6
- metadata.gz: 65a6f1c073c7c81e573584fade3c389a9195e5c0e8a74439d958859596cbb7d3d89754061f5ea6b9d3fc9d3857ca89d867b45fb94db90415804a7a69cb1d2aaf
7
- data.tar.gz: 9b14f2f5d3a05f9a9523cae760e88338c3ec2823b5090b462705c86b3a0cbef71fe00ed14f9cf8a086477d392e6a27259309dd1b1813c9517deed8f11d8912d7
6
+ metadata.gz: a5bb2c538a1c5a989ab6c7f5c0d961e65bc26fa25b8a9564ede16621f4bd7a7a5adc7a428f725279fe6dc72be48828972d53dbbc3c12218910c408c5f7f3ff5f
7
+ data.tar.gz: '093e0ff55a179408031ec74572715bdc73fa5cc9571c9b56fdf2154ae5df6ba4e9bd3cf1141d72ee10f368d576c0a8c720e54f24addf09c93bd70bddf567bcc1'
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  * TODO: Replace this bullet point with an actual description of a change.
4
4
 
5
+ ### 1.6.0 (12 January 2025)
6
+
7
+ * Switched to Zeitwerk as autoloader (#27)
8
+
5
9
  ### 1.5.1 (9 January 2025)
6
10
 
7
11
  * Sometimes the classic Rails autoloader is confused our engines
@@ -36,4 +36,5 @@ Gem::Specification.new do |spec|
36
36
  spec.add_dependency 'factory_bot', '~> 6.2'
37
37
  spec.add_dependency 'rails', '>= 6.1'
38
38
  spec.add_dependency 'retries', '>= 0.0.5'
39
+ spec.add_dependency 'zeitwerk', '~> 2.6'
39
40
  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.5.1'
7
+ VERSION = '1.6.0'
8
8
 
9
9
  class << self
10
10
  # Returns the version of gem as a string.
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'active_support'
4
+ require 'active_support/concern'
5
+ require 'active_support/configurable'
6
+ require 'active_support/cache'
7
+ require 'active_support/core_ext/hash'
8
+ require 'active_support/time'
9
+ require 'active_support/time_with_zone'
10
+ require 'retries'
11
+ require 'factory_bot'
12
+
13
+ module FactoryBot
14
+ # The top level namespace for the factory_bot_instrumentation gem.
15
+ module Instrumentation
16
+ # Setup a Zeitwerk autoloader instance and configure it
17
+ loader = Zeitwerk::Loader.for_gem_extension(FactoryBot)
18
+
19
+ # Finish the auto loader configuration
20
+ loader.setup
21
+
22
+ # Make sure to eager load all constants
23
+ loader.eager_load
24
+
25
+ class << self
26
+ attr_writer :configuration
27
+
28
+ # Retrieve the current configuration object.
29
+ #
30
+ # @return [Configuration]
31
+ def configuration
32
+ @configuration ||= Configuration.new
33
+ end
34
+
35
+ # Configure the concern by providing a block which takes
36
+ # care of this task. Example:
37
+ #
38
+ # FactoryBot::Instrumentation.configure do |conf|
39
+ # # conf.xyz = [..]
40
+ # end
41
+ def configure
42
+ yield(configuration)
43
+ end
44
+
45
+ # Reset the current configuration with the default one.
46
+ def reset_configuration!
47
+ self.configuration = Configuration.new
48
+ end
49
+ end
50
+ end
51
+ end
@@ -1,45 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'active_support'
4
- require 'active_support/concern'
5
- require 'active_support/configurable'
6
- require 'active_support/cache'
7
- require 'active_support/core_ext/hash'
8
- require 'active_support/time'
9
- require 'active_support/time_with_zone'
10
- require 'retries'
11
-
12
- require 'factory_bot'
13
- require 'factory_bot/instrumentation/configuration'
14
- require 'factory_bot/instrumentation/engine'
15
-
16
- module FactoryBot
17
- # The top level namespace for the factory_bot_instrumentation gem.
18
- module Instrumentation
19
- class << self
20
- attr_writer :configuration
21
- end
22
-
23
- # Retrieve the current configuration object.
24
- #
25
- # @return [Configuration]
26
- def self.configuration
27
- @configuration ||= Configuration.new
28
- end
29
-
30
- # Configure the concern by providing a block which takes
31
- # care of this task. Example:
32
- #
33
- # FactoryBot::Instrumentation.configure do |conf|
34
- # # conf.xyz = [..]
35
- # end
36
- def self.configure
37
- yield(configuration)
38
- end
39
-
40
- # Reset the current configuration with the default one.
41
- def self.reset_configuration!
42
- self.configuration = Configuration.new
43
- end
44
- end
45
- end
3
+ require 'factory_bot/instrumentation'
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.5.1
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hermann Mayer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-01-09 00:00:00.000000000 Z
11
+ date: 2025-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: factory_bot
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.0.5
55
+ - !ruby/object:Gem::Dependency
56
+ name: zeitwerk
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '2.6'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '2.6'
55
69
  description: Allow your testers to generate test data on demand
56
70
  email:
57
71
  - hermann.mayer92@gmail.com
@@ -112,6 +126,7 @@ files:
112
126
  - factory_bot_instrumentation.gemspec
113
127
  - gemfiles/rails_6.1.gemfile
114
128
  - gemfiles/rails_7.1.gemfile
129
+ - lib/factory_bot/instrumentation.rb
115
130
  - lib/factory_bot/instrumentation/configuration.rb
116
131
  - lib/factory_bot/instrumentation/engine.rb
117
132
  - lib/factory_bot/instrumentation/version.rb