faker_maker 1.1.5 → 1.1.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +30 -0
- data/Guardfile +91 -0
- data/README.md +18 -279
- data/_config.yml +1 -0
- data/docs/.bundle/config +2 -0
- data/docs/.keep +1 -0
- data/docs/_config.yml +8 -0
- data/docs/contributing.md +9 -0
- data/docs/credits.md +9 -0
- data/docs/index.md +21 -0
- data/docs/installation.md +21 -0
- data/docs/logo.png +0 -0
- data/docs/usage/arrays.md +44 -0
- data/docs/usage/building_instances.md +64 -0
- data/docs/usage/dependencies.md +10 -0
- data/docs/usage/destroying_factories.md +54 -0
- data/docs/usage/embedding_factories.md +23 -0
- data/docs/usage/index.md +52 -0
- data/docs/usage/inheritance.md +37 -0
- data/docs/usage/json_field_names.md +57 -0
- data/docs/usage/lifecycle_hooks.md +33 -0
- data/docs/usage/omitting_fields copy.md +42 -0
- data/faker_maker.gemspec +18 -12
- data/img/unipug.svg +135 -0
- data/lib/faker_maker.rb +23 -5
- data/lib/faker_maker/attribute.rb +4 -4
- data/lib/faker_maker/base.rb +1 -2
- data/lib/faker_maker/definition_proxy.rb +8 -2
- data/lib/faker_maker/factory.rb +38 -16
- data/lib/faker_maker/lifecycle_hooks.rb +16 -0
- data/lib/faker_maker/naming.rb +7 -0
- data/lib/faker_maker/naming/json.rb +12 -0
- data/lib/faker_maker/naming/json_capitalized.rb +12 -0
- data/lib/faker_maker/version.rb +1 -1
- metadata +97 -14
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module FakerMaker
|
4
|
+
module LifecycleHooks
|
5
|
+
# Lifecycle hooks which can be called during the building of an instance
|
6
|
+
module DefinitionProxy
|
7
|
+
def before_build(&block)
|
8
|
+
@factory.define_singleton_method(:before_build) { block.call }
|
9
|
+
end
|
10
|
+
|
11
|
+
def after_build(&block)
|
12
|
+
@factory.define_singleton_method(:after_build) { block.call }
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/faker_maker/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: faker_maker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nigel Brookes-Thomas
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -58,6 +58,62 @@ dependencies:
|
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '2.1'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: guard
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '2.16'
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '2.16'
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: guard-bundler
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - "~>"
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '2.2'
|
82
|
+
type: :development
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - "~>"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '2.2'
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: guard-rubocop
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - "~>"
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '1.3'
|
96
|
+
type: :development
|
97
|
+
prerelease: false
|
98
|
+
version_requirements: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - "~>"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '1.3'
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: guard-rspec
|
105
|
+
requirement: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - "~>"
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '4.7'
|
110
|
+
type: :development
|
111
|
+
prerelease: false
|
112
|
+
version_requirements: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - "~>"
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '4.7'
|
61
117
|
- !ruby/object:Gem::Dependency
|
62
118
|
name: pry
|
63
119
|
requirement: !ruby/object:Gem::Requirement
|
@@ -78,14 +134,14 @@ dependencies:
|
|
78
134
|
requirements:
|
79
135
|
- - "~>"
|
80
136
|
- !ruby/object:Gem::Version
|
81
|
-
version: '
|
137
|
+
version: '13.0'
|
82
138
|
type: :development
|
83
139
|
prerelease: false
|
84
140
|
version_requirements: !ruby/object:Gem::Requirement
|
85
141
|
requirements:
|
86
142
|
- - "~>"
|
87
143
|
- !ruby/object:Gem::Version
|
88
|
-
version: '
|
144
|
+
version: '13.0'
|
89
145
|
- !ruby/object:Gem::Dependency
|
90
146
|
name: rspec
|
91
147
|
requirement: !ruby/object:Gem::Requirement
|
@@ -106,14 +162,14 @@ dependencies:
|
|
106
162
|
requirements:
|
107
163
|
- - "~>"
|
108
164
|
- !ruby/object:Gem::Version
|
109
|
-
version: '0
|
165
|
+
version: '1.0'
|
110
166
|
type: :development
|
111
167
|
prerelease: false
|
112
168
|
version_requirements: !ruby/object:Gem::Requirement
|
113
169
|
requirements:
|
114
170
|
- - "~>"
|
115
171
|
- !ruby/object:Gem::Version
|
116
|
-
version: '0
|
172
|
+
version: '1.0'
|
117
173
|
- !ruby/object:Gem::Dependency
|
118
174
|
name: simplecov
|
119
175
|
requirement: !ruby/object:Gem::Requirement
|
@@ -142,8 +198,8 @@ dependencies:
|
|
142
198
|
- - "~>"
|
143
199
|
- !ruby/object:Gem::Version
|
144
200
|
version: '0.8'
|
145
|
-
description: FakerMaker is a simple
|
146
|
-
|
201
|
+
description: FakerMaker is a simple factory builder so you can throw away your fixtures
|
202
|
+
and generate test data instead.
|
147
203
|
email:
|
148
204
|
- nigel@brookes-thomas.co.uk
|
149
205
|
executables: []
|
@@ -157,24 +213,51 @@ files:
|
|
157
213
|
- ".rubocop.yml"
|
158
214
|
- ".travis.yml"
|
159
215
|
- Gemfile
|
216
|
+
- Guardfile
|
160
217
|
- LICENSE.txt
|
161
218
|
- README.md
|
162
219
|
- Rakefile
|
220
|
+
- _config.yml
|
163
221
|
- bin/console
|
164
222
|
- bin/setup
|
223
|
+
- docs/.bundle/config
|
224
|
+
- docs/.keep
|
225
|
+
- docs/_config.yml
|
226
|
+
- docs/contributing.md
|
227
|
+
- docs/credits.md
|
228
|
+
- docs/index.md
|
229
|
+
- docs/installation.md
|
230
|
+
- docs/logo.png
|
231
|
+
- docs/usage/arrays.md
|
232
|
+
- docs/usage/building_instances.md
|
233
|
+
- docs/usage/dependencies.md
|
234
|
+
- docs/usage/destroying_factories.md
|
235
|
+
- docs/usage/embedding_factories.md
|
236
|
+
- docs/usage/index.md
|
237
|
+
- docs/usage/inheritance.md
|
238
|
+
- docs/usage/json_field_names.md
|
239
|
+
- docs/usage/lifecycle_hooks.md
|
240
|
+
- docs/usage/omitting_fields copy.md
|
165
241
|
- faker_maker.gemspec
|
242
|
+
- img/unipug.svg
|
166
243
|
- lib/faker_maker.rb
|
167
244
|
- lib/faker_maker/attribute.rb
|
168
245
|
- lib/faker_maker/base.rb
|
169
246
|
- lib/faker_maker/definition_proxy.rb
|
170
247
|
- lib/faker_maker/factory.rb
|
248
|
+
- lib/faker_maker/lifecycle_hooks.rb
|
249
|
+
- lib/faker_maker/naming.rb
|
250
|
+
- lib/faker_maker/naming/json.rb
|
251
|
+
- lib/faker_maker/naming/json_capitalized.rb
|
171
252
|
- lib/faker_maker/version.rb
|
172
|
-
homepage: https://github.
|
253
|
+
homepage: https://billyruffian.github.io/faker_maker/
|
173
254
|
licenses:
|
174
255
|
- MIT
|
175
256
|
metadata:
|
257
|
+
homepage_uri: https://billyruffian.github.io/faker_maker/
|
176
258
|
source_code_uri: https://github.com/BillyRuffian/faker_maker
|
177
|
-
|
259
|
+
changelog_uri: https://github.com/BillyRuffian/faker_maker/releases
|
260
|
+
post_install_message:
|
178
261
|
rdoc_options: []
|
179
262
|
require_paths:
|
180
263
|
- lib
|
@@ -182,15 +265,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
182
265
|
requirements:
|
183
266
|
- - ">="
|
184
267
|
- !ruby/object:Gem::Version
|
185
|
-
version: '
|
268
|
+
version: '2.6'
|
186
269
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
187
270
|
requirements:
|
188
271
|
- - ">="
|
189
272
|
- !ruby/object:Gem::Version
|
190
273
|
version: '0'
|
191
274
|
requirements: []
|
192
|
-
rubygems_version: 3.
|
193
|
-
signing_key:
|
275
|
+
rubygems_version: 3.1.4
|
276
|
+
signing_key:
|
194
277
|
specification_version: 4
|
195
278
|
summary: FakerMaker bakes fakes.
|
196
279
|
test_files: []
|