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 +4 -4
- data/CHANGELOG.md +4 -0
- data/factory_bot_instrumentation.gemspec +1 -0
- data/lib/factory_bot/instrumentation/version.rb +1 -1
- data/lib/factory_bot/instrumentation.rb +51 -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: 143f452a5a40851cbc8a3cbb6efd6c233f4f736c1e196a9a03bd96a5707b6159
|
4
|
+
data.tar.gz: e5ed5f34de9cfdcc4e7699f536559dc3c865280fdfdfeafb078cdfe7c24ab2f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5bb2c538a1c5a989ab6c7f5c0d961e65bc26fa25b8a9564ede16621f4bd7a7a5adc7a428f725279fe6dc72be48828972d53dbbc3c12218910c408c5f7f3ff5f
|
7
|
+
data.tar.gz: '093e0ff55a179408031ec74572715bdc73fa5cc9571c9b56fdf2154ae5df6ba4e9bd3cf1141d72ee10f368d576c0a8c720e54f24addf09c93bd70bddf567bcc1'
|
data/CHANGELOG.md
CHANGED
@@ -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 '
|
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.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-
|
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
|