Skip to content

Commit f902338

Browse files
committed
Finish 1.1.0
2 parents 2c5a106 + ef49037 commit f902338

File tree

12 files changed

+44
-50
lines changed

12 files changed

+44
-50
lines changed

.travis.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,18 @@
11
language: ruby
2-
bundler_args: --without debug
32
script: "bundle exec rspec spec"
4-
before_install:
5-
- 'gem update --system --conservative || (gem i "rubygems-update:~>2.7" --no-document && update_rubygems)'
6-
- 'gem update bundler --conservative'
73
env:
84
- CI=true
95
rvm:
10-
- 2.2.2
11-
- 2.3
126
- 2.4
137
- 2.5
148
- 2.6
15-
- jruby-9
16-
- rbx-3
9+
- 2.7
10+
- jruby
11+
- rbx
1712
cache: bundler
1813
sudo: false
1914
matrix:
2015
allow_failures:
21-
- rvm: jruby-9
22-
- rvm: rbx-3
16+
- rvm: jruby
17+
- rvm: rbx
2318
dist: trusty

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This is a Ruby implementation of a universal [S-expression][] parser.
1010
* Parses S-expressions in universal, [Scheme][], [Common Lisp][], or
1111
[SPARQL][] syntax.
1212
* Adds a `#to_sxp` method to Ruby objects.
13-
* Compatible with Ruby >= 2.2.2, Rubinius >= 3.0, and JRuby 9+.
13+
* Compatible with Ruby >= 2.4, Rubinius >= 3.0, and JRuby 9+.
1414

1515
## Examples
1616

@@ -74,8 +74,8 @@ This is a Ruby implementation of a universal [S-expression][] parser.
7474
Dependencies
7575
------------
7676

