shex 0.6.2 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -43,7 +43,11 @@ module ShEx
43
43
  # 160s
44
44
  ECHAR = /\\[tbnrf\\"']/
45
45
 
46
- WS = /(?:\s|(?:#[^\n\r]*))+/m.freeze
46
+ WS = %r((
47
+ \s
48
+ | (?:\#[^\n\r]*)
49
+ | (?:/\*(?:(?:\*[^/])|[^*])*\*/)
50
+ )+)xmu.freeze
47
51
 
48
52
  # 69
49
53
  RDF_TYPE = /a/.freeze
@@ -92,30 +96,6 @@ module ShEx
92
96
  CODE = /\{(?:[^%\\]|\\[%\\]|#{UCHAR})*%#{WS}*\}/m.freeze
93
97
  # 70
94
98
  REPEAT_RANGE = /\{\s*#{INTEGER}(?:,#{WS}*(?:#{INTEGER}|\*)?)?#{WS}*\}/.freeze
95
-
96
- # String terminals, mixed case sensitivity
97
- STR_EXPR = %r(true|false
98
- |\^\^|\/\/
99
- |[\(\)\{\}\[\],\.;\=\-\~!\|\&\@\$\?\+\*\%\^a]|
100
- (?i:OR|AND|NOT
101
- |BASE|PREFIX
102
- |IRI|BNODE|NONLITERAL
103
- |MINLENGTH|MAXLENGTH|LENGTH
104
- |MAXINCLUSIVE|MAXEXCLUSIVE
105
- |MININCLUSIVE|MINEXCLUSIVE
106
- |TOTALDIGITS|FRACTIONDIGITS
107
- |START
108
- |EXTERNAL|CLOSED|EXTRA|LITERAL
109
- )
110
- )x.freeze
111
-
112
- # Map terminals to canonical form
113
- STR_MAP = %w{OR AND NOT BASE PREFIX IRI BNODE NONLITERAL
114
- MINLENGTH MAXLENGTH LENGTH MININCLUSIVE MAXINCLUSIVE MINEXCLUSIVE MAXEXCLUSIVE
115
- TOTALDIGITS FRACTIONDIGITS START EXTERNAL CLOSED EXTRA LITERAL}.
116
- inject({}) do |memo, t|
117
- memo.merge(t.downcase => t)
118
- end
119
99
 
120
100
  end
121
101
  end
data/lib/shex.rb CHANGED
@@ -1,9 +1,12 @@
1
+ require 'rdf'
2
+ require 'sxp'
3
+ require 'shex/format'
4
+
1
5
  ##
2
6
  # A ShEx runtime for RDF.rb.
3
7
  #
4
8
  # @see https://shex.io/shex-semantics/#shexc
5
9
  module ShEx
6
- require 'shex/format'
7
10
  autoload :Algebra, 'shex/algebra'
8
11
  autoload :Meta, 'shex/meta'
9
12
  autoload :Parser, 'shex/parser'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregg Kellogg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-17 00:00:00.000000000 Z
11
+ date: 2022-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rdf
@@ -16,126 +16,154 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '3.1'
19
+ version: '3.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '3.1'
26
+ version: '3.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: json-ld
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '3.1'
33
+ version: '3.2'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '3.1'
40
+ version: '3.2'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: json-ld-preloaded
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '3.1'
47
+ version: '3.2'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '3.1'
54
+ version: '3.2'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: ebnf
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '2.1'
61
+ version: '2.2'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '2.1'
68
+ version: '2.2'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: sxp
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '1.1'
75
+ version: '1.2'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '1.1'
82
+ version: '1.2'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rdf-xsd
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '3.1'
89
+ version: '3.2'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '3.1'
96
+ version: '3.2'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: sparql
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '3.1'
103
+ version: '3.2'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '3.1'
110
+ version: '3.2'
111
+ - !ruby/object:Gem::Dependency
112
+ name: htmlentities
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '4.3'
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '4.3'
125
+ - !ruby/object:Gem::Dependency
126
+ name: erubis
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '2.7'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '2.7'
111
139
  - !ruby/object:Gem::Dependency
112
140
  name: rdf-spec
113
141
  requirement: !ruby/object:Gem::Requirement
114
142
  requirements:
115
143
  - - "~>"
116
144
  - !ruby/object:Gem::Version
117
- version: '3.1'
145
+ version: '3.2'
118
146
  type: :development
119
147
  prerelease: false
120
148
  version_requirements: !ruby/object:Gem::Requirement
121
149
  requirements:
122
150
  - - "~>"
123
151
  - !ruby/object:Gem::Version
124
- version: '3.1'
152
+ version: '3.2'
125
153
  - !ruby/object:Gem::Dependency
126
154
  name: rdf-turtle
127
155
  requirement: !ruby/object:Gem::Requirement
128
156
  requirements:
129
157
  - - "~>"
130
158
  - !ruby/object:Gem::Version
131
- version: '3.1'
159
+ version: '3.2'
132
160
  type: :development
133
161
  prerelease: false
134
162
  version_requirements: !ruby/object:Gem::Requirement
135
163
  requirements:
136
164
  - - "~>"
137
165
  - !ruby/object:Gem::Version
138
- version: '3.1'
166
+ version: '3.2'
139
167
  - !ruby/object:Gem::Dependency
140
168
  name: rspec
141
169
  requirement: !ruby/object:Gem::Requirement
@@ -196,6 +224,7 @@ files:
196
224
  - lib/shex/algebra/annotation.rb
197
225
  - lib/shex/algebra/each_of.rb
198
226
  - lib/shex/algebra/external.rb
227
+ - lib/shex/algebra/import.rb
199
228
  - lib/shex/algebra/language.rb
200
229
  - lib/shex/algebra/node_constraint.rb
201
230
  - lib/shex/algebra/not.rb
@@ -220,10 +249,15 @@ files:
220
249
  - lib/shex/shex_context.rb
221
250
  - lib/shex/terminals.rb
222
251
  - lib/shex/version.rb
223
- homepage: https://ruby-rdf.github.com/shex
252
+ homepage: https://github.com/ruby-rdf/shex
224
253
  licenses:
225
254
  - Unlicense
226
255
  metadata:
256
+ documentation_uri: https://ruby-rdf.github.io/shex
257
+ bug_tracker_uri: https://github.com/ruby-rdf/shex/issues
258
+ homepage_uri: https://github.com/ruby-rdf/shex
259
+ mailing_list_uri: https://lists.w3.org/Archives/Public/public-rdf-ruby/
260
+ source_code_uri: https://github.com/ruby-rdf/shex
227
261
  yard.run: yri
228
262
  post_install_message:
229
263
  rdoc_options: []
@@ -233,14 +267,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
233
267
  requirements:
234
268
  - - ">="
235
269
  - !ruby/object:Gem::Version
236
- version: '2.4'
270
+ version: '2.6'
237
271
  required_rubygems_version: !ruby/object:Gem::Requirement
238
272
  requirements:
239
273
  - - ">="
240
274
  - !ruby/object:Gem::Version
241
275
  version: '0'
242
276
  requirements: []
243
- rubygems_version: 3.2.15
277
+ rubygems_version: 3.2.32
244
278
  signing_key:
245
279
  specification_version: 4
246
280
  summary: Implementation of Shape Expressions (ShEx) for RDF.rb