rdf-do 2.2.0 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (9) hide show
  1. checksums.yaml +5 -5
  2. data/AUTHORS +1 -1
  3. data/CHANGELOG +6 -0
  4. data/CONTRIBUTING.md +36 -0
  5. data/README.md +126 -0
  6. data/UNLICENSE +1 -1
  7. data/VERSION +1 -1
  8. metadata +20 -31
  9. data/README +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 31dd20b8a37d2fef08f93c84fefdbcc3dde6c38e
4
- data.tar.gz: 6a9381c39440e07f891ea85282e954459e7f02ee
2
+ SHA256:
3
+ metadata.gz: eb2c2e3d26d556b4e0a4070cd21f16ddb8e11d8951a4333ee613e6d4137999da
4
+ data.tar.gz: 3e1440b270bd7ea372a709f730b2b740bb737b8a860bfda086e77e1cf654bdfe
5
5
  SHA512:
6
- metadata.gz: 0a676955dfaadc5aa51c690b924ce8c341b14a5c0db0db38122bc20c7a7df8c5e07a0d7de03a60cc1512f534817ab1f7f7fca7788f6507a46c6485c43196b56f
7
- data.tar.gz: 2596e0cbc7263aff89dc88f377ff92723221832b58f5b556f0fccb1f40db99165a3e929caeb2000c53c87f5b3c8a89e929b1516a6f9b156c05d4c343e89f9a48
6
+ metadata.gz: 52701ed2f68a8b81cb32ae495abd159789ec378008dca296fd7a0c9776b1c6e25b8f60477d17ab67c8c8672a1db96bfad2bf204e3eff959d5cf736694aa8ed37
7
+ data.tar.gz: 3e8b1658203a77fa1df4e87b320812565068a0a612ef713c1916495b31d725c1856b4887fbac401e3acb6d4c7589aee1fb5ed1f032cc084be3643c47b5840d0c
data/AUTHORS CHANGED
@@ -1 +1 @@
1
- Ben Lavender - blavender@gmail.com - <http://bhuga.net>
1
+ Ben Lavender - blavender@gmail.com - <https://bhuga.net>
@@ -0,0 +1,6 @@
1
+ 0.3.2: RDF.rb 0.2.0 compatibility updates
2
+ 0.3.1: Deprecate 1.8.6 and use RDF::Enumerable
3
+ 0.3.0: Using new RDF.rb insert_statements, implemented multiple insert for
4
+ Postgres. Almost twice as fast on heroku.
5
+ 0.2.1: Updates to gemspec
6
+ 0.2.0: Initial release
@@ -0,0 +1,36 @@
1
+ # How to contribute
2
+
3
+ Community contributions are essential for keeping Ruby RDF great. We want to keep it as easy as possible to contribute changes that get things working in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things.
4
+
5
+ ## Development
6
+
7
+ This repository uses [Git Flow](https://github.com/nvie/gitflow) to manage development and release activity. All submissions _must_ be on a feature branch based on the _develop_ branch to ease staging and integration.
8
+
9
+ * create or respond to an issue on the [Github Repository](https://github.com/ruby-rdf/rdf-do/issues)
10
+ * Fork and clone the repo:
11
+ `git clone git@github.com:your-username/rdf-do.git`
12
+ * Install bundle:
13
+ `bundle install`
14
+ * Create tests in RSpec and make sure you achieve at least 90% code coverage for the feature your adding or behavior being modified.
15
+ * Push to your fork and [submit a pull request][pr].
16
+
17
+ ## Do's and Dont's
18
+ * Do your best to adhere to the existing coding conventions and idioms.
19
+ * Don't use hard tabs, and don't leave trailing whitespace on any line.
20
+ Before committing, run `git diff --check` to make sure of this.
21
+ * Do document every method you add using [YARD][] annotations. Read the
22
+ [tutorial][YARD-GS] or just look at the existing code for examples.
23
+ * Don't touch the `.gemspec` or `VERSION` files. If you need to change them,
24
+ do so on your private branch only.
25
+ * Do feel free to add yourself to the `CREDITS` file and the
26
+ corresponding list in the the `README`. Alphabetical order applies.
27
+ * Don't touch the `AUTHORS` file. If your contributions are significant
28
+ enough, be assured we will eventually add you in there.
29
+ * Do note that in order for us to merge any non-trivial changes (as a rule
30
+ of thumb, additions larger than about 15 lines of code), we need an
31
+ explicit [public domain dedication][PDD] on record from you.
32
+
33
+ [YARD]: https://yardoc.org/
34
+ [YARD-GS]: https://rubydoc.info/docs/yard/file/docs/GettingStarted.md
35
+ [PDD]: https://lists.w3.org/Archives/Public/public-rdf-ruby/2010May/0013.html
36
+ [pr]: https://github.com/ruby-rdf/rdf-do/compare/
@@ -0,0 +1,126 @@
1
+ # RDF::DataObjects
2
+
3
+ DataObjects-backed [RDF.rb][] repository, aiming for a simple use case and
4
+ currently targeting SQLite and Postgres.
5
+
6
+ * <https://github.com/ruby-rdf/rdf-do>
7
+ * <https://lists.w3.org/Archives/Public/public-rdf-ruby>
8
+
9
+ [![Gem Version](https://badge.fury.io/rb/rdf-do.png)](https://badge.fury.io/rb/rdf-do)
10
+ [![Build Status](https://travis-ci.org/ruby-rdf/rdf-do.png?branch=master)](https://travis-ci.org/ruby-rdf/rdf-do)
11
+
12
+ This was written for a tutorial, and is thus a pretty naive implementation so far.
13
+ RDF::DataObjects stores triples in a simple subject, predicate, object, context
14
+ table. Don't try to back a big website with it yet. Nonetheless, it works,
15
+ and it passes all its tests on [Heroku][] as well.
16
+
17
+ Example:
18
+
19
+ repository = RDF::DataObjects::Repository.new uri: "sqlite3:test.db"
20
+ repository.insert(statement)
21
+ repository.count #=> 1
22
+ repository.delete(statement)
23
+
24
+ You can use any DataObjects compatible connection options to create a new
25
+ repository, but only SQLite3 and Postgres are implemented for now. The
26
+ different databases are *just* different enough with their handling of unique
27
+ constraints that some database-specific work is required for a new adapter, but
28
+ it's not much.
29
+
30
+ ## Minimal Support
31
+
32
+ Note that this library depends on the [data_objects](https://github.com/datamapper/do) gem, which has been archived. Without support from upstream gems, this project may also be deprecated.
33
+
34
+ ## Installation
35
+
36
+ The greatly preferred installation method is via RubyGems:
37
+
38
+ $ sudo gem install rdf-do
39
+
40
+ Requires Ruby >= 2.4
41
+
42
+ ## Connecting
43
+ require 'rdf'
44
+ require 'rdf/do'
45
+ require 'do_postgres' # gem install do_postgres
46
+ require 'do_sqlite3' # gem install do_sqlite3
47
+ repo = RDF::DataObjects::Repository.new uri: "postgres://localhost/database"
48
+ repo = RDF::DataObjects::Repository.new uri: "sqlite3:test.db"
49
+
50
+
51
+ ## Using
52
+
53
+ Your repository is a fully-functional [RDF.rb][] `RDF::Repository`.
54
+ As with any [RDF.rb][] repository, this includes the mixins `RDF::Enumerable`, `RDF::Mutable`,
55
+ `RDF::Durable`, and `RDF::Queryable`.
56
+ Please see <https://www.rubydoc.info/github/ruby-rdf/rdf/RDF/Repository> for more information.
57
+
58
+ Example:
59
+
60
+ require 'rdf'
61
+ require 'rdf/ntriples'
62
+ require 'data_objects'
63
+ require 'do_sqlite3'
64
+ require 'rdf/do'
65
+
66
+ repo = RDF::DataObjects::Repository.new uri: 'sqlite3:test.db'
67
+ # repo = RDF::DataObjects::Repository.new uri: 'postgres://postgres@server/database'
68
+ # heroku_repo = RDF::DataObjects::Repository.new uri: ENV['DATABASE_URL']
69
+ repo.load('http://datagraph.org/jhacker/foaf.nt')
70
+
71
+ # How many statements did we have?
72
+ repo.count
73
+ #=> 10
74
+
75
+ # Get the URI of the first subject
76
+ jhacker = repo.first.subject
77
+ #=> #<RDF::URI(http://datagraph.org/jhacker/foaf)>
78
+
79
+ # Delete everything to do with it
80
+ jhacker_statements = repo.query(subject: jhacker)
81
+ repo.delete *jhacker_statements
82
+ repo.count
83
+ #=> 7
84
+
85
+ # with Postgres, we could have done this, but SQLite gives us a locking error:
86
+ # repo.delete(*repo.query(subject: jhacker))
87
+
88
+ # Changed our mind--bring it back
89
+ repo.insert *jhacker_statements
90
+ repo.count
91
+ #=> 10
92
+
93
+ ## Contributing
94
+ This repository uses [Git Flow](https://github.com/nvie/gitflow) to mange development and release activity. All submissions _must_ be on a feature branch based on the _develop_ branch to ease staging and integration.
95
+
96
+ * Do your best to adhere to the existing coding conventions and idioms.
97
+ * Don't use hard tabs, and don't leave trailing whitespace on any line.
98
+ * Do document every method you add using [YARD][] annotations. Read the
99
+ [tutorial][YARD-GS] or just look at the existing code for examples.
100
+ * Don't touch the `.gemspec`, `VERSION` or `AUTHORS` files. If you need to
101
+ change them, do so on your private branch only.
102
+ * Do feel free to add yourself to the `CREDITS` file and the corresponding
103
+ list in the `README`. Alphabetical order applies.
104
+ * Do note that in order for us to merge any non-trivial changes (as a rule
105
+ of thumb, additions larger than about 15 lines of code), we need an
106
+ explicit [public domain dedication][PDD] on record from you.
107
+
108
+ ## Support
109
+
110
+ The preferred method to report issues is the issue queue at
111
+ <https://github.com/ruby-rdf/rdf-do/issues>. You'll get the most attention if
112
+ you submit a failing test for a bug, or a pending test for a feature.
113
+
114
+ We'd also like to hear from you on the mailing list:
115
+ <https://lists.w3.org/Archives/Public/public-rdf-ruby>
116
+
117
+ ## Miscellany
118
+
119
+ * Author: Ben Lavender | <blavender@gmail.com> | <https://bhuga.net>
120
+ * 'License': RDF::DataObjects is free and unencumbered software released into the public domain. For more information, see the included UNLICENSE file.
121
+
122
+ [RDF.rb]: https://rubygems.org/gems/rdf
123
+ [YARD]: https://yardoc.org/
124
+ [YARD-GS]: https://rubydoc.info/docs/yard/file/docs/GettingStarted.md
125
+ [PDD]: https://lists.w3.org/Archives/Public/public-rdf-ruby/2010May/0013.html
126
+ [Heroku]: https://www.heroku.com
data/UNLICENSE CHANGED
@@ -21,4 +21,4 @@ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21
21
  ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
22
  OTHER DEALINGS IN THE SOFTWARE.
23
23
 
24
- For more information, please refer to <http://unlicense.org/>
24
+ For more information, please refer to <https://unlicense.org/>
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.2.0
1
+ 3.1.0
metadata CHANGED
@@ -1,35 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdf-do
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Lavender
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-13 00:00:00.000000000 Z
11
+ date: 2020-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rdf
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '2.2'
20
- - - "<"
17
+ - - "~>"
21
18
  - !ruby/object:Gem::Version
22
- version: '4.0'
19
+ version: '3.1'
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- version: '2.2'
30
- - - "<"
24
+ - - "~>"
31
25
  - !ruby/object:Gem::Version
32
- version: '4.0'
26
+ version: '3.1'
33
27
  - !ruby/object:Gem::Dependency
34
28
  name: data_objects
35
29
  requirement: !ruby/object:Gem::Requirement
@@ -76,50 +70,44 @@ dependencies:
76
70
  name: rdf-spec
77
71
  requirement: !ruby/object:Gem::Requirement
78
72
  requirements:
79
- - - ">="
80
- - !ruby/object:Gem::Version
81
- version: '2.2'
82
- - - "<"
73
+ - - "~>"
83
74
  - !ruby/object:Gem::Version
84
- version: '4.0'
75
+ version: '3.1'
85
76
  type: :development
86
77
  prerelease: false
87
78
  version_requirements: !ruby/object:Gem::Requirement
88
79
  requirements:
89
- - - ">="
90
- - !ruby/object:Gem::Version
91
- version: '2.2'
92
- - - "<"
80
+ - - "~>"
93
81
  - !ruby/object:Gem::Version
94
- version: '4.0'
82
+ version: '3.1'
95
83
  - !ruby/object:Gem::Dependency
96
84
  name: rspec
97
85
  requirement: !ruby/object:Gem::Requirement
98
86
  requirements:
99
87
  - - "~>"
100
88
  - !ruby/object:Gem::Version
101
- version: '3.7'
89
+ version: '3.9'
102
90
  type: :development
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
93
  requirements:
106
94
  - - "~>"
107
95
  - !ruby/object:Gem::Version
108
- version: '3.7'
96
+ version: '3.9'
109
97
  - !ruby/object:Gem::Dependency
110
98
  name: rspec-its
111
99
  requirement: !ruby/object:Gem::Requirement
112
100
  requirements:
113
101
  - - "~>"
114
102
  - !ruby/object:Gem::Version
115
- version: '1.2'
103
+ version: '1.3'
116
104
  type: :development
117
105
  prerelease: false
118
106
  version_requirements: !ruby/object:Gem::Requirement
119
107
  requirements:
120
108
  - - "~>"
121
109
  - !ruby/object:Gem::Version
122
- version: '1.2'
110
+ version: '1.3'
123
111
  - !ruby/object:Gem::Dependency
124
112
  name: yard
125
113
  requirement: !ruby/object:Gem::Requirement
@@ -141,7 +129,9 @@ extensions: []
141
129
  extra_rdoc_files: []
142
130
  files:
143
131
  - AUTHORS
144
- - README
132
+ - CHANGELOG
133
+ - CONTRIBUTING.md
134
+ - README.md
145
135
  - UNLICENSE
146
136
  - VERSION
147
137
  - lib/rdf/do.rb
@@ -149,7 +139,7 @@ files:
149
139
  - lib/rdf/do/adapters/postgres.rb
150
140
  - lib/rdf/do/adapters/sqlite3.rb
151
141
  - lib/rdf/do/version.rb
152
- homepage: http://ruby-rdf.github.com/rdf-do
142
+ homepage: https://ruby-rdf.github.com/rdf-do
153
143
  licenses:
154
144
  - Public Domain
155
145
  metadata: {}
@@ -161,15 +151,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
161
151
  requirements:
162
152
  - - ">="
163
153
  - !ruby/object:Gem::Version
164
- version: 2.2.2
154
+ version: '2.4'
165
155
  required_rubygems_version: !ruby/object:Gem::Requirement
166
156
  requirements:
167
157
  - - ">="
168
158
  - !ruby/object:Gem::Version
169
159
  version: '0'
170
160
  requirements: []
171
- rubyforge_project:
172
- rubygems_version: 2.6.14
161
+ rubygems_version: 3.1.2
173
162
  signing_key:
174
163
  specification_version: 4
175
164
  summary: RDF.rb extension providing a DataObjects storage adapter.
data/README DELETED
@@ -1 +0,0 @@
1
- ./README.md