determinator 2.4.3 → 2.4.4

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: 82c42a19aacd47c09c0e36e9bcd40ee6f9d51cdffa6e88323c11fbe0b6585958
4
- data.tar.gz: 6bdc0c7d84619d372c3a3e9548c9e07db52b8a69f21b0a24d1111011def0d8c5
3
+ metadata.gz: 1b5c2494d530c31a915321c8dbf47713e4ddaed50a0d5858a285e020a87bccf1
4
+ data.tar.gz: 4e9cad995c047a7c8d12aa7dc8228cddfc4a84891c2fc9283b4d41eb26b3bbdf
5
5
  SHA512:
6
- metadata.gz: b2ef63a1af2d69ab269b77a660d1bcb136bef54b2d3cc9b5ef580686c96c5ab8cc39735f58fe05569a8e9867311ca4d000144475a42421f2ee832f3b985edbed
7
- data.tar.gz: 64bd72ec5c94f1a255814b22dd9386d1ffac4e5e109a44cd1d3eb5bddfc119303c99d7ce7d91b55f0cbfb4b367b8051ed0ed8ceb1e465cfedbd463d6fd1f8b61
6
+ metadata.gz: 0727e1e39289a3f89b0d6e20da1139130ca329cdd786af73b7190c3df3f3e958f31d2f92eb09593e00c2503fdb09adf499ac81006baac28094b377e59f7be452
7
+ data.tar.gz: ce5085f303357a3d3e70e082b99f6ef986ee1f5c0a27fee7c0b89d7e6196c6702955e2c70db1897f003316cfcbf3934d99a9379cfa1b11a9659321832141a091
@@ -1,3 +1,8 @@
1
+ # 2.4.4
2
+
3
+ Bug fix:
4
+ - Count repeated determinations instead of tracking separately
5
+
1
6
  # 2.4.3
2
7
 
3
8
  Feature:
@@ -13,6 +13,12 @@ module Determinator
13
13
  def ==(other)
14
14
  id == other.id && guid == other.guid && feature_id == other.feature_id && determination == other.determination
15
15
  end
16
+
17
+ alias eql? ==
18
+
19
+ def hash
20
+ [id, guid, feature_id, determination].hash
21
+ end
16
22
  end
17
23
  end
18
24
  end
@@ -7,19 +7,21 @@ module Determinator
7
7
  attr_reader :type, :determinations
8
8
 
9
9
  def initialize(type)
10
- @determinations = []
10
+ @determinations = Hash.new(0)
11
11
  @type = type
12
12
  @monotonic_start = now
13
13
  @start = Time.now
14
14
  end
15
15
 
16
16
  def track(id, guid, feature, determination)
17
- determinations << Determinator::Tracking::Determination.new(
18
- id: id,
19
- guid: guid,
20
- feature_id: feature.identifier,
21
- determination: determination
22
- )
17
+ determinations[
18
+ Determinator::Tracking::Determination.new(
19
+ id: id,
20
+ guid: guid,
21
+ feature_id: feature.identifier,
22
+ determination: determination
23
+ )
24
+ ] += 1
23
25
  end
24
26
 
25
27
  def finish!(endpoint:, error:, **attributes)
@@ -1,3 +1,3 @@
1
1
  module Determinator
2
- VERSION = '2.4.3'
2
+ VERSION = '2.4.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: determinator
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.3
4
+ version: 2.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - JP Hastings-Spital