rom-factory 0.10.2 → 0.12.0

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.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/.devtools/templates/changelog.erb +3 -0
  3. data/.devtools/templates/release.erb +36 -0
  4. data/.github/FUNDING.yml +1 -0
  5. data/.github/ISSUE_TEMPLATE/{---bug-report.md → bug-report.md} +6 -10
  6. data/.github/ISSUE_TEMPLATE/config.yml +5 -0
  7. data/.github/SUPPORT.md +3 -0
  8. data/.github/workflows/ci.yml +17 -25
  9. data/.github/workflows/docsite.yml +6 -6
  10. data/.github/workflows/rubocop.yml +46 -0
  11. data/.github/workflows/sync_configs.yml +7 -13
  12. data/.repobot.yml +24 -0
  13. data/.rubocop.yml +135 -16
  14. data/CHANGELOG.md +64 -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 +35 -0
  24. data/docsite/source/index.html.md +162 -1
  25. data/lib/rom/factory/attribute_registry.rb +6 -2
  26. data/lib/rom/factory/attributes/association.rb +127 -29
  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 +21 -6
  31. data/lib/rom/factory/builder.rb +17 -19
  32. data/lib/rom/factory/constants.rb +1 -1
  33. data/lib/rom/factory/dsl.rb +43 -25
  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 +4 -3
  37. data/lib/rom/factory/tuple_evaluator.rb +92 -43
  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 +40 -26
  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
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", "< 4"
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.12.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: 2024-01-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: dry-configurable
@@ -17,62 +17,76 @@ 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
- version: '3.0'
65
+ version: '4'
52
66
  type: :runtime
53
67
  prerelease: false
54
68
  version_requirements: !ruby/object:Gem::Requirement
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
- version: '3.0'
75
+ version: '4'
62
76
  - !ruby/object:Gem::Dependency
63
77
  name: rom-core
64
78
  requirement: !ruby/object:Gem::Requirement
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
@@ -82,27 +96,27 @@ extensions: []
82
96
  extra_rdoc_files: []
83
97
  files:
84
98
  - ".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"
99
+ - ".devtools/templates/release.erb"
100
+ - ".github/FUNDING.yml"
101
+ - ".github/ISSUE_TEMPLATE/bug-report.md"
102
+ - ".github/ISSUE_TEMPLATE/config.yml"
103
+ - ".github/SUPPORT.md"
90
104
  - ".github/workflows/ci.yml"
91
- - ".github/workflows/custom/ci.yml"
92
105
  - ".github/workflows/docsite.yml"
106
+ - ".github/workflows/rubocop.yml"
93
107
  - ".github/workflows/sync_configs.yml"
94
108
  - ".gitignore"
109
+ - ".repobot.yml"
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.5.5
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
data/LICENSE.txt DELETED
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2016 Janis Miezitis
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.