rdf-mongo 2.0.1 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +16 -17
  3. data/VERSION +1 -1
  4. data/lib/rdf/mongo.rb +13 -12
  5. metadata +24 -26
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 2a91d8405fa246651fce9d3c97b3da32b26c1380
4
- data.tar.gz: 93c268a404411577b276771ddb8f7c8b82cc91ec
2
+ SHA256:
3
+ metadata.gz: 1004bcc342e29957951cab359e86a44771b6cdea67fb6a262d2f9af7f8b3f59f
4
+ data.tar.gz: cfb66ba5efbd342f7068cae0413a47f51399d71a09e91c23f7a56bc70f5302e4
5
5
  SHA512:
6
- metadata.gz: 28afd467cc19bccfc1bbe4e4cdb830ad0e764f57f7742047be32f4b8f3b83d3030f42a1bbdcbb88f8db68861a10f50b0cb8d78ddcb49c11d3f212fd6402b2732
7
- data.tar.gz: e903f0f0b89bde195e847643a84fcc0f64d44519510d7de49d46545271ef65fbb5a5b6cd203eea36f081d07b019fa9e5faa853f529247f349b157bdcf88ea942
6
+ metadata.gz: a038580232c7742058276a6ef45eed457893b3cb349927486b0c7561d101ec32792ed861869dc55ca4d03002a74fa4258886d260b38d1be53a27b2495da262a6
7
+ data.tar.gz: 5eddd409e6258aba746ff1f246de10b6a20178798e2ab4f2aef9503d0274201a0bfefb08753b48197945089cd18ff929c1269a3e608dd3beb7d7a515b31eb4e3
data/README.md CHANGED
@@ -2,17 +2,14 @@
2
2
 
3
3
  This is an [RDF.rb][] storage adapter for MongoDB.
4
4
 
