flatware-cucumber 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/flatware/cucumber.rb +50 -0
  3. metadata +14 -14
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a996ac4f5dfda54ef1f0559fae1c834853fb53462c0c25897de04c805535716c
4
- data.tar.gz: 16008ba3f593ec6b1285787b8aa9e9933a4c74b29e85acc058fb39a814123b97
3
+ metadata.gz: 265407eeff8748e873d84126d35f1341bfd0c82e153370adc64206be66400f77
4
+ data.tar.gz: d7838a350284cfeb715530d4ca07f60c134d0afcb4aa4b75f7138341dc7d308e
5
5
  SHA512:
6
- metadata.gz: 5eefc2fbe66d431915b33676bb661e781623fd186f1343db2d11bc580d098e0b3fa74124c6958508ab7d0325be9d0dfea7dffb7aea4cd15d5ed63b107484890d
7
- data.tar.gz: a48f376ba128ccf09f48b1c8bfd3d57593f9d10e7847a4c78427c2850ddb24390373f324155ce8d3f4f78982b8de04c93f3c57a4e9d2a30a41be19a1cd48ee7a
6
+ metadata.gz: 94f4cd09f4186b373d95215544decc76825afc51cbc7395be759ac19128f93c819f18d7e0726d15b8592a36e83d9a50223da1cd59d7323d38f336ee84b4ff317
7
+ data.tar.gz: ebed813f6ae2f7c9726cd764b53ac42bc11e39b4c18c3f36a82809e88d51bb25e373378286b2b573adf40d4b75643a7c98481d13c67ac088f290d04424f0c272
@@ -0,0 +1,50 @@
1
+ require 'cucumber'
2
+ require 'flatware/cucumber/formatter'
3
+ require 'flatware/cucumber/result'
4
+ require 'flatware/cucumber/scenario_result'
5
+ require 'flatware/cucumber/step_result'
6
+ require 'flatware/cucumber/formatters/console'
7
+ require 'flatware/cucumber/cli'
8
+
9
+ module Flatware
10
+ module Cucumber
11
+ class Config
12
+ attr_reader :config, :args
13
+ def initialize(cucumber_config, args)
14
+ @config, @args = cucumber_config, args
15
+ end
16
+
17
+ def feature_dir
18
+ @config.feature_dirs.first
19
+ end
20
+
21
+ def jobs
22
+ feature_files.map { |file| Job.new file, args }.to_a
23
+ end
24
+
25
+ private
26
+
27
+ def feature_files
28
+ config.feature_files - config.feature_dirs
29
+ end
30
+ end
31
+
32
+ extend self
33
+
34
+ def configure(args, out_stream=$stdout, error_stream=$stderr)
35
+ raw_args = args.dup
36
+ cli_config = ::Cucumber::Cli::Configuration.new(out_stream, error_stream)
37
+ cli_config.parse! args + %w[--format Flatware::Cucumber::Formatter]
38
+ cucumber_config = ::Cucumber::Configuration.new cli_config
39
+ Config.new cucumber_config, raw_args
40
+ end
41
+
42
+ def run(feature_files, options)
43
+ runtime(Array(feature_files) + options).run!
44
+ end
45
+
46
+ def runtime(args)
47
+ ::Cucumber::Runtime.new(configure(args).config)
48
+ end
49
+ end
50
+ end
metadata CHANGED
@@ -1,43 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flatware-cucumber
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Dunn
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-01 00:00:00.000000000 Z
11
+ date: 2019-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: flatware
14
+ name: cucumber
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '='
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.1.0
19
+ version: '3.0'
20
20
  type: :runtime
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: 1.1.0
26
+ version: '3.0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: cucumber
28
+ name: flatware
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: '3.0'
33
+ version: 1.2.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: '3.0'
40
+ version: 1.2.0
41
41
  description: A distributed cucumber runner
42
42
  email: brian@hashrocket.com
43
43
  executables: []
@@ -49,6 +49,7 @@ files:
49
49
  - LICENSE.txt
50
50
  - README.md
51
51
  - lib/flatware-cucumber.rb
52
+ - lib/flatware/cucumber.rb
52
53
  - lib/flatware/cucumber/cli.rb
53
54
  - lib/flatware/cucumber/formatter.rb
54
55
  - lib/flatware/cucumber/formatters/console.rb
@@ -76,8 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
76
77
  - !ruby/object:Gem::Version
77
78
  version: '0'
78
79
  requirements: []
79
- rubyforge_project:
80
- rubygems_version: 2.7.6
80
+ rubygems_version: 3.0.3
81
81
  signing_key:
82
82
  specification_version: 4
83
83
  summary: A distributed cucumber runner