serverspec_launcher 0.1.10 → 0.1.11
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
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 89991bc77e618a3c0ed3821b9c5740999c5374df30f72bd273055aee8a2721a2
|
4
|
+
data.tar.gz: fedd2dda330c4d183c91b58b4f702577b2a2f31116056351627fd9c11fdcf100
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa6acf23d5c3bf5d6afed3fb38f22331fa33a8208cbeebeee8e4f341c005bf906a1c93f1324244b8bd38831b6c57aee8adbcff4cd005d89bf3c7233e8686be0e
|
7
|
+
data.tar.gz: 72494715471d44345a08c422d923206601694871eae44a5b9230abaa4cfbc091f8046470a9fa05241557bab199fce9b3306170f9467a1d8da9100a46d19fc6bc
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module SymbolizeHelper
|
2
|
+
extend self
|
3
|
+
|
4
|
+
def symbolize_recursive(hash)
|
5
|
+
{}.tap do |h|
|
6
|
+
hash.each { |key, value| h[key.to_sym] = transform(value) }
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
private
|
11
|
+
|
12
|
+
def transform(thing)
|
13
|
+
case thing
|
14
|
+
when Hash; symbolize_recursive(thing)
|
15
|
+
when Array; thing.map { |v| transform(v) }
|
16
|
+
else; thing
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
refine Hash do
|
21
|
+
def deep_symbolize_keys
|
22
|
+
SymbolizeHelper.symbolize_recursive(self)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -6,17 +6,21 @@ require 'yaml'
|
|
6
6
|
|
7
7
|
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
|
8
8
|
require 'serverspec_launcher/helpers/example_helper'
|
9
|
+
require 'serverspec_launcher/helpers/symbolize_helper'
|
9
10
|
|
10
11
|
# loads up the rake tasks
|
11
12
|
class ServerspecLauncherRakeTasks
|
12
13
|
include ::Rake::DSL if defined?(::Rake::DSL)
|
13
14
|
include ExampleHelper
|
15
|
+
using SymbolizeHelper
|
14
16
|
|
15
17
|
def initialize(properties = nil)
|
18
|
+
|
16
19
|
@properties = properties ? properties : YAML.load_file('properties.yml')
|
17
20
|
options = @properties[:options] || {}
|
18
21
|
@fail_on_err = options[:fail_on_err]
|
19
22
|
@formatters = options[:formatters] || []
|
23
|
+
@colorize = options[:color].nil? ? true : options[:color]
|
20
24
|
end
|
21
25
|
|
22
26
|
def load_tasks
|
@@ -30,7 +34,8 @@ class ServerspecLauncherRakeTasks
|
|
30
34
|
target = @properties[:targets][key]
|
31
35
|
options = {
|
32
36
|
fail_on_err: target[:fail_on_err] || @fail_on_err,
|
33
|
-
formatters: target[:formatters] || @formatters
|
37
|
+
formatters: target[:formatters] || @formatters,
|
38
|
+
color: target[:color].nil? ? @colorize : target[:color]
|
34
39
|
}
|
35
40
|
spec_type = target[:spec_type] || 'default'
|
36
41
|
if target[:hosts].is_a?(Array)
|
@@ -74,26 +79,40 @@ class ServerspecLauncherRakeTasks
|
|
74
79
|
|
75
80
|
def set_formatters(key, options, t)
|
76
81
|
opts = t.rspec_opts
|
77
|
-
if options[:formatters].include?
|
82
|
+
if options[:formatters].include?('junit') || options[:formatters].include?('xml')
|
78
83
|
opts = "#{opts} --format RspecJunitFormatter --out reports/#{key}.xml"
|
79
84
|
end
|
80
|
-
if options[:formatters].include?('docs') || options[:formatters].include?('documentation')
|
81
|
-
opts = "#{opts} --format documentation --out reports/#{key}.
|
85
|
+
if options[:formatters].include?('docs') || options[:formatters].include?('documentation') || options[:formatters].include?('docs_file')
|
86
|
+
opts = "#{opts} --format documentation --out reports/#{key}.docs"
|
82
87
|
end
|
83
88
|
if options[:formatters].include?('docs_screen')
|
84
89
|
opts = "#{opts} --format documentation"
|
85
90
|
end
|
91
|
+
if options[:formatters].include?('tick')
|
92
|
+
opts = "#{opts} --format RspecTickFormatter"
|
93
|
+
end
|
94
|
+
if options[:formatters].include?('tick_file')
|
95
|
+
opts = "#{opts} --format RspecTickFormatter --out reports/#{key}.tick"
|
96
|
+
end
|
86
97
|
if options[:formatters].include?('progress')
|
87
98
|
opts = "#{opts} --format progress"
|
88
99
|
end
|
89
100
|
if options[:formatters].include?('html')
|
90
101
|
opts = "#{opts} --format html --out reports/#{key}.html"
|
91
102
|
end
|
103
|
+
if options[:formatters].include?('html_report')
|
104
|
+
opts = "#{opts} --format RspecHtmlReporter"
|
105
|
+
end
|
106
|
+
if options[:formatters].include?('json')
|
107
|
+
opts = "#{opts} --format j --out reports/#{key}.json"
|
108
|
+
end
|
109
|
+
unless options[:color]
|
110
|
+
opts = "#{opts} --no-color"
|
111
|
+
end
|
92
112
|
if File.exist?('.rspec')
|
93
113
|
opts = "#{opts} --options .rspec"
|
94
114
|
end
|
95
115
|
t.rspec_opts = opts
|
96
|
-
puts "opts #{t.rspec_opts}"
|
97
116
|
end
|
98
117
|
|
99
118
|
def debug_tasks
|
data/serverspec_launcher.gemspec
CHANGED
@@ -29,5 +29,6 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.add_development_dependency 'rubocop'
|
30
30
|
spec.add_runtime_dependency 'serverspec'
|
31
31
|
spec.add_runtime_dependency 'rspec_junit_formatter'
|
32
|
+
spec.add_runtime_dependency 'rspec-tick-formatter', '0.1.3'
|
32
33
|
spec.add_runtime_dependency 'docker-api'
|
33
34
|
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.
|
4
|
+
version: 0.1.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Wardrobe
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -94,6 +94,20 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rspec-tick-formatter
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - '='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 0.1.3
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - '='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 0.1.3
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: docker-api
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -133,6 +147,7 @@ files:
|
|
133
147
|
- lib/serverspec_launcher/generators/rakefile_generator.rb
|
134
148
|
- lib/serverspec_launcher/generators/spec_helper_generator.rb
|
135
149
|
- lib/serverspec_launcher/helpers/example_helper.rb
|
150
|
+
- lib/serverspec_launcher/helpers/symbolize_helper.rb
|
136
151
|
- lib/serverspec_launcher/rake_tasks.rb
|
137
152
|
- lib/serverspec_launcher/spec_helper.rb
|
138
153
|
- lib/serverspec_launcher/version.rb
|
@@ -160,7 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
160
175
|
version: '0'
|
161
176
|
requirements: []
|
162
177
|
rubyforge_project:
|
163
|
-
rubygems_version: 2.
|
178
|
+
rubygems_version: 2.7.6
|
164
179
|
signing_key:
|
165
180
|
specification_version: 4
|
166
181
|
summary: A utility to manage serverspec scripts
|