parallel_calabash 0.1.2 → 0.1.3

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: 3cc4d8fc0f272da9f707d70b4362d997df2c8633
4
- data.tar.gz: eaaa148652e0f6aa7b9a9dda522d9e13883d6b63
3
+ metadata.gz: 8e707fea978908c069d5ee8b7ed755c61b923f15
4
+ data.tar.gz: 78ae4ba1f33793908c81fa7e64d1d07fe4fef9a0
5
5
  SHA512:
6
- metadata.gz: aa58d6085e7c9718173782545f29dc66c7b10331c79641133be8fdc0dc172ed252e2e046241f56000b9d8073791f4928c85077dc5b6e84e76351b4fd6625b04f
7
- data.tar.gz: 0d9cba03a4a9f904831bba7bc6277af437ad856e91ab42ef896a7f8901c10c01aeba2059a8281d882e59573ef9ea01537475e06a48bdfdc8158cd91bdad7de2a
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 { |feature| feature["elements"].map { |scenario| "#{feature["uri"]}:#{scenario["line"]}" } }.flatten
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].first}`
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)
@@ -1,3 +1,3 @@
1
1
  module ParallelCalabash
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
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.2
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-01 00:00:00.000000000 Z
11
+ date: 2015-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler