uuid-ncname 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -5
- data/lib/uuid/ncname/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: 9e388102139409aff9de824bcff21d8a7793796425d781e896deb04ad1032fce
|
4
|
+
data.tar.gz: 06ff6b9f8f141db4fc5d3458c814be989f315b9f2bb3c77dc9a2ee81ba7d7b0c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66abf5bf9d94bf70b268c5e0a96f99b7579903f6e3dc3c697afcfb99a64acc58da32a1340269d5f93e2a9cec1cdb0f261da21d2c94c94462d5487a80a2301b4b
|
7
|
+
data.tar.gz: 00e7081505f5a836bf5073e0b7a489a3b3a0e2620f54cc7619224786b09019fc5b9af43448a35393b6679a1256d4729f0a3f174d50d6ecb85a383a56fa5832c1
|
data/README.md
CHANGED
@@ -7,14 +7,19 @@ require 'uuidtools'
|
|
7
7
|
uu = UUIDTools::UUID.random_create
|
8
8
|
# => #<UUID:0x3fff0e597ef8 UUID:df521e0a-9d57-4f04-9a95-fc2888decc5a>
|
9
9
|
|
10
|
-
|
11
|
-
nc32 = UUID::NCName.to_ncname_32 uu # => "E35jb4cu5k7yetkk7ykei33gfk"
|
10
|
+
# see below about this :version parameter
|
12
11
|
|
13
|
-
|
12
|
+
nc64 = UUID::NCName.to_ncname uu, version: 1
|
13
|
+
# => "E31IeCp1X8EqV_CiI3sxaJ"
|
14
|
+
|
15
|
+
nc32 = UUID::NCName.to_ncname_32 uu, version: 1
|
16
|
+
# => "E35jb4cu5k7yevfp4fcen5tc2j"
|
17
|
+
|
18
|
+
orig = UUID::NCName.from_ncname nc64, version: 1
|
14
19
|
# => "df521e0a-9d57-4f04-9a95-fc2888decc5a"
|
15
20
|
|
16
|
-
orig == UUID::NCName.from_ncname nc32 # => true
|
17
|
-
orig == uu.to_s
|
21
|
+
orig == UUID::NCName.from_ncname nc32, version: 1 # => true
|
22
|
+
orig == uu.to_s # => true
|
18
23
|
|
19
24
|
# then you can turn it back into an object or whatever
|
20
25
|
uu == UUIDTools::UUID.parse(orig) # => true
|
data/lib/uuid/ncname/version.rb
CHANGED