cl 0.1.9 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +36 -0
- data/lib/cl/runner/default.rb +9 -16
- data/lib/cl/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5097e3fcd96f977c5384e2cbd4517446f1c23f12
|
4
|
+
data.tar.gz: b5be035521723319b454d4c77c0156b03693974c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7aae3ad9799257c430f8be056881e4417d4ac93172e41f89ff522ed51ddfabbf4cbb25879c657bbda12254cfa5252c697947ef1185e4a74ed70993a47c3408d9
|
7
|
+
data.tar.gz: e56d5e67686bad275d1335afa078cdf4ba9ab28fd722143069481b5e56fb0e39729958953ba6c58303ab1d355d9b4c3e6df439a16e3a65a1ddcee9d56688e040
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
cl (0.1.9)
|
5
|
+
regstry (~> 1.0.3)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
diff-lcs (1.3)
|
11
|
+
memfs (1.0.0)
|
12
|
+
regstry (1.0.6)
|
13
|
+
rspec (3.8.0)
|
14
|
+
rspec-core (~> 3.8.0)
|
15
|
+
rspec-expectations (~> 3.8.0)
|
16
|
+
rspec-mocks (~> 3.8.0)
|
17
|
+
rspec-core (3.8.0)
|
18
|
+
rspec-support (~> 3.8.0)
|
19
|
+
rspec-expectations (3.8.3)
|
20
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
21
|
+
rspec-support (~> 3.8.0)
|
22
|
+
rspec-mocks (3.8.0)
|
23
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
24
|
+
rspec-support (~> 3.8.0)
|
25
|
+
rspec-support (3.8.0)
|
26
|
+
|
27
|
+
PLATFORMS
|
28
|
+
ruby
|
29
|
+
|
30
|
+
DEPENDENCIES
|
31
|
+
cl!
|
32
|
+
memfs
|
33
|
+
rspec
|
34
|
+
|
35
|
+
BUNDLED WITH
|
36
|
+
2.0.1
|
data/lib/cl/runner/default.rb
CHANGED
@@ -34,24 +34,17 @@ class Cl
|
|
34
34
|
private
|
35
35
|
|
36
36
|
def lookup(args)
|
37
|
-
keys = expand(args)
|
38
|
-
|
39
|
-
|
37
|
+
keys = expand(args)
|
38
|
+
keys = keys & Cmd.registry.keys.map(&:to_s)
|
39
|
+
cmd = Cmd[keys.last] || abort("Unknown command: #{args.join(' ')}")
|
40
|
+
args = args[keys.last.split(':').size..-1]
|
41
|
+
[cmd, args]
|
40
42
|
end
|
41
43
|
|
42
|
-
def
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
def keys(cmd)
|
47
|
-
keys = cmd.registry_key.to_s.split(':')
|
48
|
-
keys.concat(expand(keys)).uniq
|
49
|
-
end
|
50
|
-
|
51
|
-
def expand(strs)
|
52
|
-
# strs = strs.reject { |str| str.start_with?('-') }
|
53
|
-
strs = strs.take_while { |str| !str.start_with?('-') }
|
54
|
-
strs.inject([]) { |strs, str| strs << [strs.last, str].compact.join(':') }
|
44
|
+
def expand(args)
|
45
|
+
keys = args.take_while { |str| !str.start_with?('-') }
|
46
|
+
args = args[keys.size..-1]
|
47
|
+
keys.inject([]) { |strs, str| strs << [strs.last, str].compact.join(':') }
|
55
48
|
end
|
56
49
|
end
|
57
50
|
end
|
data/lib/cl/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sven Fuchs
|
@@ -32,6 +32,7 @@ extra_rdoc_files: []
|
|
32
32
|
files:
|
33
33
|
- CHANGELOG.md
|
34
34
|
- Gemfile
|
35
|
+
- Gemfile.lock
|
35
36
|
- MIT_LICENSE.md
|
36
37
|
- NOTES.md
|
37
38
|
- README.md
|