ld-patch 0.3.3 → 3.1.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
- SHA1:
3
- metadata.gz: 478b434d8e482b62cf00f5c21feb14dad3522efd
4
- data.tar.gz: d51182636e80abb937b07a4dec5bf2a59fc9bc00
2
+ SHA256:
3
+ metadata.gz: 04e7c8951220ddc76aa7dc4989520a377e4d4c49d0582be49594ae3ec23ff5e5
4
+ data.tar.gz: aacfbf26b73bac66393515ba57b4dc0b20f6dd2f6cdd28eaee1c7ff5d0926732
5
5
  SHA512:
6
- metadata.gz: 4f103e4f87ada0127eeed159d80b97719b295f2b221e5d52eb9eef9357464b91a4e85c613110de7f507a84433cce78f9c3de5c5bc3cf59a251ea8f627010266b
7
- data.tar.gz: d36ca827841a984cd0d932dd86f1a31b3c03764fcf098ddadd47bf5b2b6a435e572f00481bc1d99d9fddbbeafed43b8bf7e49d103d92ab13b6f6c9a817880f6a
6
+ metadata.gz: 2b7eb0687f88cbc0c6715b48dd24bcd62ba634ed7fa15515262c88c1b266b995d919dbd0845ad30cb356e45d7259a0bb215a45c1462caaca0af54fc077c73446
7
+ data.tar.gz: 3b1a86c9edf0a9a48f6eaa762b312b12f31f373633ff7b357c79848fa89a14a39b250499d1dbc6d5e1c25d871a0444207ba8fe53fe7f9f2425c3fda37a23cea9
data/README.md CHANGED
@@ -24,7 +24,7 @@ This gem implements the [LD Patch][] specification with a couple of changes and/
24
24
  * 100% free and unencumbered [public domain](http://unlicense.org/) software.
25
25
  * Complete [Linked Data Patch Format][LD Patch] parsing and execution
26
26
  * Implementation Report: {file:etc/earl.html EARL}
27
- * Compatible with Ruby >= 2.2.2.
27
+ * Compatible with Ruby >= 2.4.
28
28
 
29
29
  ## Documentation
30
30
  Full documentation available on [Rubydoc.info][LD-Patch doc]
@@ -73,12 +73,12 @@ The parser takes branch and follow tables generated from the [LD Patch Grammar](
73
73
 
74
74
  ## Dependencies
75
75
 
76
- * [Ruby](http://ruby-lang.org/) (>= 2.2.2)
77
- * [RDF.rb](http://rubygems.org/gems/rdf) (~> 2.0)
78
- * [EBNF][] (~> 1.0)
79
- * [SPARQL][] (~> 2.0)
80
- * [SXP][] (~> 0.1.6)
81
- * [RDF::XSD][] (~> 2.0)
76
+ * [Ruby](http://ruby-lang.org/) (>= 2.4)
77
+ * [RDF.rb](http://rubygems.org/gems/rdf) (~> 3.1)
78
+ * [EBNF][] (~> 1.2)
79
+ * [SPARQL][] (~> 3.1)
80
+ * [SXP][] (~> 1.1)
81
+ * [RDF::XSD][] (~> 3.1)
82
82
 
83
83
  ## Mailing List
84
84
  * <http://lists.w3.org/Archives/Public/public-rdf-ruby/>
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.3
1
+ 3.1.0
@@ -28,8 +28,8 @@ module LD
28
28
  # the base URI to use when resolving relative URIs
29
29
  # @option (see LD::Patch::Parser#initialize)
30
30
  # @return [SPARQL::Algebra::Operator] The executable parsed Patch
31
- def self.parse(input, options = {})
32
- LD::Patch::Parser.new(input, options).parse
31
+ def self.parse(input, **options)
32
+ LD::Patch::Parser.new(input, **options).parse
33
33
  end
34
34
 
35
35
  class Error < StandardError
@@ -42,7 +42,7 @@ module LD
42
42
  # @param [String, #to_s] message
43
43
  # @param [Hash{Symbol => Object}] options
44
44
  # @option options [Integer] :code (422)
45
- def initialize(message, options = {})
45
+ def initialize(message, **options)
46
46
  @code = options.fetch(:status_code, 422)
47
47
  super(message.to_s)
48
48
  end
@@ -70,7 +70,7 @@ module LD
70
70
  # @option options [String] :token (nil)
71
71
  # @option options [Integer] :lineno (nil)
72
72
  # @option options [Integer] :code (400)
73
- def initialize(message, options = {})
73
+ def initialize(message, **options)
74
74
  @token = options[:token]
75
75
  @lineno = options[:lineno] || (@token.lineno if @token.respond_to?(:lineno))
76
76
  super(message.to_s, code: options.fetch(:code, 400))
@@ -42,7 +42,7 @@ module LD::Patch
42
42
  control: :none,
43
43
  on: ["--patch-input STRING"],
44
44
  description: "Patch in URI encoded format"
45
- ) {|v| URI.decode(v)},
45
+ ) {|v| CGI.decode(v)},
46
46
  RDF::CLI::Option.new(
47
47
  symbol: :patch_file,
48
48
  datatype: String,
@@ -295,7 +295,7 @@ module LD::Patch
295
295
  str = lit.delete(:string)
296
296
  lit[:datatype] = lit.delete(:iri) if lit[:iri]
297
297
  lit[:language] = lit.delete(:language).last.downcase if lit[:language]
298
- input[:literal] = RDF::Literal.new(str, lit) if str
298
+ input[:literal] = RDF::Literal.new(str, **lit) if str
299
299
  end
300
300
  end
301
301
 
@@ -323,7 +323,7 @@ module LD::Patch
323
323
  # @yield [parser] `self`
324
324
  # @yieldparam [LD::Patch::Parser] parser
325
325
  # @return [LD::Patch::Parser] The parser instance, or result returned from block
326
- def initialize(input = nil, options = {}, &block)
326
+ def initialize(input = nil, **options, &block)
327
327
  @input = case input
328
328
  when IO, StringIO then input.read
329
329
  else input.to_s.dup
@@ -366,10 +366,13 @@ module LD::Patch
366
366
  # @return [SPARQL::Algebra::Operator, Object]
367
367
  # @raise [ParseError] when illegal grammar detected.
368
368
  def parse(prod = START)
369
- ll1_parse(@input, prod.to_sym, @options.merge(branch: BRANCH,
370
- first: FIRST,
371
- follow: FOLLOW,
372
- whitespace: WS)
369
+ ll1_parse(@input,
370
+ prod.to_sym,
371
+ branch: BRANCH,
372
+ first: FIRST,
373
+ follow: FOLLOW,
374
+ whitespace: WS,
375
+ **@options
373
376
  ) do |context, *data|
374
377
  case context
375
378
  when :trace
@@ -545,7 +548,7 @@ module LD::Patch
545
548
  end
546
549
 
547
550
  # Create a literal
548
- def literal(value, options = {})
551
+ def literal(value, **options)
549
552
  options = options.dup
550
553
  # Internal representation is to not use xsd:string, although it could arguably go the other way.
551
554
  options.delete(:datatype) if options[:datatype] == RDF::XSD.string
@@ -554,7 +557,7 @@ module LD::Patch
554
557
  "options: #{options.inspect}, " +
555
558
  "validate: #{validate?.inspect}, "
556
559
  end
557
- RDF::Literal.new(value, options.merge(validate: validate?))
560
+ RDF::Literal.new(value, validate: validate?, **options)
558
561
  end
559
562
  end
560
563
  end
metadata CHANGED
@@ -1,157 +1,127 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ld-patch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregg Kellogg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-13 00:00:00.000000000 Z
11
+ date: 2019-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rdf
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '2.2'
20
- - - "<"
17
+ - - "~>"
21
18
  - !ruby/object:Gem::Version
22
- version: '4.0'
19
+ version: '3.1'
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- version: '2.2'
30
- - - "<"
24
+ - - "~>"
31
25
  - !ruby/object:Gem::Version
32
- version: '4.0'
26
+ version: '3.1'
33
27
  - !ruby/object:Gem::Dependency
34
28
  name: ebnf
35
29
  requirement: !ruby/object:Gem::Requirement
36
30
  requirements:
37
31
  - - "~>"
38
32
  - !ruby/object:Gem::Version
39
- version: '1.1'
33
+ version: '1.2'
40
34
  type: :runtime
41
35
  prerelease: false
42
36
  version_requirements: !ruby/object:Gem::Requirement
43
37
  requirements:
44
38
  - - "~>"
45
39
  - !ruby/object:Gem::Version
46
- version: '1.1'
40
+ version: '1.2'
47
41
  - !ruby/object:Gem::Dependency
48
42
  name: sparql
49
43
  requirement: !ruby/object:Gem::Requirement
50
44
  requirements:
51
- - - ">="
52
- - !ruby/object:Gem::Version
53
- version: '2.2'
54
- - - "<"
45
+ - - "~>"
55
46
  - !ruby/object:Gem::Version
56
- version: '4.0'
47
+ version: '3.1'
57
48
  type: :runtime
58
49
  prerelease: false
59
50
  version_requirements: !ruby/object:Gem::Requirement
60
51
  requirements:
61
- - - ">="
62
- - !ruby/object:Gem::Version
63
- version: '2.2'
64
- - - "<"
52
+ - - "~>"
65
53
  - !ruby/object:Gem::Version
66
- version: '4.0'
54
+ version: '3.1'
67
55
  - !ruby/object:Gem::Dependency
68
56
  name: sxp
69
57
  requirement: !ruby/object:Gem::Requirement
70
58
  requirements:
71
59
  - - "~>"
72
60
  - !ruby/object:Gem::Version
73
- version: '1.0'
61
+ version: '1.1'
74
62
  type: :runtime
75
63
  prerelease: false
76
64
  version_requirements: !ruby/object:Gem::Requirement
77
65
  requirements:
78
66
  - - "~>"
79
67
  - !ruby/object:Gem::Version
80
- version: '1.0'
68
+ version: '1.1'
81
69
  - !ruby/object:Gem::Dependency
82
70
  name: rdf-xsd
83
71
  requirement: !ruby/object:Gem::Requirement
84
72
  requirements:
85
- - - ">="
86
- - !ruby/object:Gem::Version
87
- version: '2.2'
88
- - - "<"
73
+ - - "~>"
89
74
  - !ruby/object:Gem::Version
90
- version: '4.0'
75
+ version: '3.1'
91
76
  type: :runtime
92
77
  prerelease: false
93
78
  version_requirements: !ruby/object:Gem::Requirement
94
79
  requirements:
95
- - - ">="
96
- - !ruby/object:Gem::Version
97
- version: '2.2'
98
- - - "<"
80
+ - - "~>"
99
81
  - !ruby/object:Gem::Version
100
- version: '4.0'
82
+ version: '3.1'
101
83
  - !ruby/object:Gem::Dependency
102
84
  name: json-ld
103
85
  requirement: !ruby/object:Gem::Requirement
104
86
  requirements:
105
- - - ">="
106
- - !ruby/object:Gem::Version
107
- version: '2.1'
108
- - - "<"
87
+ - - "~>"
109
88
  - !ruby/object:Gem::Version
110
- version: '4.0'
89
+ version: '3.1'
111
90
  type: :development
112
91
  prerelease: false
113
92
  version_requirements: !ruby/object:Gem::Requirement
114
93
  requirements:
115
- - - ">="
116
- - !ruby/object:Gem::Version
117
- version: '2.1'
118
- - - "<"
94
+ - - "~>"
119
95
  - !ruby/object:Gem::Version
120
- version: '4.0'
96
+ version: '3.1'
121
97
  - !ruby/object:Gem::Dependency
122
98
  name: rack
123
99
  requirement: !ruby/object:Gem::Requirement
124
100
  requirements:
125
101
  - - "~>"
126
102
  - !ruby/object:Gem::Version
127
- version: '1.6'
103
+ version: '2.0'
128
104
  type: :development
129
105
  prerelease: false
130
106
  version_requirements: !ruby/object:Gem::Requirement
131
107
  requirements:
132
108
  - - "~>"
133
109
  - !ruby/object:Gem::Version
134
- version: '1.6'
110
+ version: '2.0'
135
111
  - !ruby/object:Gem::Dependency
136
112
  name: rdf-spec
137
113
  requirement: !ruby/object:Gem::Requirement
138
114
  requirements:
139
- - - ">="
140
- - !ruby/object:Gem::Version
141
- version: '2.2'
142
- - - "<"
115
+ - - "~>"
143
116
  - !ruby/object:Gem::Version
144
- version: '4.0'
117
+ version: '3.1'
145
118
  type: :development
146
119
  prerelease: false
147
120
  version_requirements: !ruby/object:Gem::Requirement
148
121
  requirements:
149
- - - ">="
150
- - !ruby/object:Gem::Version
151
- version: '2.2'
152
- - - "<"
122
+ - - "~>"
153
123
  - !ruby/object:Gem::Version
154
- version: '4.0'
124
+ version: '3.1'
155
125
  - !ruby/object:Gem::Dependency
156
126
  name: open-uri-cached
157
127
  requirement: !ruby/object:Gem::Requirement
@@ -178,56 +148,56 @@ dependencies:
178
148
  requirements:
179
149
  - - "~>"
180
150
  - !ruby/object:Gem::Version
181
- version: '3.7'
151
+ version: '3.9'
182
152
  type: :development
183
153
  prerelease: false
184
154
  version_requirements: !ruby/object:Gem::Requirement
185
155
  requirements:
186
156
  - - "~>"
187
157
  - !ruby/object:Gem::Version
188
- version: '3.7'
158
+ version: '3.9'
189
159
  - !ruby/object:Gem::Dependency
190
160
  name: rspec-its
191
161
  requirement: !ruby/object:Gem::Requirement
192
162
  requirements:
193
163
  - - "~>"
194
164
  - !ruby/object:Gem::Version
195
- version: '1.2'
165
+ version: '1.3'
196
166
  type: :development
197
167
  prerelease: false
198
168
  version_requirements: !ruby/object:Gem::Requirement
199
169
  requirements:
200
170
  - - "~>"
201
171
  - !ruby/object:Gem::Version
202
- version: '1.2'
172
+ version: '1.3'
203
173
  - !ruby/object:Gem::Dependency
204
174
  name: yard
205
175
  requirement: !ruby/object:Gem::Requirement
206
176
  requirements:
207
177
  - - "~>"
208
178
  - !ruby/object:Gem::Version
209
- version: '0.9'
179
+ version: 0.9.20
210
180
  type: :development
211
181
  prerelease: false
212
182
  version_requirements: !ruby/object:Gem::Requirement
213
183
  requirements:
214
184
  - - "~>"
215
185
  - !ruby/object:Gem::Version
216
- version: '0.9'
186
+ version: 0.9.20
217
187
  - !ruby/object:Gem::Dependency
218
188
  name: webmock
219
189
  requirement: !ruby/object:Gem::Requirement
220
190
  requirements:
221
191
  - - "~>"
222
192
  - !ruby/object:Gem::Version
223
- version: '3.0'
193
+ version: '3.7'
224
194
  type: :development
225
195
  prerelease: false
226
196
  version_requirements: !ruby/object:Gem::Requirement
227
197
  requirements:
228
198
  - - "~>"
229
199
  - !ruby/object:Gem::Version
230
- version: '3.0'
200
+ version: '3.7'
231
201
  description: |2-
232
202
 
233
203
  Implements the W3C Linked Data Patch Format and operations for RDF.rb.
@@ -272,15 +242,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
272
242
  requirements:
273
243
  - - ">="
274
244
  - !ruby/object:Gem::Version
275
- version: 2.2.2
245
+ version: '2.4'
276
246
  required_rubygems_version: !ruby/object:Gem::Requirement
277
247
  requirements:
278
248
  - - ">="
279
249
  - !ruby/object:Gem::Version
280
250
  version: '0'
281
251
  requirements: []
282
- rubyforge_project:
283
- rubygems_version: 2.6.14
252
+ rubygems_version: 3.0.6
284
253
  signing_key:
285
254
  specification_version: 4
286
255
  summary: W3C Linked Data Patch Format for RDF.rb.