gem_changelog_diff 0.8.0 → 0.9.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 +15 -1
- data/CLAUDE.md +3 -1
- data/README.md +47 -0
- data/ROADMAP.md +0 -14
- data/lib/gem_changelog_diff/cli.rb +18 -2
- data/lib/gem_changelog_diff/exit_code.rb +9 -0
- data/lib/gem_changelog_diff/version.rb +1 -1
- data/lib/gem_changelog_diff.rb +1 -0
- data/sig/gem_changelog_diff.rbs +15 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4c1e8032c69ad427e1469a9620c6df00d3d401e83f939e6fd8c99335fb709fc8
|
|
4
|
+
data.tar.gz: 9d536f58e4148db45d1de19107cfc28270ab5ce92b892375cf6eae01e3ea5613
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8e3c3547a707fa41cf491a35f66288f1fbe8210ee99d7742bcc918a5d9721298d9c75bdbe42bd68a77c5de535f1fe0899fc1beea269291adef2b80e27a9ded9a
|
|
7
|
+
data.tar.gz: 594f28bb073332585345ae5569c2c1298c4ca705df61ecd81e92f5cfd3c279110f13a5c34c18d543a20c75b7133d84cc011e5756116f331499644991a774ba73
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.9.0] - 2026-06-18
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- `rubocop-rspec` plugin for spec linting with targeted cop overrides
|
|
15
|
+
- VCR integration tests with recorded cassettes for rails, nokogiri, puma, and edge cases
|
|
16
|
+
- Integration formatter tests verifying text, JSON, and markdown output against real API data
|
|
17
|
+
- Complete RBS type signatures for all private methods in `GithubClient`, `UriResolver`, and `CLI`
|
|
18
|
+
- `ExitCode` module with `SUCCESS` (0), `ERROR` (1), and `PARTIAL_FAILURE` (2) constants
|
|
19
|
+
- `check` exits with status based on report errors (0 = all ok, 1 = all failed, 2 = partial)
|
|
20
|
+
- `show` exits 0 on success, 1 on error
|
|
21
|
+
- README: exit codes section, concurrency flag docs, CI integration guide
|
|
22
|
+
|
|
10
23
|
## [0.8.0] - 2026-06-18
|
|
11
24
|
|
|
12
25
|
### Added
|
|
@@ -118,7 +131,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
118
131
|
- Plain text formatter for changelog output
|
|
119
132
|
- Full end-to-end pipeline: detect → lookup → fetch → format
|
|
120
133
|
|
|
121
|
-
[Unreleased]: https://github.com/eclectic-coding/gem_changelog_diff/compare/v0.
|
|
134
|
+
[Unreleased]: https://github.com/eclectic-coding/gem_changelog_diff/compare/v0.9.0...HEAD
|
|
135
|
+
[0.9.0]: https://github.com/eclectic-coding/gem_changelog_diff/releases/tag/v0.9.0
|
|
122
136
|
[0.8.0]: https://github.com/eclectic-coding/gem_changelog_diff/releases/tag/v0.8.0
|
|
123
137
|
[0.7.0]: https://github.com/eclectic-coding/gem_changelog_diff/releases/tag/v0.7.0
|
|
124
138
|
[0.6.0]: https://github.com/eclectic-coding/gem_changelog_diff/releases/tag/v0.6.0
|
data/CLAUDE.md
CHANGED
|
@@ -27,7 +27,7 @@ All feature work lives on `feature/<version>-<scope>` branches (e.g. `feature/0.
|
|
|
27
27
|
|
|
28
28
|
## Code Style
|
|
29
29
|
|
|
30
|
-
- RuboCop with `rubocop-rake`
|
|
30
|
+
- RuboCop with `rubocop-rake` and `rubocop-rspec` plugins; double quotes for strings
|
|
31
31
|
- Target Ruby version: 3.3
|
|
32
32
|
- `frozen_string_literal: true` on all Ruby files
|
|
33
33
|
- `Style/Documentation` is disabled
|
|
@@ -37,6 +37,8 @@ All feature work lives on `feature/<version>-<scope>` branches (e.g. `feature/0.
|
|
|
37
37
|
- RSpec with `--format documentation`
|
|
38
38
|
- SimpleCov for coverage (HTML + JSON output); JSON uploaded to Codecov in CI
|
|
39
39
|
- Coverage filters: `spec/` and `version.rb` excluded; tracks `lib/**/*.rb`
|
|
40
|
+
- VCR integration tests in `spec/integration/` use recorded cassettes from `spec/cassettes/`
|
|
41
|
+
- To re-record cassettes: `GITHUB_TOKEN=ghp_... bundle exec rspec spec/integration/`
|
|
40
42
|
|
|
41
43
|
## CI
|
|
42
44
|
|
data/README.md
CHANGED
|
@@ -22,6 +22,8 @@ CLI that shows you the changelog diff for each gem before you `bundle update`, p
|
|
|
22
22
|
- [Caching](#caching)
|
|
23
23
|
- [Dry Run](#dry-run)
|
|
24
24
|
- [Timeouts](#timeouts)
|
|
25
|
+
- [Concurrency](#concurrency)
|
|
26
|
+
- [Exit Codes](#exit-codes)
|
|
25
27
|
- [Configuration File](#configuration-file)
|
|
26
28
|
- [Development](#development)
|
|
27
29
|
- [Contributing](#contributing)
|
|
@@ -170,6 +172,51 @@ gem_changelog_diff --timeout 30 # Per-request timeout in seconds (default: 10)
|
|
|
170
172
|
|
|
171
173
|
The total operation timeout (default: 120s) limits how long concurrent fetching can run. Both values are configurable via the config file.
|
|
172
174
|
|
|
175
|
+
### Concurrency
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
gem_changelog_diff --concurrency 8 # Fetch 8 gems in parallel (default: 4)
|
|
179
|
+
gem_changelog_diff --concurrency 1 # Disable concurrent fetching
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
The concurrency setting controls how many gems are fetched simultaneously using threads. Lower values reduce load on the GitHub API; higher values speed up large projects.
|
|
183
|
+
|
|
184
|
+
### Exit Codes
|
|
185
|
+
|
|
186
|
+
The CLI uses defined exit codes for scripting and CI integration:
|
|
187
|
+
|
|
188
|
+
| Code | Meaning |
|
|
189
|
+
|------|---------|
|
|
190
|
+
| 0 | All gems processed successfully |
|
|
191
|
+
| 1 | Complete failure (all gems failed, or fatal error) |
|
|
192
|
+
| 2 | Some gems succeeded, some failed |
|
|
193
|
+
|
|
194
|
+
The `check` command sets the exit code based on how many gems produced errors:
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
gem_changelog_diff check
|
|
198
|
+
echo $? # 0 = all ok, 1 = all failed, 2 = some failed
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
The `show` command exits 0 on success or 1 if the changelog could not be retrieved:
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
gem_changelog_diff show rails 7.0.8 7.1.3
|
|
205
|
+
echo $? # 0 = success, 1 = error
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
#### CI Integration
|
|
209
|
+
|
|
210
|
+
Use exit codes to control CI behavior:
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
# Fail CI only on complete failure
|
|
214
|
+
gem_changelog_diff check || [ $? -eq 2 ]
|
|
215
|
+
|
|
216
|
+
# Strict mode: fail on any error
|
|
217
|
+
gem_changelog_diff check
|
|
218
|
+
```
|
|
219
|
+
|
|
173
220
|
### Configuration File
|
|
174
221
|
|
|
175
222
|
Generate a config file template:
|
data/ROADMAP.md
CHANGED
|
@@ -2,20 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Feature roadmap for gem_changelog_diff. Each section is auto-pruned by `bin/release` when that version ships.
|
|
4
4
|
|
|
5
|
-
## 0.9.0 -- Pre-1.0 Stabilization
|
|
6
|
-
|
|
7
|
-
Freeze the public API. Harden the test suite. Prepare documentation for stable release.
|
|
8
|
-
|
|
9
|
-
- Integration test suite with VCR-recorded HTTP fixtures against well-known gems
|
|
10
|
-
- RBS type signatures in `sig/gem_changelog_diff.rbs`
|
|
11
|
-
- Defined exit codes: 0 (success), 1 (error), 2 (partial failure)
|
|
12
|
-
- Add `rubocop-rspec` for spec linting
|
|
13
|
-
- README overhaul with examples for every subcommand and flag
|
|
14
|
-
|
|
15
|
-
**Dependencies:** `vcr`, `rubocop-rspec` (development)
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
5
|
## 1.0.0 -- Stable Release
|
|
20
6
|
|
|
21
7
|
Public API is frozen. Semantic versioning contract begins.
|
|
@@ -34,11 +34,11 @@ module GemChangelogDiff
|
|
|
34
34
|
gems = filter_gems(detect_gems, gem_names)
|
|
35
35
|
return say("All gems are up to date!") if gems.empty?
|
|
36
36
|
|
|
37
|
-
gems =
|
|
37
|
+
gems = apply_interactive(gems)
|
|
38
38
|
return say("No gems selected.") if gems.empty?
|
|
39
39
|
return dry_run_output(gems) if options[:dry_run]
|
|
40
40
|
|
|
41
|
-
output_results(gems)
|
|
41
|
+
exit exit_status(output_results(gems))
|
|
42
42
|
end
|
|
43
43
|
|
|
44
44
|
desc "show GEM FROM_VERSION TO_VERSION", "Show changelog between two versions of a gem"
|
|
@@ -48,6 +48,7 @@ module GemChangelogDiff
|
|
|
48
48
|
report = build_single_report(gem)
|
|
49
49
|
formatter = Formatters.build(format: resolved_format, color: color_enabled?)
|
|
50
50
|
write_output(formatter.format([report]))
|
|
51
|
+
exit report[:error] ? ExitCode::ERROR : ExitCode::SUCCESS
|
|
51
52
|
end
|
|
52
53
|
|
|
53
54
|
desc "cache SUBCOMMAND", "Manage the cache"
|
|
@@ -220,6 +221,21 @@ module GemChangelogDiff
|
|
|
220
221
|
reports = with_spinner { build_reports(gems) }
|
|
221
222
|
formatter = Formatters.build(format: resolved_format, color: color_enabled?)
|
|
222
223
|
write_output(formatter.format(reports))
|
|
224
|
+
reports
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
def apply_interactive(gems)
|
|
228
|
+
return gems unless options[:interactive]
|
|
229
|
+
|
|
230
|
+
Interactive.new(gems: gems).select
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
def exit_status(reports)
|
|
234
|
+
error_count = reports.count { |r| r[:error] }
|
|
235
|
+
return ExitCode::SUCCESS if error_count.zero?
|
|
236
|
+
return ExitCode::ERROR if error_count == reports.size
|
|
237
|
+
|
|
238
|
+
ExitCode::PARTIAL_FAILURE
|
|
223
239
|
end
|
|
224
240
|
|
|
225
241
|
def resolved_format
|
data/lib/gem_changelog_diff.rb
CHANGED
|
@@ -9,6 +9,7 @@ module GemChangelogDiff
|
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
require_relative "gem_changelog_diff/errors"
|
|
12
|
+
require_relative "gem_changelog_diff/exit_code"
|
|
12
13
|
require_relative "gem_changelog_diff/cache"
|
|
13
14
|
require_relative "gem_changelog_diff/outdated_gem"
|
|
14
15
|
require_relative "gem_changelog_diff/detector"
|
data/sig/gem_changelog_diff.rbs
CHANGED
|
@@ -22,6 +22,12 @@ module GemChangelogDiff
|
|
|
22
22
|
class NetworkError < Error
|
|
23
23
|
end
|
|
24
24
|
|
|
25
|
+
module ExitCode
|
|
26
|
+
SUCCESS: Integer
|
|
27
|
+
ERROR: Integer
|
|
28
|
+
PARTIAL_FAILURE: Integer
|
|
29
|
+
end
|
|
30
|
+
|
|
25
31
|
class Configuration
|
|
26
32
|
attr_accessor github_token: String?
|
|
27
33
|
attr_accessor cache_enabled: bool
|
|
@@ -119,6 +125,7 @@ module GemChangelogDiff
|
|
|
119
125
|
def extract_github_slug: (Array[String] uris) -> String?
|
|
120
126
|
def follow_redirects: (String slug, ?Integer remaining) -> String
|
|
121
127
|
def execute_head_request: (URI::Generic uri) -> (Net::HTTPResponse)
|
|
128
|
+
def extract_slug_from_location: (String? location) -> String?
|
|
122
129
|
def request_headers: () -> Hash[String, String]
|
|
123
130
|
end
|
|
124
131
|
|
|
@@ -204,6 +211,8 @@ module GemChangelogDiff
|
|
|
204
211
|
private
|
|
205
212
|
|
|
206
213
|
def fetch_releases: (String repo, ?String? current_version) -> Array[Hash[String, untyped]]
|
|
214
|
+
def paginate_releases: (String repo, Gem::Version? current) -> Array[Hash[String, untyped]]
|
|
215
|
+
def fetch_release_page: (String repo, Integer page) -> [(Net::HTTPResponse | CachedResponse), Array[Hash[String, untyped]]]
|
|
207
216
|
def build_releases_uri: (String repo, Integer page) -> URI::Generic
|
|
208
217
|
def next_page?: ((Net::HTTPResponse | CachedResponse) response) -> bool
|
|
209
218
|
def oldest_before_current?: (Array[Hash[String, untyped]] releases, Gem::Version current) -> bool
|
|
@@ -309,7 +318,9 @@ module GemChangelogDiff
|
|
|
309
318
|
def format_dry_run: (Array[OutdatedGem] gems) -> String
|
|
310
319
|
def configure_timeout: () -> void
|
|
311
320
|
def rails_credentials_token: () -> String?
|
|
312
|
-
def
|
|
321
|
+
def apply_interactive: (Array[OutdatedGem] gems) -> Array[OutdatedGem]
|
|
322
|
+
def output_results: (Array[OutdatedGem] gems) -> Array[gem_report]
|
|
323
|
+
def exit_status: (Array[gem_report] reports) -> Integer
|
|
313
324
|
def resolved_format: () -> String
|
|
314
325
|
def resolved_concurrency: () -> Integer
|
|
315
326
|
def build_single_report: (OutdatedGem gem) -> gem_report
|
|
@@ -325,6 +336,9 @@ module GemChangelogDiff
|
|
|
325
336
|
def ignore_list: () -> Array[String]
|
|
326
337
|
def build_reports: (Array[OutdatedGem] gems) -> Array[gem_report]
|
|
327
338
|
def build_gem_report: (OutdatedGem gem, RubygemsClient rubygems_client, SourceResolver source_resolver) -> gem_report
|
|
339
|
+
def setup_environment: () -> void
|
|
340
|
+
def fetch_gem_releases: (OutdatedGem gem, RubygemsClient rubygems_client, SourceResolver source_resolver) -> gem_report
|
|
341
|
+
def gem_error: (OutdatedGem gem, String message) -> gem_report
|
|
328
342
|
def write_output: (String text) -> void
|
|
329
343
|
def log: (String message) -> void
|
|
330
344
|
def log_warning: (String message) -> void
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gem_changelog_diff
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.9.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chuck Smith
|
|
@@ -93,6 +93,7 @@ files:
|
|
|
93
93
|
- lib/gem_changelog_diff/configuration.rb
|
|
94
94
|
- lib/gem_changelog_diff/detector.rb
|
|
95
95
|
- lib/gem_changelog_diff/errors.rb
|
|
96
|
+
- lib/gem_changelog_diff/exit_code.rb
|
|
96
97
|
- lib/gem_changelog_diff/formatter.rb
|
|
97
98
|
- lib/gem_changelog_diff/formatters/base.rb
|
|
98
99
|
- lib/gem_changelog_diff/formatters/json.rb
|