rdm 0.4.18 → 0.4.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/lib/rdm/spec_runner/runner.rb +26 -29
- data/lib/rdm/version.rb +1 -1
- data/rdm.gemspec +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67aa6a9d7a25fc2a4453684a55772e59ca5304ff097b2f115eadbf6a4d3862a4
|
4
|
+
data.tar.gz: a35e83a3002b1a4143b6cf1b1f336e350caf8d3bec8c834e8ea5d5312e9b471d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3aa14248780cd0b00516e758ff9cc31c3c0b269d14d2f785cbdfbd7862175c9dedc720814f503b150614f62e5c9ebfb81d4e94f1c99d2e95d8ac02d7471a3f23
|
7
|
+
data.tar.gz: 5b33aa37a0e1ff1b07dd7c8704cfa21fbba11ac57ce620b95eee81d81e5a17e3d58843b9c07c750e65b1d5bca911c70f207dda407e175f357043c6aff7c450d6
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rdm (0.4.
|
4
|
+
rdm (0.4.19)
|
5
5
|
activesupport
|
6
6
|
commander (~> 4.4)
|
7
7
|
|
@@ -69,7 +69,7 @@ PLATFORMS
|
|
69
69
|
ruby
|
70
70
|
|
71
71
|
DEPENDENCIES
|
72
|
-
bundler
|
72
|
+
bundler
|
73
73
|
byebug
|
74
74
|
codecov
|
75
75
|
rake
|
@@ -78,4 +78,4 @@ DEPENDENCIES
|
|
78
78
|
rubocop (~> 0.46)
|
79
79
|
|
80
80
|
BUNDLED WITH
|
81
|
-
1.
|
81
|
+
2.1.4
|
@@ -4,12 +4,11 @@ class Rdm::SpecRunner::Runner
|
|
4
4
|
|
5
5
|
attr_accessor :no_specs_packages
|
6
6
|
attr_accessor :prepared_command_params
|
7
|
-
|
8
|
-
|
7
|
+
|
9
8
|
def initialize(
|
10
|
-
package: nil,
|
11
|
-
spec_matcher: nil,
|
12
|
-
path: nil,
|
9
|
+
package: nil,
|
10
|
+
spec_matcher: nil,
|
11
|
+
path: nil,
|
13
12
|
from: nil,
|
14
13
|
show_missing_packages: true,
|
15
14
|
skip_ignored_packages: false,
|
@@ -22,12 +21,13 @@ class Rdm::SpecRunner::Runner
|
|
22
21
|
@spec_string_number = spec_matcher.to_s.split(':')[1].to_i
|
23
22
|
@path = path
|
24
23
|
@run_all = @package_name.nil?
|
25
|
-
@show_missing_packages = show_missing_packages && !@package_name
|
24
|
+
@show_missing_packages = show_missing_packages && !@package_name
|
26
25
|
@skip_ignored_packages = skip_ignored_packages
|
27
26
|
@skipped_packages = []
|
28
27
|
@stdout = stdout
|
29
28
|
@show_output = show_output
|
30
29
|
@from = from
|
30
|
+
@command_list = []
|
31
31
|
end
|
32
32
|
|
33
33
|
def run
|
@@ -37,7 +37,7 @@ class Rdm::SpecRunner::Runner
|
|
37
37
|
when 0
|
38
38
|
raise Rdm::Errors::SpecMatcherNoFiles, "No specs were found for '#{@spec_matcher}'"
|
39
39
|
when 1
|
40
|
-
format_string_number = @spec_string_number == 0 ? "" : ":#{@spec_string_number}"
|
40
|
+
format_string_number = @spec_string_number == 0 ? "" : ":#{@spec_string_number}"
|
41
41
|
@spec_matcher = @spec_file_matches.first + format_string_number
|
42
42
|
|
43
43
|
@stdout.puts "Following spec matches your input: #{@spec_matcher}"
|
@@ -51,7 +51,7 @@ class Rdm::SpecRunner::Runner
|
|
51
51
|
display_missing_specs if @show_missing_packages
|
52
52
|
display_ignored_specs if @skip_ignored_packages
|
53
53
|
print_message view.specs_header_message if @show_missing_packages || @skip_ignored_packages
|
54
|
-
|
54
|
+
|
55
55
|
execute_command
|
56
56
|
end
|
57
57
|
|
@@ -98,7 +98,7 @@ class Rdm::SpecRunner::Runner
|
|
98
98
|
def prepare!
|
99
99
|
prepared_command_params = []
|
100
100
|
no_specs_packages = []
|
101
|
-
|
101
|
+
@command_list = []
|
102
102
|
prepare_command_params
|
103
103
|
prepare_no_specs_packages
|
104
104
|
prepare_command
|
@@ -108,8 +108,8 @@ class Rdm::SpecRunner::Runner
|
|
108
108
|
@prepared_command_params ||= begin
|
109
109
|
packages.map do |_name, package|
|
110
110
|
Rdm::SpecRunner::CommandGenerator.new(
|
111
|
-
package_name: package.name,
|
112
|
-
package_path: package.path,
|
111
|
+
package_name: package.name,
|
112
|
+
package_path: package.path,
|
113
113
|
spec_matcher: @spec_matcher,
|
114
114
|
show_output: @show_output
|
115
115
|
).generate
|
@@ -124,23 +124,21 @@ class Rdm::SpecRunner::Runner
|
|
124
124
|
end
|
125
125
|
|
126
126
|
def prepare_command
|
127
|
-
@
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
prepare_command_for_packages(prepared_command_params)
|
132
|
-
end
|
127
|
+
if @package_name
|
128
|
+
@command_list += prepare_single_package_command(@package_name)
|
129
|
+
else
|
130
|
+
@command_list += prepare_commands_for_packages(prepared_command_params)
|
133
131
|
end
|
134
132
|
end
|
135
133
|
|
136
134
|
def prepare_single_package_command(package_name)
|
137
|
-
selected = prepared_command_params.
|
135
|
+
selected = prepared_command_params.detect do |cmd_params|
|
138
136
|
cmd_params.package_name == package_name
|
139
137
|
end
|
140
|
-
|
138
|
+
prepare_commands_for_packages([selected])
|
141
139
|
end
|
142
140
|
|
143
|
-
def
|
141
|
+
def prepare_commands_for_packages(packages_command_params)
|
144
142
|
if @skip_ignored_packages && !@package_name
|
145
143
|
runignore_path = File.expand_path(File.join(Rdm.root_dir, RUNIGNORE_PATH))
|
146
144
|
package_list = Rdm::SourceParser.read_and_init_source(Rdm.root).packages.keys
|
@@ -149,7 +147,7 @@ class Rdm::SpecRunner::Runner
|
|
149
147
|
.lines
|
150
148
|
.map(&:strip)
|
151
149
|
.reject(&:empty?) rescue []
|
152
|
-
|
150
|
+
|
153
151
|
@skipped_packages = skipped_package_list.select {|line| package_list.include?(line)}
|
154
152
|
comment_runignore_lines = skipped_package_list.select {|line| line.start_with?(RUNIGNORE_COMMENT)}
|
155
153
|
invalid_ignore_packages = skipped_package_list - @skipped_packages - comment_runignore_lines
|
@@ -188,10 +186,8 @@ class Rdm::SpecRunner::Runner
|
|
188
186
|
#{(packages.keys - no_specs_packages).map {|pkg| " - #{pkg}"}.sort.join("\n")}\n
|
189
187
|
EOF
|
190
188
|
end
|
191
|
-
|
192
|
-
running_packages
|
193
|
-
.map(&:command)
|
194
|
-
.join('; ')
|
189
|
+
|
190
|
+
running_packages.map(&:command)
|
195
191
|
end
|
196
192
|
|
197
193
|
def display_missing_specs
|
@@ -207,10 +203,11 @@ class Rdm::SpecRunner::Runner
|
|
207
203
|
end
|
208
204
|
|
209
205
|
def execute_command
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
206
|
+
has_failed_packages = @command_list
|
207
|
+
.map {|cmd| eval(cmd); $?}
|
208
|
+
.reject {|result| result.success?}
|
209
|
+
.any?
|
214
210
|
|
211
|
+
exit(1) if has_failed_packages
|
215
212
|
end
|
216
213
|
end
|
data/lib/rdm/version.rb
CHANGED
data/rdm.gemspec
CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
|
|
16
16
|
|
17
17
|
spec.require_paths = ["lib"]
|
18
18
|
|
19
|
-
spec.add_development_dependency "bundler"
|
19
|
+
spec.add_development_dependency "bundler"
|
20
20
|
spec.add_development_dependency "rake"
|
21
21
|
spec.add_development_dependency "rspec"
|
22
22
|
spec.add_development_dependency "byebug"
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rdm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Droid Labs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-10-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|