paraduct 0.0.1.beta15 → 0.0.1.beta16
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +6 -0
- data/lib/paraduct/cli.rb +2 -0
- data/lib/paraduct/configuration.rb +4 -0
- data/lib/paraduct/templates/.paraduct.yml.tt +3 -0
- data/lib/paraduct/variable_converter.rb +7 -0
- data/lib/paraduct/version.rb +1 -1
- data/paraduct.gemspec +1 -1
- data/spec/{.rubocop.yml → .hound.yml} +0 -0
- data/spec/paraduct/variable_converter_spec.rb +25 -0
- metadata +7 -7
data/README.md
CHANGED
@@ -71,6 +71,9 @@ variables:
|
|
71
71
|
max_threads: 4
|
72
72
|
rsync_option:
|
73
73
|
exclude_from: .paraduct_rsync_exclude.txt
|
74
|
+
exclude:
|
75
|
+
- name1: value1a
|
76
|
+
name2: value2b
|
74
77
|
```
|
75
78
|
|
76
79
|
### script
|
@@ -100,6 +103,9 @@ maximum concurrent execution number of jobs
|
|
100
103
|
### rsync_option
|
101
104
|
support only `exclude-from`
|
102
105
|
|
106
|
+
### exclude
|
107
|
+
exclude pattern from product variables
|
108
|
+
|
103
109
|
## Contributing
|
104
110
|
|
105
111
|
1. Fork it ( https://github.com/sue445/paraduct/fork )
|
data/lib/paraduct/cli.rb
CHANGED
@@ -22,6 +22,8 @@ module Paraduct
|
|
22
22
|
raise "require variables" if variables.blank?
|
23
23
|
|
24
24
|
product_variables = Paraduct::VariableConverter.product(variables)
|
25
|
+
product_variables = Paraduct::VariableConverter.reject(product_variables, Paraduct.config.exclude)
|
26
|
+
|
25
27
|
test_response = Paraduct::ParallelRunner.perform_all(script, product_variables)
|
26
28
|
Paraduct.logger.info test_response.detail_message
|
27
29
|
raise Paraduct::Errors::TestFailureError if test_response.failure?
|
@@ -24,6 +24,13 @@ module Paraduct
|
|
24
24
|
product_variables
|
25
25
|
end
|
26
26
|
|
27
|
+
def self.reject(product_variables, exclude_variables)
|
28
|
+
product_variables.inject([]) do |rejected_product_variables, variables|
|
29
|
+
rejected_product_variables << variables unless exclude_variables.include?(variables)
|
30
|
+
rejected_product_variables
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
27
34
|
def self.product_array(array)
|
28
35
|
first_values = array.shift
|
29
36
|
if array.empty?
|
data/lib/paraduct/version.rb
CHANGED
data/paraduct.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency "activesupport"
|
21
|
+
spec.add_dependency "activesupport", ">= 4.0.0"
|
22
22
|
spec.add_dependency "colorize"
|
23
23
|
spec.add_dependency "rsync"
|
24
24
|
spec.add_dependency "thor"
|
File without changes
|
@@ -58,4 +58,29 @@ describe Paraduct::VariableConverter do
|
|
58
58
|
|
59
59
|
end
|
60
60
|
|
61
|
+
describe "#reject" do
|
62
|
+
subject{ Paraduct::VariableConverter.reject(product_variables, exclude_variables) }
|
63
|
+
|
64
|
+
let(:product_variables) do
|
65
|
+
[
|
66
|
+
{"ruby" => "1.9", "database" => "mysql" , "rails" => "3.2"},
|
67
|
+
{"ruby" => "2.0", "database" => "mysql" , "rails" => "3.2"},
|
68
|
+
{"ruby" => "2.1", "database" => "mysql" , "rails" => "3.2"},
|
69
|
+
]
|
70
|
+
end
|
71
|
+
|
72
|
+
let(:exclude_variables) do
|
73
|
+
[
|
74
|
+
{"rails" => "3.2", "ruby" => "2.0", "database" => "mysql"},
|
75
|
+
]
|
76
|
+
end
|
77
|
+
|
78
|
+
it {
|
79
|
+
should contain_exactly(
|
80
|
+
{"ruby" => "1.9", "database" => "mysql" , "rails" => "3.2"},
|
81
|
+
{"ruby" => "2.1", "database" => "mysql" , "rails" => "3.2"},
|
82
|
+
)
|
83
|
+
}
|
84
|
+
end
|
85
|
+
|
61
86
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paraduct
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.1.
|
4
|
+
version: 0.0.1.beta16
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-10-
|
12
|
+
date: 2014-10-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
21
|
+
version: 4.0.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ! '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
29
|
+
version: 4.0.0
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: colorize
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -333,9 +333,9 @@ files:
|
|
333
333
|
- lib/paraduct/variable_converter.rb
|
334
334
|
- lib/paraduct/version.rb
|
335
335
|
- paraduct.gemspec
|
336
|
+
- spec/.hound.yml
|
336
337
|
- spec/.paraduct.yml
|
337
338
|
- spec/.paraduct_rsync_exclude.txt
|
338
|
-
- spec/.rubocop.yml
|
339
339
|
- spec/paraduct/cli_spec.rb
|
340
340
|
- spec/paraduct/colored_label_logger_spec.rb
|
341
341
|
- spec/paraduct/configuration_spec.rb
|
@@ -369,7 +369,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
369
369
|
version: '0'
|
370
370
|
segments:
|
371
371
|
- 0
|
372
|
-
hash: -
|
372
|
+
hash: -1655533724767241350
|
373
373
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
374
374
|
none: false
|
375
375
|
requirements:
|
@@ -383,9 +383,9 @@ signing_key:
|
|
383
383
|
specification_version: 3
|
384
384
|
summary: matrix test runner
|
385
385
|
test_files:
|
386
|
+
- spec/.hound.yml
|
386
387
|
- spec/.paraduct.yml
|
387
388
|
- spec/.paraduct_rsync_exclude.txt
|
388
|
-
- spec/.rubocop.yml
|
389
389
|
- spec/paraduct/cli_spec.rb
|
390
390
|
- spec/paraduct/colored_label_logger_spec.rb
|
391
391
|
- spec/paraduct/configuration_spec.rb
|