gem-clone 0.2.0 → 0.3.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: cf92769fcccbfc24afb0301081e3c935d02b47d1136b4afebd9ffc8c61f4564c
4
- data.tar.gz: db3c451de56900a6629346e40168bbb7914c1c45005215012646a5e3842b3011
3
+ metadata.gz: 65f01c6935db365ac746c5c4e6a3bc5b927664f221601f003080d26d2a1fa476
4
+ data.tar.gz: 67ceb76ea713a3e3adeb1035da5effbe7173c6780dd6fe5d2f3893ed5128fceb
5
5
  SHA512:
6
- metadata.gz: 9bc582e2011a9396d1c47c5cad7da4705b068b650bf482c017104e19c412eb5953e98f8e84e2db110ec0aa3a9c0dc0b50af220deb718a5b733c4d80d338a05d5
7
- data.tar.gz: 60186bc4c5e5420bfe8cf585c7edf2ce43aa1692c63c7deafbda4aac6224181918a99d6f2c35e6b2f4e74db89fcb467cfa1ea302aa074ef8c11412699658f194
6
+ metadata.gz: 3740f3e3e5756c62307e6b62718f9c55981ecfc65c32e9db1aac5faa563643251ff5d4ab0c3f9ddaa8ba5d3ff603edf6e9c6be3303558583e310bc1d7e5e8f25
7
+ data.tar.gz: b57afb1728d4b3d08bfee562d7bea047e5f7055c246c2c3e18c8403d9e9ba84f640d803a3b2d9f172f067e18d8f06234387a4b97448e4fc8ac4c6e181ce5976d
data/README.md CHANGED
@@ -35,6 +35,9 @@ gem clone sinatra
35
35
 
36
36
  # Clone with verbose output
37
37
  gem clone rails --verbose
38
+
39
+ # Show repository URL without cloning
40
+ gem clone rails --show-url
38
41
  ```
39
42
 
40
43
  The command will:
@@ -44,7 +47,12 @@ The command will:
44
47
  - `source_code_uri` metadata
45
48
  - `homepage_uri` (if it looks like a repository URL)
46
49
  - `project_uri` (if it looks like a repository URL)
47
- 3. Use `ghq get` to clone the repository
50
+ 3. Use `ghq get` to clone the repository (unless `--show-url` is specified)
51
+
52
+ ## Options
53
+
54
+ - `-v, --verbose`: Show verbose output during execution
55
+ - `-u, --show-url`: Display the repository URL without executing the clone operation
48
56
 
49
57
  ## Examples
50
58
 
@@ -58,6 +66,9 @@ Fetching gem metadata for 'rails'...
58
66
  Found repository URL: https://github.com/rails/rails
59
67
  Executing: ghq get https://github.com/rails/rails
60
68
  Successfully cloned repository: https://github.com/rails/rails
69
+
70
+ $ gem clone rails --show-url
71
+ https://github.com/rails/rails
61
72
  ```
62
73
 
63
74
  ## Development
@@ -9,7 +9,11 @@ class Gem::Commands::CloneCommand < Gem::Command
9
9
  super 'clone', 'Clone a gem repository using ghq'
10
10
 
11
11
  add_option('-v', '--verbose', 'Show verbose output') do |value, options|
12
- options[:verbose] = value
12
+ options[:verbose] = true
13
+ end
14
+
15
+ add_option('-u', '--show-url', 'Show repository URL without cloning') do |value, options|
16
+ options[:show_url] = true
13
17
  end
14
18
  end
15
19
 
@@ -26,6 +30,7 @@ source_code_uri from the gem's metadata.
26
30
  Examples:
27
31
  gem clone sinatra
28
32
  gem clone rails --verbose
33
+ gem clone rails --show-url
29
34
  EOF
30
35
  end
31
36
 
@@ -50,7 +55,11 @@ Examples:
50
55
 
51
56
  say "Found repository URL: #{repository_url}" if options[:verbose]
52
57
 
53
- clone_repository(repository_url)
58
+ if options[:show_url]
59
+ say repository_url
60
+ else
61
+ clone_repository(repository_url)
62
+ end
54
63
  end
55
64
 
56
65
  private
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gem-clone
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiroshi SHIBATA
@@ -37,7 +37,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
37
37
  - !ruby/object:Gem::Version
38
38
  version: '0'
39
39
  requirements: []
40
- rubygems_version: 3.7.0.dev
40
+ rubygems_version: 3.6.7
41
41
  specification_version: 4
42
42
  summary: A RubyGems plugin to clone gem repositories
43
43
  test_files: []