gemwork 0.1.0 → 0.2.0

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: 6d3241df9423a54841f11171d2fbeff4bb63b22085bc187a18fedae95b74ee2f
4
- data.tar.gz: 7a5dea7187011408054ec03e82ec39613db139d40187db044f115a35a3b65133
3
+ metadata.gz: 16eb6be5f4d3df33580263ae99993955fc2a23c375da90bc0918992bad91c9f3
4
+ data.tar.gz: 485e472747f3666a3e861809531b888696353da68f38ca0c1cb8d9305fee398b
5
5
  SHA512:
6
- metadata.gz: d0f5e9c142694babd902734ef36ccdee43439ca13a79b3d276a488136e42dfa1a8a2dd6ea2dc38ce727937bbede0e5c94d1e0da04b0508876be932af8cf5e9dd
7
- data.tar.gz: c996bc46e4a8d3b96daeb73d4d3c8ccbf9905267dc3f238de1d2cc3d4d55b500d08945591728e7065a2bbd8a50892e54e568f2d22a7c4544a20f04ca46b06aa9
6
+ metadata.gz: d82f6082fb2a0d2eb48089950f9940ddab4724d1dfc5685cdfee2771294766c758ae692f383d058c98368bcd02c19f9b7545795b4a826190f1f085f55ebb84a5
7
+ data.tar.gz: 0175bacca5b9cdb35d9c8c26a44b3dabb1c322cb3355549e7b263dc5e9f284aeacffbc0ef1744623775e706929de54441db484cff971cb35c39e2433d7d7893b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  ## [Unreleased]
2
2
 
3
+
4
+ ## [0.2.0] - 2023-11-25
5
+
6
+ - Add gem dependencies to Gemwork, to be installed by including child gems.
7
+ - Add testing support files for more easily setting up and maintaining dependencies in the test/test_helper.rb file of child gems.
8
+
3
9
  ## [0.1.1] - 2023-11-24
4
10
 
11
+ - Recommend adding a `REBUILD_GEMWORK` flag to README, for use when running `bin/setup` from a child gem.
12
+
13
+ ## [0.1.0] - 2023-11-24
14
+
5
15
  - Initial release
data/README.md CHANGED
@@ -77,6 +77,46 @@ inherit_gem:
77
77
 
78
78
  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).
79
79
 
80
+ ## Testing Support
81
+
82
+ 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.
83
+
84
+
85
+ ```ruby
86
+ # frozen_string_literal: true
87
+
88
+ require "gemwork/test/support/simplecov"
89
+
90
+ $LOAD_PATH.unshift File.expand_path("../lib", __dir__)
91
+ require "say"
92
+
93
+ require "minitest/autorun"
94
+
95
+ require "gemwork/test/support/reporters"
96
+ require "gemwork/test/support/much_stub"
97
+ require "gemwork/test/support/spec_dsl"
98
+
99
+ # ...
100
+ ```
101
+
102
+ ## Gem Dependencies
103
+
104
+ Gemwork depends on the following gems. None of these are actually used by Gemwork, itself, but are included for use by child gems. This is meant to ease dependency management for child gems as these things evolve over time.
105
+
106
+ #### Unit Testing
107
+ - [minitest](https://github.com/minitest/minitest)
108
+ - [minitest-reporters](https://github.com/minitest-reporters/minitest-reporters) -- Create customizable MiniTest output formats.
109
+ - [much-stub](https://github.com/redding/much-stub) -- Stubbing API for replacing method calls on objects in test runs.
110
+ - [simplecov](https://github.com/simplecov-ruby/simplecov) -- Code coverage for Ruby.
111
+
112
+ #### Linters
113
+ - [reek](https://github.com/troessner/reek) -- Code smell detector for Ruby.
114
+ - [rubocop](https://github.com/rubocop/rubocop) -- A Ruby static code analyzer and formatter, based on the community Ruby style guide.
115
+ - [rubocop-minitest](https://github.com/rubocop/rubocop-minitest) -- Code style checking for Minitest files.
116
+ - [rubocop-performance](https://github.com/rubocop/rubocop-performance/) -- An extension of RuboCop focused on code performance checks.
117
+ - [rubocop-rake](https://github.com/rubocop/rubocop-rake) -- A RuboCop plugin for Rake.
118
+ - [yard](https://github.com/lsegal/yard) -- YARD is a Ruby Documentation tool. The Y stands for "Yay!".
119
+
80
120
  ## Development
81
121
 
82
122
  Development of Gemwork often requires making updates to its code and then testing them in another child gem that uses Gemwork.
@@ -84,17 +124,28 @@ Development of Gemwork often requires making updates to its code and then testin
84
124
  Even if the child gem already has the `gemwork` gem installed from RubyGems, local changes to Gemwork can be compiled and installed as a local gem, which the child gem will then immediately utilize. To facilitate this, it is recommended to add this compile/local-install step to the child gem's `bin/setup` executable:
85
125
 
86
126
  ```bash
87
- # ./bin/setup for your child gem:
127
+ # Example ./bin/setup for your child gem:
88
128
 
89
- # ...
129
+ #!/usr/bin/env bash
90
130
 
91
131
  # Recompile and install Gemwork locally.
92
- ( cd ~/dev/gemwork && rake install:local )
132
+ if [ -n "$REBUILD_GEMWORK" ]; then
133
+ ( cd ~/dev/gemwork && bin/setup && rake install:local )
134
+ fi
135
+
136
+ set -euo pipefail
137
+ IFS=$'\n\t'
138
+ set -vx
93
139
 
94
- # The above code should be placed above this line in your bin/setup:
95
140
  bundle install
96
141
 
97
- # ...
142
+ # Do any other automated setup that you need to do here
143
+ ```
144
+
145
+ With the above, you can opt in to using a locally built and installed Gemwork gem from your child gem:
146
+
147
+ ```bash
148
+ REBUILD_GEMWORK=1 bin/setup
98
149
  ```
99
150
 
100
151
  ### Releases
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "much-stub"
4
+
5
+ class Minitest::Spec
6
+ after do
7
+ MuchStub.unstub!
8
+ end
9
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "minitest/reporters"
4
+
5
+ Minitest::Test.make_my_diffs_pretty!
6
+
7
+ reporter_options = { color: true }
8
+ # Minitest::Reporters.use!(
9
+ # Minitest::Reporters::DefaultReporter.new(reporter_options))
10
+
11
+ Minitest::Reporters.use!(
12
+ Minitest::Reporters::ProgressReporter.new(reporter_options))
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "simplecov"
4
+
5
+ SimpleCov.start do
6
+ enable_coverage :branch
7
+ enable_coverage_for_eval
8
+ add_filter "/bin/"
9
+ add_filter "/test/"
10
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ def context(...)
4
+ describe(...)
5
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Gemwork
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
data/lib/gemwork.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "version"
4
-
5
3
  # Gemwork is the top-level namespace/module for this gem.
6
4
  module Gemwork
7
5
  end
6
+
7
+ require "gemwork/version"
metadata CHANGED
@@ -1,15 +1,71 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gemwork
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.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: 2023-11-25 00:00:00.000000000 Z
11
+ date: 2023-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: minitest
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: minitest-reporters
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: much-stub
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: simplecov
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
13
69
  - !ruby/object:Gem::Dependency
14
70
  name: reek
15
71
  requirement: !ruby/object:Gem::Requirement
@@ -119,6 +175,10 @@ files:
119
175
  - LICENSE.txt
120
176
  - README.md
121
177
  - lib/gemwork.rb
178
+ - lib/gemwork/test/support/much_stub.rb
179
+ - lib/gemwork/test/support/reporters.rb
180
+ - lib/gemwork/test/support/simplecov.rb
181
+ - lib/gemwork/test/support/spec_dsl.rb
122
182
  - lib/gemwork/version.rb
123
183
  - lib/reek/.reek.yml
124
184
  - lib/rubocop/.rubocop.yml