rom-factory 0.10.1 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/.action_hero.yml +21 -0
  3. data/.devtools/templates/changelog.erb +43 -0
  4. data/.devtools/templates/release.erb +36 -0
  5. data/.github/FUNDING.yml +1 -0
  6. data/.github/ISSUE_TEMPLATE/bug-report.md +26 -0
  7. data/.github/ISSUE_TEMPLATE/config.yml +5 -0
  8. data/.github/SUPPORT.md +3 -0
  9. data/.github/workflows/ci.yml +87 -0
  10. data/.github/workflows/docsite.yml +38 -9
  11. data/.github/workflows/rubocop.yml +46 -0
  12. data/.github/workflows/sync_configs.yml +41 -18
  13. data/.rspec +1 -1
  14. data/.rubocop.yml +198 -40
  15. data/CHANGELOG.md +88 -33
  16. data/CODEOWNERS +1 -0
  17. data/CODE_OF_CONDUCT.md +1 -1
  18. data/CONTRIBUTING.md +4 -4
  19. data/Gemfile +22 -22
  20. data/Gemfile.devtools +20 -0
  21. data/LICENSE +1 -1
  22. data/README.md +13 -48
  23. data/Rakefile +1 -1
  24. data/benchmarks/basic.rb +10 -10
  25. data/changelog.yml +99 -0
  26. data/docsite/source/index.html.md +162 -1
  27. data/lib/rom/factory/attribute_registry.rb +2 -2
  28. data/lib/rom/factory/attributes/association.rb +52 -12
  29. data/lib/rom/factory/attributes/callable.rb +1 -1
  30. data/lib/rom/factory/attributes/value.rb +1 -1
  31. data/lib/rom/factory/attributes.rb +4 -6
  32. data/lib/rom/factory/builder/persistable.rb +3 -5
  33. data/lib/rom/factory/builder.rb +8 -18
  34. data/lib/rom/factory/constants.rb +1 -1
  35. data/lib/rom/factory/dsl.rb +36 -23
  36. data/lib/rom/factory/factories.rb +13 -15
  37. data/lib/rom/factory/registry.rb +2 -2
  38. data/lib/rom/factory/sequences.rb +1 -1
  39. data/lib/rom/factory/tuple_evaluator.rb +18 -22
  40. data/lib/rom/factory/version.rb +1 -1
  41. data/lib/rom/factory.rb +8 -5
  42. data/lib/rom-factory.rb +1 -1
  43. data/project.yml +3 -0
  44. data/rom-factory.gemspec +8 -11
  45. metadata +43 -43
  46. data/.codeclimate.yml +0 -12
  47. data/.github/ISSUE_TEMPLATE/----please-don-t-ask-for-support-via-issues.md +0 -10
  48. data/.github/ISSUE_TEMPLATE/----please-don-t-report-feature-requests-via-issues.md +0 -10
  49. data/.github/ISSUE_TEMPLATE/---a-detailed-bug-report.md +0 -30
  50. data/.github/ISSUE_TEMPLATE/---bug-report.md +0 -30
  51. data/.github/ISSUE_TEMPLATE/---feature-request.md +0 -18
  52. data/.github/workflows/custom_ci.yml +0 -118
  53. data/Appraisals +0 -9
  54. data/LICENSE.txt +0 -21
  55. data/gemfiles/faker_1.gemfile +0 -34
  56. data/gemfiles/faker_1.gemfile.lock +0 -178
  57. data/gemfiles/faker_2.gemfile +0 -34
  58. data/gemfiles/faker_2.gemfile.lock +0 -178
data/.rubocop.yml CHANGED
@@ -1,89 +1,247 @@
1
- # this file is managed by rom-rb/devtools project
2
-
1
+ # This is a config synced from rom-rb/template-gem repo
3
2
  AllCops:
4
- TargetRubyVersion: 2.4
3
+ TargetRubyVersion: 2.7
4
+ NewCops: disable
5
+ SuggestExtensions: false
6
+ Exclude:
7
+ - spec/support/coverage.rb
8
+ - spec/support/warnings.rb
9
+ - spec/support/rspec_options.rb
10
+ - Gemfile.devtools
11
+ - "*.gemspec"
5
12
 
