Skip to content

Commit b5e8471

Browse files
committed
Finish 3.1.0
2 parents c1e75c9 + e992f36 commit b5e8471

6 files changed

Lines changed: 23 additions & 38 deletions

File tree

.travis.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
language: ruby
2-
bundler_args: --without debug
32
script: "bundle exec rspec spec"
43
env:
54
- CI=true
65
services:
76
- mongodb
87
rvm:
9-
- 2.2
10-
- 2.3
118
- 2.4
12-
- jruby-9
13-
- rbx-3
9+
- 2.5
10+
- 2.6
11+
- 2.7
12+
- jruby
1413
cache: bundler
1514
sudo: false
1615
matrix:
1716
allow_failures:
18-
- rvm: jruby-9
19-
- rvm: rbx-3
17+
- rvm: jruby
2018
dist: trusty

.yardopts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@
99
CHANGELOG
1010
LICENSE
1111
VERSION
12+
README.md

Gemfile

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,3 @@ gem 'rdf-isomorphic', github: "ruby-rdf/rdf-isomorphic", branch: "develop"
99
group :debug do
1010
gem "byebug", platforms: :mri
1111
end
12-
13-
platforms :rbx do
14-
gem 'rubysl', '~> 2.0'
15-
gem 'rubinius', '~> 2.0'
16-
end

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/mongo.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,13 @@ class Repository < ::RDF::Repository
118118
##
119119
# Initializes this repository instance.
120120
#
121-
# @overload initialize(options = {}, &block)
121+
# @overload initialize(**options, &block)
122122
# @param [Hash{Symbol => Object}] options
123123
# @option options [String, #to_s] :title (nil)
124124
# @option options [URI, #to_s] :uri (nil)
125125
# URI in the form `mongodb://host:port/db`. The URI should also identify the collection use, but appending a `collection` path component such as `mongodb://host:port/db/collection`, this ensures that the collection will be maintained if cloned. See [Mongo::Client options](https://docs.mongodb.org/ecosystem/tutorial/ruby-driver-tutorial-2-0/#uri-options-conversions) for more information on Mongo URIs.
126126
#
127-
# @overload initialize(options = {}, &block)
127+
# @overload initialize(**options, &block)
128128
# @param [Hash{Symbol => Object}] options
129129
# See [Mongo::Client options](https://docs.mongodb.org/ecosystem/tutorial/ruby-driver-tutorial-2-0/#uri-options-conversions) for more information on Mongo Client options.
130130
# @option options [String, #to_s] :title (nil)
@@ -136,7 +136,7 @@ class Repository < ::RDF::Repository
136136
#
137137
# @yield [repository]
138138
# @yieldparam [Repository] repository
139-
def initialize(options = {}, &block)
139+
def initialize(**options, &block)
140140
collection = nil
141141
if options[:uri]
142142
options = options.dup
@@ -145,14 +145,14 @@ def initialize(options = {}, &block)
145145
collection = coll || options.delete(:collection)
146146
db ||= "quadb"
147147
uri.path = "/#{db}" if coll
148-
@client = ::Mongo::Client.new(uri.to_s, options)
148+
@client = ::Mongo::Client.new(uri.to_s, **options)
149149
else
150150
warn "[DEPRECATION] RDF::Mongo::Repository#initialize expects a uri argument. Called from #{Gem.location_of_caller.join(':')}" unless options.empty?
151151
options[:database] ||= options.delete(:db) # 1.x compat
152152
options[:database] ||= 'quadb'
153153
hosts = Array(options[:host] || 'localhost')
154154
hosts.map! {|h| "#{h}:#{options[:port]}"} if options[:port]
155-
@client = ::Mongo::Client.new(hosts, options)
155+
@client = ::Mongo::Client.new(hosts, **options)
156156
end
157157

158158
@collection = @client[options.delete(:collection) || 'quads']
@@ -165,7 +165,7 @@ def initialize(options = {}, &block)
165165
#{key: {s: 1, o: "hashed"}}, # Muti-key hashed indexes not allowed
166166
#{key: {p: 1, o: "hashed"}}, # Muti-key hashed indexes not allowed
167167
])
168-
super(options, &block)
168+
super(**options, &block)
169169
end
170170

171171
# @see RDF::Mutable#insert_statement
@@ -258,8 +258,8 @@ def has_graph?(value)
258258
# @private
259259
# @see RDF::Queryable#query_pattern
260260
# @see RDF::Query::Pattern
261-
def query_pattern(pattern, options = {}, &block)
262-
return enum_for(:query_pattern, pattern, options) unless block_given?
261+
def query_pattern(pattern, **options, &block)
262+
return enum_for(:query_pattern, pattern, **options) unless block_given?
263263
@nodes = {} # reset cache. FIXME this should probably be in Node.intern
264264

265265
# A pattern graph_name of `false` is used to indicate the default graph

rdf-mongo.gemspec

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,26 +23,17 @@ Gem::Specification.new do |gem|
2323
gem.platform = Gem::Platform::RUBY
2424
gem.files = %w(LICENSE VERSION README.md) + Dir.glob('lib/**/*.rb')
2525
gem.require_paths = %w(lib)
26-
gem.extensions = %w()
2726
gem.test_files = Dir.glob('spec/*.spec')
28-
gem.has_rdoc = false
2927

30-
gem.required_ruby_version = '>= 2.2.2'
28+
gem.required_ruby_version = '>= 2.4'
3129
gem.requirements = []
32-
gem.add_runtime_dependency 'rdf', '>= 2.2', '< 4.0'
33-
gem.add_runtime_dependency 'mongo', '~> 2.2'
34-
35-
gem.add_development_dependency 'rdf-spec', '>= 2.2', '< 4.0'
36-
gem.add_development_dependency 'rspec', '~> 3.4'
37-
gem.add_development_dependency 'rspec-its', '~> 1.2'
38-
gem.add_development_dependency 'yard', '~> 0.8'
39-
40-
# Rubinius has it's own dependencies
41-
if RUBY_ENGINE == "rbx" && RUBY_VERSION >= "2.1.0"
42-
gem.add_runtime_dependency "rubysl-base64"
43-
gem.add_runtime_dependency "rubysl-digest"
44-
gem.add_development_dependency "rubysl-prettyprint"
45-
end
30+
gem.add_runtime_dependency 'rdf', '>= 3.1'
31+
gem.add_runtime_dependency 'mongo', '~> 2.11'
32+
33+
gem.add_development_dependency 'rdf-spec', '>= 3.1'
34+
gem.add_development_dependency 'rspec', '~> 3.9'
35+
gem.add_development_dependency 'rspec-its', '~> 1.3'
36+
gem.add_development_dependency 'yard', '~> 0.9.20'
4637

4738
gem.post_install_message = "Have fun! :)"
4839
end

0 commit comments

Comments
 (0)