uuid-ncname 0.2.4 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/README.md +4 -5
- data/lib/uuid/ncname.rb +10 -10
- data/lib/uuid/ncname/version.rb +4 -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: 0eaed682c9e65dd5d15a576fcc62b0f234cc70481017aaac64eef84afe3bb6ea
|
|
4
|
+
data.tar.gz: f55eadabe095625c795d7cefda9e2cedc9643d383d0e1ecd17b375f3897b99ac
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9f060166823eb018f830787177ad331d2e530d5036341802e8ae5b49c6f4a2e661ee8e8a273573bca44ab24904a33b754f7efcbe196e174c998a9a97958514fa
|
|
7
|
+
data.tar.gz: e9fbb9c79c496bf639eef5d500e07f9b8f7207739a04c36aea1d6035fb56ddbd5581d8f33b63058a074f4fa35e5d23a9982315f2b14d3533b939f2f9fee89d5c
|
data/.gitignore
CHANGED
data/README.md
CHANGED
|
@@ -83,11 +83,10 @@ variants.
|
|
|
83
83
|
|
|
84
84
|
Since I have already released this gem prior to this format change, I
|
|
85
85
|
have added a `:version` parameter to both `to_ncname` and
|
|
86
|
-
`from_ncname`. The version
|
|
87
|
-
will issue a warning if not explicitly
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
code written during the transition produces the correct results.
|
|
86
|
+
`from_ncname`. The version, as of 0.2.4, now defaults to `1`, the
|
|
87
|
+
current one, but will still issue a warning if not explicitly
|
|
88
|
+
set. Later I will finally remove the warning. This should ensure that
|
|
89
|
+
any code written during the transition produces the correct results.
|
|
91
90
|
|
|
92
91
|
> Unless you have to support identifiers generated from version 0.1.3
|
|
93
92
|
> or older, you should be running these methods with `version: 1`.
|
data/lib/uuid/ncname.rb
CHANGED
|
@@ -212,9 +212,9 @@ module UUID::NCName
|
|
|
212
212
|
# @param format [:str, :hex, :b64, :bin] An optional formatting
|
|
213
213
|
# parameter; defaults to `:str`, the canonical string representation.
|
|
214
214
|
#
|
|
215
|
-
# @param version [0, 1] See
|
|
215
|
+
# @param version [0, 1] See ::to_ncname. Defaults to 1.
|
|
216
216
|
#
|
|
217
|
-
# @param align [nil, true, false] See
|
|
217
|
+
# @param align [nil, true, false] See ::to_ncname for details.
|
|
218
218
|
# Setting this parameter to `nil`, the default, will cause the
|
|
219
219
|
# decoder to detect the alignment state from the identifier.
|
|
220
220
|
#
|
|
@@ -275,9 +275,9 @@ module UUID::NCName
|
|
|
275
275
|
#
|
|
276
276
|
# @param uuid [#to_s] The UUID
|
|
277
277
|
#
|
|
278
|
-
# @param version [0, 1] See
|
|
278
|
+
# @param version [0, 1] See ::to_ncname.
|
|
279
279
|
#
|
|
280
|
-
# @param align [true, false] See
|
|
280
|
+
# @param align [true, false] See ::to_ncname.
|
|
281
281
|
#
|
|
282
282
|
# @return [String] The Base64-encoded NCName
|
|
283
283
|
|
|
@@ -291,9 +291,9 @@ module UUID::NCName
|
|
|
291
291
|
#
|
|
292
292
|
# @param format [:str, :hex, :b64, :bin] The format
|
|
293
293
|
#
|
|
294
|
-
# @param version [0, 1] See
|
|
294
|
+
# @param version [0, 1] See ::to_ncname.
|
|
295
295
|
#
|
|
296
|
-
# @param align [true, false] See
|
|
296
|
+
# @param align [true, false] See ::to_ncname.
|
|
297
297
|
#
|
|
298
298
|
# @return [String, nil] The corresponding UUID or nil if the input
|
|
299
299
|
# is malformed.
|
|
@@ -306,9 +306,9 @@ module UUID::NCName
|
|
|
306
306
|
#
|
|
307
307
|
# @param uuid [#to_s] The UUID
|
|
308
308
|
#
|
|
309
|
-
# @param version [0, 1] See
|
|
309
|
+
# @param version [0, 1] See ::to_ncname.
|
|
310
310
|
#
|
|
311
|
-
# @param align [true, false] See
|
|
311
|
+
# @param align [true, false] See ::to_ncname.
|
|
312
312
|
#
|
|
313
313
|
# @return [String] The Base32-encoded NCName
|
|
314
314
|
|
|
@@ -322,9 +322,9 @@ module UUID::NCName
|
|
|
322
322
|
#
|
|
323
323
|
# @param format [:str, :hex, :b64, :bin] The format
|
|
324
324
|
#
|
|
325
|
-
# @param version [0, 1] See
|
|
325
|
+
# @param version [0, 1] See ::to_ncname.
|
|
326
326
|
#
|
|
327
|
-
# @param align [true, false] See
|
|
327
|
+
# @param align [true, false] See ::to_ncname.
|
|
328
328
|
#
|
|
329
329
|
# @return [String, nil] The corresponding UUID or nil if the input
|
|
330
330
|
# is malformed.
|
data/lib/uuid/ncname/version.rb
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
# this is here because it reasonable to expect a *class* in the
|
|
2
|
+
# namespace called UUID, so if you say `module UUID; module NCName`,
|
|
3
|
+
# it will croak with a "TypeError: UUID is not a module".
|
|
1
4
|
unless Module.const_defined? 'UUID'
|
|
2
5
|
module UUID; end
|
|
3
6
|
end
|
|
4
7
|
|
|
5
8
|
module UUID::NCName
|
|
6
|
-
|
|
9
|
+
VERSION = "0.2.5"
|
|
7
10
|
end
|