rdf-mongo 2.2.1 → 3.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 +5 -5
- data/VERSION +1 -1
- data/lib/rdf/mongo.rb +8 -8
- metadata +16 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 19996e4e819f3dbddc977c81971cc2f3d7998e6c85a96c03f16296097fa02091
|
4
|
+
data.tar.gz: 346faa6bd5fca9537056e784269234a4aaae4a528fd802f2b9f1d1f2538c8dc3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e8baab125167f760d78126d6782bdd54f038d0d85dc12ec86b3207a981bbf9efebfbf661dbfeed99f95124c5c1852fd9127316ccca239b055a7100036f83b10
|
7
|
+
data.tar.gz: e9555cbe5c11d47f748066003ccf4fdd285a5a7e00d9b97d7fb44fd9a4030c1aa693b49b38122656523a2284b552001bae6ef7ac7bd4d0bd0236bb3a573d7fe5
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3.1.0
|
data/lib/rdf/mongo.rb
CHANGED
@@ -118,13 +118,13 @@ module RDF
|
|
118
118
|
##
|
119
119
|
# Initializes this repository instance.
|
120
120
|
#
|
121
|
-
# @overload initialize(options
|
121
|
+
# @overload initialize(**options, &block)
|
122
122
|
# @param [Hash{Symbol => Object}] options
|
123
123
|
# @option options [String, #to_s] :title (nil)
|
124
124
|
# @option options [URI, #to_s] :uri (nil)
|
125
125
|
# 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.
|
126
126
|
#
|
127
|
-
# @overload initialize(options
|
127
|
+
# @overload initialize(**options, &block)
|
128
128
|
# @param [Hash{Symbol => Object}] options
|
129
129
|
# 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.
|
130
130
|
# @option options [String, #to_s] :title (nil)
|
@@ -136,7 +136,7 @@ module RDF
|
|
136
136
|
#
|
137
137
|
# @yield [repository]
|
138
138
|
# @yieldparam [Repository] repository
|
139
|
-
def initialize(options
|
139
|
+
def initialize(**options, &block)
|
140
140
|
collection = nil
|
141
141
|
if options[:uri]
|
142
142
|
options = options.dup
|
@@ -145,14 +145,14 @@ module RDF
|
|
145
145
|
collection = coll || options.delete(:collection)
|
146
146
|
db ||= "quadb"
|
147
147
|
uri.path = "/#{db}" if coll
|
148
|
-
@client = ::Mongo::Client.new(uri.to_s, options)
|
148
|
+
@client = ::Mongo::Client.new(uri.to_s, **options)
|
149
149
|
else
|
150
150
|
warn "[DEPRECATION] RDF::Mongo::Repository#initialize expects a uri argument. Called from #{Gem.location_of_caller.join(':')}" unless options.empty?
|
151
151
|
options[:database] ||= options.delete(:db) # 1.x compat
|
152
152
|
options[:database] ||= 'quadb'
|
153
153
|
hosts = Array(options[:host] || 'localhost')
|
154
154
|
hosts.map! {|h| "#{h}:#{options[:port]}"} if options[:port]
|
155
|
-
@client = ::Mongo::Client.new(hosts, options)
|
155
|
+
@client = ::Mongo::Client.new(hosts, **options)
|
156
156
|
end
|
157
157
|
|
158
158
|
@collection = @client[options.delete(:collection) || 'quads']
|
@@ -165,7 +165,7 @@ module RDF
|
|
165
165
|
#{key: {s: 1, o: "hashed"}}, # Muti-key hashed indexes not allowed
|
166
166
|
#{key: {p: 1, o: "hashed"}}, # Muti-key hashed indexes not allowed
|
167
167
|
])
|
168
|
-
super(options, &block)
|
168
|
+
super(**options, &block)
|
169
169
|
end
|
170
170
|
|
171
171
|
# @see RDF::Mutable#insert_statement
|
@@ -258,8 +258,8 @@ module RDF
|
|
258
258
|
# @private
|
259
259
|
# @see RDF::Queryable#query_pattern
|
260
260
|
# @see RDF::Query::Pattern
|
261
|
-
def query_pattern(pattern, options
|
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?
|
263
263
|
@nodes = {} # reset cache. FIXME this should probably be in Node.intern
|
264
264
|
|
265
265
|
# A pattern graph_name of `false` is used to indicate the default graph
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rdf-mongo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pius Uzamere
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2019-12-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rdf
|
@@ -17,96 +17,84 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: '
|
21
|
-
- - "<"
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: '4.0'
|
20
|
+
version: '3.1'
|
24
21
|
type: :runtime
|
25
22
|
prerelease: false
|
26
23
|
version_requirements: !ruby/object:Gem::Requirement
|
27
24
|
requirements:
|
28
25
|
- - ">="
|
29
26
|
- !ruby/object:Gem::Version
|
30
|
-
version: '
|
31
|
-
- - "<"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '4.0'
|
27
|
+
version: '3.1'
|
34
28
|
- !ruby/object:Gem::Dependency
|
35
29
|
name: mongo
|
36
30
|
requirement: !ruby/object:Gem::Requirement
|
37
31
|
requirements:
|
38
32
|
- - "~>"
|
39
33
|
- !ruby/object:Gem::Version
|
40
|
-
version: '2.
|
34
|
+
version: '2.11'
|
41
35
|
type: :runtime
|
42
36
|
prerelease: false
|
43
37
|
version_requirements: !ruby/object:Gem::Requirement
|
44
38
|
requirements:
|
45
39
|
- - "~>"
|
46
40
|
- !ruby/object:Gem::Version
|
47
|
-
version: '2.
|
41
|
+
version: '2.11'
|
48
42
|
- !ruby/object:Gem::Dependency
|
49
43
|
name: rdf-spec
|
50
44
|
requirement: !ruby/object:Gem::Requirement
|
51
45
|
requirements:
|
52
46
|
- - ">="
|
53
47
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
55
|
-
- - "<"
|
56
|
-
- !ruby/object:Gem::Version
|
57
|
-
version: '4.0'
|
48
|
+
version: '3.1'
|
58
49
|
type: :development
|
59
50
|
prerelease: false
|
60
51
|
version_requirements: !ruby/object:Gem::Requirement
|
61
52
|
requirements:
|
62
53
|
- - ">="
|
63
54
|
- !ruby/object:Gem::Version
|
64
|
-
version: '
|
65
|
-
- - "<"
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version: '4.0'
|
55
|
+
version: '3.1'
|
68
56
|
- !ruby/object:Gem::Dependency
|
69
57
|
name: rspec
|
70
58
|
requirement: !ruby/object:Gem::Requirement
|
71
59
|
requirements:
|
72
60
|
- - "~>"
|
73
61
|
- !ruby/object:Gem::Version
|
74
|
-
version: '3.
|
62
|
+
version: '3.9'
|
75
63
|
type: :development
|
76
64
|
prerelease: false
|
77
65
|
version_requirements: !ruby/object:Gem::Requirement
|
78
66
|
requirements:
|
79
67
|
- - "~>"
|
80
68
|
- !ruby/object:Gem::Version
|
81
|
-
version: '3.
|
69
|
+
version: '3.9'
|
82
70
|
- !ruby/object:Gem::Dependency
|
83
71
|
name: rspec-its
|
84
72
|
requirement: !ruby/object:Gem::Requirement
|
85
73
|
requirements:
|
86
74
|
- - "~>"
|
87
75
|
- !ruby/object:Gem::Version
|
88
|
-
version: '1.
|
76
|
+
version: '1.3'
|
89
77
|
type: :development
|
90
78
|
prerelease: false
|
91
79
|
version_requirements: !ruby/object:Gem::Requirement
|
92
80
|
requirements:
|
93
81
|
- - "~>"
|
94
82
|
- !ruby/object:Gem::Version
|
95
|
-
version: '1.
|
83
|
+
version: '1.3'
|
96
84
|
- !ruby/object:Gem::Dependency
|
97
85
|
name: yard
|
98
86
|
requirement: !ruby/object:Gem::Requirement
|
99
87
|
requirements:
|
100
88
|
- - "~>"
|
101
89
|
- !ruby/object:Gem::Version
|
102
|
-
version:
|
90
|
+
version: 0.9.20
|
103
91
|
type: :development
|
104
92
|
prerelease: false
|
105
93
|
version_requirements: !ruby/object:Gem::Requirement
|
106
94
|
requirements:
|
107
95
|
- - "~>"
|
108
96
|
- !ruby/object:Gem::Version
|
109
|
-
version:
|
97
|
+
version: 0.9.20
|
110
98
|
description: rdf-mongo is a storage adapter for integrating MongoDB and rdf.rb, a
|
111
99
|
Ruby library for working with Resource Description Framework (RDF) data.
|
112
100
|
email:
|
@@ -133,15 +121,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
133
121
|
requirements:
|
134
122
|
- - ">="
|
135
123
|
- !ruby/object:Gem::Version
|
136
|
-
version: 2.
|
124
|
+
version: '2.4'
|
137
125
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
138
126
|
requirements:
|
139
127
|
- - ">="
|
140
128
|
- !ruby/object:Gem::Version
|
141
129
|
version: '0'
|
142
130
|
requirements: []
|
143
|
-
|
144
|
-
rubygems_version: 2.6.14
|
131
|
+
rubygems_version: 3.0.6
|
145
132
|
signing_key:
|
146
133
|
specification_version: 4
|
147
134
|
summary: A storage adapter for integrating MongoDB and rdf.rb, a Ruby library for
|