6
- Style/EachWithObject:
13
+ Layout/ArgumentAlignment:
7
14
  Enabled: false
15
+ EnforcedStyle: with_fixed_indentation
8
16
 
9
- Style/StringLiterals:
17
+ Layout/SpaceAroundMethodCallOperator:
18
+ Enabled: false
19
+
20
+ Layout/SpaceInLambdaLiteral:
21
+ Enabled: false
22
+
23
+ Layout/MultilineMethodCallIndentation:
10
24
  Enabled: true
11
- EnforcedStyle: single_quotes
25
+ EnforcedStyle: indented
12
26
 
13
- Style/Alias:
27
+ Layout/FirstArrayElementIndentation:
28
+ EnforcedStyle: consistent
29
+
30
+ Layout/SpaceInsideHashLiteralBraces:
31
+ Enabled: true
32
+ EnforcedStyle: no_space
33
+ EnforcedStyleForEmptyBraces: no_space
34
+
35
+ Layout/LineLength:
36
+ Max: 120
37
+ Exclude:
38
+ - "spec/**/*_spec.rb"
39
+
40
+ Lint/AmbiguousBlockAssociation:
41
+ Enabled: true
42
+ # because 'expect { foo }.to change { bar }' is fine
43
+ Exclude:
44
+ - "spec/**/*.rb"
45
+
46
+ Lint/BooleanSymbol:
14
47
  Enabled: false
15
48
 
16
- Style/LambdaCall:
49
+ Lint/MissingSuper:
17
50
  Enabled: false
18
51
 
19
- Style/StabbyLambdaParentheses:
52
+ Lint/ConstantDefinitionInBlock:
20
53
  Enabled: false
21
54
 
22
- Style/FormatString:
55
+ Lint/EmptyBlock:
56
+ Exclude:
57
+ - "spec/**/*.rb"
58
+
59
+ Lint/EmptyClass:
60
+ Exclude:
61
+ - "spec/**/*.rb"
62
+
63
+ Lint/RaiseException:
23
64
  Enabled: false
24
65
 
25
- Style/Documentation:
66
+ Lint/StructNewOverride:
26
67
  Enabled: false
27
68
 
28
- Layout/SpaceInLambdaLiteral:
69
+ Lint/SuppressedException:
70
+ Exclude:
71
+ - "spec/**/*.rb"
72
+
73
+ Lint/UselessMethodDefinition:
74
+ Exclude:
75
+ - "lib/rom/struct.rb"
76
+
77
+ Lint/UnderscorePrefixedVariableName:
29
78
  Enabled: false
30
79
 
31
- Layout/MultilineMethodCallIndentation:
32
- Enabled: true
33
- EnforcedStyle: indented
80
+ Lint/ToEnumArguments:
81
+ Exclude:
82
+ - "lib/rom/command.rb"
83
+
84
+ Naming/MethodParameterName:
85
+ Enabled: false
34
86
 
35
- Metrics/LineLength:
36
- Max: 100
87
+ Naming/AccessorMethodName:
88
+ Enabled: false
89
+
90
+ Naming/VariableNumber:
91
+ Enabled: false
92
+
93
+ Naming/PredicateName:
94
+ Enabled: false
95
+
96
+ Naming/FileName:
97
+ Exclude:
98
+ - "lib/*-*.rb"
99
+
100
+ Naming/MethodName:
101
+ Enabled: false
102
+
103
+ Naming/MemoizedInstanceVariableName:
104
+ Enabled: false
37
105
 
38
106
  Metrics/MethodLength:
39
- Max: 22
107
+ Enabled: false
40
108
 
41
- Metrics/ClassLength:
42
- Max: 150
109
+ Metrics/ModuleLength:
110
+ Enabled: false
43
111
 
44
- Metrics/AbcSize:
45
- Max: 20
112
+ Metrics/ClassLength:
113
+ Enabled: false
46
114
 
47
115
  Metrics/BlockLength:
