openclacky 0.9.1 → 0.9.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 +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/clacky/server/http_server.rb +31 -3
- data/lib/clacky/ui2/layout_manager.rb +9 -2
- data/lib/clacky/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 634937d9d7a20aa0a76b046ba079ef2d82c398ac81d59014968f7dbeb325726c
|
|
4
|
+
data.tar.gz: 7cd5c7eab980c54b5da38b6744dbc21dd3ac48af00c541a609d5537d6867ee70
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b874781caf58c502536666c33b8aff0c459076689909dd36bd82151f7092953d453d51b2e90259bbfdb6b2eb0ba389e5e56c083a1364118ca0a15edbef471e02
|
|
7
|
+
data.tar.gz: 1639031ccf11848ab3b8c2a18d3eb7d87c487dc1e13b856e4c0cdc8cb35e3ebf4c8001660ea607f013e64a40fa1ef09255915652af9d0bc44ad8ddf9c0b1dff2
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.9.2] - 2026-03-15
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- **Version upgrade button now appears reliably**: the new version check now queries RubyGems directly instead of relying on local gem mirror sources (which often lag behind by hours or days), so the upgrade badge shows up promptly when a new version is available. Falls back to the local mirror if RubyGems is unreachable.
|
|
14
|
+
- **Edit confirmation diff output restored**: the file diff was not displaying correctly when the input area paused during an edit confirmation prompt; this is now fixed.
|
|
15
|
+
|
|
10
16
|
## [0.9.1] - 2026-03-15
|
|
11
17
|
|
|
12
18
|
### Added
|
|
@@ -687,10 +687,38 @@ module Clacky
|
|
|
687
687
|
latest
|
|
688
688
|
end
|
|
689
689
|
|
|
690
|
-
# Query the latest openclacky version
|
|
691
|
-
#
|
|
692
|
-
#
|
|
690
|
+
# Query the latest openclacky version.
|
|
691
|
+
# Strategy: try RubyGems official REST API first (most accurate, not affected by mirror lag),
|
|
692
|
+
# then fall back to `gem list -r` (respects user's configured gem source).
|
|
693
693
|
private def fetch_latest_version_from_gem
|
|
694
|
+
fetch_latest_version_from_rubygems_api || fetch_latest_version_from_gem_command
|
|
695
|
+
end
|
|
696
|
+
|
|
697
|
+
# Try RubyGems official REST API — fast and always up-to-date.
|
|
698
|
+
# Returns nil if the request fails or times out.
|
|
699
|
+
private def fetch_latest_version_from_rubygems_api
|
|
700
|
+
require "net/http"
|
|
701
|
+
require "json"
|
|
702
|
+
|
|
703
|
+
uri = URI("https://rubygems.org/api/v1/gems/openclacky.json")
|
|
704
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
|
705
|
+
http.use_ssl = true
|
|
706
|
+
http.open_timeout = 5
|
|
707
|
+
http.read_timeout = 8
|
|
708
|
+
|
|
709
|
+
res = http.get(uri.request_uri)
|
|
710
|
+
return nil unless res.is_a?(Net::HTTPSuccess)
|
|
711
|
+
|
|
712
|
+
data = JSON.parse(res.body)
|
|
713
|
+
data["version"].to_s.strip.then { |v| v.empty? ? nil : v }
|
|
714
|
+
rescue StandardError
|
|
715
|
+
nil
|
|
716
|
+
end
|
|
717
|
+
|
|
718
|
+
# Fall back to `gem list -r openclacky` via login shell.
|
|
719
|
+
# Respects the user's configured gem source (rbenv/mise mirrors, etc.).
|
|
720
|
+
# Output format: "openclacky (0.9.0)"
|
|
721
|
+
private def fetch_latest_version_from_gem_command
|
|
694
722
|
shell = Clacky::Tools::Shell.new
|
|
695
723
|
result = shell.execute(command: "gem list -r openclacky", soft_timeout: 15, hard_timeout: 30)
|
|
696
724
|
return nil unless result[:exit_code] == 0
|
|
@@ -59,8 +59,15 @@ module Clacky
|
|
|
59
59
|
screen.clear_line
|
|
60
60
|
end
|
|
61
61
|
|
|
62
|
-
#
|
|
63
|
-
|
|
62
|
+
# When input is paused (InlineInput active), fixed_area_start_row has grown
|
|
63
|
+
# (input_area.required_height returns 0 while paused), so the cleared rows
|
|
64
|
+
# now belong to the output area. Re-render output from buffer to fill them in.
|
|
65
|
+
if input_area.paused?
|
|
66
|
+
render_output_from_buffer
|
|
67
|
+
else
|
|
68
|
+
# Re-render fixed areas at new position
|
|
69
|
+
render_fixed_areas
|
|
70
|
+
end
|
|
64
71
|
screen.flush
|
|
65
72
|
end
|
|
66
73
|
end
|
data/lib/clacky/version.rb
CHANGED