sxp 0.1.5 → 1.0.0.beta1

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 CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- NjJkNzAwM2M1NDExNzlhOGViY2RiNWJlMDIzNTNlMWFlYjg0MmM2OQ==
5
- data.tar.gz: !binary |-
6
- NjM4NmIzZjE1YmIyM2U2M2E2YTdmNjY1MmVmNmQ1ODRmODU2YmRjNQ==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- MGE4N2VhNDE5ZjkwMGYwNWExNWFkZTEwMDEwNTVmYTE0YjBmNDIzMWM4ZWEw
10
- ODc5MjI4ZmQ3ZmZkMmRkYjVkNDUzN2Y0OTlhMTc1N2Q1OGQxNzAwMTZiZmQw
11
- MTYxMTJkNWRhMmMxZTM4YWQ2ODY4OTBmMzYzNDQyNjIwZTI2MTA=
12
- data.tar.gz: !binary |-
13
- N2VjMjM5ODIwMDY3NTkyMWM3ZjZiMjc5NjJjNDQwYTVjYmE3MWJkZGJmZTAw
14
- MmE1YmNkMGMzYTg3NzE1YWQwYzkwYzNlY2E5ZDFkMDE4MDM4YTlhYTNmNTAx
15
- OTM4ODU3YWFjYTUyZjQzODI4ZGY4YWIzMzc5OGE5NDk5Y2IzY2M=
2
+ SHA1:
3
+ metadata.gz: e746a68cbb159e8712f602539bcc900dba60e002
4
+ data.tar.gz: c40c76ab94315874fc6da3d0c860f74412b414a2
5
+ SHA512:
6
+ metadata.gz: e355d65061dd770bf2d8848d3cf878ea9e1ac389ee3e14c880a84e46979c824fcffcb6271e9fc0b48a0dda58ca064e39e4329e1222c083e4f54c938baa587fe0
7
+ data.tar.gz: 70fe5791346e8a8fcc47de84d3523c159801c03e7eb1b422aaa368ffbe7e3f7e3ccb0fb266d1359642410244abe3117dac1819e83cd31969a97847dce276c24f
@@ -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 1.8.7+, Ruby 1.9.x, Ruby 2.0.x, and JRuby 1.4/1.5.
13
+ * Compatible with Ruby Ruby 2.x, Ruby 2.x, 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/) (>= 1.8.7) or (>= 1.8.1 with [Backports][])
78
- * [RDF.rb](http://rubygems.org/gems/rdf) (>= 1.0.0), only needed for SPARQL
77
+ * [Ruby](http://ruby-lang.org/) (>= 1.9.3)
78
+ * [RDF.rb](http://rubygems.org/gems/rdf) (>= 1.1), only needed for SPARQL
79
79
  S-expressions
80
80
 
81
81
  Installation
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.5
1
+ 1.0.0.beta1
@@ -130,7 +130,7 @@ module SXP
130
130
  def read_all(options = {})
131
131
  list = []
132
132
  catch (:eof) do
133
- list << read(options.merge(:eof => :throw)) until eof?
133
+ list << read(options.merge(eof: :throw)) until eof?
134
134
  end
135
135
  list
136
136
  end
@@ -173,7 +173,7 @@ module SXP
173
173
  def read_list(list_term = nil)
174
174
  list = []
175
175
  catch (:eol) do
176
- list << read(:eol => :throw, :list_term => list_term) while true
176
+ list << read(eol: :throw, list_term: list_term) while true
177
177
  end
178
178
  list
179
179
  end
@@ -5,7 +5,7 @@ module SXP; class Reader
5
5
  #
6
6
  # @see http://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node14.html
7
7
  class CommonLisp < Basic
8
- OPTIONS = {:nil => nil, :t => true, :quote => :quote, :function => :function}
8
+ OPTIONS = {nil: nil, t: true, quote: :quote, function: :function}
9
9
 
10
10
  DECIMAL = /^[+-]?(\d*)?\.\d*$/
11
11
  INTEGER_BASE_2 = /^[+-]?[01]+$/
@@ -27,7 +27,7 @@ module SXP; class Reader
27
27
  # @param [Hash{Symbol => Object}] options
28
28
  # @option options [Symbol] :version (:r4rs)
29
29
  def initialize(input, options = {}, &block)
30
- super(input, {:version => :r4rs}.merge(options), &block)
30
+ super(input, {version: :r4rs}.merge(options), &block)
31
31
  end
32
32
 
33
33
  ##
@@ -152,10 +152,10 @@ module SXP; class Reader
152
152
  options = case peek_char
153
153
  when ?@
154
154
  skip_char # '@'
155
- {:language => read_atom.downcase}
155
+ {language: read_atom.downcase}
156
156
  when ?^
157
157
  2.times { skip_char } # '^^'
158
- {:datatype => read_token.last}
158
+ {datatype: read_token.last}
159
159
  else {}
160
160
  end
161
161
  RDF::Literal(value, options)
@@ -179,7 +179,7 @@ module SXP; class Reader
179
179
  skip_char # '>'
180
180
 
181
181
  # If we have a base URI, use that when constructing a new URI
182
- uri = if self.base_uri
182
+ uri = if self.base_uri && RDF::URI(buffer).relative?
183
183
  u = self.base_uri.join(buffer)
184
184
  u.lexical = "<#{buffer}>" unless u.to_s == buffer # So that it can be re-serialized properly
185
185
  u
@@ -196,7 +196,7 @@ begin
196
196
  # @return [Array]
197
197
  def to_sxp
198
198
  res = [:bgp] + patterns
199
- (named? ? [:graph, context, res] : res).to_sxp
199
+ (named? ? [:graph, graph_name, res] : res).to_sxp
200
200
  end
201
201
  end
202
202
 
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: 0.1.5
4
+ version: 1.0.0.beta1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arto Bendiken
@@ -9,51 +9,58 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-01-11 00:00:00.000000000 Z
12
+ date: 2016-01-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ! '>='
18
+ - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: 2.13.0
20
+ version: '3.4'
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: 2.13.0
27
+ version: '3.4'
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.8.5
34
+ version: '0.8'
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.8.5
41
+ version: '0.8'
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: 1.0.0
49
- type: :development
48
+ version: 2.0.0.beta
49
+ - - "<"
50
+ - !ruby/object:Gem::Version
51
+ version: '3'
52
+ type: :runtime
50
53
  prerelease: false
51
54
  version_requirements: !ruby/object:Gem::Requirement
52
55
  requirements:
53
- - - ! '>='
56
+ - - ">="
54
57
  - !ruby/object:Gem::Version
55
- version: 1.0.0
56
- description: A pure-Ruby implementation of a universal S-expression parser.
58
+ version: 2.0.0.beta
59
+ - - "<"
60
+ - !ruby/object:Gem::Version
61
+ version: '3'
62
+ description: Universal S-expression parser with specific support for Common Lisp,
63
+ Scheme, and RDF/SPARQL
57
64
  email:
58
65
  - arto@bendiken.net
59
66
  - gregg@greggkellogg.net
@@ -67,29 +74,29 @@ extra_rdoc_files: []
67
74
  files:
68
75
  - AUTHORS
69
76
  - CREDITS
70
- - README
77
+ - README.md
71
78
  - UNLICENSE
72
79
  - VERSION
80
+ - bin/sxp2json
81
+ - bin/sxp2rdf
82
+ - bin/sxp2xml
83
+ - bin/sxp2yaml
84
+ - lib/sxp.rb
73
85
  - lib/sxp/extensions.rb
74
86
  - lib/sxp/generator.rb
75
87
  - lib/sxp/list.rb
76
88
  - lib/sxp/pair.rb
89
+ - lib/sxp/reader.rb
77
90
  - lib/sxp/reader/basic.rb
78
91
  - lib/sxp/reader/common_lisp.rb
79
92
  - lib/sxp/reader/extended.rb
80
93
  - lib/sxp/reader/scheme.rb
81
94
  - lib/sxp/reader/sparql.rb
82
- - lib/sxp/reader.rb
83
95
  - lib/sxp/version.rb
84
96
  - lib/sxp/writer.rb
85
- - lib/sxp.rb
86
- - bin/sxp2rdf
87
- - bin/sxp2json
88
- - bin/sxp2xml
89
- - bin/sxp2yaml
90
97
  homepage: http://sxp.rubyforge.org/
91
98
  licenses:
92
- - Public Domain
99
+ - Unlicense
93
100
  metadata: {}
94
101
  post_install_message:
95
102
  rdoc_options: []
@@ -97,17 +104,17 @@ require_paths:
97
104
  - lib
98
105
  required_ruby_version: !ruby/object:Gem::Requirement
99
106
  requirements:
100
- - - ! '>='
107
+ - - ">="
101
108
  - !ruby/object:Gem::Version
102
- version: 1.8.1
109
+ version: '2.0'
103
110
  required_rubygems_version: !ruby/object:Gem::Requirement
104
111
  requirements:
105
- - - ! '>='
112
+ - - ">"
106
113
  - !ruby/object:Gem::Version
107
- version: '0'
114
+ version: 1.3.1
108
115
  requirements: []
109
116
  rubyforge_project: sxp
110
- rubygems_version: 2.0.3
117
+ rubygems_version: 2.5.1
111
118
  signing_key:
112
119
  specification_version: 4
113
120
  summary: A pure-Ruby implementation of a universal S-expression parser.