kettle-dev 2.0.1 → 2.0.3
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 +51 -5
- data/CONTRIBUTING.md +5 -0
- data/README.md +6 -1
- data/lib/kettle/dev/changelog_cli.rb +86 -17
- data/lib/kettle/dev/ci_helpers.rb +26 -13
- data/lib/kettle/dev/ci_monitor.rb +1 -9
- data/lib/kettle/dev/rakelib/yard.rake +3 -0
- data/lib/kettle/dev/release_cli.rb +1 -9
- data/lib/kettle/dev/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +8 -8
- 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: 79a49f87b3b9af1b0aa2cb1b9d8f3b026a923df0ab1164df416a5dc3af72dc42
|
|
4
|
+
data.tar.gz: b989207755b131704aec4e5a76e29c1a2e236efbe9fa7717939111d21c475a74
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ffd633d7aab286c63bbdbb039621fd0512ce4d4d478b9af5bcb37b7c9202bbab8e7cf4ab41fecb5b6306da2ba2d42bf7f20770066131ac19344655ff3f9c7b58
|
|
7
|
+
data.tar.gz: ce2c0ed8704aa2aa0aaa248f0a2269a74ac2fe9e765117cb96e80004a98c20c7420ebddd876d887543895240732c5edf64ad2fc417efdf9cd19bc4ae6390791f
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/CHANGELOG.md
CHANGED
|
@@ -22,6 +22,47 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
22
22
|
|
|
23
23
|
### Changed
|
|
24
24
|
|
|
25
|
+
### Deprecated
|
|
26
|
+
|
|
27
|
+
### Removed
|
|
28
|
+
|
|
29
|
+
### Fixed
|
|
30
|
+
|
|
31
|
+
- The `yard` rake spec now reloads the task file directly and uses Ruby
|
|
32
|
+
2.4-compatible cleanup syntax, fixing order-dependent CI failures across the
|
|
33
|
+
appraisal matrix.
|
|
34
|
+
- The `yard` rake fallback task now remains registered with kettle-dev defaults
|
|
35
|
+
when the optional `yard` gem is unavailable in an appraisal environment.
|
|
36
|
+
- The Rakefile now falls back to a stub `kettle:jem:selftest` task when the
|
|
37
|
+
installed `kettle-jem` package does not expose rake task installation.
|
|
38
|
+
|
|
39
|
+
### Security
|
|
40
|
+
|
|
41
|
+
## [2.0.3] - 2026-05-27
|
|
42
|
+
|
|
43
|
+
- TAG: [v2.0.3][2.0.3t]
|
|
44
|
+
- COVERAGE: 94.62% -- 2956/3124 lines in 24 files
|
|
45
|
+
- BRANCH COVERAGE: 78.21% -- 1206/1542 branches in 24 files
|
|
46
|
+
- 76.40% documented
|
|
47
|
+
|
|
48
|
+
### Fixed
|
|
49
|
+
|
|
50
|
+
- The default rake task now includes documentation generation via `yard`, so
|
|
51
|
+
documentation plugin post-processing runs during `bin/rake`.
|
|
52
|
+
- `kettle-changelog` now updates the current changelog release in place when
|
|
53
|
+
Unreleased has pending entries or the release section is missing generated
|
|
54
|
+
coverage/documentation metadata, even if the version is already the latest
|
|
55
|
+
known release.
|
|
56
|
+
|
|
57
|
+
## [2.0.2] - 2026-05-27
|
|
58
|
+
|
|
59
|
+
- TAG: [v2.0.2][2.0.2t]
|
|
60
|
+
- COVERAGE: 94.71% -- 2937/3101 lines in 23 files
|
|
61
|
+
- BRANCH COVERAGE: 78.23% -- 1200/1534 branches in 23 files
|
|
62
|
+
- 76.40% documented
|
|
63
|
+
|
|
64
|
+
### Changed
|
|
65
|
+
|
|
25
66
|
- **BREAKING**: Raised the minimum Ruby version to 2.4.0, matching
|
|
26
67
|
`kettle-test` 2.x and its runtime `turbo_tests2` dependency.
|
|
27
68
|
- `kettle-test` is now declared as a runtime dependency because the shipped rake
|
|
@@ -29,14 +70,14 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
29
70
|
- Refreshed generated template output for README badge formatting and
|
|
30
71
|
Ruby 2.4-targeted RuboCop LTS style dependencies.
|
|
31
72
|
|
|
32
|
-
### Deprecated
|
|
33
|
-
|
|
34
73
|
### Removed
|
|
35
74
|
|
|
36
75
|
- Removed Ruby 2.3 and JRuby 9.1 CI workflows and appraisal gemfiles.
|
|
37
76
|
|
|
38
77
|
### Fixed
|
|
39
78
|
|
|
79
|
+
- `ci:act` and release CI monitoring now detect GitHub and GitLab repositories
|
|
80
|
+
when remotes use `git+ssh://` or `ssh://` URLs.
|
|
40
81
|
- Appraisal-based CI gemfiles now load the version-appropriate VCR/WebMock
|
|
41
82
|
recording dependencies required by the spec helper without falling back to the
|
|
42
83
|
root Gemfile.
|
|
@@ -49,14 +90,15 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
49
90
|
poisoning the process exit status.
|
|
50
91
|
- Coverage CI thresholds now match the repository `mise.toml` thresholds instead
|
|
51
92
|
of requiring unreachable 100% line and branch coverage.
|
|
93
|
+
- `kettle-changelog` now fails closed when `kettle-test` does not produce the
|
|
94
|
+
expected collated `coverage/coverage.json`, instead of merging worker coverage
|
|
95
|
+
files itself and hiding a coverage integration failure.
|
|
52
96
|
- Regenerated templating now keeps `kettle-test` as a runtime dependency only
|
|
53
97
|
instead of duplicating it as both runtime and development dependency.
|
|
54
98
|
- Replaced non-capturing `=~` checks with `Regexp#match?` so unlocked/style CI
|
|
55
99
|
stays clean with newer RuboCop performance cops.
|
|
56
100
|
- Cleared the remaining `rubocop_gradual` backlog and removed the lock file.
|
|
57
101
|
|
|
58
|
-
### Security
|
|
59
|
-
|
|
60
102
|
## [2.0.1] - 2026-05-25
|
|
61
103
|
|
|
62
104
|
- TAG: [v2.0.1][2.0.1t]
|
|
@@ -1745,7 +1787,11 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
1745
1787
|
- Selecting will run the selected workflow via `act`
|
|
1746
1788
|
- This may move to its own gem in the future.
|
|
1747
1789
|
|
|
1748
|
-
[Unreleased]: https://github.com/kettle-rb/kettle-dev/compare/v2.0.
|
|
1790
|
+
[Unreleased]: https://github.com/kettle-rb/kettle-dev/compare/v2.0.3...HEAD
|
|
1791
|
+
[2.0.3]: https://github.com/kettle-rb/kettle-dev/compare/v2.0.2...v2.0.3
|
|
1792
|
+
[2.0.3t]: https://github.com/kettle-rb/kettle-dev/releases/tag/v2.0.3
|
|
1793
|
+
[2.0.2]: https://github.com/kettle-rb/kettle-dev/compare/v2.0.1...v2.0.2
|
|
1794
|
+
[2.0.2t]: https://github.com/kettle-rb/kettle-dev/releases/tag/v2.0.2
|
|
1749
1795
|
[2.0.1]: https://github.com/kettle-rb/kettle-dev/compare/v2.0.0...v2.0.1
|
|
1750
1796
|
[2.0.1t]: https://github.com/kettle-rb/kettle-dev/releases/tag/v2.0.1
|
|
1751
1797
|
[2.0.0]: https://github.com/kettle-rb/kettle-dev/compare/v1.2.5...v2.0.0
|
data/CONTRIBUTING.md
CHANGED
|
@@ -107,6 +107,11 @@ For a quick starting point, this repository’s `mise.toml` defines the shared d
|
|
|
107
107
|
## Appraisals
|
|
108
108
|
|
|
109
109
|
From time to time the [appraisal2][🚎appraisal2] gemfiles in `gemfiles/` will need to be updated.
|
|
110
|
+
Generated appraisal and CI workflow floors are controlled by `ruby.test_minimum`
|
|
111
|
+
in `.kettle-jem.yml`; this project was templated with `ruby.test_minimum: 2.4`.
|
|
112
|
+
That value describes the lowest Ruby version expected to run the test/development
|
|
113
|
+
toolchain, and it may be higher than the gemspec runtime floor.
|
|
114
|
+
|
|
110
115
|
They are created and updated with the commands:
|
|
111
116
|
|
|
112
117
|
```console
|
data/README.md
CHANGED
|
@@ -228,6 +228,10 @@ tree_haver supports multiple parsing backends, but not all backends work on all
|
|
|
228
228
|
### Compatibility
|
|
229
229
|
|
|
230
230
|
Compatible with MRI Ruby 2.4.0+, and concordant releases of JRuby, and TruffleRuby.
|
|
231
|
+
CI workflows and Appraisals are generated for MRI Ruby 2.4+.
|
|
232
|
+
This test floor is configured by `ruby.test_minimum` in `.kettle-jem.yml` and
|
|
233
|
+
may be higher than the gem's runtime compatibility floor when legacy Rubies are
|
|
234
|
+
not practical for the current toolchain.
|
|
231
235
|
|
|
232
236
|
| 🚚 _Amazing_ test matrix was brought to you by | 🔎 appraisal2 🔎 and the color 💚 green 💚 |
|
|
233
237
|
|------------------------------------------------|--------------------------------------------------------|
|
|
@@ -1006,7 +1010,7 @@ Thanks for RTFM. ☺️
|
|
|
1006
1010
|
[📌gitmoji]: https://gitmoji.dev
|
|
1007
1011
|
[📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
|
|
1008
1012
|
[🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
|
|
1009
|
-
[🧮kloc-img]: https://img.shields.io/badge/KLOC-3.
|
|
1013
|
+
[🧮kloc-img]: https://img.shields.io/badge/KLOC-3.124-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
|
|
1010
1014
|
[🔐security]: https://github.com/kettle-rb/kettle-dev/blob/main/SECURITY.md
|
|
1011
1015
|
[🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
|
|
1012
1016
|
[📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
|
|
@@ -1015,6 +1019,7 @@ Thanks for RTFM. ☺️
|
|
|
1015
1019
|
[📄license-img]: https://img.shields.io/badge/License-AGPL--3.0--only-259D6C.svg
|
|
1016
1020
|
[📄license-compat]: https://www.apache.org/legal/resolved.html#category-x
|
|
1017
1021
|
[📄license-compat-img]: https://img.shields.io/badge/Apache_Incompatible:_Category_X-%E2%9C%97-C0392B.svg?style=flat&logo=Apache
|
|
1022
|
+
|
|
1018
1023
|
[📄ilo-declaration]: https://www.ilo.org/declaration/lang--en/index.htm
|
|
1019
1024
|
[📄ilo-declaration-img]: https://img.shields.io/badge/ILO_Fundamental_Principles-✓-259D6C.svg?style=flat
|
|
1020
1025
|
[🚎yard-current]: http://rubydoc.info/gems/kettle-dev
|
|
@@ -4,6 +4,7 @@ require "open3"
|
|
|
4
4
|
require "json"
|
|
5
5
|
require "net/http"
|
|
6
6
|
require "uri"
|
|
7
|
+
require "fileutils"
|
|
7
8
|
|
|
8
9
|
module Kettle
|
|
9
10
|
module Dev
|
|
@@ -152,7 +153,7 @@ module Kettle
|
|
|
152
153
|
warn("Proceeding without live release info.")
|
|
153
154
|
end
|
|
154
155
|
|
|
155
|
-
|
|
156
|
+
unreleased_block, _before, after = extract_unreleased(changelog)
|
|
156
157
|
latest_changelog_version = detect_previous_version(after.to_s)
|
|
157
158
|
section_exists = release_section_exists?(changelog, version)
|
|
158
159
|
latest_target = latest_release_target(version, latest_overall, latest_for_series)
|
|
@@ -166,7 +167,7 @@ module Kettle
|
|
|
166
167
|
end
|
|
167
168
|
|
|
168
169
|
action = if section_exists && latest_target == version
|
|
169
|
-
:reformat_only
|
|
170
|
+
current_release_needs_update?(changelog, version, unreleased_block) ? :update_prepared_release : :reformat_only
|
|
170
171
|
elsif section_exists
|
|
171
172
|
:update_prepared_release
|
|
172
173
|
elsif latest_target == version
|
|
@@ -503,6 +504,28 @@ module Kettle
|
|
|
503
504
|
out.join
|
|
504
505
|
end
|
|
505
506
|
|
|
507
|
+
def current_release_needs_update?(changelog, version, unreleased_block)
|
|
508
|
+
return true if unreleased_block_has_entries?(unreleased_block)
|
|
509
|
+
|
|
510
|
+
!release_metadata_complete?(release_body_for(changelog, version))
|
|
511
|
+
end
|
|
512
|
+
|
|
513
|
+
def unreleased_block_has_entries?(unreleased_block)
|
|
514
|
+
!filter_unreleased_sections(unreleased_block.to_s).strip.empty?
|
|
515
|
+
end
|
|
516
|
+
|
|
517
|
+
def release_body_for(changelog, version)
|
|
518
|
+
pattern = /^## \[#{Regexp.escape(version)}\][^\n]*\n(?<body>.*?)(?=^## \[|\z)/m
|
|
519
|
+
changelog.match(pattern)&.[](:body).to_s
|
|
520
|
+
end
|
|
521
|
+
|
|
522
|
+
def release_metadata_complete?(release_body)
|
|
523
|
+
stripped_body = release_body.to_s
|
|
524
|
+
stripped_body.match?(/^- COVERAGE: /) &&
|
|
525
|
+
stripped_body.match?(/^- BRANCH COVERAGE: /) &&
|
|
526
|
+
stripped_body.match?(/^- \d+(?:\.\d+)?%\s+documented$/)
|
|
527
|
+
end
|
|
528
|
+
|
|
506
529
|
def coverage_lines
|
|
507
530
|
if @strict
|
|
508
531
|
# Always generate fresh coverage data in strict mode
|
|
@@ -525,14 +548,11 @@ module Kettle
|
|
|
525
548
|
|
|
526
549
|
puts "Coverage generation complete."
|
|
527
550
|
|
|
528
|
-
|
|
529
|
-
unless File.file?(@coverage_path)
|
|
530
|
-
raise "Coverage JSON not found at #{Kettle::Dev.display_path(@coverage_path)} after running bundle exec kettle-test"
|
|
531
|
-
end
|
|
551
|
+
ensure_changelog_coverage_json!
|
|
532
552
|
else
|
|
533
553
|
# Non-strict mode: check if coverage.json exists, warn if not
|
|
534
554
|
unless File.file?(@coverage_path)
|
|
535
|
-
warn(
|
|
555
|
+
warn(coverage_json_missing_message)
|
|
536
556
|
warn("Run: K_SOUP_COV_FORMATTERS=json bundle exec kettle-test to generate it")
|
|
537
557
|
return [nil, nil]
|
|
538
558
|
end
|
|
@@ -597,26 +617,43 @@ module Kettle
|
|
|
597
617
|
}
|
|
598
618
|
end
|
|
599
619
|
|
|
620
|
+
def ensure_changelog_coverage_json!
|
|
621
|
+
return if File.file?(@coverage_path)
|
|
622
|
+
|
|
623
|
+
raise coverage_json_missing_message
|
|
624
|
+
end
|
|
625
|
+
|
|
626
|
+
def coverage_json_missing_message
|
|
627
|
+
[
|
|
628
|
+
"Coverage JSON not found at #{Kettle::Dev.display_path(@coverage_path)} after running bundle exec kettle-test.",
|
|
629
|
+
"kettle-test runs specs in parallel and is expected to collate parallel SimpleCov results into this canonical file.",
|
|
630
|
+
"If it is missing, coverage was not enabled in ENV config or the rake/task hooks did not load the coverage integration.",
|
|
631
|
+
].join(" ")
|
|
632
|
+
end
|
|
633
|
+
|
|
600
634
|
def yard_percent_documented
|
|
601
|
-
|
|
602
|
-
|
|
635
|
+
commands = yard_documentation_commands
|
|
636
|
+
if commands.empty?
|
|
603
637
|
if @strict
|
|
604
|
-
raise "bin/rake not found or not executable; ensure rake
|
|
638
|
+
raise "bin/rake and bin/yard not found or not executable; ensure rake and yard are installed via bundler"
|
|
605
639
|
else
|
|
606
|
-
warn("bin/rake not found or not executable; ensure rake
|
|
640
|
+
warn("bin/rake and bin/yard not found or not executable; ensure rake and yard are installed via bundler")
|
|
607
641
|
return
|
|
608
642
|
end
|
|
609
643
|
end
|
|
610
644
|
|
|
611
645
|
begin
|
|
612
646
|
# Run the canonical docs task to get the documentation percentage.
|
|
613
|
-
out
|
|
614
|
-
|
|
615
|
-
|
|
647
|
+
out = +""
|
|
648
|
+
commands.each do |command|
|
|
649
|
+
prepare_yard_fence_tmp_files if command == [File.join(@root, "bin", "yard")]
|
|
650
|
+
output, _status = Open3.capture2(*command, {chdir: @root})
|
|
651
|
+
out << output
|
|
652
|
+
line = documented_percent_line(output)
|
|
653
|
+
return line if line
|
|
654
|
+
end
|
|
616
655
|
|
|
617
|
-
if
|
|
618
|
-
line.strip
|
|
619
|
-
elsif @strict
|
|
656
|
+
if @strict
|
|
620
657
|
raise "Could not find documented percentage in bin/rake yard output"
|
|
621
658
|
else
|
|
622
659
|
warn("Could not find documented percentage in bin/rake yard output.")
|
|
@@ -632,6 +669,38 @@ module Kettle
|
|
|
632
669
|
end
|
|
633
670
|
end
|
|
634
671
|
|
|
672
|
+
def yard_documentation_commands
|
|
673
|
+
commands = []
|
|
674
|
+
rake = File.join(@root, "bin", "rake")
|
|
675
|
+
commands << [rake, "yard"] if File.executable?(rake)
|
|
676
|
+
yard = File.join(@root, "bin", "yard")
|
|
677
|
+
commands << [yard] if File.executable?(yard)
|
|
678
|
+
commands
|
|
679
|
+
end
|
|
680
|
+
|
|
681
|
+
def prepare_yard_fence_tmp_files
|
|
682
|
+
yardopts = File.join(@root, ".yardopts")
|
|
683
|
+
return unless File.file?(yardopts)
|
|
684
|
+
return unless File.read(yardopts).include?("tmp/yard-fence")
|
|
685
|
+
|
|
686
|
+
require "yard/fence"
|
|
687
|
+
outdir = File.join(@root, "tmp", "yard-fence")
|
|
688
|
+
FileUtils.rm_rf(outdir)
|
|
689
|
+
FileUtils.mkdir_p(outdir)
|
|
690
|
+
Dir.glob(File.join(@root, Yard::Fence::GLOB_PATTERN)).each do |src|
|
|
691
|
+
next unless File.file?(src)
|
|
692
|
+
|
|
693
|
+
content = File.read(src)
|
|
694
|
+
sanitized = Yard::Fence.sanitize_text(content)
|
|
695
|
+
File.write(File.join(outdir, File.basename(src)), sanitized)
|
|
696
|
+
end
|
|
697
|
+
end
|
|
698
|
+
|
|
699
|
+
def documented_percent_line(output)
|
|
700
|
+
line = output.lines.find { |l| /\d+(?:\.\d+)?%\s+documented/.match?(l) }
|
|
701
|
+
line&.strip
|
|
702
|
+
end
|
|
703
|
+
|
|
635
704
|
# Transform legacy release headings that include a tag suffix, e.g.:
|
|
636
705
|
# "## [1.2.3] 2022-08-29 ([tag][1.2.3t])"
|
|
637
706
|
# into a heading followed by a list item:
|
|
@@ -29,19 +29,13 @@ module Kettle
|
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
# Parse the GitHub owner/repo from the configured origin remote.
|
|
32
|
-
# Supports SSH
|
|
33
|
-
# (https://github.com/owner/repo(.git)) forms.
|
|
32
|
+
# Supports SSH and HTTPS remote URL forms.
|
|
34
33
|
# @return [Array(String, String), nil] [owner, repo] or nil when unavailable
|
|
35
34
|
def repo_info
|
|
36
35
|
out, status = Open3.capture2("git", "config", "--get", "remote.origin.url")
|
|
37
36
|
return unless status.success?
|
|
38
37
|
|
|
39
|
-
|
|
40
|
-
if url =~ %r{git@github.com:(.+?)/(.+?)(\.git)?$}
|
|
41
|
-
[Regexp.last_match(1), Regexp.last_match(2).sub(/\.git\z/, "")]
|
|
42
|
-
elsif url =~ %r{https://github.com/(.+?)/(.+?)(\.git)?$}
|
|
43
|
-
[Regexp.last_match(1), Regexp.last_match(2).sub(/\.git\z/, "")]
|
|
44
|
-
end
|
|
38
|
+
parse_hosted_repo(out.strip, "github.com")
|
|
45
39
|
end
|
|
46
40
|
|
|
47
41
|
# Current git branch name, or nil when not in a repository.
|
|
@@ -160,11 +154,7 @@ module Kettle
|
|
|
160
154
|
url = origin_url
|
|
161
155
|
return unless url
|
|
162
156
|
|
|
163
|
-
|
|
164
|
-
[Regexp.last_match(1), Regexp.last_match(2).sub(/\.git\z/, "")]
|
|
165
|
-
elsif url =~ %r{https://gitlab.com/(.+?)/(.+?)(\.git)?$}
|
|
166
|
-
[Regexp.last_match(1), Regexp.last_match(2).sub(/\.git\z/, "")]
|
|
167
|
-
end
|
|
157
|
+
parse_hosted_repo(url, "gitlab.com")
|
|
168
158
|
end
|
|
169
159
|
|
|
170
160
|
# Default GitLab token from environment
|
|
@@ -243,6 +233,29 @@ module Kettle
|
|
|
243
233
|
def gitlab_failed?(pipeline)
|
|
244
234
|
pipeline && pipeline["status"] == "failed"
|
|
245
235
|
end
|
|
236
|
+
|
|
237
|
+
# Parse owner/repo from common hosted Git remote URL shapes.
|
|
238
|
+
# @param url [String, nil]
|
|
239
|
+
# @param host [String]
|
|
240
|
+
# @return [Array(String, String), nil]
|
|
241
|
+
def parse_hosted_repo(url, host)
|
|
242
|
+
return unless url
|
|
243
|
+
|
|
244
|
+
if url =~ %r{\Agit@#{Regexp.escape(host)}:(.+?)/(.+?)(?:\.git)?\z}
|
|
245
|
+
return [Regexp.last_match(1), Regexp.last_match(2).sub(/\.git\z/, "")]
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
uri = URI.parse(url)
|
|
249
|
+
return unless uri.host == host
|
|
250
|
+
|
|
251
|
+
path = uri.path.to_s.sub(%r{\A/}, "")
|
|
252
|
+
owner, repo = path.split("/", 2)
|
|
253
|
+
return unless owner && repo && !owner.empty? && !repo.empty?
|
|
254
|
+
|
|
255
|
+
[owner, repo.sub(/\.git\z/, "")]
|
|
256
|
+
rescue URI::InvalidURIError
|
|
257
|
+
nil
|
|
258
|
+
end
|
|
246
259
|
end
|
|
247
260
|
end
|
|
248
261
|
end
|
|
@@ -410,15 +410,7 @@ module Kettle
|
|
|
410
410
|
module_function :preferred_github_remote
|
|
411
411
|
|
|
412
412
|
def parse_github_owner_repo(url)
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
if url =~ %r{git@github.com:(.+?)/(.+?)(\.git)?$}
|
|
416
|
-
[Regexp.last_match(1), Regexp.last_match(2).sub(/\.git\z/, "")]
|
|
417
|
-
elsif url =~ %r{https://github.com/(.+?)/(.+?)(\.git)?$}
|
|
418
|
-
[Regexp.last_match(1), Regexp.last_match(2).sub(/\.git\z/, "")]
|
|
419
|
-
else
|
|
420
|
-
[nil, nil]
|
|
421
|
-
end
|
|
413
|
+
Kettle::Dev::CIHelpers.parse_hosted_repo(url, "github.com") || [nil, nil]
|
|
422
414
|
end
|
|
423
415
|
module_function :parse_github_owner_repo
|
|
424
416
|
end
|
|
@@ -24,10 +24,13 @@ begin
|
|
|
24
24
|
rescue LoadError
|
|
25
25
|
# yard-timekeeper not available - that's fine
|
|
26
26
|
end
|
|
27
|
+
|
|
28
|
+
Kettle::Dev.register_default("yard")
|
|
27
29
|
rescue LoadError
|
|
28
30
|
warn("[kettle-dev][yard.rake] failed to load yard") if Kettle::Dev::DEBUGGING
|
|
29
31
|
desc("(stub) yard is unavailable")
|
|
30
32
|
task(:yard) do
|
|
31
33
|
warn("NOTE: yard isn't installed, or is disabled for #{RUBY_VERSION} in the current environment")
|
|
32
34
|
end
|
|
35
|
+
Kettle::Dev.register_default("yard")
|
|
33
36
|
end
|
|
@@ -791,15 +791,7 @@ module Kettle
|
|
|
791
791
|
end
|
|
792
792
|
|
|
793
793
|
def parse_github_owner_repo(url)
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
if url =~ %r{git@github.com:(.+?)/(.+?)(\.git)?$}
|
|
797
|
-
[Regexp.last_match(1), Regexp.last_match(2).sub(/\.git\z/, "")]
|
|
798
|
-
elsif url =~ %r{https://github.com/(.+?)/(.+?)(\.git)?$}
|
|
799
|
-
[Regexp.last_match(1), Regexp.last_match(2).sub(/\.git\z/, "")]
|
|
800
|
-
else
|
|
801
|
-
[nil, nil]
|
|
802
|
-
end
|
|
794
|
+
Kettle::Dev::CIHelpers.parse_hosted_repo(url, "github.com") || [nil, nil]
|
|
803
795
|
end
|
|
804
796
|
|
|
805
797
|
def has_remote?(name)
|
data/lib/kettle/dev/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: kettle-dev
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Peter H. Boling
|
|
@@ -185,20 +185,20 @@ dependencies:
|
|
|
185
185
|
requirements:
|
|
186
186
|
- - "~>"
|
|
187
187
|
- !ruby/object:Gem::Version
|
|
188
|
-
version: '
|
|
188
|
+
version: '2.0'
|
|
189
189
|
- - ">="
|
|
190
190
|
- !ruby/object:Gem::Version
|
|
191
|
-
version:
|
|
191
|
+
version: 2.0.0
|
|
192
192
|
type: :development
|
|
193
193
|
prerelease: false
|
|
194
194
|
version_requirements: !ruby/object:Gem::Requirement
|
|
195
195
|
requirements:
|
|
196
196
|
- - "~>"
|
|
197
197
|
- !ruby/object:Gem::Version
|
|
198
|
-
version: '
|
|
198
|
+
version: '2.0'
|
|
199
199
|
- - ">="
|
|
200
200
|
- !ruby/object:Gem::Version
|
|
201
|
-
version:
|
|
201
|
+
version: 2.0.0
|
|
202
202
|
description: "\U0001F372 Kettle::Dev is a meta tool from kettle-rb to streamline development
|
|
203
203
|
and testing. Acts as a shim dependency, pulling in many other dependencies, to give
|
|
204
204
|
you OOTB productivity with a RubyGem, or Ruby app project. Configures a complete
|
|
@@ -312,10 +312,10 @@ licenses:
|
|
|
312
312
|
- AGPL-3.0-only
|
|
313
313
|
metadata:
|
|
314
314
|
homepage_uri: https://kettle-dev.galtzo.com
|
|
315
|
-
source_code_uri: https://github.com/kettle-rb/kettle-dev/tree/v2.0.
|
|
316
|
-
changelog_uri: https://github.com/kettle-rb/kettle-dev/blob/v2.0.
|
|
315
|
+
source_code_uri: https://github.com/kettle-rb/kettle-dev/tree/v2.0.3
|
|
316
|
+
changelog_uri: https://github.com/kettle-rb/kettle-dev/blob/v2.0.3/CHANGELOG.md
|
|
317
317
|
bug_tracker_uri: https://github.com/kettle-rb/kettle-dev/issues
|
|
318
|
-
documentation_uri: https://www.rubydoc.info/gems/kettle-dev/2.0.
|
|
318
|
+
documentation_uri: https://www.rubydoc.info/gems/kettle-dev/2.0.3
|
|
319
319
|
funding_uri: https://github.com/sponsors/pboling
|
|
320
320
|
wiki_uri: https://github.com/kettle-rb/kettle-dev/wiki
|
|
321
321
|
news_uri: https://www.railsbling.com/tags/kettle-dev
|
metadata.gz.sig
CHANGED
|
Binary file
|