yabeda 0.6.2 → 0.7.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
  SHA256:
3
- metadata.gz: fbc7c44d3d257c23cdbce5b423db52c4f2591c21737d939d9dce8df53c557f04
4
- data.tar.gz: 9c68a889b0f978a4471b0458e4d48903ab019ae7dfc6948b55cb5a5147060127
3
+ metadata.gz: 8e30282089c3784919bbdfef129e36f9898bbe30376dec4148ab45551835e95a
4
+ data.tar.gz: 9abb1750e05b17f4f97f5d3c91d9eaf6f638c735b82d46baa1618500edf373da
5
5
  SHA512:
6
- metadata.gz: 2cd9007fda7bd41d90a20238ac81dd4d2efe46e39f5473e7e0c318f5efb984f6b3e0843a06fb5c325514f0e4282fae98b2fcfc9f9920bdfbccfca946de32b910
7
- data.tar.gz: 0d429f2971ff62ec68d36bedf089ef5f203a8c63cabaddd917704529d6aaf307999ac3d2716207abb9c37be23e42d5dcdc3115d5a6eb8551eb23ef940aefb80d
6
+ metadata.gz: b8fb61bea63f36d9f8ea98985c12d5247cefe7463ad2129f3bbda1ffbff34cc8faa4b71d797f44e02cc957a2159cdca3b53996fbf641e496476ab04e47489f3d
7
+ data.tar.gz: 66f06b7e63832eda3d43e0266fc4aa38726b261215a5308930bc9757a344dd60f43844a3d9b5f74a62069e1c090664248505d8a2408f0d6801685ccd926ea8b4
@@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
6
6
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## 0.7.0 - 2020-08-07
9
+
10
+ ### Added
11
+
12
+ - `#increment` and `#decrement` convenience methods for `Yabeda::Gauge`. [#13](https://github.com/yabeda-rb/yabeda/pull/13) by [@dsalahutdinov]
13
+ - Ability to use custom step in `#increment` and `#decrement` for gauges. [@Envek]
14
+
15
+ ### Fixed
16
+
17
+ - Account for default tags in `Yabeda::Metric#get`. [@Envek]
18
+
8
19
  ## 0.6.2 - 2020-08-04
9
20
 
10
21
  ### Fixed
@@ -67,7 +78,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
67
78
 
68
79
  ### Fixed
69
80
 
70
- - Removed accidental dependency from Rails. @dsalahutdinov
81
+ - Removed accidental dependency from Rails. [@dsalahutdinov]
71
82
 
72
83
  ## 0.1.1 - 2018-10-17
73
84
 
@@ -80,4 +91,5 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
80
91
  - Initial release of evil-metrics gem. @Envek
81
92
 
82
93
  [@Envek]: https://github.com/Envek "Andrey Novikov"
94
+ [@dsalahutdinov]: https://github.com/dsalahutdinov "Dmitry Salahutdinov"
83
95
  [@asusikov]: https://github.com/asusikov "Alexander Susikov"
@@ -11,5 +11,13 @@ module Yabeda
11
11
  end
12
12
  value
13
13
  end
14
+
15
+ def increment(tags, by: 1)
16
+ set(tags, get(tags).to_i + by)
17
+ end
18
+
19
+ def decrement(tags, by: 1)
20
+ set(tags, get(tags).to_i - by)
21
+ end
14
22
  end
15
23
  end
@@ -17,7 +17,7 @@ module Yabeda
17
17
 
18
18
  # Returns the value for the given label set
19
19
  def get(labels = {})
20
- values[labels]
20
+ values[::Yabeda::Tags.build(labels)]
21
21
  end
22
22
 
23
23
  def values
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Yabeda
4
- VERSION = "0.6.2"
4
+ VERSION = "0.7.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yabeda
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrey Novikov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-04 00:00:00.000000000 Z
11
+ date: 2020-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby