clash 1.2.1 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 13be698bb980ac8d3805b00f5b4b8791caf7110c
4
- data.tar.gz: c83fc574948e7d23ffe8dc2a7bd8d036512a9e55
3
+ metadata.gz: 6cad0151a6037da89cf8bdbee5b76012bdb32839
4
+ data.tar.gz: ec101ab1ddba60ec0ecf689364389844217173b3
5
5
  SHA512:
6
- metadata.gz: 9c63754a018353efff7e13e21ef659660da12a544fac50cce1a9aeb970f04eea0cf51762bd4e204307d8134f31165e2b6821fdd75025b96bdff7b4af083b75b4
7
- data.tar.gz: 3fa441924c7e631e1898f38016ada392442bfc7607405139c2d00e90f9f79c225f5fba0defc4182c30bca7222dc808ccf798e664c918d6358f2a78aa28353a52
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
- tests.run
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
@@ -1,3 +1,3 @@
1
1
  module Clash
2
- VERSION = "1.2.1"
2
+ VERSION = "1.3.0"
3
3
  end
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.2.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-23 00:00:00.000000000 Z
11
+ date: 2014-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: diffy