77-
* [Ruby](http://ruby-lang.org/) (>= 2.2.2)
78-
* [RDF.rb](http://rubygems.org/gems/rdf) (~> 3.0), only needed for SPARQL
77+
* [Ruby](http://ruby-lang.org/) (>= 2.4)
78+
* [RDF.rb](http://rubygems.org/gems/rdf) (~> 3.1), only needed for SPARQL
7979
S-expressions
8080

8181
Installation

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.2
1+
1.1.0

lib/sxp.rb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ module SXP
3232
# @param [String, #to_s] url
3333
# @param [Hash{Symbol => Object}] options
3434
# @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)
3737
end
3838

3939
##
@@ -42,7 +42,7 @@ def self.read_url(url, options = {})
4242
# @overload read_files(*filenames)
4343
# @param [Enumerable<String>] filenames
4444
#
45-
# @overload read_files(*filenames, options)
45+
# @overload read_files(*filenames, **options)
4646
# @param [Enumerable<String>] filenames
4747
# @param [Hash{Symbol => Object}] options
4848
#
@@ -57,8 +57,8 @@ def self.read_files(*filenames)
5757
# @param [String, #to_s] filename
5858
# @param [Hash{Symbol => Object}] options
5959
# @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)
6262
end
6363

6464
##
@@ -67,8 +67,8 @@ def self.read_file(filename, options = {})
6767
# @param [IO, StringIO, String] input
6868
# @param [Hash{Symbol => Object}] options
6969
# @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)
7272
end
7373

7474
##
@@ -77,8 +77,8 @@ def self.read_all(input, options = {})
7777
# @param [IO, StringIO, String] input
7878
# @param [Hash{Symbol => Object}] options
7979
# @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)
8282
end
8383

8484
##

lib/sxp/reader.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class EOF < Error; end
2424
# @return [Enumerable<Object>]
2525
def self.read_url(url, **options)
2626
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) }
2828
end
2929

3030
##
@@ -33,15 +33,15 @@ def self.read_url(url, **options)
3333
# @overload read_files(*filenames)
3434
# @param [Enumerable<String>] filenames
3535
#
36-
# @overload read_files(*filenames, options)
36+
# @overload read_files(*filenames, **options)
3737
# @param [Enumerable<String>] filenames
3838
# @param [Hash{Symbol => Object}] options
3939
# See {#read}
4040
#
4141
# @return [Enumerable<Object>]
4242
def read_files(*filenames)
4343
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 }
4545
end
4646

4747
##

lib/sxp/reader/common_lisp.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ class CommonLisp < Basic
3737
# @option options [Object] :t (true)
3838
# @option options [Object] :quote (:quote)
3939
# @option options [Object] :function (:function)
40-
def initialize(input, options = {}, &block)
41-
super(input, OPTIONS.merge(options), &block)
40+
def initialize(input, **options, &block)
41+
super(input, **OPTIONS.merge(options), &block)
4242
end
4343

4444
##

lib/sxp/reader/sparql.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def read_rdf_literal
162162
{datatype: read_token.last}
163163
else {}
164164
end
165-
RDF::Literal(value, options)
165+
RDF::Literal(value, **options)
166166
end
167167

168168
##

spec/common_lisp_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,11 @@
120120
end
121121
end
122122

123-
def read(input, options = {})
124-
SXP::Reader::CommonLisp.new(input.freeze, options.freeze).read
123+
def read(input, **options)
124+
SXP::Reader::CommonLisp.new(input.freeze, **options.freeze).read
125125
end
126126

127-
def read_all(input, options = {})
128-
SXP::Reader::CommonLisp.new(input.freeze, options.freeze).read_all
127+
def read_all(input, **options)
128+
SXP::Reader::CommonLisp.new(input.freeze, **options.freeze).read_all
129129
end
130130
end

spec/reader_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@
6868
expect(SXP.read_file("http://example/foo.sxp")).to eq [[1, 2, 3], [4, 5, 6]]
6969
end
7070

71-
def read(input, options = {})
72-
SXP::Reader::Basic.read(input.freeze, options)
71+
def read(input, **options)
72+
SXP::Reader::Basic.read(input.freeze, **options)
7373
end
7474

75-
def read_all(input, options = {})
76-
SXP::Reader::Basic.read_all(input.freeze, options)
75+
def read_all(input, **options)
76+
SXP::Reader::Basic.read_all(input.freeze, **options)
7777
end
7878
end

spec/scheme_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,11 @@
178178
end
179179
end
180180

181-
def read(input, options = {})
182-
SXP::Reader::Scheme.new(input.freeze, options.freeze).read
181+
def read(input, **options)
182+
SXP::Reader::Scheme.new(input.freeze, **options.freeze).read
183183
end
184184

185-
def read_all(input, options = {})
186-
SXP::Reader::Scheme.new(input.freeze, options.freeze).read_all
185+
def read_all(input, **options)
186+
SXP::Reader::Scheme.new(input.freeze, **options.freeze).read_all
187187
end
188188
end

spec/sparql_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -292,11 +292,11 @@
292292
end
293293
end
294294

295-
def read(input, options = {})
296-
SXP::Reader::SPARQL.new(input, options).read
295+
def read(input, **options)
296+
SXP::Reader::SPARQL.new(input, **options).read
297297
end
298298

299-
def read_all(input, options = {})
300-
SXP::Reader::SPARQL.new(input.freeze, options).read_all
299+
def read_all(input, **options)
300+
SXP::Reader::SPARQL.new(input.freeze, **options).read_all
301301
end
302302
end

sxp.gemspec

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ Gem::Specification.new do |gem|
1010
gem.license = 'Unlicense'
1111
gem.summary = 'A pure-Ruby implementation of a universal S-expression parser.'
1212
gem.description = 'Universal S-expression parser with specific support for Common Lisp, Scheme, and RDF/SPARQL'
13-
gem.rubyforge_project = 'sxp'
1413

1514
gem.author = ['Arto Bendiken', 'Gregg Kellogg']
1615
gem.email = ['arto@bendiken.net', 'gregg@greggkellogg.net']
@@ -21,11 +20,11 @@ Gem::Specification.new do |gem|
2120
gem.executables = %w(sxp2rdf sxp2json sxp2xml sxp2yaml)
2221
gem.require_paths = %w(lib)
2322

24-
gem.required_ruby_version = '>= 2.2.2'
23+
gem.required_ruby_version = '>= 2.4'
2524
gem.requirements = []
26-
gem.add_development_dependency 'rspec', '~> 3.8'
27-
gem.add_development_dependency 'yard' , '~> 0.9.18'
28-
gem.add_runtime_dependency 'rdf', '~> 3.0'
25+
gem.add_development_dependency 'rspec', '~> 3.9'
26+
gem.add_development_dependency 'yard' , '~> 0.9.20'
27+
gem.add_runtime_dependency 'rdf', '~> 3.1'
2928

3029
gem.post_install_message = nil
3130
end

0 commit comments

Comments
 (0)