clash 1.2.1 → 1.3.0
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 +4 -4
- data/bin/clash +9 -1
- data/lib/clash/tests.rb +15 -0
- data/lib/clash/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6cad0151a6037da89cf8bdbee5b76012bdb32839
|
4
|
+
data.tar.gz: ec101ab1ddba60ec0ecf689364389844217173b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7aecb430a2bb79e8030665e5dee3fcb64499f482e4959262fb650665672599a2aef604d211fc5591b3acdbd71d5c7d016f09d4e79dfe2cfc73b04055ed2307b5
|
7
|
+
data.tar.gz: 0cb4d44011a22bf212153618caec4a522c85b02e692a8dbf74033d6939931872ca97bf0f9bbc794badf7d05684b447f6a1fd51b4a4e1ac1fce694e66c86ba77c
|
data/bin/clash
CHANGED
@@ -48,6 +48,10 @@ OptionParser.new do |opts|
|
|
48
48
|
options[:context] = context
|
49
49
|
end
|
50
50
|
|
51
|
+
opts.on("-l", "--list", "Print a list of tests' numbers and titles") do |l|
|
52
|
+
options[:list] = l
|
53
|
+
end
|
54
|
+
|
51
55
|
opts.on("-h", "--help", "Show this message") do |h|
|
52
56
|
puts opts
|
53
57
|
puts config_info
|
@@ -65,5 +69,9 @@ end
|
|
65
69
|
|
66
70
|
unless options[:help]
|
67
71
|
tests = Clash::Tests.new(options)
|
68
|
-
|
72
|
+
if options[:list]
|
73
|
+
tests.list
|
74
|
+
else
|
75
|
+
tests.run
|
76
|
+
end
|
69
77
|
end
|
data/lib/clash/tests.rb
CHANGED
@@ -21,6 +21,21 @@ module Clash
|
|
21
21
|
@tests = read_tests
|
22
22
|
end
|
23
23
|
|
24
|
+
def list
|
25
|
+
@tests.each_with_index do |options, index|
|
26
|
+
# If tests are limited, only run specified tests
|
27
|
+
#
|
28
|
+
next if options.nil?
|
29
|
+
list_test(options, index)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def list_test(options, index)
|
34
|
+
number = boldit((index + 1).to_s.rjust(3))
|
35
|
+
title = options['title'] || "Untitled test"
|
36
|
+
puts "#{number}) #{title}"
|
37
|
+
end
|
38
|
+
|
24
39
|
def run
|
25
40
|
|
26
41
|
Dir.chdir(@options[:path]) do
|
data/lib/clash/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Mathis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: diffy
|