mettric 0.2.5 → 0.3.0

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: cced7de227f54677b7e5aaf5b243ae66dc04a6bc
4
- data.tar.gz: b701806fa6ac95e05136d38f1b2f5d3e8c32c422
3
+ metadata.gz: bf29224def9171b196e8989bcd132f881267b6d8
4
+ data.tar.gz: 2d83a52017f9ac892171c3769cc6efbec985bdc3
5
5
  SHA512:
6
- metadata.gz: d74986e86a55da01be207034a62f07830a4da1095c32a31489c12004b6267c048d80b0c9a9982669c21eca0d7091da72de33cd12a9b889e0d7afa3b619d65378
7
- data.tar.gz: 1415b20d1184135cf4a21a66cf4971f0ea4ceca1055435611786a9bf3ebb04d6eaf96be6b6ee993a0f83f447d519f78556f5d7467f180f2fd13c2d06ed19ab4c
6
+ metadata.gz: 6e260be235860e9cc427db18a92035a1866b260e7a5424b1115557d507c1a685426cf4a71e53ff6e51defb2fdcbb3c6a9d22f98683e2438409c7d1a45801e81d
7
+ data.tar.gz: da2ade0317bc8db6c1c156774ad4405b54ad9dc2d671f274201afd636322a2bfe79c7b9488afc6c689ffe1db366b315f0b9723600d328b497f6fc2041753e4f0
@@ -1,3 +1,7 @@
1
+ 0.3.0 (2016-07-26)
2
+ ==================
3
+ - Make Mettric.time return what the block returned
4
+
1
5
  0.2.5 (2016-07-26)
2
6
  ==================
3
7
  - don't swallow exceptions in Mettric.time
@@ -45,10 +45,11 @@ class Mettric
45
45
  # To track durations
46
46
  def self.time(payload)
47
47
  exception = nil
48
+ result = nil
48
49
  state = 'success'
49
50
  start = Time.now
50
51
  begin
51
- yield
52
+ result = yield
52
53
  rescue => e
53
54
  exception = e
54
55
  state = 'failure'
@@ -57,7 +58,7 @@ class Mettric
57
58
  payload[:description] = [payload[:description], "(ms)"].compact.join(' ')
58
59
  payload[:tags] ||= []
59
60
  payload[:tags] << :timing
60
- result = track(payload)
61
+ track(payload)
61
62
  raise exception if exception
62
63
  result
63
64
  end
@@ -1,3 +1,3 @@
1
1
  class Mettric
2
- VERSION = "0.2.5"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mettric
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jannis Hermanns