parallel_calabash 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/parallel_calabash/feature_grouper.rb +15 -3
- data/lib/parallel_calabash/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e707fea978908c069d5ee8b7ed755c61b923f15
|
4
|
+
data.tar.gz: 78ae4ba1f33793908c81fa7e64d1d07fe4fef9a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aba39d6219d67792d46963955bf44760de1f44192c8542c82d9d182b13bcc0fed255fe5fd673a6c735613632bac6ead9fc4aa06da1119e7f19760a569f28f130
|
7
|
+
data.tar.gz: 2fd7b19d29b811ca11c89a005009771cc8508e4d52e27dffdd70111832808ba125c95b8a831e9084d88edf09dbb1fcaa3b9b3d203ef3bec7c1827ad3f28518d5
|
@@ -35,19 +35,31 @@ module ParallelCalabash
|
|
35
35
|
group << files.delete_at(0)
|
36
36
|
end
|
37
37
|
end
|
38
|
-
groups
|
38
|
+
groups.reject &:empty?
|
39
39
|
end
|
40
40
|
|
41
41
|
def scenario_groups group_size, options
|
42
42
|
generate_dry_run_report options
|
43
43
|
raise "Can not create dry run for scenario distribution" unless File.exists?("parallel_calabash_dry_run.json")
|
44
44
|
distribution_data = JSON.parse(File.read("parallel_calabash_dry_run.json"))
|
45
|
-
all_runnable_scenarios = distribution_data.map
|
45
|
+
all_runnable_scenarios = distribution_data.map do |feature|
|
46
|
+
unless feature["elements"].nil?
|
47
|
+
feature["elements"].map do |scenario|
|
48
|
+
if scenario["keyword"] == 'Scenario'
|
49
|
+
"#{feature["uri"]}:#{scenario["line"]}"
|
50
|
+
elsif scenario['keyword'] == 'Scenario Outline'
|
51
|
+
scenario["examples"].map { |example|
|
52
|
+
"#{feature["uri"]}:#{example["line"]}"
|
53
|
+
}
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end.flatten.compact
|
46
58
|
groups = group_creator group_size,all_runnable_scenarios
|
47
59
|
end
|
48
60
|
|
49
61
|
def generate_dry_run_report options
|
50
|
-
`cucumber #{options[:cucumber_options]} -f usage --dry-run -f json --out parallel_calabash_dry_run.json #{options[:feature_folder].
|
62
|
+
`cucumber #{options[:cucumber_options]} -f usage --dry-run -f json --out parallel_calabash_dry_run.json #{options[:feature_folder].join(' ')}`
|
51
63
|
end
|
52
64
|
|
53
65
|
def feature_files_in_folder(feature_dir)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parallel_calabash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rajdeep
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|