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 +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/determinator/tracking/determination.rb +6 -0
- data/lib/determinator/tracking/tracker.rb +9 -7
- data/lib/determinator/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b5c2494d530c31a915321c8dbf47713e4ddaed50a0d5858a285e020a87bccf1
|
4
|
+
data.tar.gz: 4e9cad995c047a7c8d12aa7dc8228cddfc4a84891c2fc9283b4d41eb26b3bbdf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0727e1e39289a3f89b0d6e20da1139130ca329cdd786af73b7190c3df3f3e958f31d2f92eb09593e00c2503fdb09adf499ac81006baac28094b377e59f7be452
|
7
|
+
data.tar.gz: ce5085f303357a3d3e70e082b99f6ef986ee1f5c0a27fee7c0b89d7e6196c6702955e2c70db1897f003316cfcbf3934d99a9379cfa1b11a9659321832141a091
|
data/CHANGELOG.md
CHANGED
@@ -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
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
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)
|
data/lib/determinator/version.rb
CHANGED