closer 0.0.5 → 0.1.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: 79fdcd81b33f793f0f92b6755f4c09d8f1d6e54f
4
- data.tar.gz: 858f015dbb92e452216dd2521204a54cdcc0cc89
3
+ metadata.gz: b99eb87604e2f3176b267aa90a0f28a0568c16b4
4
+ data.tar.gz: 7696d5b8131a9a47fdfe139c899a825597948a41
5
5
  SHA512:
6
- metadata.gz: 155b5a020137a5b73edd71ed0738cfcb821531468ef4514b08a8d5acc0fc99a00616872ac0afafa378821d84c3c1d6b344d3a3d1bcb35ebf06fc46a83538ff59
7
- data.tar.gz: 091a43bd57c60ff5b0b158926540a0d6ef9bf58ae3877bb4e8e2000bf2606fac2d46c622a0333313b474a90651ee1f497fc3c8777534ecf8d04f9541fcbcb89a
6
+ metadata.gz: 4dd36b4edb84dcdad15a0e2af98b2ef290ad81e679b1fc89a330aa04e8132cae9c90d56fb67efb2d99441f39301f28d1abedb03373617f2fd46eadd345082766
7
+ data.tar.gz: 03dad37b1c3aeed8fa033b7683d7e057c9e72a81cf7a90f6646470c20b09ae2b5467dec1468665919aa84129886ba9b1e34b87f756eb271f6442a06ae58b9113
@@ -1,3 +1,3 @@
1
1
  module Closer
2
- VERSION = '0.0.5'
2
+ VERSION = '0.1.0'
3
3
  end
@@ -24,18 +24,36 @@ task :close => dependencies do |t, args|
24
24
  end
25
25
  end
26
26
 
27
+ feature_dir = 'features'
28
+ if features.first
29
+ dir = File.dirname(features.first)
30
+ feature_dir = dir == '.' ? File.basename(features.first) : dir
31
+ end
32
+ puts "using features in #{feature_dir}"
33
+
27
34
  format = ENV['FORMAT'] || 'Closer::Formatter::Html'
28
- if format.to_s.length > 0
35
+ unless format.empty?
29
36
  case format
30
37
  when 'junit'
31
- output = "test/reports"
38
+ output = File.join('test', 'reports')
32
39
  FileUtils.mkdir_p(output)
33
40
  else
34
- output = "features/reports/index.html"
41
+ output = File.join(feature_dir, 'reports', 'index.html')
35
42
  FileUtils.mkdir_p(File.dirname(output))
36
43
  end
37
44
  additional_format = "--format #{format} --out #{output}"
38
45
  end
39
46
 
40
- fail unless system("bundle exec cucumber --guess --quiet --no-multiline -r features --format pretty #{additional_format} #{features.join(' ')} #{options}")
47
+ args = [
48
+ "-r #{feature_dir}",
49
+ feature_dir == 'features' ? '' : '--exclude features/step_definitions',
50
+ '--guess',
51
+ '--quiet',
52
+ '--no-multiline',
53
+ '--format pretty',
54
+ additional_format,
55
+ features.join(' ')
56
+ ].join(' ')
57
+
58
+ fail unless system("bundle exec cucumber #{args} #{options}")
41
59
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: closer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ichy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-23 00:00:00.000000000 Z
11
+ date: 2015-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber
@@ -98,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
98
98
  version: '0'
99
99
  requirements: []
100
100
  rubyforge_project:
101
- rubygems_version: 2.4.2
101
+ rubygems_version: 2.4.5
102
102
  signing_key:
103
103
  specification_version: 4
104
104
  summary: Cucumber test execution tool