rage-rb 1.21.0 → 1.21.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7120d5b1b4f9ae8307d199389fe7efbffff3a950d3d312b80c954a00b0c0572e
4
- data.tar.gz: d3ce27d3cfa545ac38e7b3a7091c24bdd394ab954860da1418a97a16c65ef482
3
+ metadata.gz: faa71c4b50bb54ce6163c04fc5e734e812b60eb9dd1dc3a392c6e64fdfc735d0
4
+ data.tar.gz: 71a92667a83e26ccdb0c75c500880eb472a021ede32e39beddb00db32553d36b
5
5
  SHA512:
6
- metadata.gz: aeb7938480349b63ddf30525b7bf89b6c214cf12e1b859311f6c8c7976f4c20866897fbb8cbaefa271fcf65234905b97d0428a1b6f85fb307b91f415abc7538c
7
- data.tar.gz: 78b9c08dc3769fcec16ec011699d06246e7177d0459e0e4a39a592e5f62386b5142da133337a53eccb2f1c9175a3986a064e0bc16395708901de2c61080acede
6
+ metadata.gz: cb86c7badba46ddf489838c768f0409fc8e3cbcc880b2c315f1fe58b4a85191d77a3f94421973ce26a5c7050e08f9864dbea63c7aa70e36176a2a6a5c8825233
7
+ data.tar.gz: 38f2e8c93f7306b802ae36439687fa98b85e6a8e8f06a6f505fb62d748ca6b71620181e51ccb7aec298ef0f927799d60770219a197f47fce731b96605f21f5d2
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [1.21.1] - 2026-02-27
4
+
5
+ - Improve styling for the `skills` CLI (#223).
6
+
3
7
  ## [1.21.0] - 2026-02-25
4
8
 
5
9
  ### Added
@@ -14,8 +14,8 @@ class CLISkills < Thor
14
14
  say "Downloading skills..."
15
15
  install_skills(installation_path, skills_version)
16
16
 
17
- say "\nInstalled Rage skills #{skills_version} to #{set_color(installation_path, :bold)}."
18
- say "Skills are now available to your coding agent."
17
+ say "#{set_color("✓", :green)} Installed Rage skills #{set_color(skills_version, :bold)} to #{set_color(installation_path, :cyan)}."
18
+ say "#{set_color("✓", :green)} Skills are now available to your coding agent."
19
19
  rescue => e
20
20
  say_error(e)
21
21
  end
@@ -40,17 +40,17 @@ class CLISkills < Thor
40
40
  current_version = File.exist?(version_file) ? File.read(version_file).strip : nil
41
41
 
42
42
  if current_version == skills_version
43
- log "#{destination}: already up to date."
43
+ log "#{set_color(destination, :cyan)}: already up to date."
44
44
  next
45
45
  end
46
46
 
47
- log "Updating #{destination}..."
47
+ log "Updating #{set_color(destination, :cyan)}..."
48
48
  install_skills(destination, skills_version)
49
49
  updated_paths << destination
50
50
  end
51
51
 
52
52
  if updated_paths.any?
53
- log "\nUpdated #{updated_paths.size} installation#{"s" if updated_paths.size > 1} to #{skills_version}."
53
+ log "#{set_color("✓", :green)} Updated #{updated_paths.size} installation#{"s" if updated_paths.size > 1} to #{set_color(skills_version, :bold)}."
54
54
  end
55
55
 
56
56
  json_output(
@@ -87,7 +87,7 @@ class CLISkills < Thor
87
87
  end
88
88
 
89
89
  def say_error(error)
90
- say "#{set_color("Error:", :red, :bold)} #{error.message}"
90
+ say "#{set_color("𐄂 Error:", :red, :bold)} #{error.message}"
91
91
  debug { "#{error.class}: #{error.message}\n#{error.backtrace.join("\n")}" }
92
92
  end
93
93
 
@@ -104,8 +104,16 @@ class CLISkills < Thor
104
104
  ["9", "Other", ".claude/skills"]
105
105
  ]
106
106
 
107
- print_table([["Option", "Coding Agent", "Installation Path"]] + agent_options)
108
- agent_choice = ask("Select your coding agent (1-#{agent_options[-1][0]}):", default: "1")
107
+ display_options = ([["Option", "Coding Agent", "Installation Path"]] + agent_options).map.with_index do |(option, agent, path), index|
108
+ if index == 0
109
+ [set_color(option, :bold), set_color(agent, :bold), set_color(path, :bold)]
110
+ else
111
+ [set_color(option, :bold), agent, set_color(path, :cyan)]
112
+ end
113
+ end
114
+
115
+ print_ansi_table(display_options)
116
+ agent_choice = ask(set_color("Select your coding agent (1-#{agent_options[-1][0]}):", :bold), default: "1")
109
117
 
110
118
  installation_path = ".claude/skills"
111
119
 
@@ -116,10 +124,10 @@ class CLISkills < Thor
116
124
  end
117
125
  end
118
126
 
119
- say "\nSource: #{set_color("https://github.com/rage-rb/skills", :bold)}"
120
- say "Destination: #{set_color(installation_path, :bold)}"
127
+ say "\n#{set_color("Source:", :bold)} #{set_color("https://github.com/rage-rb/skills", :cyan)}"
128
+ say "#{set_color("Destination:", :bold)} #{set_color(installation_path, :cyan)}"
121
129
 
122
- answer = ask("Proceed with installation? [Y/n]", default: "y")
130
+ answer = ask(set_color("? ", :green, :bold) + set_color("Proceed with installation? [Y/n]", :bold), default: "y")
123
131
  unless answer.downcase.start_with?("y")
124
132
  say "Installation cancelled."
125
133
  return nil
@@ -229,10 +237,15 @@ class CLISkills < Thor
229
237
 
230
238
  parsed_uri = URI(uri)
231
239
  http = Net::HTTP.new(parsed_uri.host, parsed_uri.port)
232
- http.use_ssl = parsed_uri.scheme == "https"
233
240
  http.open_timeout = 5
234
241
  http.read_timeout = 5
235
242
 
243
+ if parsed_uri.scheme == "https"
244
+ http.use_ssl = true
245
+ http.verify_mode = OpenSSL::SSL::VERIFY_PEER
246
+ http.cert_store = OpenSSL::X509::Store.new.tap(&:set_default_paths)
247
+ end
248
+
236
249
  response = http.request(Net::HTTP::Get.new(parsed_uri))
237
250
 
238
251
  case response
@@ -243,5 +256,36 @@ class CLISkills < Thor
243
256
  request(response["Location"], limit - 1)
244
257
  end
245
258
  end
259
+
260
+ # print a table stripping ANSI codes to ensure paddings are based on visible length
261
+ def print_ansi_table(rows)
262
+ return if rows.empty?
263
+
264
+ widths = rows.each_with_object([]) do |row, maxima|
265
+ row.each_with_index do |column, index|
266
+ visible_width = strip_ansi(column.to_s).size
267
+ maxima[index] = [maxima[index] || 0, visible_width].max
268
+ end
269
+ end
270
+
271
+ border = "+" + widths.map { |width| "-" * (width + 2) }.join("+") + "+"
272
+ say(border)
273
+
274
+ rows.each do |row|
275
+ formatted_cells = widths.each_index.map do |index|
276
+ cell = row[index].to_s
277
+ cell_padding = widths[index] - strip_ansi(cell).size
278
+ " #{cell}#{" " * cell_padding} "
279
+ end
280
+
281
+ say("|#{formatted_cells.join("|")}|")
282
+ end
283
+
284
+ say(border)
285
+ end
286
+
287
+ def strip_ansi(text)
288
+ text.gsub(/\e\[[0-9;]*m/, "")
289
+ end
246
290
  end
247
291
  end
data/lib/rage/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Rage
4
- VERSION = "1.21.0"
4
+ VERSION = "1.21.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rage-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.21.0
4
+ version: 1.21.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roman Samoilov