res 1.2.8 → 1.2.9

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: 1fa76535601715e280e0383732b9eabf5820d513
4
- data.tar.gz: 5a6872728674c42f61f10ee0979d07c54108229f
3
+ metadata.gz: e9de4ed8f0de1b609819a546d41a75519667ccb8
4
+ data.tar.gz: a2be68478e937ff44dfdde6f525bebe2d85666e9
5
5
  SHA512:
6
- metadata.gz: 6127b112a359b3fb8b9557a70cefd67ee5262a2425e2e5f83450d49200f8787cd250a75b80744f813dff298ef3c816429fd876f76e636e11fb8be9a1b9b34577
7
- data.tar.gz: 32adea0c914f992ac6c8dfba21c177743a4718a0c4d10191b232998f2d7b36d11c5220f207cb0ec88912a4d4c06faa4b6011e58ea6af675fbf8fbba71a888923
6
+ metadata.gz: 75889fec1660375681a80fffe8490cb9c03b9d6fe3e0fb9ab40b3da852cbe79b896a1079bcb0a9ba1b938d827ab1615beff3ee64be53a0d0d19fdbd2df217ec0
7
+ data.tar.gz: ab54551c0fc918f84e4740d14d629305c21f475a466e4d1726785d475833b6944a71910ba0a11109d1e79b7f89a150421a1c3c5f79000b55fe0d1fb82ca990cd
data/lib/res.rb CHANGED
@@ -56,4 +56,8 @@ module Res
56
56
  @data
57
57
  end
58
58
 
59
+ def self.perf_data= data
60
+ @data = data
61
+ end
62
+
59
63
  end
@@ -7,7 +7,10 @@ module Res
7
7
 
8
8
  attr_accessor :output, :result, :start_time
9
9
  RSpec::Core::Formatters.register self, :start,
10
- :example_group_started, :example_passed, :example_failed, :example_pending,
10
+ :example_group_started,
11
+ :example_passed,
12
+ :example_failed,
13
+ :example_pending,
11
14
  :stop, :start_dump
12
15
 
13
16
 
@@ -99,14 +102,20 @@ module Res
99
102
  end
100
103
  i += 1
101
104
  end
102
- result[:values] = Res.perf_data.pop if !Res.perf_data.empty?
103
- end
105
+ end
104
106
  result
105
107
  end
106
108
 
107
109
  def set_status(result, urn, status)
108
110
  result.each do |r|
109
111
  if r[:type] == "Rspec::Describe"
112
+ if Res.perf_data.size > 0
113
+ r[:values] ||= {}
114
+ Res.perf_data.each do |p|
115
+ r[:values].merge! p
116
+ end
117
+ Res.perf_data = []
118
+ end
110
119
  set_status(r[:children], urn, status)
111
120
  elsif r[:type] == "Rspec::Test"
112
121
  if r[:urn] == urn
@@ -1,3 +1,3 @@
1
1
  module Res
2
- VERSION = '1.2.8'
2
+ VERSION = '1.2.9'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: res
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.8
4
+ version: 1.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - BBC
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-05-15 00:00:00.000000000 Z
13
+ date: 2016-05-16 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: json