gemwork 0.4.0 → 0.5.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/README.md +116 -4
- data/lib/gemwork/version.rb +1 -1
- data/lib/rubocop/.rubocop-gems.yml +10 -0
- data/lib/rubocop/.rubocop-rails.yml +10 -0
- data/lib/rubocop/.rubocop.yml +1 -7
- data/lib/rubocop/gemspec.yml +2 -5
- data/lib/rubocop/layout.yml +40 -0
- data/lib/rubocop/lint.yml +7 -4
- data/lib/rubocop/minitest.yml +5 -0
- data/lib/rubocop/naming.yml +3 -0
- data/lib/rubocop/performance.yml +17 -0
- data/lib/rubocop/rails.yml +46 -0
- data/lib/rubocop/style.yml +69 -0
- data/lib/tasks/{Rakefile → util.rake} +0 -13
- metadata +24 -19
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e412d441f6bde6c0a2e3ba214d6204e17ca4f2e7eb5f796e06ce79f1ff545aa8
|
|
4
|
+
data.tar.gz: 0c6d4106c0e547e2dab91d7411674fdeb1d7ba3c054e7bcb055635a96b7adad8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4cb7d423c31fa5bec5c06b4bc597d199f30e122b8e5ab9bdc1351c9b51f9e8e5223a00697cc9b9fa7be81a0533e2cce6e105d4b9b8995789dda7bd52dc0c0ce7
|
|
7
|
+
data.tar.gz: 29cae19621f25a53e03bb7d76495dfebaf5092ab00e5c9ac6d68b4b626b1b35d41f4a4e8ec65d64c6c9f9f2440d08c42b5be0f9c8154c365451cdba73f380f1d
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [0.5.0] - 2024-3-22
|
|
4
|
+
|
|
5
|
+
- Add examples for use in Rails projects. See the updated README.
|
|
6
|
+
- Spruce up the rubocop config.
|
|
7
|
+
- Now includes all "Disabled"-by-default cops. Most stay disabled, but some are now enabled.
|
|
8
|
+
- No longer includes "Pending"-by-default cops. These are already automatically enabled by the `NewCops: enable` directive.
|
|
9
|
+
- Separate gem-specific from rails-specific cops configuration.
|
|
10
|
+
- Miscellaneous cleanup.
|
|
11
|
+
|
|
12
|
+
## [0.4.2] - 2024-2-4
|
|
13
|
+
|
|
14
|
+
- Add finer-grained control of Rake tasks loading/running. See the updated README.
|
|
15
|
+
|
|
3
16
|
## [0.4.0] - 2024-1-6
|
|
4
17
|
|
|
5
18
|
- House cleaning for Ruby 3.3.
|
data/README.md
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
Gemwork is an abstract framework used by [pdobb](https://github.com/pdobb)'s Ruby Gems.
|
|
6
6
|
|
|
7
|
+
Support for Rails applications is also included, but not as the automatic default. See the "Rails" subheadings in the below sections.
|
|
8
|
+
|
|
7
9
|
## Installation
|
|
8
10
|
|
|
9
11
|
Add this line to your `my_gem.gemspec` file:
|
|
@@ -32,14 +34,58 @@ Create file: `./rakelib/gemwork.rake`
|
|
|
32
34
|
```ruby
|
|
33
35
|
# frozen_string_literal: true
|
|
34
36
|
|
|
37
|
+
spec = Gem::Specification.find_by_name("gemwork")
|
|
38
|
+
|
|
35
39
|
# Load additional tasks defined by Gemwork.
|
|
36
|
-
|
|
37
|
-
|
|
40
|
+
Dir.glob(
|
|
41
|
+
Pathname.new(spec.gem_dir).
|
|
42
|
+
join("lib", "tasks", "{util,rubocop,reek,test}.rake")) do |task|
|
|
43
|
+
load(task)
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Redefine the default `rake` task.
|
|
47
|
+
Rake::Task["default"].clear
|
|
48
|
+
task :default do
|
|
49
|
+
run_tasks(%i[
|
|
50
|
+
test
|
|
51
|
+
rubocop
|
|
52
|
+
reek
|
|
53
|
+
])
|
|
38
54
|
end
|
|
39
55
|
```
|
|
40
56
|
|
|
41
57
|
Running `rake -T` after this will reveal the additional tasks defined by Gemwork just as if they were defined within your project.
|
|
42
58
|
|
|
59
|
+
### Rails
|
|
60
|
+
|
|
61
|
+
For a Rails project, you may need to conditionally run the above by returning early unless the current environment is development. Further, you may want to include other tasks, such as `test:system`.
|
|
62
|
+
|
|
63
|
+
```ruby
|
|
64
|
+
# frozen_string_literal: true
|
|
65
|
+
|
|
66
|
+
return unless Rails.env.development?
|
|
67
|
+
|
|
68
|
+
spec = Gem::Specification.find_by_name("gemwork")
|
|
69
|
+
|
|
70
|
+
# Load additional tasks defined by Gemwork.
|
|
71
|
+
Dir.glob(
|
|
72
|
+
Pathname.new(spec.gem_dir).
|
|
73
|
+
join("lib", "tasks", "{util,rubocop,reek,test}.rake")) do |task|
|
|
74
|
+
load(task)
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Redefine the default `rake` task.
|
|
78
|
+
Rake::Task["default"].clear
|
|
79
|
+
task :default do
|
|
80
|
+
run_tasks(%i[
|
|
81
|
+
test
|
|
82
|
+
rubocop
|
|
83
|
+
reek
|
|
84
|
+
test:system
|
|
85
|
+
])
|
|
86
|
+
end
|
|
87
|
+
```
|
|
88
|
+
|
|
43
89
|
## Rubocop Integration
|
|
44
90
|
### Simple Usage
|
|
45
91
|
|
|
@@ -49,7 +95,22 @@ Add the following to the `.rubocop.yml` file in your gem:
|
|
|
49
95
|
# .rubocop.yml
|
|
50
96
|
|
|
51
97
|
inherit_gem:
|
|
52
|
-
gemwork: lib/rubocop/.rubocop.yml
|
|
98
|
+
gemwork: lib/rubocop/.rubocop-gems.yml
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
#### Rails
|
|
102
|
+
|
|
103
|
+
Or, for a Rails project, add the following to the `.rubocop.yml` file in your project:
|
|
104
|
+
|
|
105
|
+
```yaml
|
|
106
|
+
# .rubocop.yml
|
|
107
|
+
require:
|
|
108
|
+
- rubocop-rake
|
|
109
|
+
- rubocop-minitest
|
|
110
|
+
- rubocop-performance
|
|
111
|
+
|
|
112
|
+
inherit_gem:
|
|
113
|
+
gemwork: lib/rubocop/.rubocop-rails.yml
|
|
53
114
|
```
|
|
54
115
|
|
|
55
116
|
### Advanced Usage
|
|
@@ -73,12 +134,51 @@ inherit_gem:
|
|
|
73
134
|
- lib/rubocop/layout.yml
|
|
74
135
|
- lib/rubocop/lint.yml
|
|
75
136
|
- lib/rubocop/metrics.yml
|
|
137
|
+
- lib/rubocop/minitest.yml
|
|
76
138
|
- lib/rubocop/naming.yml
|
|
139
|
+
- lib/rubocop/performance.yml
|
|
77
140
|
- lib/rubocop/style.yml
|
|
141
|
+
|
|
142
|
+
# Override values from gemwork's lib/rubocop/all_cops.yml config.
|
|
143
|
+
AllCops:
|
|
144
|
+
TargetRubyVersion: 2.7
|
|
78
145
|
```
|
|
79
146
|
|
|
80
147
|
See also: [RuboCop's Configuration Guide on Inheritance](https://github.com/rubocop/rubocop/blob/master/docs/modules/ROOT/pages/configuration.adoc#inheriting-configuration-from-a-dependency-gem).
|
|
81
148
|
|
|
149
|
+
#### Rails
|
|
150
|
+
|
|
151
|
+
```yaml
|
|
152
|
+
# .rubocop.yml
|
|
153
|
+
|
|
154
|
+
# Load Rubocop plugins.
|
|
155
|
+
require:
|
|
156
|
+
- rubocop-capybara
|
|
157
|
+
- rubocop-performance
|
|
158
|
+
- rubocop-minitest
|
|
159
|
+
- rubocop-rails
|
|
160
|
+
- rubocop-rake
|
|
161
|
+
|
|
162
|
+
# Load Cops configuration by Department.
|
|
163
|
+
inherit_gem:
|
|
164
|
+
gemwork:
|
|
165
|
+
- lib/rubocop/all_cops.yml
|
|
166
|
+
- lib/rubocop/layout.yml
|
|
167
|
+
- lib/rubocop/lint.yml
|
|
168
|
+
- lib/rubocop/metrics.yml
|
|
169
|
+
- lib/rubocop/minitest.yml
|
|
170
|
+
- lib/rubocop/naming.yml
|
|
171
|
+
- lib/rubocop/performance.yml
|
|
172
|
+
- lib/rubocop/rails.yml
|
|
173
|
+
- lib/rubocop/style.yml
|
|
174
|
+
|
|
175
|
+
# Override values from gemwork's lib/rubocop/all_cops.yml config.
|
|
176
|
+
AllCops:
|
|
177
|
+
TargetRubyVersion: 3.3
|
|
178
|
+
Exclude:
|
|
179
|
+
- bin/bundle
|
|
180
|
+
```
|
|
181
|
+
|
|
82
182
|
## Testing Support
|
|
83
183
|
|
|
84
184
|
The following requires may be added to `./test/test_helper.rb` to simplify test configuration. These requires support the gem dependencies mentioned in the following section.
|
|
@@ -117,8 +217,18 @@ Gemwork depends on the following gems. None of these are actually used by Gemwor
|
|
|
117
217
|
- [rubocop-minitest](https://github.com/rubocop/rubocop-minitest) -- Code style checking for Minitest files.
|
|
118
218
|
- [rubocop-performance](https://github.com/rubocop/rubocop-performance/) -- An extension of RuboCop focused on code performance checks.
|
|
119
219
|
- [rubocop-rake](https://github.com/rubocop/rubocop-rake) -- A RuboCop plugin for Rake.
|
|
220
|
+
|
|
221
|
+
#### Documentation
|
|
120
222
|
- [yard](https://github.com/lsegal/yard) -- YARD is a Ruby Documentation tool. The Y stands for "Yay!".
|
|
121
223
|
|
|
224
|
+
### Rails
|
|
225
|
+
|
|
226
|
+
For Rails projects, you may want to manually install additional gems as well:
|
|
227
|
+
|
|
228
|
+
#### Linters
|
|
229
|
+
- [rubocop-rails](https://github.com/rubocop/rubocop-rails) -- A RuboCop extension focused on enforcing Rails best practices and coding conventions.
|
|
230
|
+
- [rubocop-capybara](https://github.com/rubocop/rubocop-capybara) -- Code style checking for Capybara files.
|
|
231
|
+
|
|
122
232
|
## Development
|
|
123
233
|
|
|
124
234
|
Development of Gemwork often requires making updates to its code and then testing them in another child gem that uses Gemwork.
|
|
@@ -156,7 +266,9 @@ To release a new version of Gemwork to RubyGems:
|
|
|
156
266
|
|
|
157
267
|
1. Update the version number in `version.rb`
|
|
158
268
|
2. Update `CHANGELOG.md`
|
|
159
|
-
3. Run `
|
|
269
|
+
3. Run `bundle` to update Gemfile.lock with the latest version info
|
|
270
|
+
4. Commit the changes. e.g. `Bump to vX.Y.Z`
|
|
271
|
+
5. Run `rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
160
272
|
|
|
161
273
|
## Contributing
|
|
162
274
|
|
data/lib/gemwork/version.rb
CHANGED
data/lib/rubocop/.rubocop.yml
CHANGED
data/lib/rubocop/gemspec.yml
CHANGED
data/lib/rubocop/layout.yml
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
|
+
Layout/ClassStructure:
|
|
2
|
+
Enabled: false # Consider implementing on a per-project basis.
|
|
3
|
+
|
|
1
4
|
Layout/DotPosition:
|
|
2
5
|
EnforcedStyle: trailing
|
|
3
6
|
|
|
4
7
|
Layout/EmptyLineAfterGuardClause:
|
|
5
8
|
Enabled: true
|
|
6
9
|
|
|
10
|
+
Layout/EmptyLineAfterMultilineCondition:
|
|
11
|
+
Enabled: false
|
|
12
|
+
|
|
7
13
|
Layout/EndOfLine:
|
|
8
14
|
EnforcedStyle: lf
|
|
9
15
|
|
|
@@ -13,12 +19,28 @@ Layout/FirstArgumentIndentation:
|
|
|
13
19
|
Layout/FirstArrayElementIndentation:
|
|
14
20
|
EnforcedStyle: consistent
|
|
15
21
|
|
|
22
|
+
Layout/FirstArrayElementLineBreak:
|
|
23
|
+
Enabled: true
|
|
24
|
+
|
|
16
25
|
Layout/FirstHashElementIndentation:
|
|
17
26
|
EnforcedStyle: consistent
|
|
18
27
|
|
|
28
|
+
Layout/FirstHashElementLineBreak:
|
|
29
|
+
Enabled: true
|
|
30
|
+
|
|
31
|
+
Layout/FirstMethodArgumentLineBreak:
|
|
32
|
+
Enabled: true
|
|
33
|
+
AllowMultilineFinalElement: true
|
|
34
|
+
|
|
35
|
+
Layout/FirstMethodParameterLineBreak:
|
|
36
|
+
Enabled: true
|
|
37
|
+
|
|
19
38
|
Layout/FirstParameterIndentation:
|
|
20
39
|
Enabled: false # Revisit if more settings become available.
|
|
21
40
|
|
|
41
|
+
Layout/HeredocArgumentClosingParenthesis:
|
|
42
|
+
Enabled: true
|
|
43
|
+
|
|
22
44
|
Layout/LineContinuationSpacing:
|
|
23
45
|
EnforcedStyle: no_space
|
|
24
46
|
|
|
@@ -44,6 +66,18 @@ Layout/MultilineAssignmentLayout:
|
|
|
44
66
|
# - kwbegin
|
|
45
67
|
- module
|
|
46
68
|
|
|
69
|
+
Layout/MultilineArrayLineBreaks:
|
|
70
|
+
Enabled: true
|
|
71
|
+
|
|
72
|
+
Layout/MultilineHashKeyLineBreaks:
|
|
73
|
+
Enabled: true
|
|
74
|
+
|
|
75
|
+
Layout/MultilineMethodArgumentLineBreaks:
|
|
76
|
+
Enabled: false
|
|
77
|
+
|
|
78
|
+
Layout/MultilineMethodParameterLineBreaks:
|
|
79
|
+
Enabled: false
|
|
80
|
+
|
|
47
81
|
Layout/MultilineMethodCallBraceLayout:
|
|
48
82
|
EnforcedStyle: same_line
|
|
49
83
|
|
|
@@ -55,3 +89,9 @@ Layout/MultilineMethodDefinitionBraceLayout:
|
|
|
55
89
|
|
|
56
90
|
Layout/MultilineOperationIndentation:
|
|
57
91
|
Enabled: false # Waiting for e.g. `indented_relative_to_receiver`.
|
|
92
|
+
|
|
93
|
+
Layout/RedundantLineBreak:
|
|
94
|
+
Enabled: false
|
|
95
|
+
|
|
96
|
+
Layout/SingleLineBlockChain:
|
|
97
|
+
Enabled: false
|
data/lib/rubocop/lint.yml
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
Lint/ConstantResolution:
|
|
2
|
+
Enabled: false
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
Lint/HeredocMethodCallPosition:
|
|
5
|
+
Enabled: true
|
|
6
|
+
|
|
7
|
+
Lint/NumberConversion:
|
|
8
|
+
Enabled: false
|
|
6
9
|
|
|
7
10
|
Lint/Void:
|
|
8
11
|
CheckForMethodsWithNoSideEffects: true
|
data/lib/rubocop/naming.yml
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Performance/ArraySemiInfiniteRangeSlice:
|
|
2
|
+
Enabled: true
|
|
3
|
+
|
|
4
|
+
Performance/CaseWhenSplat:
|
|
5
|
+
Enabled: true
|
|
6
|
+
|
|
7
|
+
Performance/ChainArrayAllocation:
|
|
8
|
+
Enabled: true
|
|
9
|
+
|
|
10
|
+
Performance/IoReadlines:
|
|
11
|
+
Enabled: true
|
|
12
|
+
|
|
13
|
+
Performance/OpenStruct:
|
|
14
|
+
Enabled: true
|
|
15
|
+
|
|
16
|
+
Performance/SelectMap:
|
|
17
|
+
Enabled: true
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# While bulk changes can be useful, they shouldn't be required. Too much work
|
|
2
|
+
# for little benefit.
|
|
3
|
+
Rails/BulkChangeTable:
|
|
4
|
+
Enabled: false
|
|
5
|
+
|
|
6
|
+
Rails/DefaultScope:
|
|
7
|
+
Enabled: true
|
|
8
|
+
|
|
9
|
+
Rails/Delegate:
|
|
10
|
+
Enabled: false # We choose to never use `delegate`, instead.
|
|
11
|
+
|
|
12
|
+
Rails/EnvironmentVariableAccess:
|
|
13
|
+
Enabled: true
|
|
14
|
+
|
|
15
|
+
Rails/HasManyOrHasOneDependent:
|
|
16
|
+
Enabled: false # A :dependent option isn't always needed (e.g. Transactions).
|
|
17
|
+
|
|
18
|
+
Rails/OrderById:
|
|
19
|
+
Enabled: true
|
|
20
|
+
|
|
21
|
+
Rails/PluckId:
|
|
22
|
+
Enabled: true
|
|
23
|
+
|
|
24
|
+
Rails/RequireDependency:
|
|
25
|
+
Enabled: true
|
|
26
|
+
|
|
27
|
+
Rails/ReversibleMigrationMethodDefinition:
|
|
28
|
+
Enabled: true
|
|
29
|
+
|
|
30
|
+
Rails/SaveBang:
|
|
31
|
+
Enabled: false
|
|
32
|
+
|
|
33
|
+
Rails/SchemaComment:
|
|
34
|
+
Enabled: false
|
|
35
|
+
|
|
36
|
+
Rails/SkipsModelValidations:
|
|
37
|
+
Enabled: false # Reconsider later.
|
|
38
|
+
|
|
39
|
+
Rails/TableNameAssignment:
|
|
40
|
+
Enabled: true
|
|
41
|
+
|
|
42
|
+
Rails/UniqBeforePluck:
|
|
43
|
+
EnforcedStyle: aggressive
|
|
44
|
+
|
|
45
|
+
Rails/WhereExists:
|
|
46
|
+
EnforcedStyle: where
|
data/lib/rubocop/style.yml
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
Style/Alias:
|
|
2
2
|
EnforcedStyle: prefer_alias_method
|
|
3
3
|
|
|
4
|
+
Style/ArrayFirstLast:
|
|
5
|
+
Enabled: false # Too many false positives.
|
|
6
|
+
|
|
7
|
+
Style/AutoResourceCleanup:
|
|
8
|
+
Enabled: true
|
|
9
|
+
|
|
4
10
|
Style/BlockDelimiters:
|
|
5
11
|
EnforcedStyle: semantic
|
|
6
12
|
AllowBracesOnProceduralOneLiners: true
|
|
@@ -37,6 +43,9 @@ Style/ClassAndModuleChildren:
|
|
|
37
43
|
Exclude:
|
|
38
44
|
- "test/**/*"
|
|
39
45
|
|
|
46
|
+
Style/ClassMethodsDefinitions:
|
|
47
|
+
Enabled: true
|
|
48
|
+
|
|
40
49
|
Style/CollectionMethods:
|
|
41
50
|
Enabled: true
|
|
42
51
|
PreferredMethods:
|
|
@@ -46,10 +55,19 @@ Style/CollectionMethods:
|
|
|
46
55
|
detect: detect
|
|
47
56
|
inject: inject
|
|
48
57
|
|
|
58
|
+
Style/DateTime:
|
|
59
|
+
Enabled: true
|
|
60
|
+
|
|
61
|
+
Style/DisableCopsWithinSourceCodeDirective:
|
|
62
|
+
Enabled: false
|
|
63
|
+
|
|
49
64
|
Style/Documentation:
|
|
50
65
|
Exclude:
|
|
51
66
|
- "test/**/*"
|
|
52
67
|
|
|
68
|
+
Style/DocumentationMethod:
|
|
69
|
+
Enabled: false
|
|
70
|
+
|
|
53
71
|
Style/EmptyElse:
|
|
54
72
|
Enabled: false # Including a comment in an empty else block shows intent.
|
|
55
73
|
|
|
@@ -63,12 +81,36 @@ Style/ExpandPathArguments:
|
|
|
63
81
|
Style/FormatString:
|
|
64
82
|
Enabled: false # % notation with an Array just reads better sometimes.
|
|
65
83
|
|
|
84
|
+
Style/ImplicitRuntimeError:
|
|
85
|
+
Enabled: false
|
|
86
|
+
|
|
87
|
+
Style/InlineComment:
|
|
88
|
+
Enabled: false
|
|
89
|
+
|
|
90
|
+
Style/InvertibleUnlessCondition:
|
|
91
|
+
Enabled: true
|
|
92
|
+
|
|
93
|
+
Style/IpAddresses:
|
|
94
|
+
Enabled: true
|
|
95
|
+
|
|
66
96
|
Style/Lambda:
|
|
67
97
|
EnforcedStyle: literal
|
|
68
98
|
|
|
69
99
|
Style/LambdaCall:
|
|
70
100
|
Enabled: false # Allow ServiceObject.(*). Only use on classes, not instances.
|
|
71
101
|
|
|
102
|
+
Style/MethodCallWithArgsParentheses:
|
|
103
|
+
Enabled: false # Reconsider later.
|
|
104
|
+
|
|
105
|
+
Style/MethodCalledOnDoEndBlock:
|
|
106
|
+
Enabled: true
|
|
107
|
+
|
|
108
|
+
Style/MissingElse:
|
|
109
|
+
Enabled: false
|
|
110
|
+
|
|
111
|
+
Style/MultilineMethodSignature:
|
|
112
|
+
Enabled: false
|
|
113
|
+
|
|
72
114
|
Style/NumericPredicate:
|
|
73
115
|
AutoCorrect: true
|
|
74
116
|
|
|
@@ -76,6 +118,9 @@ Style/OpenStructUse:
|
|
|
76
118
|
Exclude:
|
|
77
119
|
- "test/**/*"
|
|
78
120
|
|
|
121
|
+
Style/OptionHash:
|
|
122
|
+
Enabled: true
|
|
123
|
+
|
|
79
124
|
Style/RegexpLiteral:
|
|
80
125
|
EnforcedStyle: mixed
|
|
81
126
|
|
|
@@ -85,6 +130,18 @@ Style/RescueStandardError:
|
|
|
85
130
|
Style/ReturnNil:
|
|
86
131
|
Enabled: true
|
|
87
132
|
|
|
133
|
+
Style/Send:
|
|
134
|
+
Enabled: true
|
|
135
|
+
|
|
136
|
+
Style/SingleLineBlockParams:
|
|
137
|
+
Enabled: false
|
|
138
|
+
|
|
139
|
+
Style/StaticClass:
|
|
140
|
+
Enabled: true
|
|
141
|
+
|
|
142
|
+
Style/StringHashKeys:
|
|
143
|
+
Enabled: false
|
|
144
|
+
|
|
88
145
|
Style/StringMethods:
|
|
89
146
|
Enabled: true
|
|
90
147
|
|
|
@@ -98,8 +155,20 @@ Style/StringLiterals:
|
|
|
98
155
|
Style/StringLiteralsInInterpolation:
|
|
99
156
|
EnforcedStyle: double_quotes
|
|
100
157
|
|
|
158
|
+
Style/TopLevelMethodDefinition:
|
|
159
|
+
Enabled: false
|
|
160
|
+
|
|
101
161
|
Style/TrailingCommaInArrayLiteral:
|
|
102
162
|
EnforcedStyleForMultiline: comma
|
|
103
163
|
|
|
164
|
+
Style/TrailingCommaInBlockArgs:
|
|
165
|
+
Enabled: false
|
|
166
|
+
|
|
104
167
|
Style/TrailingCommaInHashLiteral:
|
|
105
168
|
EnforcedStyleForMultiline: comma
|
|
169
|
+
|
|
170
|
+
Style/UnlessLogicalOperators:
|
|
171
|
+
Enabled: true
|
|
172
|
+
|
|
173
|
+
Style/YodaExpression:
|
|
174
|
+
Enabled: true
|
|
@@ -1,18 +1,5 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# FIXME: How to do relative path loading (from a child gem context)?
|
|
4
|
-
spec = Gem::Specification.find_by_name("gemwork")
|
|
5
|
-
Dir.glob("#{spec.gem_dir}/lib/tasks/*.rake").each { |r| load r }
|
|
6
|
-
|
|
7
|
-
task :default do
|
|
8
|
-
run_tasks(%i[
|
|
9
|
-
test
|
|
10
|
-
rubocop
|
|
11
|
-
reek
|
|
12
|
-
yard
|
|
13
|
-
])
|
|
14
|
-
end
|
|
15
|
-
|
|
16
3
|
def run_tasks(tasks)
|
|
17
4
|
tasks.each_with_index do |name, index|
|
|
18
5
|
annotate_run(name) do
|
metadata
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gemwork
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Paul DobbinSchmaltz
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-
|
|
11
|
+
date: 2024-03-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
|
-
name:
|
|
14
|
+
name: rake
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
17
|
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
19
|
version: '0'
|
|
20
|
-
type: :
|
|
20
|
+
type: :development
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
@@ -25,7 +25,7 @@ dependencies:
|
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
26
|
version: '0'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
|
-
name:
|
|
28
|
+
name: debug
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
31
|
- - ">="
|
|
@@ -39,7 +39,7 @@ dependencies:
|
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
40
|
version: '0'
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
|
-
name:
|
|
42
|
+
name: irb
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
44
44
|
requirements:
|
|
45
45
|
- - ">="
|
|
@@ -53,7 +53,7 @@ dependencies:
|
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
54
|
version: '0'
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
|
-
name:
|
|
56
|
+
name: yard
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
58
58
|
requirements:
|
|
59
59
|
- - ">="
|
|
@@ -67,7 +67,7 @@ dependencies:
|
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
68
|
version: '0'
|
|
69
69
|
- !ruby/object:Gem::Dependency
|
|
70
|
-
name:
|
|
70
|
+
name: minitest
|
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
|
72
72
|
requirements:
|
|
73
73
|
- - ">="
|
|
@@ -81,7 +81,7 @@ dependencies:
|
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
82
|
version: '0'
|
|
83
83
|
- !ruby/object:Gem::Dependency
|
|
84
|
-
name:
|
|
84
|
+
name: minitest-reporters
|
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
|
86
86
|
requirements:
|
|
87
87
|
- - ">="
|
|
@@ -95,7 +95,7 @@ dependencies:
|
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
96
|
version: '0'
|
|
97
97
|
- !ruby/object:Gem::Dependency
|
|
98
|
-
name:
|
|
98
|
+
name: much-stub
|
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
|
100
100
|
requirements:
|
|
101
101
|
- - ">="
|
|
@@ -109,7 +109,7 @@ dependencies:
|
|
|
109
109
|
- !ruby/object:Gem::Version
|
|
110
110
|
version: '0'
|
|
111
111
|
- !ruby/object:Gem::Dependency
|
|
112
|
-
name:
|
|
112
|
+
name: simplecov
|
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
|
114
114
|
requirements:
|
|
115
115
|
- - ">="
|
|
@@ -123,7 +123,7 @@ dependencies:
|
|
|
123
123
|
- !ruby/object:Gem::Version
|
|
124
124
|
version: '0'
|
|
125
125
|
- !ruby/object:Gem::Dependency
|
|
126
|
-
name:
|
|
126
|
+
name: reek
|
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
|
128
128
|
requirements:
|
|
129
129
|
- - ">="
|
|
@@ -137,7 +137,7 @@ dependencies:
|
|
|
137
137
|
- !ruby/object:Gem::Version
|
|
138
138
|
version: '0'
|
|
139
139
|
- !ruby/object:Gem::Dependency
|
|
140
|
-
name:
|
|
140
|
+
name: rubocop
|
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
|
142
142
|
requirements:
|
|
143
143
|
- - ">="
|
|
@@ -151,7 +151,7 @@ dependencies:
|
|
|
151
151
|
- !ruby/object:Gem::Version
|
|
152
152
|
version: '0'
|
|
153
153
|
- !ruby/object:Gem::Dependency
|
|
154
|
-
name:
|
|
154
|
+
name: rubocop-minitest
|
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
|
156
156
|
requirements:
|
|
157
157
|
- - ">="
|
|
@@ -165,7 +165,7 @@ dependencies:
|
|
|
165
165
|
- !ruby/object:Gem::Version
|
|
166
166
|
version: '0'
|
|
167
167
|
- !ruby/object:Gem::Dependency
|
|
168
|
-
name:
|
|
168
|
+
name: rubocop-performance
|
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
|
170
170
|
requirements:
|
|
171
171
|
- - ">="
|
|
@@ -179,13 +179,13 @@ dependencies:
|
|
|
179
179
|
- !ruby/object:Gem::Version
|
|
180
180
|
version: '0'
|
|
181
181
|
- !ruby/object:Gem::Dependency
|
|
182
|
-
name: rake
|
|
182
|
+
name: rubocop-rake
|
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
|
184
184
|
requirements:
|
|
185
185
|
- - ">="
|
|
186
186
|
- !ruby/object:Gem::Version
|
|
187
187
|
version: '0'
|
|
188
|
-
type: :
|
|
188
|
+
type: :runtime
|
|
189
189
|
prerelease: false
|
|
190
190
|
version_requirements: !ruby/object:Gem::Requirement
|
|
191
191
|
requirements:
|
|
@@ -209,18 +209,23 @@ files:
|
|
|
209
209
|
- lib/gemwork/test/support/spec_dsl.rb
|
|
210
210
|
- lib/gemwork/version.rb
|
|
211
211
|
- lib/reek/.reek.yml
|
|
212
|
+
- lib/rubocop/.rubocop-gems.yml
|
|
213
|
+
- lib/rubocop/.rubocop-rails.yml
|
|
212
214
|
- lib/rubocop/.rubocop.yml
|
|
213
215
|
- lib/rubocop/all_cops.yml
|
|
214
216
|
- lib/rubocop/gemspec.yml
|
|
215
217
|
- lib/rubocop/layout.yml
|
|
216
218
|
- lib/rubocop/lint.yml
|
|
217
219
|
- lib/rubocop/metrics.yml
|
|
220
|
+
- lib/rubocop/minitest.yml
|
|
218
221
|
- lib/rubocop/naming.yml
|
|
222
|
+
- lib/rubocop/performance.yml
|
|
223
|
+
- lib/rubocop/rails.yml
|
|
219
224
|
- lib/rubocop/style.yml
|
|
220
|
-
- lib/tasks/Rakefile
|
|
221
225
|
- lib/tasks/reek.rake
|
|
222
226
|
- lib/tasks/rubocop.rake
|
|
223
227
|
- lib/tasks/test.rake
|
|
228
|
+
- lib/tasks/util.rake
|
|
224
229
|
- lib/tasks/yard.rake
|
|
225
230
|
homepage: https://github.com/pdobb/gemwork
|
|
226
231
|
licenses:
|
|
@@ -246,7 +251,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
246
251
|
- !ruby/object:Gem::Version
|
|
247
252
|
version: '0'
|
|
248
253
|
requirements: []
|
|
249
|
-
rubygems_version: 3.5.
|
|
254
|
+
rubygems_version: 3.5.6
|
|
250
255
|
signing_key:
|
|
251
256
|
specification_version: 4
|
|
252
257
|
summary: Common gem framework code used by pdobb's Ruby Gems.
|