clusterid 1.0.0 → 1.0.1
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/clusterid/v1/value.rb +15 -1
- data/lib/clusterid/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed2451fa08500d8ba5e920f5f90663dbbc1e3ad2c23847286ad3ea6d6b64f1eb
|
4
|
+
data.tar.gz: f548685c834b0025631d569865efb510d23555f028dca67b091a638c1652637e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3e69fc747ebf7721ea669ae753e73d0399d8228e627312962eeab0404bdf7c09cee0be90cc088d626f85e17dfb9df09cc57250fdf1fd7b9581fde565353deb9
|
7
|
+
data.tar.gz: d504bf0f8a1e9d7bc90d3d70b0ff9b3e3b967d6277ace20f1167c8865ed856249c39c4a1504561f04ae025301bc3abb11e50d3d11444e92394c7f3317936ca58
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,9 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## v1.0.1 - 2022-03-07
|
4
|
+
### Changed
|
5
|
+
- The `ClusterId::V1::Value#<=>` method now returns `nil` for uncomparable types.
|
6
|
+
- The `ClusterId::V1::Value#<=>` method has been updated to compare against all properties except version.
|
7
|
+
|
3
8
|
## v1.0.0 - 2022-02-26
|
4
9
|
- Initial release
|
data/lib/clusterid/v1/value.rb
CHANGED
@@ -112,7 +112,21 @@ module ClusterId
|
|
112
112
|
# @param other [Value] the object to compare against
|
113
113
|
# @return [-1, 0, 1] -1 when less than +other+, 0 when equal to +other+, 1 when greater than +other+
|
114
114
|
def <=>(other)
|
115
|
-
|
115
|
+
return nil if self.class != other.class
|
116
|
+
|
117
|
+
cmp = datetime <=> other.datetime
|
118
|
+
return cmp unless cmp.zero?
|
119
|
+
|
120
|
+
cmp = data_centre <=> other.data_centre
|
121
|
+
return cmp unless cmp.zero?
|
122
|
+
|
123
|
+
cmp = environment <=> other.environment
|
124
|
+
return cmp unless cmp.zero?
|
125
|
+
|
126
|
+
cmp = type_id <=> other.type_id
|
127
|
+
return cmp unless cmp.zero?
|
128
|
+
|
129
|
+
nonce <=> other.nonce
|
116
130
|
end
|
117
131
|
end
|
118
132
|
end
|
data/lib/clusterid/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clusterid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephan Tarulli
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-03-08 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Create unique identifiers for entities in distributed systems
|
14
14
|
email:
|
@@ -38,7 +38,7 @@ metadata:
|
|
38
38
|
source_code_uri: https://github.com/tinychameleon/clusterid
|
39
39
|
changelog_uri: https://github.com/tinychameleon/clusterid/blob/main/CHANGELOG.md
|
40
40
|
bug_tracker_uri: https://github.com/tinychameleon/clusterid/issues
|
41
|
-
documentation_uri: https://tinychameleon.github.
|
41
|
+
documentation_uri: https://tinychameleon.github.io/clusterid/
|
42
42
|
post_install_message:
|
43
43
|
rdoc_options: []
|
44
44
|
require_paths:
|