48
116
  Enabled: false
49
117
 
118
+ Metrics/AbcSize:
119
+ Max: 36
120
+
50
121
  Metrics/CyclomaticComplexity:
51
122
  Enabled: true
52
- Max: 10
123
+ Max: 12
53
124
 
54
- Lint/BooleanSymbol:
125
+ Metrics/PerceivedComplexity:
126
+ Max: 14
127
+
128
+ Metrics/ParameterLists:
129
+ Enabled: false
130
+
131
+ Style/AccessorGrouping:
132
+ Enabled: false
133
+
134
+ Style/ExponentialNotation:
135
+ Enabled: false
136
+
137
+ Style/HashEachMethods:
138
+ Enabled: false
139
+
140
+ Style/HashTransformKeys:
141
+ Enabled: false
142
+
143
+ Style/HashTransformValues:
55
144
  Enabled: false
56
145
 
57
146
  Style/AccessModifierDeclarations:
58
147
  Enabled: false
59
148
 
60
- Style/BlockDelimiters:
149
+ Style/Alias:
150
+ Enabled: true
151
+ EnforcedStyle: prefer_alias_method
152
+
153
+ Style/AsciiComments:
61
154
  Enabled: false
62
155
 
63
- Layout/IndentFirstArrayElement:
64
- EnforcedStyle: consistent
156
+ Style/BlockDelimiters:
157
+ Enabled: false
65
158
 
66
159
  Style/ClassAndModuleChildren:
67
- Exclude:
68
- - "spec/**/*_spec.rb"
160
+ Enabled: false
69
161
 
70
- Lint/HandleExceptions:
71
- Exclude:
72
- - "spec/spec_helper.rb"
162
+ Style/ConditionalAssignment:
163
+ Enabled: false
73
164
 
74
- Naming/PredicateName:
165
+ Style/DateTime:
75
166
  Enabled: false
76
167
 
77
- Naming/FileName:
78
- Exclude:
79
- - "lib/rom-*.rb"
168
+ Style/Documentation:
169
+ Enabled: false
170
+
171
+ Style/EachWithObject:
172
+ Enabled: false
173
+
174
+ Style/FormatString:
175
+ Enabled: false
176
+
177
+ Style/GuardClause:
178
+ Enabled: false
179
+
180
+ Style/IfUnlessModifier:
181
+ Enabled: false
182
+
183
+ Style/Lambda:
184
+ Enabled: false
185
+
186
+ Style/LambdaCall:
187
+ Enabled: false
188
+
189
+ Style/ParallelAssignment:
190
+ Enabled: false
191
+
192
+ Style/StabbyLambdaParentheses:
193
+ Enabled: false
194
+
195
+ Style/StringLiterals:
196
+ Enabled: true
197
+ EnforcedStyle: double_quotes
198
+ ConsistentQuotesInMultiline: false
199
+
200
+ Style/StringLiteralsInInterpolation:
201
+ Enabled: true
202
+ EnforcedStyle: double_quotes
80
203
 
81
204
  Style/SymbolArray:
82
- Exclude:
83
- - "spec/**/*_spec.rb"
205
+ Enabled: false
84
206
 
85
- Style/ConditionalAssignment:
207
+ Style/OptionalBooleanParameter:
86
208
  Enabled: false
87
209
 
88
- Naming/MethodName:
210
+ Style/MultilineBlockChain:
211
+ Enabled: false
212
+
213
+ Style/DocumentDynamicEvalDefinition:
214
+ Enabled: false
215
+
216
+ Style/TrailingUnderscoreVariable:
217
+ Enabled: false
218
+
219
+ Style/MultipleComparison:
220
+ Enabled: false
221
+
222
+ Style/StringConcatenation:
223
+ Enabled: false
224
+
225
+ Style/OpenStructUse:
226
+ Enabled: false
227
+
228
+ Style/MapToHash:
229
+ Enabled: false
230
+
231
+ Style/FormatStringToken:
232
+ Enabled: false
233
+
234
+ Style/StructInheritance:
235
+ Enabled: false
236
+
237
+ Style/PreferredHashMethods:
238
+ Enabled: false
239
+
240
+ Style/DoubleNegation:
241
+ Enabled: false
242
+
243
+ Style/MissingRespondToMissing:
244
+ Enabled: false
245
+
246
+ Style/CombinableLoops:
89
247
  Enabled: false
