caruso 0.7.3 → 0.7.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a982ce1bffa391e5afde0a31d44b09d8682bb4e77435cd606592c8b811365bd0
4
- data.tar.gz: 29c157f5ad0dae28757e91fe401f118326d59dfc6c74a04ecfc137fa9e73ac23
3
+ metadata.gz: f8b934cb6295f95d2246260f6eb77a4b31c999bb35e73a379457fa9c9d27d7d2
4
+ data.tar.gz: 9da817fab3ff58b8a363c631ad945d206f3d4ed3f9fc65efd8f0225b3d731a6b
5
5
  SHA512:
6
- metadata.gz: 99d2a0ffa635b47cdfb0bfeb21ec4a9f49c383ba4aa66482b45a1234fc3adec7ea436aaf2b1bc914323fd9fe06673a0f7e1dc22e209f4c4446eec4bc6d04dd4e
7
- data.tar.gz: a71281ef5308c0df2989247d5d7cc89b2513475613a1755d845c69d78dad6d3fe768632ba52d2cae7c39903cb93eb0073af38b05ca530ab74b081646f34181bd
6
+ metadata.gz: 4d135ab13fc7b995cfb1fa029900902d458f1ec84d8eb7d7a1e2a54daeecf757cbfceee0a8491b8e9aeb427e7f18c01800dd227652859ea01f40fd472a55ca67
7
+ data.tar.gz: 94aeb96c6fb123a76d0056785ce12489fc5d4d2d176491e5da2d35c93f3d74e4c2d53509c7932958d687abd22510e95ef30ba3fffe2cfc141389434143166332
data/AGENTS.md CHANGED
@@ -185,7 +185,7 @@ Thor-based CLI with nested commands:
185
185
  - Plugin install format: `plugin@marketplace` or just `plugin` (if only one marketplace configured)
186
186
  - Update commands refresh marketplace cache (git pull) before fetching latest plugin files
187
187
  - Marketplace add eagerly clones repos unless `CARUSO_TESTING_SKIP_CLONE` env var is set (used in tests)
188
- - **Marketplace names always come from marketplace.json `name` field (required)** - no custom names allowed
188
+ - **Marketplace names for GitHub sources are derived as `owner-repo`** (matching Claude Code behavior). For non-GitHub sources, names come from marketplace.json `name` field (required). No custom names allowed.
189
189
  - Errors use descriptive messages with suggestions (e.g., "use 'caruso marketplace add <url>'")
190
190
 
191
191
  ### Data Flow Example
@@ -94,6 +94,7 @@ module Caruso
94
94
 
95
95
  # Register the marketplace in the registry after name is known.
96
96
  # Must be called after extract_marketplace_name or when marketplace_name is set.
97
+ # For GitHub sources, name is derived from URL (owner-repo); for others, from marketplace.json.
97
98
  def register_marketplace(name)
98
99
  return unless @clone_url # Only register if we cloned something
99
100
 
@@ -102,14 +103,18 @@ module Caruso
102
103
  end
103
104
 
104
105
  def extract_marketplace_name
105
- marketplace_data = load_marketplace
106
- name = marketplace_data["name"]
106
+ if github_repo?
107
+ extract_github_marketplace_name
108
+ else
109
+ marketplace_data = load_marketplace
110
+ name = marketplace_data["name"]
107
111
 
108
- unless name
109
- raise Caruso::Error, "Invalid marketplace: marketplace.json missing required 'name' field"
110
- end
112
+ unless name
113
+ raise Caruso::Error, "Invalid marketplace: marketplace.json missing required 'name' field"
114
+ end
111
115
 
112
- name
116
+ name
117
+ end
113
118
  end
114
119
 
115
120
  private
@@ -400,5 +405,18 @@ module Caruso
400
405
  def extract_name_from_url(url)
401
406
  url.split("/").last.sub(".git", "")
402
407
  end
408
+
409
+ # Derive marketplace name from GitHub URL as owner-repo (matching Claude Code behavior).
410
+ def extract_github_marketplace_name
411
+ uri = @marketplace_uri.sub(/\.git\z/, "")
412
+
413
+ if uri.match?(%r{\Ahttps://github\.com/})
414
+ parts = URI.parse(uri).path.split("/").reject(&:empty?)
415
+ "#{parts[0]}-#{parts[1]}"
416
+ else
417
+ # owner/repo shorthand
418
+ uri.tr("/", "-")
419
+ end
420
+ end
403
421
  end
404
422
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Caruso
4
- VERSION = "0.7.3"
4
+ VERSION = "0.7.4"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caruso
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.3
4
+ version: 0.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Philipp Comans