avocado_formatter 0.0.2 → 0.0.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: 2117bb86ee2283cbb2fa9866cb295697acfa9191
4
- data.tar.gz: e8d3daf2085c18f6be20229b289185b8b1037962
3
+ metadata.gz: 158dd0dee5b8ddd832acc8bc39354753f213688e
4
+ data.tar.gz: 484762f6427a533f691235f94d7c881854876f2d
5
5
  SHA512:
6
- metadata.gz: 5d82d2ca0b6c67e9229e341358656459395a7f43e6f4c6cb825fdee5ad558160996f404f45fc5af9c079a44fc8e46e7b6cd127c1dc85fdd7d72c97eefe9473cd
7
- data.tar.gz: 564b13ea99fcf9981e9a27d098be8422bc2b1930ef35492d2a5b2ed1a65f588d4e283ccc50b8fd0236255a795055c56c1eae5d44ec134c68e79f32c183c7afbd
6
+ metadata.gz: 626c198b682acbafcd9c34ae7e332888fb76d6457f150e60fabb516af210200992c374e8966f1116fb6b95287e09e0267a9e9e0694591246818de697c819d85a
7
+ data.tar.gz: dcd4de9c89fac51878434939b551de718cb8fb88877876f3988a4faa07005aeab53560e1dd46835ba14d27b2a4030fdc7e47480c58e202ecf80c7648ef217029
@@ -10,6 +10,6 @@ Gem::Specification.new do |gem|
10
10
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
11
11
  gem.name = "avocado_formatter"
12
12
  gem.require_paths = ["lib"]
13
- gem.version = '0.0.2'
13
+ gem.version = '0.0.3'
14
14
  gem.license = 'MIT'
15
15
  end
@@ -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.2
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-09 00:00:00.000000000 Z
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: