serverspec_launcher 0.1.5 → 0.1.6

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: c50e6061e7c302a0f3e06178079ddb71215d459d
4
- data.tar.gz: 99394c51bd6a31c95ebad152b1251c54bf45446a
3
+ metadata.gz: 94b6abf5943ddf44a2fc1b6dc78ef00c1a78f4ac
4
+ data.tar.gz: 077248c5cb91c5abb4f42caebbe0e098ac8319a6
5
5
  SHA512:
6
- metadata.gz: c0f7e82a6d3ffa97751079f310d0de318ea3138e6875641f394f92fe5377b0f42045be998e3ee137607358edbdbea240126b13539e320a9cbcfd446e01e9ebb4
7
- data.tar.gz: 3da73c2a5e0fdb71a949bdce41520084cab93c07582edc2184a251b6258e85b26395884a439f00a2ccdf7c0d92b56b03aa27929abefc9588aeec71e080f74402
6
+ metadata.gz: 78aff3c3c69939a3c19e84ffd26dad1349b13c3fb883af3db0cdee4fdbcbbaf42c9196aab6e05438b8561da41422564d2de48e821b7d1607b15322b7bf75cdb0
7
+ data.tar.gz: a97e0b6fed3d2dd17a9dfccf01d40e0c7a8fab7b446b3a372e18bb06d637543c3e1255dfa959ae96338e425df4f4842cc8c4d3442b233ddbb46f204e015c5b7f
@@ -68,13 +68,32 @@ class ServerspecLauncherRakeTasks
68
68
  ENV['TASK_NAME'] = task_name
69
69
  t.pattern = "spec/#{spec_type}_spec.rb"
70
70
  t.fail_on_error = options[:fail_on_err]
71
- opts = t.rspec_opts
72
- if options[:formatters].include? 'junit'
73
- opts = "#{opts} --format RspecJunitFormatter --out #{key}.results.xml"
74
- end
75
- t.rspec_opts = opts
76
- puts "opts #{t.rspec_opts}"
71
+ set_formatters(key, options, t)
72
+ end
73
+ end
74
+
75
+ def set_formatters(key, options, t)
76
+ opts = t.rspec_opts
77
+ if options[:formatters].include? 'junit'
78
+ opts = "#{opts} --format RspecJunitFormatter --out reports/#{key}.xml"
79
+ end
80
+ if options[:formatters].include?('docs') || options[:formatters].include?('documentation')
81
+ opts = "#{opts} --format documentation --out reports/#{key}.txt"
82
+ end
83
+ if options[:formatters].include?('docs_screen')
84
+ opts = "#{opts} --format documentation"
85
+ end
86
+ if options[:formatters].include?('progress')
87
+ opts = "#{opts} --format progress"
88
+ end
89
+ if options[:formatters].include?('html')
90
+ opts = "#{opts} --format html --out reports/#{key}.html"
91
+ end
92
+ if File.exist?('.rspec')
93
+ opts = "#{opts} --options .rspec"
77
94
  end
95
+ t.rspec_opts = opts
96
+ puts "opts #{t.rspec_opts}"
78
97
  end
79
98
 
80
99
  def debug_tasks
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module ServerspecLauncher
3
- VERSION = '0.1.5'
3
+ VERSION = '0.1.6'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: serverspec_launcher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Wardrobe
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-07-12 00:00:00.000000000 Z
11
+ date: 2017-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler