rom-factory 0.10.2 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/.action_hero.yml +21 -0
  3. data/.devtools/templates/changelog.erb +3 -0
  4. data/.devtools/templates/release.erb +36 -0
  5. data/.github/FUNDING.yml +1 -0
  6. data/.github/ISSUE_TEMPLATE/{---bug-report.md → bug-report.md} +6 -10
  7. data/.github/ISSUE_TEMPLATE/config.yml +5 -0
  8. data/.github/SUPPORT.md +3 -0
  9. data/.github/workflows/ci.yml +14 -23
  10. data/.github/workflows/docsite.yml +5 -4
  11. data/.github/workflows/rubocop.yml +46 -0
  12. data/.github/workflows/sync_configs.yml +17 -17
  13. data/.rubocop.yml +135 -16
  14. data/CHANGELOG.md +44 -0
  15. data/CODEOWNERS +1 -0
  16. data/CONTRIBUTING.md +3 -3
  17. data/Gemfile +20 -19
  18. data/Gemfile.devtools +6 -5
  19. data/LICENSE +1 -1
  20. data/README.md +3 -3
  21. data/Rakefile +1 -1
  22. data/benchmarks/basic.rb +10 -10
  23. data/changelog.yml +23 -0
  24. data/docsite/source/index.html.md +162 -1
  25. data/lib/rom/factory/attribute_registry.rb +2 -2
  26. data/lib/rom/factory/attributes/association.rb +52 -12
  27. data/lib/rom/factory/attributes/callable.rb +1 -1
  28. data/lib/rom/factory/attributes/value.rb +1 -1
  29. data/lib/rom/factory/attributes.rb +4 -6
  30. data/lib/rom/factory/builder/persistable.rb +3 -5
  31. data/lib/rom/factory/builder.rb +8 -18
  32. data/lib/rom/factory/constants.rb +1 -1
  33. data/lib/rom/factory/dsl.rb +36 -24
  34. data/lib/rom/factory/factories.rb +13 -15
  35. data/lib/rom/factory/registry.rb +2 -2
  36. data/lib/rom/factory/sequences.rb +1 -1
  37. data/lib/rom/factory/tuple_evaluator.rb +18 -22
  38. data/lib/rom/factory/version.rb +1 -1
  39. data/lib/rom/factory.rb +8 -5
  40. data/lib/rom-factory.rb +1 -1
  41. data/project.yml +1 -0
  42. data/rom-factory.gemspec +9 -10
  43. metadata +38 -24
  44. data/.github/ISSUE_TEMPLATE/----please-don-t-ask-for-support-via-issues.md +0 -10
  45. data/.github/ISSUE_TEMPLATE/----please-don-t-report-feature-requests-via-issues.md +0 -10
  46. data/.github/ISSUE_TEMPLATE/---a-detailed-bug-report.md +0 -30
  47. data/.github/ISSUE_TEMPLATE/---feature-request.md +0 -18
  48. data/.github/workflows/custom/ci.yml +0 -26
  49. data/Appraisals +0 -9
  50. data/LICENSE.txt +0 -21
@@ -1,26 +1,30 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'faker'
4
- require 'dry/core/inflector'
3
+ require "faker"
5
4
 
6
- require 'rom/factory/builder'
7
- require 'rom/factory/attribute_registry'
8
- require 'rom/factory/attributes'
5
+ require "rom/factory/builder"
6
+ require "rom/factory/attribute_registry"
7
+ require "rom/factory/attributes"
9
8
 
10
9
  module ROM
11
10
  module Factory
11
+ extend ::Dry::Core::Cache
12
+
12
13
  class << self
13
14
  # @api private
14
- def fake(type, *args)
15
- api = ::Faker.const_get(::Dry::Core::Inflector.classify(type.to_s))
15
+ def fake(*args, **options)
16
+ api = fetch_or_store(:faker, *args) do
17
+ *ns, method_name = args
16
18
 
17
- if args[0].is_a?(Symbol)
18
- api.public_send(*args)
19
- else
20
- api.public_send(type, *args)
19
+ const = ns.reduce(::Faker) do |obj, name|
20
+ obj.const_get(::Dry::Core::Inflector.camelize(name))
21
+ end
22
+
23
+ const.method(method_name)
21
24
  end
25
+
26
+ api.(**options)
22
27
  end
23
- ruby2_keywords(:fake) if respond_to?(:ruby2_keywords, true)
24
28
  end
