gemwork 0.3.0 → 0.4.2
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 +8 -0
- data/README.md +26 -3
- data/lib/gemwork/test/support/much_stub.rb +1 -0
- data/lib/gemwork/version.rb +1 -1
- data/lib/tasks/{Rakefile → util.rake} +0 -13
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18438fa88b1f45c7f4f3a928d5af815860816c06998dd8082db7c44b19913e19
|
4
|
+
data.tar.gz: c873811945efbdf88806bec43015458453c5220a6596c50605b8baaaf9495a6a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6cd5487b6d9ce14d5a76d7546f4a8b6347820ef362fb87eebe9fd543841b9e85a841b1735811a6789c05b1ec4070bb090eaaeb27bcc3a929da086402bae8c10b
|
7
|
+
data.tar.gz: 39bcf0b95a131518130b182336257ff8e1911dcac8c1135b4b5eafe143bc1380cf401147ba8b2c4ef4fe8de9ae6d185040234d4febc8714c6229633bd8f74284
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
## [0.4.2] - 2024-2-4
|
4
|
+
|
5
|
+
- Add finer-grained control of Rake tasks loading/running. See the updated README.
|
6
|
+
|
7
|
+
## [0.4.0] - 2024-1-6
|
8
|
+
|
9
|
+
- House cleaning for Ruby 3.3.
|
10
|
+
|
3
11
|
## [0.3.0] - 2023-11-25
|
4
12
|
|
5
13
|
- Use [IRB](https://github.com/ruby/irb) + [debug](https://github.com/ruby/debug) instead of Pry.
|
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Gemwork
|
2
2
|
|
3
|
+
[](https://img.shields.io/github/v/release/pdobb/gemwork)
|
4
|
+
|
3
5
|
Gemwork is an abstract framework used by [pdobb](https://github.com/pdobb)'s Ruby Gems.
|
4
6
|
|
5
7
|
## Installation
|
@@ -31,13 +33,32 @@ Create file: `./rakelib/gemwork.rake`
|
|
31
33
|
# frozen_string_literal: true
|
32
34
|
|
33
35
|
# Load additional tasks defined by Gemwork.
|
34
|
-
Gem::Specification.find_by_name("gemwork")
|
35
|
-
|
36
|
+
spec = Gem::Specification.find_by_name("gemwork")
|
37
|
+
|
38
|
+
tasks = %i[util test rubocop reek]
|
39
|
+
|
40
|
+
Dir.glob("#{spec.gem_dir}/lib/tasks/{#{tasks.join(",")}}.rake") do |task|
|
41
|
+
load(task)
|
42
|
+
end
|
43
|
+
|
44
|
+
task :default do
|
45
|
+
run_tasks(tasks[1..])
|
36
46
|
end
|
37
47
|
```
|
38
48
|
|
39
49
|
Running `rake -T` after this will reveal the additional tasks defined by Gemwork just as if they were defined within your project.
|
40
50
|
|
51
|
+
NOTE: For a Rails project, you may need to conditionally run the above by returning early unless the current environment is development.
|
52
|
+
|
53
|
+
```ruby
|
54
|
+
# frozen_string_literal: true
|
55
|
+
|
56
|
+
return unless Rails.env.development?
|
57
|
+
|
58
|
+
# Load additional tasks defined by Gemwork.
|
59
|
+
# ...
|
60
|
+
```
|
61
|
+
|
41
62
|
## Rubocop Integration
|
42
63
|
### Simple Usage
|
43
64
|
|
@@ -154,7 +175,9 @@ To release a new version of Gemwork to RubyGems:
|
|
154
175
|
|
155
176
|
1. Update the version number in `version.rb`
|
156
177
|
2. Update `CHANGELOG.md`
|
157
|
-
3. Run `
|
178
|
+
3. Run `bundle` to update Gemfile.lock with the latest version info
|
179
|
+
4. Commit the changes. e.g. `Bump to vX.Y.Z`
|
180
|
+
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).
|
158
181
|
|
159
182
|
## Contributing
|
160
183
|
|
data/lib/gemwork/version.rb
CHANGED
@@ -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,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gemwork
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul DobbinSchmaltz
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -217,10 +217,10 @@ files:
|
|
217
217
|
- lib/rubocop/metrics.yml
|
218
218
|
- lib/rubocop/naming.yml
|
219
219
|
- lib/rubocop/style.yml
|
220
|
-
- lib/tasks/Rakefile
|
221
220
|
- lib/tasks/reek.rake
|
222
221
|
- lib/tasks/rubocop.rake
|
223
222
|
- lib/tasks/test.rake
|
223
|
+
- lib/tasks/util.rake
|
224
224
|
- lib/tasks/yard.rake
|
225
225
|
homepage: https://github.com/pdobb/gemwork
|
226
226
|
licenses:
|
@@ -246,7 +246,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
246
246
|
- !ruby/object:Gem::Version
|
247
247
|
version: '0'
|
248
248
|
requirements: []
|
249
|
-
rubygems_version: 3.
|
249
|
+
rubygems_version: 3.5.3
|
250
250
|
signing_key:
|
251
251
|
specification_version: 4
|
252
252
|
summary: Common gem framework code used by pdobb's Ruby Gems.
|