data/CHANGELOG.md CHANGED
@@ -1,5 +1,50 @@
1
+ <!--- DO NOT EDIT THIS FILE - IT'S AUTOMATICALLY GENERATED VIA DEVTOOLS --->
2
+
3
+ ## 0.11.0 2022-11-11
4
+
5
+ ### Fixed
6
+
7
+ - Support for plural Faker generators (@wuarmin)
8
+
9
+ ### Added
10
+
11
+ - Support for one-to-one associations (@ianks)
12
+ - [internal] cache for Faker constants (@flash-gordon)
13
+
14
+ ### Changed
15
+
16
+ - [BREAKING] attributes are always passed as keywords (@alassek)
17
+ This may affect your code in places where attributes are passed as hashes.
18
+ Places like
19
+
20
+ ```ruby
21
+ user_attributes = { name: 'Jane' }
22
+ Factory[:user, user_attributes]
23
+ ```
24
+ must be updated to
25
+ ```ruby
26
+ user_attributes = { name: 'Jane' }
27
+ Factory[:user, **user_attributes]
28
+ ```
29
+ - Upgraded to the latest versions of dry-rb dependencies, compatible with rom 5.3 (@flash-gordon)
30
+ - Support for Faker 1.x was dropped (@alassek)
31
+
32
+
33
+ [Compare v0.10.2...v0.11.0](https://github.com/rom-rb/rom-factory/compare/v0.10.2...v0.11.0)
34
+
35
+ ## 0.10.2 2020-04-05
36
+
37
+
38
+ ### Fixed
39
+
40
+ - Fix more keyword warnings (@flash-gordon)
41
+
42
+
43
+ [Compare v0.10.1...v0.10.2](https://github.com/rom-rb/rom-factory/compare/v0.10.1...v0.10.2)
44
+
1
45
  ## 0.10.1 2019-12-28
2
46
 
47
+
3
48
  ### Added
4
49
 
5
50
  - Support for faker 2 (@ianks)
@@ -8,13 +53,15 @@
8
53
 
9
54
  - Keyword warnings reported by Ruby 2.7 (@flash-gordon)
10
55
 
56
+
11
57
  [Compare v0.10.0...v0.10.1](https://github.com/rom-rb/rom-factory/compare/v0.10.0...v0.10.1)
12
58
 
13
59
  ## 0.10.0 2019-12-11
14
60
 
61
+
15
62
  ### Added
16
63
 
17
- * `struct_namespace` option is supported by factory builders (@graceful-potato)
64
+ - `struct_namespace` option is supported by factory builders (@graceful-potato)
18
65
 
19
66
  ``` ruby
20
67
  factories.define(:user, struct_namespace: MyApp::Entities) do |f|
@@ -24,98 +71,106 @@
24
71
 
25
72
  ### Fixed
26
73
 
27
- * Support building structs when child assoc does not define parent (@psparrow)
28
- * Fixed `TupleEvaluator#struct_attrs` for non-standard output schema (@AMHOL)
74
+ - Support building structs when child assoc does not define parent (@psparrow)
75
+ - Fixed `TupleEvaluator#struct_attrs` for non-standard output schema (@AMHOL)
76
+
29
77
 
30
78
  [Compare v0.9.1...v0.10.0](https://github.com/rom-rb/rom-factory/compare/v0.9.1...v0.10.0)
31
79
 
32
80
  ## 0.9.1 2019-10-23
33
81
 
82
+
34
83
  ### Fixed
35
84
 
36
- * Attributes of a struct are no longer accidentally passed to their associations (@psparrow)
85
+ - Attributes of a struct are no longer accidentally passed to their associations (@psparrow)
86
+
37
87
 
38
88
  [Compare v0.9.0...v0.9.1](https://github.com/rom-rb/rom-factory/compare/v0.9.0...v0.9.1)
39
89
 
40
90
  ## 0.9.0 2019-08-12
41
91
 
92
+
42
93
  ### Added
43
94
 
44
- * When attributes hash includes unknown attributes, a `ROM::Factory::UnknownAttributeError` will be raised (@rawburt)
95
+ - When attributes hash includes unknown attributes, a `ROM::Factory::UnknownAttributeError` will be raised (@rawburt)
96
+
45
97
 
46
98
  [Compare v0.8.0...v0.9.0](https://github.com/rom-rb/rom-factory/compare/v0.8.0...v0.9.0)
47
99
 
48
100
  ## 0.8.0 2019-04-24
49
101
 
102
+
50
103
  ### Fixed
51
104
 
52
- * Loaded association structs are no longer rejected by output schemas (issue #34) (flash-gordon + solnic)
105
+ - Loaded association structs are no longer rejected by output schemas (issue #34) (flash-gordon + solnic)
106
+
53
107
 
54
108
  [Compare v0.7.0...v0.8.0](https://github.com/rom-rb/rom-factory/compare/v0.7.0...v0.8.0)
55
109
 
56
110
  ## 0.7.0 2018-11-17
57
111
 
112
+
58
113
  ### Added
59
114
 
60
- * Support for traits (v-kolesnikov)
61
- * Support building structs with associations (@ianks)
115
+ - Support for traits (v-kolesnikov)
116
+ - Support building structs with associations (@ianks)
62
117
 
63
118
  ### Fixed
64
119
 
65
- * Overwritten attributes with dependencies (JanaVPetrova)
120
+ - Overwritten attributes with dependencies (JanaVPetrova)
121
+
66
122
 
67
123
  [Compare v0.6.0...v0.7.0](https://github.com/rom-rb/rom-factory/compare/v0.6.0...v0.7.0)
68
124
 
69
125
  ## 0.6.0 2018-01-31
70
126
 
127
+
71
128
  ### Added
72
129
 
73
- * Support for factories with custom struct namespaces (solnic)
130
+ - Support for factories with custom struct namespaces (solnic)
74
131
 
75
- ### Changed
132
+ ### Fixed
76
133
 
77
- * Accessing a factory which is not defined will result in `FactoryNotDefinedError` exception (GustavoCaso + solnic)
134
+ - Using dependent attributes with sequences works correctly, ie `f.sequence(:login) { |i, name| "name-#{i}"}` (solnic)
78
135
 
79
- ### Fixed
136
+ ### Changed
80
137
 
81
- * Using dependent attributes with sequences works correctly, ie `f.sequence(:login) { |i, name| "name-#{i}"}` (solnic)
138
+ - Accessing a factory which is not defined will result in `FactoryNotDefinedError` exception (GustavoCaso + solnic)
82
139
 
83
140
  [Compare v0.5.0...v0.6.0](https://github.com/rom-rb/rom-factory/compare/v0.5.0...v0.6.0)
84
141
 
85
142
  ## 0.5.0 2017-10-24
86
143
 
144
+
87
145
  ### Added
88
146
 
89
- * Updated to rom 4.0 (solnic)
90
- * Support for `has_many` and `has_one` associations (solnic)
91
- * Support for attributes depending on values from other attributes (solnic)
92
- * Support for `rand` inside the generator block (flash-gordon)
147
+ - Updated to rom 4.0 (solnic)
148
+ - Support for `has_many` and `has_one` associations (solnic)
149
+ - Support for attributes depending on values from other attributes (solnic)
150
+ - Support for `rand` inside the generator block (flash-gordon)
93
151
 
94
152
  ### Changed
95
153
 
96
- * Depends on `rom-core` now (solnic)
154
+ - Depends on `rom-core` now (solnic)
97
155
 
98
156
  [Compare v0.4.0...v0.5.0](https://github.com/rom-rb/rom-factory/compare/v0.4.0...v0.5.0)
99
157
 
100
- ## v0.4.0 2017-03-03
158
+ ## 0.4.0 2017-03-03
101
159
 
102
- This is a revamp of the original `rom_factory` gem which adds new features and
103
160
  improves internals.
104
161
 
105
162
  ### Added
106
163
 
107
- * Support for defining multiple factories via `MyFactory = ROM::Factory.configure { |c| ... }` (solnic)
108
- * Support for builder inheritence via `define(admin: :user) { |f| ... }` (solnic)
109
- * Support for generating in-memory structs via `MyFactory.structs[:user]` that are not persisted (solnic)
110
- * Support for `belongs_to` associations via `f.association(:user)` (solnic)
111
- * New DSL for defining builders `MyFactory.define(:user) { |f| ... }` which infers default relation name (solnic)
112
- * New factory method `MyFactory#[]` ie `MyFactory[:user, name: "Jane"]` (solnic)
113
- * New `fake` helper which uses faker gem under the hood ie `f.email { fake(:internet, :email) }` (solnic)
164
+ - Support for defining multiple factories via `MyFactory = ROM::Factory.configure { |c| ... }` (solnic)
165
+ - Support for builder inheritence via `define(admin: :user) { |f| ... }` (solnic)
166
+ - Support for generating in-memory structs via `MyFactory.structs[:user]` that are not persisted (solnic)
167
+ - Support for `belongs_to` associations via `f.association(:user)` (solnic)
168
+ - New DSL for defining builders `MyFactory.define(:user) { |f| ... }` which infers default relation name (solnic)
169
+ - New factory method `MyFactory#[]` ie `MyFactory[:user, name: "Jane"]` (solnic)
170
+ - New `fake` helper which uses faker gem under the hood ie `f.email { fake(:internet, :email) }` (solnic)
114
171
 
115
172
  ### Changed
116
173
 
117
- * `Rom::Factory::Config.configure` was replaced with `ROM::Factory.configure` (solnic)
118
- * Global factory config and builders are gone (solnic)
119
- * Structs are now based on dry-struct (solnic)
120
-
121
- [Compare v0.3.1...v0.4.0](https://github.com/rom-rb/rom-factory/compare/v0.3.1...v0.4.0)
174
+ - `Rom::Factory::Config.configure` was replaced with `ROM::Factory.configure` (solnic)
175
+ - Global factory config and builders are gone (solnic)
176
+ - Structs are now based on dry-struct (solnic)
data/CODEOWNERS ADDED
@@ -0,0 +1 @@
1
+ * @solnic
data/CODE_OF_CONDUCT.md CHANGED
@@ -10,4 +10,4 @@ Project maintainers have the right and responsibility to remove, edit, or reject
10
10
 
11
11
  Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
12
12
 
13
- This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.0.0, available at [https://www.contributor-covenant.org/version/1/4/code-of-conduct](https://www.contributor-covenant.org/version/1/4/code-of-conduct)
13
+ This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.4.0, available at [https://www.contributor-covenant.org/version/1/4/code-of-conduct](https://www.contributor-covenant.org/version/1/4/code-of-conduct)
data/CONTRIBUTING.md CHANGED
@@ -6,11 +6,11 @@ If you found a bug, report an issue and describe what's the expected behavior ve
6
6
 
7
7
  ## Reporting feature requests
8
8
 
9
- Report a feature request **only after discussing it first on [discourse.rom-rb.org](https://discourse.rom-rb.org)** where it was accepted. Please provide a concise description of the feature, don't link to a discussion thread, and instead summarize what was discussed.
9
+ Report a feature request **only after discussing it first on [discourse.rom-rb.org](https://discourse.rom-rb.org)** where it was accepted. Please provide a concise description of the feature.
10
10
 
11
11
  ## Reporting questions, support requests, ideas, concerns etc.
12
12
 
13
- **PLEASE DON'T** - use [discourse.rom-rb.org](http://discourse.rom-rb.org) instead.
13
+ **PLEASE DON'T** - use [discourse.rom-rb.org](https://discourse.rom-rb.org) instead.
14
14
 
15
15
  # Pull Request Guidelines
16
16
 
@@ -22,8 +22,8 @@ Other requirements:
22
22
  2) Follow the style conventions of the surrounding code. In most cases, this is standard ruby style.
23
23
  3) Add API documentation if it's a new feature
24
24
  4) Update API documentation if it changes an existing feature
25
- 5) Bonus points for sending a PR to [github.com/rom-rb/rom-rb.org](github.com/rom-rb/rom-rb.org) which updates user documentation and guides
25
+ 5) Bonus points for sending a PR which updates user documentation in the `docsite` directory
26
26
 
27
27
  # Asking for help
28
28
 
29
- If these guidelines aren't helpful, and you're stuck, please post a message on [discourse.rom-rb.org](https://discourse.rom-rb.org) or join [our chat](https://rom-rb.zulipchat.com).
29
+ If these guidelines aren't helpful, and you're stuck, please post a message on [discourse.rom-rb.org](https://discourse.rom-rb.org).
data/Gemfile CHANGED
@@ -1,39 +1,39 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- source 'https://rubygems.org'
3
+ source "https://rubygems.org"
4
4
 
5
5
  gemspec
6
6
 
7
- git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
7
+ eval_gemfile "Gemfile.devtools"
8
8
 
9
- gem 'rake', '~> 12.0'
10
- gem 'rspec', '~> 3.0'
9
+ gem "faker", "~> 2.8"
11
10
 
12
- gem 'rom', github: 'rom-rb/rom', branch: 'master' do
13
- gem 'rom-core'
11
+ gem "rspec", "~> 3.0"
12
+
13
+ git "https://github.com/rom-rb/rom.git", branch: "release-5.3" do
14
+ gem "rom-core"
15
+ gem "rom-changeset"
16
+ gem "rom-repository"
17
+ gem "rom"
14
18
  end
15
19
 
16
20
  group :test do
17
- gem 'rom-sql', github: 'rom-rb/rom-sql', branch: 'master'
18
- gem 'inflecto'
19
- gem 'pry-byebug', platforms: :mri
20
- gem 'pry', platforms: :jruby
21
- gem 'codeclimate-test-reporter'
22
- gem 'simplecov'
23
-
24
- gem 'pg', '~> 0.21', platforms: [:mri, :truffleruby]
25
- gem 'jdbc-postgres', platforms: :jruby
26
- gem 'warning'
21
+ gem "pry", "~> 0.12.0", "<= 0.13"
22
+ gem "pry-byebug", "~> 3.8", platforms: :ruby
23
+ gem "rom-sql", github: "rom-rb/rom-sql", branch: "release-3.6"
24
+
25
+ gem "jdbc-postgres", platforms: :jruby
26
+ gem "pg", "~> 0.21", platforms: :ruby
27
27
  end
28
28
 
29
29
  group :tools do
30
- gem 'byebug', platform: :mri
31
- gem 'redcarpet' # for yard
30
+ gem "byebug", platform: :mri
31
+ gem "redcarpet" # for yard
32
32
  end
33
33
 
34
34
  group :benchmarks do
35
- gem 'activerecord'
36
- gem 'benchmark-ips'
37
- gem 'factory_bot'
38
- gem 'fabrication'
35
+ gem "activerecord"
36
+ gem "benchmark-ips"
37
+ gem "fabrication"
38
+ gem "factory_bot"
39
39
  end
data/Gemfile.devtools ADDED
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ # this file is managed by rom-rb/devtools project
4
+
5
+ gem "rake", ">= 12.3.3"
6
+
7
+ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
8
+
9
+ group :test do
10
+ gem "simplecov", require: false, platforms: :ruby
11
+ gem "simplecov-cobertura", require: false, platforms: :ruby
12
+ gem "rexml", require: false
13
+
14
+ gem "warning" if RUBY_VERSION >= "2.4.0"
15
+ end
16
+
17
+ group :tools do
18
+ # this is the same version that we use on codacy
19
+ gem "rubocop", "1.26.1"
20
+ end
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2015-2019 rom-rb team
3
+ Copyright (c) 2015-2021 rom-rb team
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of
6
6
  this software and associated documentation files (the "Software"), to deal in