gemwork 0.4.0 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6b93c15236af6840a3554e1ca99867816511a425675fb062e0b70b681508c3cf
4
- data.tar.gz: 54ba728610e27679caa6edbfd0fa3340edce68a1013af2dbfb274b0cbf049bb5
3
+ metadata.gz: 18438fa88b1f45c7f4f3a928d5af815860816c06998dd8082db7c44b19913e19
4
+ data.tar.gz: c873811945efbdf88806bec43015458453c5220a6596c50605b8baaaf9495a6a
5
5
  SHA512:
6
- metadata.gz: b0256d6193fc521e0837892e3f9fc6d8343ebc04bfde9d1491eed97f07a68484850c817049a5c1a9dc5bcb5284dbd2775b3cb3e195a41c25d98929ca1041f941
7
- data.tar.gz: ddb2effea533ccecb40e1be489ce561f6bb1b80525efa31cf13bdb673015c35cc87f9a005bc0ae995eac6e3178e16ad3eee49c3f16db07edb3c03db407ce8ea2
6
+ metadata.gz: 6cd5487b6d9ce14d5a76d7546f4a8b6347820ef362fb87eebe9fd543841b9e85a841b1735811a6789c05b1ec4070bb090eaaeb27bcc3a929da086402bae8c10b
7
+ data.tar.gz: 39bcf0b95a131518130b182336257ff8e1911dcac8c1135b4b5eafe143bc1380cf401147ba8b2c4ef4fe8de9ae6d185040234d4febc8714c6229633bd8f74284
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
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
+
3
7
  ## [0.4.0] - 2024-1-6
4
8
 
5
9
  - House cleaning for Ruby 3.3.
data/README.md CHANGED
@@ -33,13 +33,32 @@ Create file: `./rakelib/gemwork.rake`
33
33
  # frozen_string_literal: true
34
34
 
35
35
  # Load additional tasks defined by Gemwork.
36
- Gem::Specification.find_by_name("gemwork").tap do |gemspec|
37
- Rake.load_rakefile("#{gemspec.gem_dir}/lib/tasks/Rakefile")
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..])
38
46
  end
39
47
  ```
40
48
 
41
49
  Running `rake -T` after this will reveal the additional tasks defined by Gemwork just as if they were defined within your project.
42
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
+
43
62
  ## Rubocop Integration
44
63
  ### Simple Usage
45
64
 
@@ -156,7 +175,9 @@ To release a new version of Gemwork to RubyGems:
156
175
 
157
176
  1. Update the version number in `version.rb`
158
177
  2. Update `CHANGELOG.md`
159
- 3. 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).
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).
160
181
 
161
182
  ## Contributing
162
183
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Gemwork
4
- VERSION = "0.4.0"
4
+ VERSION = "0.4.2"
5
5
  end
@@ -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.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: 2024-01-07 00:00:00.000000000 Z
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: