rdf 2.2.6 → 2.2.7

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
  SHA1:
3
- metadata.gz: 671733c01fd3701c8f8d7148b8a54a8ffa3e233a
4
- data.tar.gz: bbd4ea7216916b5d2ad9a52d66f6d0b6b6fca8c7
3
+ metadata.gz: bb99255dac04c747b9392d7f487ec45e31ef79bc
4
+ data.tar.gz: 213f13c8b38eaf7a8324c6002c7bf412f22933e3
5
5
  SHA512:
6
- metadata.gz: 55ee3186049b69421a3b4ef414ed42e76c2e838773a83441890535d28a0ab9e4bbd64927637254ff5ad276fc502fea7f31be6db7d9da1787c067f7f894a9c2d8
7
- data.tar.gz: bdcca124b5f65fb94207b25912f8002c94ca6704d3b364c65f519774133938d2cdbece606e05293bfe5e809d95c104dc69395dc5fabec048f24b2102616a0204
6
+ metadata.gz: 00d4369281d4945fa1252c79c284928655d5f57c5b96c094be795025cd3db52b8a2f693a52d692cb0e1646921d5cc8137c47039acd1dfb63ec18918a55162176
7
+ data.tar.gz: 94df47f23a50f7c45f40456d444e2a133df3d71b778663184998824e7496f08b78f5419d2a233697a338b43e4efe31466bb887aef3de0a8be6616e2b7f7363dc
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.2.6
1
+ 2.2.7
@@ -30,19 +30,28 @@ module RDF
30
30
  ##
31
31
  # Returns a blank node with a random UUID-based identifier.
32
32
  #
33
+ # (Depends on availability of either `uuid` or `uuidtools` gems).
34
+ #
35
+ # @param [:default, :compact] format (:default)
36
+ # Formats supported by the UUID generator:
37
+ # * `:default` Produces 36 characters, including hyphens separating the UUID value parts
38
+ # * `:compact` Produces a 32 digits (hexadecimal) value with no hyphens
39
+ # * `:urn` Adds the prefix urn:uuid: to the default format
33
40
  # @param [Regexp] grammar (nil)
34
41
  # a grammar specification that the generated UUID must match
42
+ # The UUID is generated such that its initial part is guaranteed
43
+ # to match the given `grammar`, e.g. `/^[A-Za-z][A-Za-z0-9]*/`.
44
+ # Some RDF storage systems (e.g. AllegroGraph) require this.
45
+ # Requires that the `uuid` gem be loadable to use `format`
35
46
  # @return [RDF::Node]
36
- def self.uuid(grammar: nil)
47
+ def self.uuid(format: :default, grammar: nil)
37
48
  case
38
49
  when grammar
39
- # The UUID is generated such that its initial part is guaranteed
40
- # to match the given `grammar`, e.g. `/^[A-Za-z][A-Za-z0-9]*/`.
41
- # Some RDF storage systems (e.g. AllegroGraph) require this.
42
- # @see http://github.com/bendiken/rdf/pull/43
43
- uuid = RDF::Util::UUID.generate(options) until uuid =~ grammar
50
+ warn "[DEPRECATION] The grammar parameter to RDF::Node#uri is deprecated.\n" +
51
+ "Called from #{Gem.location_of_caller.join(':')}"
52
+ uuid = RDF::Util::UUID.generate(format: format) until uuid =~ grammar
44
53
  else
45
- uuid = RDF::Util::UUID.generate(options)
54
+ uuid = RDF::Util::UUID.generate(format: format)
46
55
  end
47
56
  self.new(uuid)
48
57
  end
@@ -14,13 +14,11 @@ module RDF; module Util
14
14
  # [UUIDTools]: http://rubygems.org/gems/uuidtools
15
15
  #
16
16
  # @param [:default, :compact, :urn] format (:default)
17
- # @param [Hash{Symbol => Object}] options
18
- # any options to pass through to the underlying UUID library
19
17
  # @return [String] a UUID string
20
18
  # @raise [LoadError] if no UUID library is available
21
19
  # @see http://rubygems.org/gems/uuid
22
20
  # @see http://rubygems.org/gems/uuidtools
23
- def self.generate(format: :default, **options)
21
+ def self.generate(format: :default)
24
22
  begin
25
23
  require 'uuid'
26
24
  ::UUID.generate(format)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdf
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.6
4
+ version: 2.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arto Bendiken
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-04-15 00:00:00.000000000 Z
13
+ date: 2017-07-28 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: link_header
@@ -298,7 +298,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
298
298
  version: '0'
299
299
  requirements: []
300
300
  rubyforge_project: rdf
301
- rubygems_version: 2.6.11
301
+ rubygems_version: 2.6.12
302
302
  signing_key:
303
303
  specification_version: 4
304
304
  summary: A Ruby library for working with Resource Description Framework (RDF) data.