25
29
 
26
30
  # Factory builder DSL
@@ -33,7 +37,7 @@ module ROM
33
37
  attr_reader :_traits
34
38
 
35
39
  # @api private
36
- def initialize(name, attributes: AttributeRegistry.new, relation:, factories:, struct_namespace:)
40
+ def initialize(name, relation:, factories:, struct_namespace:, attributes: AttributeRegistry.new)
37
41
  @_name = name
38
42
  @_relation = relation
39
43
  @_factories = factories
@@ -83,28 +87,36 @@ module ROM
83
87
  #
84
88
  # @param [Symbol] type The value type to generate
85
89
  #
86
- # @overload fake(api, type)
90
+ # @overload fake(genre, type)
87
91
  # @example
88
92
  # f.email { fake(:internet, :email) }
89
93
  #
90
- # @param [Symbol] api The faker API identifier ie. :internet, :product etc.
94
+ # @param [Symbol] genre The faker API identifier ie. :internet, :product etc.
91
95
  # @param [Symbol] type The value type to generate
92
96
  #
93
- # @overload fake(api, type, *args)
97
+ # @overload fake(genre, type, **options)
94
98
  # @example
95
- # f.email { fake(:number, :between, 10, 100) }
99
+ # f.email { fake(:number, :between, from: 10, to: 100) }
96
100
  #
97
- # @param [Symbol] api The faker API identifier ie. :internet, :product etc.
101
+ # @param [Symbol] genre The faker API identifier ie. :internet, :product etc.
98
102
  # @param [Symbol] type The value type to generate
99
- # @param [Array] args Additional arguments
103
+ # @param [Hash] options Additional arguments
104
+ #
105
+ # @overload fake(genre, subgenre, type, **options)
106
+ # @example
107
+ # f.quote { fake(:books, :dune, :quote, character: 'stilgar') }
108
+ #
109
+ # @param [Symbol] genre The Faker genre of API i.e. :books, :creature, :games etc
110
+ # @param [Symbol] subgenre The subgenre of API i.e. :dune, :bird, :myst etc
111
+ # @param [Symbol] type the value type to generate
112
+ # @param [Hash] options Additional arguments
100
113
  #
101
- # @see https://github.com/stympy/faker/tree/master/doc
114
+ # @see https://github.com/faker-ruby/faker/tree/master/doc
102
115
  #
103
116
  # @api public
104
- def fake(*args)
105
- ::ROM::Factory.fake(*args)
117
+ def fake(type, *args, **options)
118
+ ::ROM::Factory.fake(type, *args, **options)
106
119
  end
107
- ruby2_keywords(:fake) if respond_to?(:ruby2_keywords, true)
108
120
 
109
121
  def trait(name, parents = [], &block)
110
122
  _traits[name] = DSL.new(
@@ -136,7 +148,7 @@ module ROM
136
148
  assoc = _relation.associations[name]
137
149
 
138
150
  if assoc.is_a?(::ROM::SQL::Associations::OneToOne) && options.fetch(:count, 1) > 1
139
- ::Kernel.raise ::ArgumentError, 'count cannot be greater than 1 on a OneToOne'
151
+ ::Kernel.raise ::ArgumentError, "count cannot be greater than 1 on a OneToOne"
140
152
  end
141
153
 
142
154
  builder = -> { _factories.for_relation(assoc.target) }
@@ -1,12 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'dry/configurable'
4
- require 'dry/core/inflector'
5
-
6
- require 'rom/initializer'
7
- require 'rom/struct'
8
- require 'rom/factory/dsl'
9
- require 'rom/factory/registry'
3
+ require "rom/initializer"
4
+ require "rom/struct"
5
+ require "rom/factory/dsl"
6
+ require "rom/factory/registry"
10
7
 
11
8
  module ROM::Factory
12
9
  # In-memory builder API
@@ -42,7 +39,7 @@ module ROM::Factory
42
39
  #
43
40
  # @api public
44
41
  def [](name, *traits, **attrs)
45
- registry[name].struct_namespace(struct_namespace).create(*traits, attrs)
42
+ registry[name].struct_namespace(struct_namespace).create(*traits, **attrs)
46
43
  end
47
44
  end
48
45
 
@@ -147,7 +144,7 @@ module ROM::Factory
147
144
  name,
148
145
  relation: relation,
149
146
  factories: self,
150
- struct_namespace: builder_sturct_namespace(namespace),
147
+ struct_namespace: builder_struct_namespace(namespace),
151
148
  &block
152
149
  ).call
