rdf 2.0.0.beta2 → 2.0.0

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: 93fe92b9d0141e5c9537bdd33df4ac48b16dd614
4
- data.tar.gz: 48c1f403490e61487a6d66cc2b9434e1199ddd2f
3
+ metadata.gz: 523f47ae54751bebd787e2c6e89a873c9840a864
4
+ data.tar.gz: 983597fbc20f6f76112c305fc1381cd121f0460a
5
5
  SHA512:
6
- metadata.gz: 766b89bac9456158ba2e3bc4640e5b3e4c361e4a20ac72737d259146223f224523f059f302331edb9a58ade726a03fc3f45e0672a404e47f73b9044529548aaa
7
- data.tar.gz: e5327946f1f6b1d41e05b262b8fb64a4efeec329aafb14107e2e46a92c15b0e7cd217fded4e4339f83f034b6f87a690d1c387ebe21f8923e731e2006e4fc4201
6
+ metadata.gz: 5a2ac12b5cf718284a678b37c1fab90b2d8e169f719dfc24af2ec1a4a2094672008d69bf3c8c8af3e4d4c67083a1e86966b237d9f68a13aa663f9e867dfae54b
7
+ data.tar.gz: a9791dc9db755abdb52811f0a238c1294e830fe3d4f4fe0f7451e3bdc6734bca379a384e300fe0ee77c059749b55506dce5ae6be033c2de1cfbfb13a3f0f6550
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.0.beta2
1
+ 2.0.0
data/lib/rdf.rb CHANGED
@@ -120,11 +120,7 @@ module RDF
120
120
  #
121
121
  # @param (see RDF::Graph#initialize)
122
122
  # @return [RDF::Graph]
123
- def self.Graph(*args, **options, &block)
124
- unless args.empty?
125
- warn "[DEPRECATION] Graph#initialize now uses keyword arguments. Called from #{Gem.location_of_caller.join(':')}"
126
- options[:graph_name] ||= args.first
127
- end
123
+ def self.Graph(**options, &block)
128
124
  Graph.new(options, &block)
129
125
  end
130
126
 
@@ -87,25 +87,13 @@ module RDF
87
87
  end
88
88
 
89
89
  ##
90
- # @overload initialize(graph_name, options)
91
- # @param [RDF::Resource] graph_name
92
- # The graph_name from the associated {RDF::Queryable} associated
93
- # with this graph as provided with the `:data` option
94
- # (only for {RDF::Queryable} instances supporting
95
- # named graphs).
96
- # @param [Hash{Symbol => Object}] options
97
- # @option options [RDF::Queryable] :data (RDF::Repository.new)
98
- # Storage behind this graph.
99
- # @deprecated This form is deprecated in version 2.0.
100
- #
101
- # @overload initialize(graph_name: nil, data: nil)
102
- # @param [RDF::Resource] graph_name
103
- # The graph_name from the associated {RDF::Queryable} associated
104
- # with this graph as provided with the `:data` option
105
- # (only for {RDF::Queryable} instances supporting
106
- # named graphs).
107
- # @param [RDF::Queryable] :data (RDF::Repository.new)
108
- # Storage behind this graph.
90
+ # @param [RDF::Resource] graph_name
91
+ # The graph_name from the associated {RDF::Queryable} associated
92
+ # with this graph as provided with the `:data` option
93
+ # (only for {RDF::Queryable} instances supporting
94
+ # named graphs).
95
+ # @param [RDF::Queryable] :data (RDF::Repository.new)
96
+ # Storage behind this graph.
109
97
  #
110
98
  # @raise [ArgumentError] if a `data` does not support named graphs.
111
99
  # @note
@@ -115,12 +103,7 @@ module RDF
115
103
  # graphs which are named, but the name is not a property of the graph.
116
104
  # @yield [graph]
117
105
  # @yieldparam [Graph]
118
- def initialize(*args, graph_name: nil, data: nil, **options, &block)
119
- unless args.empty?
120
- warn "[DEPRECATION] Graph#initialize now uses keyword arguments. Called from #{Gem.location_of_caller.join(':')}"
121
- graph_name ||= args.first
122
- end
123
-
106
+ def initialize(graph_name: nil, data: nil, **options, &block)
124
107
  @graph_name = case graph_name
125
108
  when nil then nil
126
109
  when RDF::Resource then graph_name
@@ -48,29 +48,14 @@ module RDF
48
48
  # g = RDF::Graph.new << l
49
49
  # g.count # => l.count
50
50
  #
51
- # @overload initialize(subject = nil, graph = nil, values = nil, &block)
52
- # @param [RDF::Resource] subject
53
- # Subject should be an {RDF::Node}, not a {RDF::URI}. A list with an IRI head will not validate, but is commonly used to detect if a list is valid.
54
- # @param [RDF::Graph] graph
55
- # @param [Array<RDF::Term>] values
56
- # Any values which are not terms are coerced to `RDF::Literal`.
57
- # @yield [list]
58
- # @yieldparam [RDF::List] list
59
- # @deprecated This form is deprecated in version 2.0
60
- #
61
- # @overload initialize(subject: nil, graph: nil, values: nil, &block)
62
- # @param [RDF::Resource] subject (RDF.nil)
63
- # Subject should be an {RDF::Node}, not a {RDF::URI}. A list with an IRI head will not validate, but is commonly used to detect if a list is valid.
64
- # @param [RDF::Graph] graph (RDF::Graph.new)
65
- # @param [Array<RDF::Term>] values
66
- # Any values which are not terms are coerced to `RDF::Literal`.
67
- # @yield [list]
68
- # @yieldparam [RDF::List] list
69
- #
70
- def initialize(*args, subject: nil, graph: nil, values: nil, &block)
71
- unless args.empty?
72
- raise ArgumentError, "[FATAL DEPRECATION] List#initialize now uses keyword arguments. Called from #{Gem.location_of_caller.join(':')}"
73
- end
51
+ # @param [RDF::Resource] subject (RDF.nil)
52
+ # Subject should be an {RDF::Node}, not a {RDF::URI}. A list with an IRI head will not validate, but is commonly used to detect if a list is valid.
53
+ # @param [RDF::Graph] graph (RDF::Graph.new)
54
+ # @param [Array<RDF::Term>] values
55
+ # Any values which are not terms are coerced to `RDF::Literal`.
56
+ # @yield [list]
57
+ # @yieldparam [RDF::List] list
58
+ def initialize(subject: nil, graph: nil, values: nil, &block)
74
59
  @subject = subject || RDF.nil
75
60
  @graph = graph || RDF::Graph.new
76
61
  is_empty = @graph.query(subject: subject, predicate: RDF.first).empty?
@@ -118,8 +118,8 @@ module RDF
118
118
  #
119
119
  # @deprecated
120
120
  # @return [RDF::Enumerable]
121
- attr_reader :deletes
122
121
  def deletes
122
+ warn "[DEPRECATION] Transaction#deletes now uses keyword arguments. Called from #{Gem.location_of_caller.join(':')}"
123
123
  self.changes.deletes
124
124
  end
125
125
 
@@ -128,8 +128,8 @@ module RDF
128
128
  #
129
129
  # @deprecated
130
130
  # @return [RDF::Enumerable]
131
- attr_reader :inserts
132
131
  def inserts
132
+ warn "[DEPRECATION] Transaction#inserts now uses keyword arguments. Called from #{Gem.location_of_caller.join(':')}"
133
133
  self.changes.inserts
134
134
  end
135
135
 
@@ -92,14 +92,14 @@ module RDF
92
92
 