5
- See <http://blog.datagraph.org/2010/04/rdf-repository-howto> for an overview of the general approach of creating RDF::Repository adaptors.
6
-
7
- [![Gem Version](https://badge.fury.io/rb/rdf-mongo.png)](http://badge.fury.io/rb/rdf-mongo)
8
- [![Build Status](https://travis-ci.org/ruby-rdf/rdf-mongo.png?branch=master)](http://travis-ci.org/ruby-rdf/rdf-mongo)
5
+ [![Gem Version](https://badge.fury.io/rb/rdf-mongo.png)](https://badge.fury.io/rb/rdf-mongo)
6
+ [![Build Status](https://github.com/ruby-rdf/rdf-mongo/workflows/CI/badge.svg?branch=develop)](https://github.com/ruby-rdf/rdf-mongo/actions?query=workflow%3ACI)
7
+ [![Gitter chat](https://badges.gitter.im/ruby-rdf/rdf.png)](https://gitter.im/ruby-rdf/rdf)
9
8
 
10
9
  ## Versioning and backwards compatibility
11
10
 
12
11
  Moving forward, the versioning will reflect the [RDF.rb][] version number for which all rdf-specs are passing.
13
12
 
14
- It should also be noted that prior to 1.0, there are no guarantees of backwards compatibility for data stored using previous versions of the gem. This is to make optimizing the schema for MongoDB easy.
15
-
16
13
  ## Requirements
17
14
 
18
15
  You'll need the 'mongo', 'rdf', 'rdf-spec', and 'rspec' libraries. The easiest way to install these is via RubyGems.
@@ -44,12 +41,12 @@ one more more predicates having one or more types.
44
41
  Please post questions or feedback to the [W3C-ruby-rdf mailing list][].
45
42
 
46
43
  ### Authors
47
- * [Pius Uzamere][] | <http://github.com/pius> | <http://pius.me>
48
- * [Gregg Kellogg][] | <http://github.com/gkellogg> | <http://greggkellogg.net>
44
+ * [Pius Uzamere][] | <https://github.com/pius> | <https://pius.me>
45
+ * [Gregg Kellogg][] | <https://github.com/gkellogg> | <https://greggkellogg.net>
49
46
 
50
47
  ### Thank you
51
48
 
52
- * Ben Lavender (author of the adapter skeleton) | <blavender@gmail.com> | <http://github.com/bhuga> | <http://bhuga.net> | <http://blog.datagraph.org>
49
+ * Ben Lavender (author of the adapter skeleton) | <blavender@gmail.com> | <https://github.com/bhuga> | <https://bhuga.net>
53
50
 
54
51
  ### Contributing
55
52
 
@@ -65,16 +62,18 @@ This repository uses [Git Flow](https://github.com/nvie/gitflow) to mange develo
65
62
  list in the the `README`. Alphabetical order applies.
66
63
  * Do note that in order for us to merge any non-trivial changes (as a rule
67
64
  of thumb, additions larger than about 15 lines of code), we need an
68
- explicit [public domain dedication][PDD] on record from you.
65
+ explicit [public domain dedication][PDD] on record from you,
66
+ which you will be asked to agree to on the first commit to a repo within the organization.
67
+ Note that the agreement applies to all repos in the [Ruby RDF](https://github.com/ruby-rdf/) organization.
69
68
 
70
69
  ### License
71
70
 
72
71
  MIT License
73
72
 
74
- [W3C-ruby-rdf mailing list]: http://lists.w3.org/Archives/Public/public-rdf-ruby/
75
- [Pius Uzamere]: http://pius.me
76
- [Gregg Kellogg]: http://greggkellogg.net/me
77
- [RDF.rb]: http://rdf.rubyforge.org/
78
- [YARD]: http://yardoc.org/
79
- [YARD-GS]: http://rubydoc.info/docs/yard/file/docs/GettingStarted.md
80
- [PDD]: http://lists.w3.org/Archives/Public/public-rdf-ruby/2010May/0013.html
73
+ [W3C-ruby-rdf mailing list]: https://lists.w3.org/Archives/Public/public-rdf-ruby/
74
+ [Pius Uzamere]: https://pius.me
75
+ [Gregg Kellogg]: https://greggkellogg.net/me
76
+ [RDF.rb]: https://ruby-rdf.github.com/
77
+ [YARD]: https://yardoc.org/
78
+ [YARD-GS]: https://rubydoc.info/docs/yard/file/docs/GettingStarted.md
79
+ [PDD]: https://unlicense.org/#unlicensing-contributions
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.1
1
+ 3.2.0
data/lib/rdf/mongo.rb CHANGED
@@ -8,7 +8,7 @@ module RDF
8
8
  # Creates a BSON representation of the statement.
9
9
  # @return [Hash]
10
10
  def to_mongo
11
- self.to_hash.inject({}) do |hash, (place_in_statement, entity)|
11
+ self.to_h.inject({}) do |hash, (place_in_statement, entity)|
12
12
  hash.merge(RDF::Mongo::Conversion.to_mongo(entity, place_in_statement))
13
13
  end
14
14
  end
@@ -118,13 +118,13 @@ module RDF
118
118
  ##
119
119
  # Initializes this repository instance.
120
120
  #
121
- # @overload initialize(options = {}, &block)
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 = {}, &block)
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 = {}, &block)
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,15 +165,16 @@ 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
172
172
  def supports?(feature)
173
173
  case feature.to_sym
174
- when :graph_name then true
175
- when :atomic_write then true
176
- when :validity then @options.fetch(:with_validity, true)
174
+ when :graph_name then true
175
+ when :atomic_write then true
176
+ when :validity then @options.fetch(:with_validity, true)
177
+ when :literal_equality then true
177
178
  else false
178
179
  end
179
180
  end
@@ -257,8 +258,8 @@ module RDF
257
258
  # @private
258
259
  # @see RDF::Queryable#query_pattern
259
260
  # @see RDF::Query::Pattern
260
- def query_pattern(pattern, options = {}, &block)
261
- 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?
262
263
  @nodes = {} # reset cache. FIXME this should probably be in Node.intern
263
264
 
264
265
  # A pattern graph_name of `false` is used to indicate the default graph
metadata CHANGED
@@ -1,100 +1,100 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdf-mongo
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 3.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pius Uzamere
8
8
  - Gregg Kellogg
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-06-12 00:00:00.000000000 Z
12
+ date: 2021-12-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rdf
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - "~>"
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: '2.0'
20
+ version: '3.2'
21
21
  type: :runtime
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.0'
27
+ version: '3.2'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: mongo
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
32
  - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: '2.2'
34
+ version: '2.17'
35
35
  type: :runtime
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: '2.2'
41
+ version: '2.17'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: rdf-spec
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - "~>"
46
+ - - ">="
47
47
  - !ruby/object:Gem::Version
48
- version: '2.0'
48
+ version: '3.2'
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - "~>"
53
+ - - ">="
54
54
  - !ruby/object:Gem::Version
55
- version: '2.0'
55
+ version: '3.2'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: rspec
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
60
  - - "~>"
61
61
  - !ruby/object:Gem::Version
62
- version: '3.4'
62
+ version: '3.10'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
67
  - - "~>"
68
68
  - !ruby/object:Gem::Version
69
- version: '3.4'
69
+ version: '3.10'
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: rspec-its
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
74
  - - "~>"
75
75
  - !ruby/object:Gem::Version
76
- version: '1.2'
76
+ version: '1.3'
77
77
  type: :development
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
81
  - - "~>"
82
82
  - !ruby/object:Gem::Version
83
- version: '1.2'
83
+ version: '1.3'
84
84
  - !ruby/object:Gem::Dependency
85
85
  name: yard
86
86
  requirement: !ruby/object:Gem::Requirement
87
87
  requirements:
88
88
  - - "~>"
89
89
  - !ruby/object:Gem::Version
90
- version: '0.8'
90
+ version: '0.9'
91
91
  type: :development
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
95
  - - "~>"
96
96
  - !ruby/object:Gem::Version
97
- version: '0.8'
97
+ version: '0.9'
98
98
  description: rdf-mongo is a storage adapter for integrating MongoDB and rdf.rb, a
99
99
  Ruby library for working with Resource Description Framework (RDF) data.
100
100
  email:
@@ -109,11 +109,11 @@ files:
109
109
  - VERSION
110
110
  - lib/rdf/mongo.rb
111
111
  - lib/rdf/mongo/version.rb
112
- homepage: http://ruby-rdf.github.com/rdf-mongo
112
+ homepage: https://ruby-rdf.github.com/rdf-mongo
113
113
  licenses:
114
114
  - MIT
115
115
  metadata: {}
116
- post_install_message: Have fun! :)
116
+ post_install_message:
117
117
  rdoc_options: []
118
118
  require_paths:
119
119
  - lib
@@ -121,18 +121,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
- version: '2.0'
124
+ version: '2.6'
125
125
  required_rubygems_version: !ruby/object:Gem::Requirement
126
126
  requirements:
127
127
  - - ">="
128
128
  - !ruby/object:Gem::Version
129
129
  version: '0'
130
130
  requirements: []
131
- rubyforge_project:
132
- rubygems_version: 2.5.1
133
- signing_key:
131
+ rubygems_version: 3.3.3
132
+ signing_key:
134
133
  specification_version: 4
135
134
  summary: A storage adapter for integrating MongoDB and rdf.rb, a Ruby library for
136
135
  working with Resource Description Framework (RDF) data.
137
136
  test_files: []
138
- has_rdoc: false