sxp 1.0.2 → 1.1.0
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/README.md +3 -3
- data/VERSION +1 -1
- data/lib/sxp.rb +9 -9
- data/lib/sxp/reader.rb +3 -3
- data/lib/sxp/reader/common_lisp.rb +2 -2
- data/lib/sxp/reader/sparql.rb +1 -1
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b421d3fcd687a0e3e946087339e58f4a323be02bc3a1e66c024785324019b14a
|
4
|
+
data.tar.gz: be19832d64b95ab0db9e0a23b0d41ea48b9e6d2bc2405cb3186cd9c9307c4d39
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7937ebb8b36f9cd16bc9ec74c2d385a3a5d6c0f62e0f6a6b350199ee4a1f532780a63335a03c38ad79207fcdead281d03fc55d07c341b9d8acc8fed78a3254db
|
7
|
+
data.tar.gz: fa13fc009baf866729d7fda6050949095218634125b873ecc3121d878a19f32fd563a010f8d628c0e0197fcd4b26913c9b0d44088e9dbad0f411c120aa702d47
|
data/README.md
CHANGED
@@ -10,7 +10,7 @@ This is a Ruby implementation of a universal [S-expression][] parser.
|
|
10
10
|
* Parses S-expressions in universal, [Scheme][], [Common Lisp][], or
|
11
11
|
[SPARQL][] syntax.
|
12
12
|
* Adds a `#to_sxp` method to Ruby objects.
|
13
|
-
* Compatible with Ruby >= 2.
|
13
|
+
* Compatible with Ruby >= 2.4, Rubinius >= 3.0, and JRuby 9+.
|
14
14
|
|
15
15
|
## Examples
|
16
16
|
|
@@ -74,8 +74,8 @@ This is a Ruby implementation of a universal [S-expression][] parser.
|
|
74
74
|
Dependencies
|
75
75
|
------------
|
76
76
|
|
77
|
-
* [Ruby](http://ruby-lang.org/) (>= 2.
|
78
|
-
* [RDF.rb](http://rubygems.org/gems/rdf) (~> 3.
|
77
|
+
* [Ruby](http://ruby-lang.org/) (>= 2.4)
|
78
|
+
* [RDF.rb](http://rubygems.org/gems/rdf) (~> 3.1), only needed for SPARQL
|
79
79
|
S-expressions
|
80
80
|
|
81
81
|
Installation
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0
|
1
|
+
1.1.0
|
data/lib/sxp.rb
CHANGED
@@ -32,8 +32,8 @@ module SXP
|
|
32
32
|
# @param [String, #to_s] url
|
33
33
|
# @param [Hash{Symbol => Object}] options
|
34
34
|
# @return [Enumerable<Object>]
|
35
|
-
def self.read_url(url, options
|
36
|
-
Reader::Basic.read_url(url, options)
|
35
|
+
def self.read_url(url, **options)
|
36
|
+
Reader::Basic.read_url(url, **options)
|
37
37
|
end
|
38
38
|
|
39
39
|
##
|
@@ -42,7 +42,7 @@ module SXP
|
|
42
42
|
# @overload read_files(*filenames)
|
43
43
|
# @param [Enumerable<String>] filenames
|
44
44
|
#
|
45
|
-
# @overload read_files(*filenames, options)
|
45
|
+
# @overload read_files(*filenames, **options)
|
46
46
|
# @param [Enumerable<String>] filenames
|
47
47
|
# @param [Hash{Symbol => Object}] options
|
48
48
|
#
|
@@ -57,8 +57,8 @@ module SXP
|
|
57
57
|
# @param [String, #to_s] filename
|
58
58
|
# @param [Hash{Symbol => Object}] options
|
59
59
|
# @return [Enumerable<Object>]
|
60
|
-
def self.read_file(filename, options
|
61
|
-
Reader::Basic.read_file(filename, options)
|
60
|
+
def self.read_file(filename, **options)
|
61
|
+
Reader::Basic.read_file(filename, **options)
|
62
62
|
end
|
63
63
|
|
64
64
|
##
|
@@ -67,8 +67,8 @@ module SXP
|
|
67
67
|
# @param [IO, StringIO, String] input
|
68
68
|
# @param [Hash{Symbol => Object}] options
|
69
69
|
# @return [Enumerable<Object>]
|
70
|
-
def self.read_all(input, options
|
71
|
-
Reader::Basic.read_all(input, options)
|
70
|
+
def self.read_all(input, **options)
|
71
|
+
Reader::Basic.read_all(input, **options)
|
72
72
|
end
|
73
73
|
|
74
74
|
##
|
@@ -77,8 +77,8 @@ module SXP
|
|
77
77
|
# @param [IO, StringIO, String] input
|
78
78
|
# @param [Hash{Symbol => Object}] options
|
79
79
|
# @return [Object]
|
80
|
-
def self.read(input, options
|
81
|
-
Reader::Basic.read(input, options)
|
80
|
+
def self.read(input, **options)
|
81
|
+
Reader::Basic.read(input, **options)
|
82
82
|
end
|
83
83
|
|
84
84
|
##
|
data/lib/sxp/reader.rb
CHANGED
@@ -24,7 +24,7 @@ module SXP
|
|
24
24
|
# @return [Enumerable<Object>]
|
25
25
|
def self.read_url(url, **options)
|
26
26
|
require 'open-uri'
|
27
|
-
open(url.to_s, 'rb', nil, **options) { |io| read_all(io, options) }
|
27
|
+
open(url.to_s, 'rb', nil, **options) { |io| read_all(io, **options) }
|
28
28
|
end
|
29
29
|
|
30
30
|
##
|
@@ -33,7 +33,7 @@ module SXP
|
|
33
33
|
# @overload read_files(*filenames)
|
34
34
|
# @param [Enumerable<String>] filenames
|
35
35
|
#
|
36
|
-
# @overload read_files(*filenames, options)
|
36
|
+
# @overload read_files(*filenames, **options)
|
37
37
|
# @param [Enumerable<String>] filenames
|
38
38
|
# @param [Hash{Symbol => Object}] options
|
39
39
|
# See {#read}
|
@@ -41,7 +41,7 @@ module SXP
|
|
41
41
|
# @return [Enumerable<Object>]
|
42
42
|
def read_files(*filenames)
|
43
43
|
options = filenames.last.is_a?(Hash) ? filenames.pop : {}
|
44
|
-
filenames.map { |filename| read_file(filename, options) }.inject { |sxps, sxp| sxps + sxp }
|
44
|
+
filenames.map { |filename| read_file(filename, **options) }.inject { |sxps, sxp| sxps + sxp }
|
45
45
|
end
|
46
46
|
|
47
47
|
##
|
@@ -37,8 +37,8 @@ module SXP; class Reader
|
|
37
37
|
# @option options [Object] :t (true)
|
38
38
|
# @option options [Object] :quote (:quote)
|
39
39
|
# @option options [Object] :function (:function)
|
40
|
-
def initialize(input, options
|
41
|
-
super(input, OPTIONS.merge(options), &block)
|
40
|
+
def initialize(input, **options, &block)
|
41
|
+
super(input, **OPTIONS.merge(options), &block)
|
42
42
|
end
|
43
43
|
|
44
44
|
##
|
data/lib/sxp/reader/sparql.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sxp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arto Bendiken
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-
|
12
|
+
date: 2019-12-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
@@ -17,42 +17,42 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: '3.
|
20
|
+
version: '3.9'
|
21
21
|
type: :development
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: '3.
|
27
|
+
version: '3.9'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: yard
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
32
|
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: 0.9.
|
34
|
+
version: 0.9.20
|
35
35
|
type: :development
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: 0.9.
|
41
|
+
version: 0.9.20
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: rdf
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
46
|
- - "~>"
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version: '3.
|
48
|
+
version: '3.1'
|
49
49
|
type: :runtime
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
53
|
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: '3.
|
55
|
+
version: '3.1'
|
56
56
|
description: Universal S-expression parser with specific support for Common Lisp,
|
57
57
|
Scheme, and RDF/SPARQL
|
58
58
|
email:
|
@@ -100,14 +100,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
100
100
|
requirements:
|
101
101
|
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 2.
|
103
|
+
version: '2.4'
|
104
104
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
105
105
|
requirements:
|
106
106
|
- - ">="
|
107
107
|
- !ruby/object:Gem::Version
|
108
108
|
version: '0'
|
109
109
|
requirements: []
|
110
|
-
rubygems_version: 3.0.
|
110
|
+
rubygems_version: 3.0.6
|
111
111
|
signing_key:
|
112
112
|
specification_version: 4
|
113
113
|
summary: A pure-Ruby implementation of a universal S-expression parser.
|