factory_bot_instrumentation 1.5.1 → 1.6.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 +4 -4
- data/CHANGELOG.md +8 -0
- data/factory_bot_instrumentation.gemspec +1 -0
- data/lib/factory_bot/instrumentation/version.rb +1 -1
- data/lib/factory_bot/instrumentation.rb +53 -0
- data/lib/factory_bot_instrumentation.rb +1 -43
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52408b1b399fb1e03d902d1afa8f3a665090e90448de6d48cb9c4d2359fffef7
|
4
|
+
data.tar.gz: c52929ce5baa33b88c4988ca28a74f2217ce838e9cf2beebc65d866f5ee70ef3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6933cc1e6a66fe7900a1689f321acd0915693e4f0f520ddf96834981011084ad7c509f6a71db947dee4e4ca53fa0099b16baa554eb247d25c4ea6ab78574cef
|
7
|
+
data.tar.gz: e4a223f3d7656a194dda4a7d9c242e04315a821ffa54d9e10291d48fbe6890f16629a7b64ae512c9431725ee903e67faaadc1ef5264e56f5b45ea2a170564311
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,14 @@
|
|
2
2
|
|
3
3
|
* TODO: Replace this bullet point with an actual description of a change.
|
4
4
|
|
5
|
+
### 1.6.1 (17 January 2025)
|
6
|
+
|
7
|
+
* Added the logger dependency (#28)
|
8
|
+
|
9
|
+
### 1.6.0 (12 January 2025)
|
10
|
+
|
11
|
+
* Switched to Zeitwerk as autoloader (#27)
|
12
|
+
|
5
13
|
### 1.5.1 (9 January 2025)
|
6
14
|
|
7
15
|
* Sometimes the classic Rails autoloader is confused our engines
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'zeitwerk'
|
4
|
+
require 'logger'
|
5
|
+
require 'active_support'
|
6
|
+
require 'active_support/concern'
|
7
|
+
require 'active_support/configurable'
|
8
|
+
require 'active_support/cache'
|
9
|
+
require 'active_support/core_ext/hash'
|
10
|
+
require 'active_support/time'
|
11
|
+
require 'active_support/time_with_zone'
|
12
|
+
require 'retries'
|
13
|
+
require 'factory_bot'
|
14
|
+
|
15
|
+
module FactoryBot
|
16
|
+
# The top level namespace for the factory_bot_instrumentation gem.
|
17
|
+
module Instrumentation
|
18
|
+
# Setup a Zeitwerk autoloader instance and configure it
|
19
|
+
loader = Zeitwerk::Loader.for_gem_extension(FactoryBot)
|
20
|
+
|
21
|
+
# Finish the auto loader configuration
|
22
|
+
loader.setup
|
23
|
+
|
24
|
+
# Make sure to eager load all constants
|
25
|
+
loader.eager_load
|
26
|
+
|
27
|
+
class << self
|
28
|
+
attr_writer :configuration
|
29
|
+
|
30
|
+
# Retrieve the current configuration object.
|
31
|
+
#
|
32
|
+
# @return [Configuration]
|
33
|
+
def configuration
|
34
|
+
@configuration ||= Configuration.new
|
35
|
+
end
|
36
|
+
|
37
|
+
# Configure the concern by providing a block which takes
|
38
|
+
# care of this task. Example:
|
39
|
+
#
|
40
|
+
# FactoryBot::Instrumentation.configure do |conf|
|
41
|
+
# # conf.xyz = [..]
|
42
|
+
# end
|
43
|
+
def configure
|
44
|
+
yield(configuration)
|
45
|
+
end
|
46
|
+
|
47
|
+
# Reset the current configuration with the default one.
|
48
|
+
def reset_configuration!
|
49
|
+
self.configuration = Configuration.new
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -1,45 +1,3 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require '
|
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.
|
4
|
+
version: 1.6.1
|
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-
|
11
|
+
date: 2025-01-17 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
|