faker_maker 1.1.6 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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) { yield(self.instance, self) }
9
+ end
10
+
11
+ def after_build(&block)
12
+ @factory.define_singleton_method(:after_build) { yield(self.instance, self) }
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module FakerMaker
4
+ # Base module for naming strategies
5
+ module Naming
6
+ end
7
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module FakerMaker
4
+ module Naming
5
+ # Use camelCase for naming
6
+ module JSON
7
+ def self.name(name)
8
+ name.to_s.camelize(:lower)
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module FakerMaker
4
+ module Naming
5
+ # Use CamelCase for naming
6
+ module JSONCapitalized
7
+ def self.name(name)
8
+ name.to_s.camelize
9
+ end
10
+ end
11
+ end
12
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FakerMaker
4
- VERSION = '1.1.6'
4
+ VERSION = '1.2.0'
5
5
  end
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.6
4
+ version: 1.2.0
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: 2019-10-11 00:00:00.000000000 Z
11
+ date: 2021-04-14 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
@@ -106,14 +162,14 @@ dependencies:
106
162
  requirements:
107
163
  - - "~>"
108
164
  - !ruby/object:Gem::Version
109
- version: '0.68'
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.68'
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 fixture generator with a concise and straightforward
146
- syntax.
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.com/BillyRuffian/faker_maker
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
- post_install_message:
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: '0'
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.0.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: []