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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 31e41c2e00be1fcc94add13ebbb9c999a7693abf14379cb339cfa0cb4f6d2e69
4
- data.tar.gz: af14562a190bc54da499dd3e9c4f38767d8c6270309762b35aa1f8b309e2ec75
3
+ metadata.gz: 18438fa88b1f45c7f4f3a928d5af815860816c06998dd8082db7c44b19913e19
4
+ data.tar.gz: c873811945efbdf88806bec43015458453c5220a6596c50605b8baaaf9495a6a
5
5
  SHA512:
6
- metadata.gz: cef78a68e3e10cceab96a5a2e39de77606d99d928006a0c8d3621328efa3ae46110cbb455fce0d03651e2736009b7d714ec613ce298cbb1a82fef94634b88ceb
7
- data.tar.gz: ddfd5ee54abd5ccc043e43a2b873059d7d1ce0b6b68a8efbebc2ff7583fe47468c1563cc315065d33dbc12451afb547fef31d8f926aaec99de3c59676008bc3f
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
+ [![Gem Version](https://img.shields.io/github/v/release/pdobb/gemwork)](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").tap do |gemspec|
35
- 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..])
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 `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).
158
181
 
159
182
  ## Contributing
160
183
 
@@ -2,6 +2,7 @@
2
2
 
3
3
  require "much-stub"
4
4
 
5
+ # Augment the existing Minitest::Spec class.
5
6
  class Minitest::Spec
6
7
  after do
7
8
  MuchStub.unstub!
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Gemwork
4
- VERSION = "0.3.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.3.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: 2023-11-26 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:
@@ -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.4.10
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.