153
150
  end
@@ -164,13 +161,14 @@ module ROM::Factory
164
161
  # MyFactory[:user, name: "Jane"]
165
162
  #
166
163
  # @param [Symbol] name The name of the registered factory
167
- # @param [Hash] attrs An optional hash with attributes
164
+ # @param [Array<Symbol>] traits List of traits to apply
165
+ # @param [Hash] attrs optional attributes to override the defaults
168
166
  #
169
167
  # @return [ROM::Struct]
170
168
  #
171
169
  # @api public
172
- def [](name, *args)
173
- registry[name].struct_namespace(struct_namespace).persistable.create(*args)
170
+ def [](name, *traits, **attrs)
171
+ registry[name].struct_namespace(struct_namespace).persistable.create(*traits, **attrs)
174
172
  end
175
173
 
176
174
  # Return in-memory struct builder
@@ -204,8 +202,8 @@ module ROM::Factory
204
202
  end
205
203
 
206
204
  # @api private
207
- def builder_sturct_namespace(ns)
208
- ns ? { namespace: ns, overridable: false } : { namespace: struct_namespace, overridable: true }
205
+ def builder_struct_namespace(ns)
206
+ ns ? {namespace: ns, overridable: false} : {namespace: struct_namespace, overridable: true}
209
207
  end
210
208
 
211
209
  # @api private
@@ -226,7 +224,7 @@ module ROM::Factory
226
224
  # @api private
227
225
  def extend_builder(name, parent, relation_name, ns, &block)
228
226
  namespace = parent.options[:struct_namespace]
229
- namespace = builder_sturct_namespace(ns) if ns
227
+ namespace = builder_struct_namespace(ns) if ns
230
228
  relation = rom.relations.fetch(relation_name) { parent.relation }
