avocado_formatter 0.0.2 → 0.0.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/avocado_formatter.gemspec +1 -1
- data/lib/avocado_formatter/cucumber.rb +66 -0
- 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: 158dd0dee5b8ddd832acc8bc39354753f213688e
|
4
|
+
data.tar.gz: 484762f6427a533f691235f94d7c881854876f2d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 626c198b682acbafcd9c34ae7e332888fb76d6457f150e60fabb516af210200992c374e8966f1116fb6b95287e09e0267a9e9e0694591246818de697c819d85a
|
7
|
+
data.tar.gz: dcd4de9c89fac51878434939b551de718cb8fb88877876f3988a4faa07005aeab53560e1dd46835ba14d27b2a4030fdc7e47480c58e202ecf80c7648ef217029
|
data/avocado_formatter.gemspec
CHANGED
@@ -0,0 +1,66 @@
|
|
1
|
+
require 'socket'
|
2
|
+
|
3
|
+
module AvocadoFormatter
|
4
|
+
class Cucumber
|
5
|
+
|
6
|
+
def label(feature)
|
7
|
+
feature.short_name
|
8
|
+
end
|
9
|
+
|
10
|
+
def initialize(runtime, path_or_io, options)
|
11
|
+
@runtime, @io, @options = runtime, ensure_io(path_or_io), options
|
12
|
+
@hostname = 'localhost'
|
13
|
+
@port = '1336'
|
14
|
+
@socket = TCPSocket.open(@hostname, @port)
|
15
|
+
@socket.puts(@runtime.scenarios.length);
|
16
|
+
@socket.puts(@runtime.steps.length);
|
17
|
+
end
|
18
|
+
|
19
|
+
def before_feature(feature)
|
20
|
+
# @io.print "#{label(feature)} "
|
21
|
+
# @io.flush
|
22
|
+
# @exceptions = []
|
23
|
+
# @start_time = Time.now
|
24
|
+
@socket.puts(label(feature));
|
25
|
+
end
|
26
|
+
|
27
|
+
def after_feature(feature)
|
28
|
+
# print_elapsed_time @io, @start_time
|
29
|
+
# @io.puts
|
30
|
+
#
|
31
|
+
# @exceptions.each do |(exception, status)|
|
32
|
+
# print_exception(exception, status, 2)
|
33
|
+
# end
|
34
|
+
end
|
35
|
+
|
36
|
+
def exception(exception, status)
|
37
|
+
@exceptions << [exception, status]
|
38
|
+
super if defined?(super)
|
39
|
+
end
|
40
|
+
|
41
|
+
def after_features(features)
|
42
|
+
# @io.puts
|
43
|
+
# print_stats(features, @options)
|
44
|
+
# print_snippets(@options)
|
45
|
+
# print_passing_wip(@options)
|
46
|
+
end
|
47
|
+
|
48
|
+
CHARS = {
|
49
|
+
:passed => '.',
|
50
|
+
:failed => 'F',
|
51
|
+
:undefined => 'U',
|
52
|
+
:pending => 'P',
|
53
|
+
:skipped => '-'
|
54
|
+
}
|
55
|
+
|
56
|
+
def progress(status)
|
57
|
+
char = CHARS[status]
|
58
|
+
@socket.puts(char);
|
59
|
+
# @io.print(format_string(char, status))
|
60
|
+
# @io.flush
|
61
|
+
end
|
62
|
+
|
63
|
+
def done
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: avocado_formatter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- George Karagkiaouris
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-12 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: RSpec/Cucumber formatter that connects with Avocado
|
14
14
|
email:
|