93
93
  @output.print %(# -*- encoding: utf-8 -*-
94
94
  # frozen_string_literal: true
95
- # This file generated automatically using vocab-fetch from #{source}
95
+ # This file generated automatically using rdf vocabulary format from #{source}
96
96
  require 'rdf'
97
97
  module #{module_name}
98
98
  # @!parse
99
99
  # # Vocabulary for <#{base_uri}>
100
- # class #{vocab.name} < RDF::#{"Strict" if strict}Vocabulary
100
+ # class #{class_name} < RDF::#{"Strict" if strict}Vocabulary
101
101
  # end
102
- class #{vocab.name} < RDF::#{"Strict" if strict}Vocabulary("#{base_uri}")
102
+ class #{class_name} < RDF::#{"Strict" if strict}Vocabulary("#{base_uri}")
103
103
  ).gsub(/^ /, '')
104
104
 
105
105
  # Split nodes into Class/Property/Datatype/Other
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.0.0.beta2
4
+ version: 2.0.0
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: 2016-04-06 00:00:00.000000000 Z
13
+ date: 2016-04-10 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: link_header
@@ -50,62 +50,44 @@ dependencies:
50
50
  name: rdf-spec
51
51
  requirement: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - ">="
54
- - !ruby/object:Gem::Version
55
- version: 2.0.0.beta
56
- - - "<"
53
+ - - "~>"
57
54
  - !ruby/object:Gem::Version
58
- version: '3'
55
+ version: '2.0'
59
56
  type: :development
60
57
  prerelease: false
61
58
  version_requirements: !ruby/object:Gem::Requirement
62
59
  requirements:
63
- - - ">="
64
- - !ruby/object:Gem::Version
65
- version: 2.0.0.beta
66
- - - "<"
60
+ - - "~>"
67
61
  - !ruby/object:Gem::Version
68
- version: '3'
62
+ version: '2.0'
69
63
  - !ruby/object:Gem::Dependency
70
64
  name: rdf-vocab
71
65
  requirement: !ruby/object:Gem::Requirement
72
66
  requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: 2.0.0.beta
76
- - - "<"
67
+ - - "~>"
77
68
  - !ruby/object:Gem::Version
78
- version: '3'
69
+ version: '2.0'
79
70
  type: :development
80
71
  prerelease: false
81
72
  version_requirements: !ruby/object:Gem::Requirement
82
73
  requirements:
83
- - - ">="
84
- - !ruby/object:Gem::Version
85
- version: 2.0.0.beta
86
- - - "<"
74
+ - - "~>"
87
75
  - !ruby/object:Gem::Version
88
- version: '3'
76
+ version: '2.0'
89
77
  - !ruby/object:Gem::Dependency
90
78
  name: rdf-xsd
91
79
  requirement: !ruby/object:Gem::Requirement
92
80
  requirements:
93
- - - ">="
94
- - !ruby/object:Gem::Version
95
- version: 2.0.0.beta
96
- - - "<"
81
+ - - "~>"
97
82
  - !ruby/object:Gem::Version
98
- version: '3'
83
+ version: '2.0'
99
84
  type: :development
100
85
  prerelease: false
101
86
  version_requirements: !ruby/object:Gem::Requirement
102
87
  requirements:
103
- - - ">="
104
- - !ruby/object:Gem::Version
105
- version: 2.0.0.beta
106
- - - "<"
88
+ - - "~>"
107
89
  - !ruby/object:Gem::Version
108
- version: '3'
90
+ version: '2.0'
109
91
  - !ruby/object:Gem::Dependency
110
92
  name: rest-client
111
93
  requirement: !ruby/object:Gem::Requirement
@@ -297,9 +279,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
297
279
  version: '2.0'
298
280
  required_rubygems_version: !ruby/object:Gem::Requirement
299
281
  requirements:
300
- - - ">"
282
+ - - ">="
301
283
  - !ruby/object:Gem::Version
302
- version: 1.3.1
284
+ version: '0'
303
285
  requirements: []
304
286
  rubyforge_project: rdf
305
287
  rubygems_version: 2.4.8