231
229
  DSL.new(
232
230
  name,
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'rom/factory/constants'
3
+ require "rom/factory/constants"
4
4
 
5
5
  module ROM
6
6
  module Factory
@@ -28,7 +28,7 @@ module ROM
28
28
  # @api private
29
29
  def [](name)
30
30
  elements.fetch(name) do
31
- raise FactoryNotDefinedError.new(name)
31
+ raise FactoryNotDefinedError, name
32
32
  end
33
33
  end
34
34
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'singleton'
3
+ require "singleton"
4
4
 
5
5
  module ROM
6
6
  module Factory
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'rom/factory/sequences'
3
+ require "rom/factory/sequences"
4
4
 
5
5
  module ROM
6
6
  module Factory
@@ -31,13 +31,13 @@ module ROM
31
31
  end
32
32
 
33
33
  # @api private
34
- def defaults(traits, attrs, opts = EMPTY_HASH)
35
- evaluate(traits, attrs, opts).merge(attrs)
34
+ def defaults(traits, attrs, **opts)
35
+ mergeable_attrs = select_mergeable_attrs(traits, attrs)
36
+ evaluate(traits, attrs, opts).merge(mergeable_attrs)
36
37
  end
37
38
 
38
39
  # @api private
39
- def struct(*args)
40
- traits, attrs = extract_tuple(args)
40
+ def struct(*traits, **attrs)
41
41
  merged_attrs = struct_attrs.merge(defaults(traits, attrs, persist: false))
42
42
  is_callable = proc { |_name, value| value.respond_to?(:call) }
43
43
 
@@ -92,28 +92,17 @@ module ROM
92
92
  relation.primary_key
93
93
  end
94
94
 
95
- # @api private
96
- def extract_tuple(args)
97
- if !args.empty? && args.last.is_a?(::Hash)
98
- *traits, attrs = args
99
-
100
- [traits, attrs]
101
- else
102
- [args, EMPTY_HASH]
103
- end
104
- end
105
-
106
95
  private
107
96
 
108
97
  # @api private
109
98
  def evaluate(traits, attrs, opts)
110
- evaluate_values(attrs, opts)
99
+ evaluate_values(attrs)
111
100
  .merge(evaluate_associations(attrs, opts))
112
101
  .merge(evaluate_traits(traits, attrs, opts))
113
102
  end
114
103
 
115
104
  # @api private
116
- def evaluate_values(attrs, opts)
105
+ def evaluate_values(attrs)
117
106
  attributes.values.tsort.each_with_object({}) do |attr, h|
118
107
  deps = attr.dependency_names.map { |k| h[k] }.compact
119
108
  result = attr.(attrs, *deps)
@@ -129,7 +118,7 @@ module ROM
129
118
 
130
119
  traits_attrs = self.traits.values_at(*traits).flat_map(&:elements)
131
120
  registry = AttributeRegistry.new(traits_attrs)
132
- self.class.new(registry, relation).defaults([], attrs, opts)
121
+ self.class.new(registry, relation).defaults([], attrs, **opts)
133
122
  end
134
123
 
135
124
  # @api private
@@ -148,9 +137,9 @@ module ROM
148
137
 
149
138
  # @api private
150
139
  def struct_attrs
151
- struct_attrs = relation.schema.
152
- reject(&:primary_key?).
153
- map { |attr| [attr.name, nil] }.to_h
140
+ struct_attrs = relation.schema
141
+ .reject(&:primary_key?)
142
+ .map { |attr| [attr.name, nil] }.to_h
154
143
 
155
144
  if primary_key
156
145
  struct_attrs.merge(primary_key => next_id)
@@ -163,6 +152,13 @@ module ROM
163
152
  def next_id
164
153
  sequence.()
165
154
  end
155
+
156
+ def select_mergeable_attrs(traits, attrs)
157
+ unmergeable = assocs(traits).select(&:through?).map do |a|
158
+ Dry::Core::Inflector.singularize(a.assoc.target.name.to_sym).to_sym
159
+ end
160
+ attrs.dup.delete_if { |key, _| unmergeable.include?(key) }
161
+ end
166
162
  end
167
163
  end
168
164
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ROM
4
4
  module Factory
5
- VERSION = '0.10.2'
5
+ VERSION = "0.11.0"
6
6
  end
7
7
  end
data/lib/rom/factory.rb CHANGED
@@ -1,14 +1,17 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'dry/core/class_builder'
4
- require 'rom/factory/factories'
3
+ require "dry/core"
4
+ require "dry/configurable"
5
+ require "dry/struct"
6
+
7
+ require "rom/factory/factories"
5
8
 
6
9
  module ROM
7
10
  # Main ROM::Factory API
8
11
  #
9
12
  # @api public
10
13
  module Factory
11
- DEFAULT_NAME = 'Factories'.freeze
14
+ DEFAULT_NAME = "Factories"
12
15
 
13
16
  # Configure a new factory
14
17
  #
@@ -23,8 +26,8 @@ module ROM
23
26
  #
24
27
  # @api public
25
28
  def self.configure(name = DEFAULT_NAME, &block)
26
- klass = Dry::Core::ClassBuilder.new(name: name, parent: Factories).call do |klass|
27
- klass.configure(&block)
29
+ klass = Dry::Core::ClassBuilder.new(name: name, parent: Factories).call do |c|
30
+ c.configure(&block)
28
31
  end
29
32
 
30
33
  klass.new(klass.config.rom)
data/lib/rom-factory.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'rom/factory'
3
+ require "rom/factory"
data/project.yml CHANGED
@@ -1,2 +1,3 @@
1
1
  name: rom-factory
2
+ custom_ci: true
2
3
  codacy_id: 5fd26fae687549218458879b1a607e18
data/rom-factory.gemspec CHANGED
@@ -11,26 +11,25 @@ Gem::Specification.new do |spec|
11
11
  spec.authors = ["Janis Miezitis", "Piotr Solnica"]
12
12
  spec.email = ["janjiss@gmail.com", "piotr.solnica@gmail.com"]
13
13
 
14
- spec.summary = %q{ROM based builder library to make your specs awesome. DSL partially inspired by FactoryGirl.}
14
+ spec.summary = %q{ROM based builder library to make your specs awesome. DSL partially inspired by FactoryBot.}
15
15
  spec.description = %q{}
16
16
  spec.homepage = "https://github.com/rom-rb/rom-factory"
17
17
  spec.license = "MIT"
18
18
 
19
19
  # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
20
20
  # to allow pushing to a single host or delete this section to allow pushing to any host.
21
- if spec.respond_to?(:metadata)
22
- spec.metadata['allowed_push_host'] = "https://rubygems.org"
23
- else
24
- raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
25
- end
21
+ spec.metadata['allowed_push_host'] = "https://rubygems.org"
26
22
 
27
23
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
28
24
  spec.bindir = "exe"
29
25
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
30
26
  spec.require_paths = ["lib"]
31
27
 
32
- spec.add_dependency "dry-configurable", "~> 0.7"
33
- spec.add_dependency "dry-core", "~> 0.4"
34
- spec.add_dependency 'faker', '>= 1.7', '< 3.0'
35
- spec.add_dependency 'rom-core', '~> 5.0'
28
+ spec.required_ruby_version = ">= 2.7.0"
29
+
30
+ spec.add_runtime_dependency "dry-configurable", "~> 1.0"
31
+ spec.add_runtime_dependency "dry-core", "~> 1.0"
32
+ spec.add_runtime_dependency "dry-struct", "~> 1.6"
33
+ spec.add_runtime_dependency "faker", ">= 2.0", "< 3.0"
34
+ spec.add_runtime_dependency "rom-core", "~> 5.3"
36
35
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rom-factory
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.2
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Janis Miezitis
8
8
  - Piotr Solnica
9
- autorequire:
9
+ autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2020-04-04 00:00:00.000000000 Z
12
+ date: 2022-11-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: dry-configurable
@@ -17,35 +17,49 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: '0.7'
20
+ version: '1.0'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: '0.7'
27
+ version: '1.0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: dry-core
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
32
  - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: '0.4'
34
+ version: '1.0'
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: '0.4'
41
+ version: '1.0'
42
+ - !ruby/object:Gem::Dependency
43
+ name: dry-struct
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: '1.6'
49
+ type: :runtime
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - "~>"
54
+ - !ruby/object:Gem::Version
55
+ version: '1.6'
42
56
  - !ruby/object:Gem::Dependency
43
57
  name: faker
44
58
  requirement: !ruby/object:Gem::Requirement
45
59
  requirements:
46
60
  - - ">="
47
61
  - !ruby/object:Gem::Version
48
- version: '1.7'
62
+ version: '2.0'
49
63
  - - "<"
50
64
  - !ruby/object:Gem::Version
51
65
  version: '3.0'
@@ -55,7 +69,7 @@ dependencies:
55
69
  requirements:
56
70
  - - ">="
57
71
  - !ruby/object:Gem::Version
58
- version: '1.7'
72
+ version: '2.0'
59
73
  - - "<"
60
74
  - !ruby/object:Gem::Version
61
75
  version: '3.0'
@@ -65,14 +79,14 @@ dependencies:
65
79
  requirements:
66
80
  - - "~>"
67
81
  - !ruby/object:Gem::Version
68
- version: '5.0'
82
+ version: '5.3'
69
83
  type: :runtime
70
84
  prerelease: false
71
85
  version_requirements: !ruby/object:Gem::Requirement
72
86
  requirements:
73
87
  - - "~>"
74
88
  - !ruby/object:Gem::Version
75
- version: '5.0'
89
+ version: '5.3'
76
90
  description: ''
77
91
  email:
78
92
  - janjiss@gmail.com
@@ -81,28 +95,28 @@ executables: []
81
95
  extensions: []
82
96
  extra_rdoc_files: []
83
97
  files:
98
+ - ".action_hero.yml"
84
99
  - ".devtools/templates/changelog.erb"
85
- - ".github/ISSUE_TEMPLATE/----please-don-t-ask-for-support-via-issues.md"
86
- - ".github/ISSUE_TEMPLATE/----please-don-t-report-feature-requests-via-issues.md"
87
- - ".github/ISSUE_TEMPLATE/---a-detailed-bug-report.md"
88
- - ".github/ISSUE_TEMPLATE/---bug-report.md"
89
- - ".github/ISSUE_TEMPLATE/---feature-request.md"
100
+ - ".devtools/templates/release.erb"
101
+ - ".github/FUNDING.yml"
102
+ - ".github/ISSUE_TEMPLATE/bug-report.md"
103
+ - ".github/ISSUE_TEMPLATE/config.yml"
104
+ - ".github/SUPPORT.md"
90
105
  - ".github/workflows/ci.yml"
91
- - ".github/workflows/custom/ci.yml"
92
106
  - ".github/workflows/docsite.yml"
107
+ - ".github/workflows/rubocop.yml"
93
108
  - ".github/workflows/sync_configs.yml"
94
109
  - ".gitignore"
95
110
  - ".rspec"
96
111
  - ".rubocop.yml"
97
112
  - ".yardopts"
98
- - Appraisals
99
113
  - CHANGELOG.md
114
+ - CODEOWNERS
100
115
  - CODE_OF_CONDUCT.md
101
116
  - CONTRIBUTING.md
102
117
  - Gemfile
103
118
  - Gemfile.devtools
104
119
  - LICENSE
105
- - LICENSE.txt
106
120
  - README.md
107
121
  - Rakefile
108
122
  - benchmarks/basic.rb
@@ -132,7 +146,7 @@ licenses:
132
146
  - MIT
133
147
  metadata:
134
148
  allowed_push_host: https://rubygems.org
135
- post_install_message:
149
+ post_install_message:
136
150
  rdoc_options: []
137
151
  require_paths:
138
152
  - lib
@@ -140,16 +154,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
140
154
  requirements:
141
155
  - - ">="
142
156
  - !ruby/object:Gem::Version
143
- version: '0'
157
+ version: 2.7.0
144
158
  required_rubygems_version: !ruby/object:Gem::Requirement
145
159
  requirements:
146
160
  - - ">="
147
161
  - !ruby/object:Gem::Version
148
162
  version: '0'
149
163
  requirements: []
150
- rubygems_version: 3.1.2
151
- signing_key:
164
+ rubygems_version: 3.3.7
165
+ signing_key:
152
166
  specification_version: 4
153
167
  summary: ROM based builder library to make your specs awesome. DSL partially inspired
154
- by FactoryGirl.
168
+ by FactoryBot.
155
169
  test_files: []
@@ -1,10 +0,0 @@
1
- ---
2
- name: "⚠️ Please don't ask for support via issues"
3
- about: See CONTRIBUTING.md for more information
4
- title: ''
5
- labels: ''
6
- assignees: ''
7
-
8
- ---
9
-
10
-
@@ -1,10 +0,0 @@
1
- ---
2
- name: "⚠️ Please don't report feature requests via issues"
3
- about: See CONTRIBUTING.md for more information
4
- title: ''
5
- labels: ''
6
- assignees: ''
7
-
8
- ---
9
-
10
-
@@ -1,30 +0,0 @@
1
- ---
2
- name: "\U0001F41B A detailed bug report"
3
- about: Report a bug
4
- title: ''
5
- labels: bug
6
- assignees: ''
7
-
8
- ---
9
-
10
- **Before you submit this: WE ONLY ACCEPT BUG REPORTS**
11
-
12
- For more information see [our contribution guidelines](https://github.com/rom-rb/rom/blob/master/CONTRIBUTING.md)
13
-
14
- **Describe the bug**
15
-
16
- A clear and concise description of what the bug is.
17
-
18
- **To Reproduce**
19
-
20
- Provide detailed steps to reproduce, an executable script would be best.
21
-
22
- **Expected behavior**
23
-
24
- A clear and concise description of what you expected to happen.
25
-
26
- **Your environment**
27
-
28
- - Affects my production application: **YES/NO**
29
- - Ruby version: ...
30
- - OS: ...
@@ -1,18 +0,0 @@
1
- ---
2
- name: "\U0001F6E0 Feature request"
3
- about: See CONTRIBUTING.md for more information
4
- title: ''
5
- labels: feature
6
- assignees: ''
7
-
8
- ---
9
-
10
- Summary of what the feature is supposed to do.
11
-
12
- ## Examples
13
-
14
- Code examples showing how the feature could be used.
15
-
16
- ## Resources
17
-
18
- Additional information, like a link to the discussion forum thread where the feature was discussed etc.
@@ -1,26 +0,0 @@
1
- jobs:
2
- tests:
3
- services:
4
- db:
5
- image: postgres:10.8
6
- env:
7
- POSTGRES_USER: runner
8
- POSTGRES_PASSWORD: ""
9
- POSTGRES_DB: rom_factory
10
- ports:
11
- - 5432:5432
12
- options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
13
- strategy:
14
- matrix:
15
- faker:
16
- - faker-1
17
- - faker-2
18
- include:
19
- - ruby: "2.6"
20
- faker: faker-2
21
- coverage: "true"
22
- - ruby: jruby
23
- database_url: jdbc:postgresql://localhost/rom_factory
24
- env:
25
- FAKER: ${{matrix.faker}}
26
- APT_DEPS: "libpq-dev libmysqlclient-dev libsqlite3-dev"
data/Appraisals DELETED
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- appraise 'faker-1' do
4
- gem 'faker', '~> 1.7'
5
- end
6
-
7
- appraise 'faker-2' do
8
- gem 'faker', '~> 2.8'
9
- end