Skip to content

Commit ece596a

Browse files
committed
Finish 3.1.0
2 parents 657c4ea + b265074 commit ece596a

File tree

12 files changed

+35
-48
lines changed

12 files changed

+35
-48
lines changed

.travis.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
language: ruby
2-
bundler_args: --without debug
32
script: "bundle exec rspec spec"
43
env:
54
- CI=true
65
rvm:
7-
- 2.2
8-
- 2.3
96
- 2.4
10-
- jruby-9
11-
- rbx-3
7+
- 2.5
8+
- 2.6
9+
- 2.7
10+
- jruby
1211
cache: bundler
1312
sudo: false
1413
matrix:
1514
allow_failures:
16-
- rvm: jruby-9
17-
- rvm: rbx-3
15+
- rvm: jruby
1816
dist: trusty

Gemfile

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ gem 'rdf', git: "https://github.com/ruby-rdf/rdf", branch: "develop"
66
gem "nokogiri"
77

88
group :development do
9-
gem 'ebnf', git: "https://github.com/gkellogg/ebnf", branch: "develop"
9+
gem 'ebnf', git: "https://github.com/dryruby/ebnf", branch: "develop"
1010
gem 'json-ld', git: "https://github.com/ruby-rdf/json-ld", branch: "develop"
1111
gem 'rdf-isomorphic', git: "https://github.com/ruby-rdf/rdf-isomorphic", branch: "develop"
1212
gem 'rdf-spec', git: "https://github.com/ruby-rdf/rdf-spec", branch: "develop"
@@ -15,8 +15,3 @@ group :development do
1515
gem "syntax"
1616
gem "byebug", platform: :mri
1717
end
18-
19-
platforms :rbx do
20-
gem 'rubysl', '~> 2.0'
21-
gem 'rubinius', '~> 2.0'
22-
end

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ Documentation
2222
Dependencies
2323
------------
2424

25-
* [RDF.rb](http://rubygems.org/gems/rdf) (>= 2.2.2)
26-
[Nokogiri](http://rubygems.org/gems/nokogiri) (>= 1.6.0)
25+
* [RDF.rb](http://rubygems.org/gems/rdf) (~> 3.1)
26+
[Nokogiri](http://rubygems.org/gems/nokogiri) (>= 1.10.0)
2727

2828
Installation
2929
------------

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.2.1
1+
3.1.0

lib/rdf/trix/reader.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class Reader < RDF::Reader
6666
# @yield [reader] `self`
6767
# @yieldparam [RDF::Reader] reader
6868
# @yieldreturn [void] ignored
69-
def initialize(input = $stdin, options = {}, &block)
69+
def initialize(input = $stdin, **options, &block)
7070
super do
7171
@library = case options[:library]
7272
when nil
@@ -97,7 +97,7 @@ def initialize(input = $stdin, options = {}, &block)
9797
self.extend(@implementation)
9898

9999
begin
100-
initialize_xml(options)
100+
initialize_xml(**options)
101101
rescue
102102
log_error("Malformed document: #{$!.message}")
103103
end

lib/rdf/trix/reader/libxml.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def self.library
2020
#
2121
# @param [Hash{Symbol => Object}] options
2222
# @return [void]
23-
def initialize_xml(options = {})
23+
def initialize_xml(**options)
2424
require 'libxml' unless defined?(::LibXML)
2525
@xml = case @input
2626
when File then ::LibXML::XML::Document.file(@input.path)

lib/rdf/trix/reader/nokogiri.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def self.library
2020
#
2121
# @param [Hash{Symbol => Object}] options
2222
# @return [void]
23-
def initialize_xml(options = {})
23+
def initialize_xml(**options)
2424
require 'nokogiri' unless defined?(::Nokogiri)
2525
@xml = ::Nokogiri::XML(@input)
2626
log_error("Errors: #{@xml.errors.join('\n')}") unless @xml.errors.empty?

lib/rdf/trix/reader/rexml.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def self.library
2020
#
2121
# @param [Hash{Symbol => Object}] options
2222
# @return [void]
23-
def initialize_xml(options = {})
23+
def initialize_xml(**options)
2424
require 'rexml/document' unless defined?(::REXML)
2525
@xml = ::REXML::Document.new(@input, :compress_whitespace => %w{uri})
2626
end

lib/rdf/trix/writer.rb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class Writer < RDF::Writer
7070
# @yield [writer] `self`
7171
# @yieldparam [RDF::Writer] writer
7272
# @yieldreturn [void] ignored
73-
def initialize(output = $stdout, options = {}, &block)
73+
def initialize(output = $stdout, **options, &block)
7474
@graph_name = nil
7575
@nesting = 0
7676

@@ -104,7 +104,7 @@ def initialize(output = $stdout, options = {}, &block)
104104
self.extend(@implementation)
105105

106106
@encoding = (options[:encoding] || 'utf-8').to_s
107-
initialize_xml(options)
107+
initialize_xml(**options)
108108

109109
super do
110110
if block_given?
@@ -193,11 +193,11 @@ def write_triple(subject, predicate, object)
193193
# @param [RDF::Value] object
194194
# @param [Hash{Symbol => Object}] options
195195
# @return [Element]
196-
def format_triple(subject, predicate, object, options = {})
196+
def format_triple(subject, predicate, object, **options)
197197
create_element(:triple) do |triple|
198-
triple << format_term(subject, options)
199-
triple << format_term(predicate, options)
200-
triple << format_term(object, options)
198+
triple << format_term(subject, **options)
199+
triple << format_term(predicate, **options)
200+
triple << format_term(object, **options)
201201
end
202202
end
203203

@@ -207,7 +207,7 @@ def format_triple(subject, predicate, object, options = {})
207207
# @param [RDF::Node] value
208208
# @param [Hash{Symbol => Object}] options
209209
# @return [Element]
210-
def format_node(value, options = {})
210+
def format_node(value, **options)
211211
create_element(:id, value.id.to_s)
212212
end
213213

@@ -217,7 +217,7 @@ def format_node(value, options = {})
217217
# @param [RDF::URI] value
218218
# @param [Hash{Symbol => Object}] options
219219
# @return [Element]
220-
def format_uri(value, options = {})
220+
def format_uri(value, **options)
221221
create_element(:uri, value.to_s)
222222
end
223223

@@ -227,7 +227,7 @@ def format_uri(value, options = {})
227227
# @param [RDF::Literal, String, #to_s] value
228228
# @param [Hash{Symbol => Object}] options
229229
# @return [Element]
230-
def format_literal(value, options = {})
230+
def format_literal(value, **options)
231231
case
232232
when value.has_datatype?
233233
create_element(:typedLiteral, value.value.to_s, 'datatype' => value.datatype.to_s)

lib/rdf/trix/writer/nokogiri.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def self.library
1818
#
1919
# @param [Hash{Symbol => Object}] options
2020
# @return [void]
21-
def initialize_xml(options = {})
21+
def initialize_xml(**options)
2222
require 'nokogiri' unless defined?(::Nokogiri)
2323
@xml = ::Nokogiri::XML::Document.new
2424
@xml.encoding = @encoding

0 commit comments

Comments
 (0)