spinach-rerun-reporter 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 006667fe629d4e3e10fe8dbb575d0cbf2980851a
4
+ data.tar.gz: cf4d2a67a8918248fb4572759621c7465acb5d90
5
+ SHA512:
6
+ metadata.gz: d46ac5df6db9a07a78f78e454a3b8dafcd61ebde293051ba4784304f4387a24c4920329f29c5bf48f6e6a96a017bdf3da4101c474b391ae8952a08a1fbff43b6
7
+ data.tar.gz: 169fdd71215972b5bf86e3f6c772544b4a8abfb12c26e3848f99451a8254c4e8a470c977db0ccccf6b287e12ba1e88d220bbe3359a4bc1b894c4f5e4038bf8ad
data/LICENSE ADDED
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2015 Javier Aranda <javier@aranda.io>
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in
11
+ all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1 @@
1
+ # spinach-rerun-reporter
@@ -0,0 +1,39 @@
1
+ module Spinach
2
+ class Reporter
3
+ class Rerun < Stdout
4
+ def before_run(*args)
5
+ super(*args)
6
+
7
+ # reset rerun.txt file
8
+ File.delete('tmp/spinach-rerun.txt') if File.file?('tmp/spinach-rerun.txt')
9
+
10
+ # create tmp folder if not exists
11
+ Dir.mkdir('tmp', 0755) unless Dir.exist?('tmp')
12
+
13
+ # rerun list of failing scenarios
14
+ @rerun = []
15
+ end
16
+
17
+ def after_run(success)
18
+ super success
19
+
20
+ # save rerun scenarios in a file
21
+ File.open('tmp/spinach-rerun.txt', 'w') { |f| f.write @rerun.join("\n") } unless success
22
+ end
23
+
24
+ def on_failed_step(step, failure, step_location, step_definitions = nil)
25
+ super step, failure, step_location, step_definitions
26
+
27
+ # save feature file and scenario line
28
+ @rerun << "#{current_feature.filename}:#{current_scenario.line}"
29
+ end
30
+
31
+ def on_error_step(step, failure, step_location, step_definitions = nil)
32
+ super step, failure, step_location, step_definitions
33
+
34
+ # save feature file and scenario line
35
+ @rerun << "#{current_feature.filename}:#{current_scenario.line}"
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1 @@
1
+ require_relative 'spinach/reporter/rerun'
metadata ADDED
@@ -0,0 +1,65 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: spinach-rerun-reporter
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Javier
8
+ - Aranda
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2015-07-28 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: spinach
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: '0.8'
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - "~>"
26
+ - !ruby/object:Gem::Version
27
+ version: '0.8'
28
+ description: ''
29
+ email:
30
+ - javier@aranda.io
31
+ executables: []
32
+ extensions: []
33
+ extra_rdoc_files:
34
+ - README.md
35
+ - LICENSE
36
+ files:
37
+ - LICENSE
38
+ - README.md
39
+ - lib/spinach-rerun-reporter.rb
40
+ - lib/spinach/reporter/rerun.rb
41
+ homepage: https://github.com/arandaio/spinach-rerun-reporter
42
+ licenses:
43
+ - MIT
44
+ metadata: {}
45
+ post_install_message:
46
+ rdoc_options: []
47
+ require_paths:
48
+ - lib
49
+ required_ruby_version: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: 2.2.0
54
+ required_rubygems_version: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - ">="
57
+ - !ruby/object:Gem::Version
58
+ version: '0'
59
+ requirements: []
60
+ rubyforge_project:
61
+ rubygems_version: 2.4.6
62
+ signing_key:
63
+ specification_version: 4
64
+ summary: spinach rerun reporter
65
+ test_files: []