ast-merge 2.0.2 → 2.0.4
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
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +38 -1
- data/README.md +1 -1
- data/lib/ast/merge/debug_logger.rb +5 -6
- data/lib/ast/merge/rspec/shared_examples/debug_logger.rb +9 -3
- data/lib/ast/merge/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +4 -4
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2472ef456d1aa146dc31692f6b3c30aa02d9d2276d3b1be1a170056fe764d58c
|
|
4
|
+
data.tar.gz: 914a71d9f70a4edf27d91525c4c23166e715ac75009f0ee191eccfd1099d905a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 31a80cd7655eb4d6717009b201f5765e8ef699e58d9199355d84e09143df052f201ab906043f62d2606ea227c9ba6703a3bef3c129e2a045402b1aceabe21f56
|
|
7
|
+
data.tar.gz: f2245d51fc9d0209159886d1b8f1917b2d86a185dff2ddd07ba3835f0a4bf2085ca773c3dc4e8396fa9e796139e1c0a37c8ba593cabe78ee76d41b221daa669b
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/CHANGELOG.md
CHANGED
|
@@ -30,6 +30,39 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
30
30
|
|
|
31
31
|
### Security
|
|
32
32
|
|
|
33
|
+
## [2.0.4] - 2025-12-31
|
|
34
|
+
|
|
35
|
+
- TAG: [v2.0.4][2.0.4t]
|
|
36
|
+
- COVERAGE: 88.61% -- 2903/3276 lines in 53 files
|
|
37
|
+
- BRANCH COVERAGE: 67.90% -- 700/1031 branches in 53 files
|
|
38
|
+
- 98.82% documented
|
|
39
|
+
|
|
40
|
+
### Added
|
|
41
|
+
|
|
42
|
+
- Many more tests
|
|
43
|
+
|
|
44
|
+
### Fixed
|
|
45
|
+
|
|
46
|
+
- RSpec shared examples for `Ast::Merge::DebugLogger` now handle Ruby 4.0+ where benchmark is a bundled gem
|
|
47
|
+
- The `#time logs start and completion with timing` test now checks `BENCHMARK_AVAILABLE` constant
|
|
48
|
+
- When benchmark is available: expects full timing output with "Starting:", "Completed:", and `real_ms`
|
|
49
|
+
- When benchmark is unavailable: expects warning message about benchmark gem not being available
|
|
50
|
+
- Fixes CI failures on Ruby 4.0.0 for downstream gems (e.g., bash-merge) using the shared examples
|
|
51
|
+
|
|
52
|
+
## [2.0.3] - 2025-12-30
|
|
53
|
+
|
|
54
|
+
- TAG: [v2.0.3][2.0.3t]
|
|
55
|
+
- COVERAGE: 88.45% -- 2894/3272 lines in 53 files
|
|
56
|
+
- BRANCH COVERAGE: 67.83% -- 698/1029 branches in 53 files
|
|
57
|
+
- 98.82% documented
|
|
58
|
+
|
|
59
|
+
### Fixed
|
|
60
|
+
|
|
61
|
+
- `Ast::Merge::DebugLogger::BENCHMARK_AVAILABLE` now correctly detects when benchmark gem is unavailable
|
|
62
|
+
- Previous implementation used `autoload` which never raises `LoadError` (it only registers for lazy loading)
|
|
63
|
+
- Now uses `require "benchmark"` which properly catches `LoadError` on Ruby 4.0+ where benchmark is a bundled gem
|
|
64
|
+
- The `#time` method now correctly falls back to non-timed execution when benchmark is unavailable
|
|
65
|
+
|
|
33
66
|
## [2.0.2] - 2025-12-30
|
|
34
67
|
|
|
35
68
|
- TAG: [v2.0.2][2.0.2t]
|
|
@@ -284,7 +317,11 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
284
317
|
|
|
285
318
|
- Initial release
|
|
286
319
|
|
|
287
|
-
[Unreleased]: https://github.com/kettle-rb/ast-merge/compare/v2.0.
|
|
320
|
+
[Unreleased]: https://github.com/kettle-rb/ast-merge/compare/v2.0.4...HEAD
|
|
321
|
+
[2.0.4]: https://github.com/kettle-rb/ast-merge/compare/v2.0.3...v2.0.4
|
|
322
|
+
[2.0.4t]: https://github.com/kettle-rb/ast-merge/releases/tag/v2.0.4
|
|
323
|
+
[2.0.3]: https://github.com/kettle-rb/ast-merge/compare/v2.0.2...v2.0.3
|
|
324
|
+
[2.0.3t]: https://github.com/kettle-rb/ast-merge/releases/tag/v2.0.3
|
|
288
325
|
[2.0.2]: https://github.com/kettle-rb/ast-merge/compare/v2.0.1...v2.0.2
|
|
289
326
|
[2.0.2t]: https://github.com/kettle-rb/ast-merge/releases/tag/v2.0.2
|
|
290
327
|
[2.0.1]: https://github.com/kettle-rb/ast-merge/compare/v2.0.0...v2.0.1
|
data/README.md
CHANGED
|
@@ -1032,7 +1032,7 @@ Thanks for RTFM. ☺️
|
|
|
1032
1032
|
[📌gitmoji]: https://gitmoji.dev
|
|
1033
1033
|
[📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
|
|
1034
1034
|
[🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
|
|
1035
|
-
[🧮kloc-img]: https://img.shields.io/badge/KLOC-3.
|
|
1035
|
+
[🧮kloc-img]: https://img.shields.io/badge/KLOC-3.276-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
|
|
1036
1036
|
[🔐security]: SECURITY.md
|
|
1037
1037
|
[🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
|
|
1038
1038
|
[📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
|
|
@@ -70,16 +70,15 @@ module Ast
|
|
|
70
70
|
#
|
|
71
71
|
# @note Shared examples require +silent_stream+ and +rspec-stubbed_env+ gems.
|
|
72
72
|
module DebugLogger
|
|
73
|
-
# Benchmark is optional - gracefully degrade if not available
|
|
74
|
-
#
|
|
73
|
+
# Benchmark is optional - gracefully degrade if not available.
|
|
74
|
+
# As of Ruby 4.0, benchmark is a bundled gem (not default), so it may not be available.
|
|
75
|
+
# We attempt to require it at load time and set a flag for later use.
|
|
75
76
|
BENCHMARK_AVAILABLE = begin
|
|
76
|
-
|
|
77
|
+
require "benchmark"
|
|
77
78
|
true
|
|
78
79
|
rescue LoadError
|
|
79
|
-
#
|
|
80
|
-
# Platform-specific: benchmark is part of Ruby stdlib, LoadError only on unusual Ruby builds
|
|
80
|
+
# benchmark gem not available (Ruby 4.0+ without explicit dependency, or unusual Ruby builds)
|
|
81
81
|
false
|
|
82
|
-
# :nocov:
|
|
83
82
|
end
|
|
84
83
|
|
|
85
84
|
class << self
|
|
@@ -108,9 +108,15 @@ RSpec.shared_examples("Ast::Merge::DebugLogger") do
|
|
|
108
108
|
|
|
109
109
|
it "#time logs start and completion with timing" do
|
|
110
110
|
output = capture(:stderr) { described_logger.time("test operation") { 42 } }
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
111
|
+
if Ast::Merge::DebugLogger::BENCHMARK_AVAILABLE
|
|
112
|
+
expect(output).to(include("Starting: test operation"))
|
|
113
|
+
expect(output).to(include("Completed: test operation"))
|
|
114
|
+
expect(output).to(match(/real_ms/))
|
|
115
|
+
else
|
|
116
|
+
expect(output).to(include("WARNING"))
|
|
117
|
+
expect(output).to(include("Benchmark gem not available"))
|
|
118
|
+
expect(output).to(include("test operation"))
|
|
119
|
+
end
|
|
114
120
|
end
|
|
115
121
|
|
|
116
122
|
it "#time returns the block result" do
|
data/lib/ast/merge/version.rb
CHANGED
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ast-merge
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Peter H. Boling
|
|
@@ -352,10 +352,10 @@ licenses:
|
|
|
352
352
|
- MIT
|
|
353
353
|
metadata:
|
|
354
354
|
homepage_uri: https://ast-merge.galtzo.com/
|
|
355
|
-
source_code_uri: https://github.com/kettle-rb/ast-merge/tree/v2.0.
|
|
356
|
-
changelog_uri: https://github.com/kettle-rb/ast-merge/blob/v2.0.
|
|
355
|
+
source_code_uri: https://github.com/kettle-rb/ast-merge/tree/v2.0.4
|
|
356
|
+
changelog_uri: https://github.com/kettle-rb/ast-merge/blob/v2.0.4/CHANGELOG.md
|
|
357
357
|
bug_tracker_uri: https://github.com/kettle-rb/ast-merge/issues
|
|
358
|
-
documentation_uri: https://www.rubydoc.info/gems/ast-merge/2.0.
|
|
358
|
+
documentation_uri: https://www.rubydoc.info/gems/ast-merge/2.0.4
|
|
359
359
|
funding_uri: https://github.com/sponsors/pboling
|
|
360
360
|
wiki_uri: https://github.com/kettle-rb/ast-merge/wiki
|
|
361
361
|
news_uri: https://www.railsbling.com/tags/ast-merge
|
metadata.gz.sig
CHANGED
|
Binary file
|