cgem 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/exe/cgem +10 -0
  3. data/lib/cgem.rb +5 -2
  4. data/lib/cgem/version.rb +1 -1
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5704b88b32f1b8a634b3f4a1a6fc9900e9416025c323320b1bcf8d8434b55a62
4
- data.tar.gz: 62f11ab69b798a755a1afdd8797e6af207c5fafa0c5351099778ef2df787151a
3
+ metadata.gz: a6a2bc830f03d5efb9fff5532162453121f58d3f465dd3c9f12d28b068964491
4
+ data.tar.gz: a57ad0e275decf5d965cea3fb7b66acbef2ef04fe384e9266662c21c066a2cb1
5
5
  SHA512:
6
- metadata.gz: 7f15fcaa325e6b5275990aeeb35788199f26a25e1912f040836ef049f67a8111baabec080bd9046bf46bf2afd68c6a9b88839e438262f1f57c13ceb9822bc1eb
7
- data.tar.gz: edafba100e74a3f9e7ba0f51290a18a35559780fc4c02a4cd0b308aafb7df12926ace5f2d1d2f4a4067f0d6ecec799a21b15507ae159f088d71f1f8296c28f88
6
+ metadata.gz: a2e46a54b7f7a175d2ca9dedbaeb427ad3870b208874e79a8ed3473130fa391607a91ff918358c88a33bfa222a8834bf7f761a53cfed3426f8bb0eabb9222100
7
+ data.tar.gz: af2204fee4a4fa59a140aadc9cec0cc99d194b9594862680b36eb8fe821fd23386ad163b86f8d8574943396c706f1b3948643140e56f3219011141700ef5fb9f
data/exe/cgem CHANGED
@@ -49,6 +49,16 @@ class CgemCLI < Thor
49
49
  abort "Please use source key in #{Cgem.gem_sources.keys}" if source.start_with?('http')
50
50
  use(source)
51
51
  end
52
+
53
+ desc 'path', 'show current cgem sources path'
54
+ def path
55
+ puts Cgem.sources_path
56
+ end
57
+
58
+ desc 'paths', 'show all supported cgem sources path in order'
59
+ def paths
60
+ pp Cgem.sources_paths
61
+ end
52
62
  end
53
63
 
54
64
  CgemCLI.start
@@ -17,8 +17,11 @@ module Cgem
17
17
  end
18
18
 
19
19
  def sources_path
20
- paths = [ env_sources_path, dot_sources_path, default_sources_path]
21
- paths.compact.find { |p| File.exists?(p) }
20
+ sources_paths.find { |p| File.exists?(p) }
21
+ end
22
+
23
+ def sources_paths
24
+ [env_sources_path, dot_sources_path, default_sources_path].compact
22
25
  end
23
26
 
24
27
  def env_sources_path
@@ -1,3 +1,3 @@
1
1
  module Cgem
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cgem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ruijian Cao
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-09-19 00:00:00.000000000 Z
11
+ date: 2019-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler