sinatra-linkeddata 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/AUTHORS +1 -0
- data/README.md +61 -55
- data/VERSION +1 -1
- metadata +19 -31
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: c9c26195847c26623e754122c4d1473b3c0210d937fb3b3b4a2ad9e1e11e78f7
|
|
4
|
+
data.tar.gz: 1ef777b892bc30bda47b2bac98d1869beaea1fef8e1890a13d612fc8413210ef
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3a7bc103188c97e585c5a6dd103507347458d3ea14e29dece1eb2066fad443c6fa29e4395675a7143aa923012c8c105e9cedc0a4a989dbc2f1bd102284a7c80c
|
|
7
|
+
data.tar.gz: 5833585dfcad83945fd70236801fcbfd78193f47b53171a276230c225d42a6a249f088bf9186edebb13132a64c10c3bceaf3558f1b2ad10d46b236b7932c8aa7
|
data/AUTHORS
CHANGED
data/README.md
CHANGED
|
@@ -5,8 +5,8 @@ negotiation for Sinatra applications.
|
|
|
5
5
|
|
|
6
6
|
* <http://github.com/datagraph/sinatra-linkeddata>
|
|
7
7
|
|
|
8
|
-
[](http://badge.fury.io/rb/sinatra-linkeddata)
|
|
9
|
+
[](http://travis-ci.org/ruby-rdf/sinatra-linkeddata)
|
|
10
10
|
|
|
11
11
|
## Features
|
|
12
12
|
|
|
@@ -19,55 +19,61 @@ negotiation for Sinatra applications.
|
|
|
19
19
|
|
|
20
20
|
### Adding Linked Data content negotiation to a classic Sinatra application
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
```ruby
|
|
23
|
+
#!/usr/bin/env ruby -rubygems
|
|
24
|
+
require 'sinatra'
|
|
25
|
+
require 'sinatra/linkeddata'
|
|
26
|
+
|
|
27
|
+
get '/hello' do
|
|
28
|
+
RDF::Graph.new do |graph|
|
|
29
|
+
graph << [RDF::Node.new, RDF::DC.title, "Hello, world!"]
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Adding Linked Data content negotiation to a modular Sinatra application
|
|
35
|
+
|
|
36
|
+
```ruby
|
|
37
|
+
#!/usr/bin/env ruby -rubygems
|
|
38
|
+
require 'sinatra/base'
|
|
39
|
+
require 'sinatra/linkeddata'
|
|
40
|
+
|
|
41
|
+
module My
|
|
42
|
+
class Application < Sinatra::Base
|
|
43
|
+
register Sinatra::LinkedData
|
|
44
|
+
|
|
26
45
|
get '/hello' do
|
|
27
46
|
RDF::Graph.new do |graph|
|
|
28
47
|
graph << [RDF::Node.new, RDF::DC.title, "Hello, world!"]
|
|
29
48
|
end
|
|
30
49
|
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
31
52
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
#!/usr/bin/env ruby -rubygems
|
|
35
|
-
require 'sinatra/base'
|
|
36
|
-
require 'sinatra/linkeddata'
|
|
37
|
-
|
|
38
|
-
module My
|
|
39
|
-
class Application < Sinatra::Base
|
|
40
|
-
register Sinatra::LinkedData
|
|
41
|
-
|
|
42
|
-
get '/hello' do
|
|
43
|
-
RDF::Graph.new do |graph|
|
|
44
|
-
graph << [RDF::Node.new, RDF::DC.title, "Hello, world!"]
|
|
45
|
-
end
|
|
46
|
-
end
|
|
47
|
-
end
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
My::Application.run! :host => '127.0.0.1', :port => 4567
|
|
53
|
+
My::Application.run! :host => '127.0.0.1', :port => 4567
|
|
54
|
+
```
|
|
51
55
|
|
|
52
56
|
### Adding Linked Data content negotiation to a Rackup application
|
|
53
57
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
end
|
|
58
|
+
```ruby
|
|
59
|
+
#!/usr/bin/env rackup
|
|
60
|
+
require 'sinatra/base'
|
|
61
|
+
require 'sinatra/linkeddata'
|
|
62
|
+
|
|
63
|
+
module My
|
|
64
|
+
class Application < Sinatra::Base
|
|
65
|
+
register Sinatra::LinkedData
|
|
66
|
+
|
|
67
|
+
get '/hello' do
|
|
68
|
+
RDF::Graph.new do |graph|
|
|
69
|
+
graph << [RDF::Node.new, RDF::DC.title, "Hello, world!"]
|
|
67
70
|
end
|
|
68
71
|
end
|
|
69
|
-
|
|
70
|
-
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
run My::Application
|
|
76
|
+
```
|
|
71
77
|
|
|
72
78
|
### Testing Linked Data content negotiation using `rackup` and `curl`
|
|
73
79
|
|
|
@@ -89,30 +95,30 @@ Data content negotiation for Rack applications.
|
|
|
89
95
|
At the moment the Sinatra extension simply corresponds
|
|
90
96
|
to doing the following manually in a Sinatra application:
|
|
91
97
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
98
|
+
```ruby
|
|
99
|
+
require 'rack/linkeddata'
|
|
100
|
+
|
|
101
|
+
module My
|
|
102
|
+
class Application < Sinatra::Base
|
|
103
|
+
use Rack::LinkedData::ContentNegotiation
|
|
104
|
+
helpers Sinatra::LinkedData::Helpers
|
|
105
|
+
include RDF
|
|
106
|
+
include LinkedData
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
```
|
|
102
110
|
|
|
103
111
|
See the `Rack::LinkedData` documentation for more information on the
|
|
104
112
|
operation and details of the content negotiation.
|
|
105
113
|
|
|
106
114
|
## Documentation
|
|
107
115
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
* {Sinatra::LinkedData}
|
|
116
|
+
* [Sinatra::LinkedData](https://www.rubydoc.info/github/ruby-rdf/sinatra-linkeddata/master)
|
|
111
117
|
|
|
112
118
|
## Dependencies
|
|
113
119
|
|
|
114
|
-
* [Sinatra](http://rubygems.org/gems/sinatra) (
|
|
115
|
-
* [Rack::LinkedData](http://rubygems.org/gems/rack-linkeddata) (~>
|
|
120
|
+
* [Sinatra](http://rubygems.org/gems/sinatra) (~> 2.0)
|
|
121
|
+
* [Rack::LinkedData](http://rubygems.org/gems/rack-linkeddata) (~> 3.1)
|
|
116
122
|
|
|
117
123
|
## Installation
|
|
118
124
|
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
3.1.0
|
metadata
CHANGED
|
@@ -1,97 +1,86 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sinatra-linkeddata
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 3.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Arto Bendiken
|
|
8
|
+
- Gregg Kellogg
|
|
8
9
|
autorequire:
|
|
9
10
|
bindir: bin
|
|
10
11
|
cert_chain: []
|
|
11
|
-
date:
|
|
12
|
+
date: 2019-12-16 00:00:00.000000000 Z
|
|
12
13
|
dependencies:
|
|
13
14
|
- !ruby/object:Gem::Dependency
|
|
14
15
|
name: rack-linkeddata
|
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
|
16
17
|
requirements:
|
|
17
|
-
- - "
|
|
18
|
-
- !ruby/object:Gem::Version
|
|
19
|
-
version: '2.2'
|
|
20
|
-
- - "<"
|
|
18
|
+
- - "~>"
|
|
21
19
|
- !ruby/object:Gem::Version
|
|
22
|
-
version: '
|
|
20
|
+
version: '3.1'
|
|
23
21
|
type: :runtime
|
|
24
22
|
prerelease: false
|
|
25
23
|
version_requirements: !ruby/object:Gem::Requirement
|
|
26
24
|
requirements:
|
|
27
|
-
- - "
|
|
28
|
-
- !ruby/object:Gem::Version
|
|
29
|
-
version: '2.2'
|
|
30
|
-
- - "<"
|
|
25
|
+
- - "~>"
|
|
31
26
|
- !ruby/object:Gem::Version
|
|
32
|
-
version: '
|
|
27
|
+
version: '3.1'
|
|
33
28
|
- !ruby/object:Gem::Dependency
|
|
34
29
|
name: sinatra
|
|
35
30
|
requirement: !ruby/object:Gem::Requirement
|
|
36
31
|
requirements:
|
|
37
|
-
- - "
|
|
38
|
-
- !ruby/object:Gem::Version
|
|
39
|
-
version: '1.4'
|
|
40
|
-
- - "<"
|
|
32
|
+
- - "~>"
|
|
41
33
|
- !ruby/object:Gem::Version
|
|
42
|
-
version: '
|
|
34
|
+
version: '2.0'
|
|
43
35
|
type: :runtime
|
|
44
36
|
prerelease: false
|
|
45
37
|
version_requirements: !ruby/object:Gem::Requirement
|
|
46
38
|
requirements:
|
|
47
|
-
- - "
|
|
48
|
-
- !ruby/object:Gem::Version
|
|
49
|
-
version: '1.4'
|
|
50
|
-
- - "<"
|
|
39
|
+
- - "~>"
|
|
51
40
|
- !ruby/object:Gem::Version
|
|
52
|
-
version: '
|
|
41
|
+
version: '2.0'
|
|
53
42
|
- !ruby/object:Gem::Dependency
|
|
54
43
|
name: yard
|
|
55
44
|
requirement: !ruby/object:Gem::Requirement
|
|
56
45
|
requirements:
|
|
57
46
|
- - "~>"
|
|
58
47
|
- !ruby/object:Gem::Version
|
|
59
|
-
version:
|
|
48
|
+
version: 0.9.20
|
|
60
49
|
type: :development
|
|
61
50
|
prerelease: false
|
|
62
51
|
version_requirements: !ruby/object:Gem::Requirement
|
|
63
52
|
requirements:
|
|
64
53
|
- - "~>"
|
|
65
54
|
- !ruby/object:Gem::Version
|
|
66
|
-
version:
|
|
55
|
+
version: 0.9.20
|
|
67
56
|
- !ruby/object:Gem::Dependency
|
|
68
57
|
name: rspec
|
|
69
58
|
requirement: !ruby/object:Gem::Requirement
|
|
70
59
|
requirements:
|
|
71
60
|
- - "~>"
|
|
72
61
|
- !ruby/object:Gem::Version
|
|
73
|
-
version: '3.
|
|
62
|
+
version: '3.9'
|
|
74
63
|
type: :development
|
|
75
64
|
prerelease: false
|
|
76
65
|
version_requirements: !ruby/object:Gem::Requirement
|
|
77
66
|
requirements:
|
|
78
67
|
- - "~>"
|
|
79
68
|
- !ruby/object:Gem::Version
|
|
80
|
-
version: '3.
|
|
69
|
+
version: '3.9'
|
|
81
70
|
- !ruby/object:Gem::Dependency
|
|
82
71
|
name: rack-test
|
|
83
72
|
requirement: !ruby/object:Gem::Requirement
|
|
84
73
|
requirements:
|
|
85
74
|
- - "~>"
|
|
86
75
|
- !ruby/object:Gem::Version
|
|
87
|
-
version: '
|
|
76
|
+
version: '1.1'
|
|
88
77
|
type: :development
|
|
89
78
|
prerelease: false
|
|
90
79
|
version_requirements: !ruby/object:Gem::Requirement
|
|
91
80
|
requirements:
|
|
92
81
|
- - "~>"
|
|
93
82
|
- !ruby/object:Gem::Version
|
|
94
|
-
version: '
|
|
83
|
+
version: '1.1'
|
|
95
84
|
description: Sinatra extension for Linked Data content negotiation.
|
|
96
85
|
email: public-rdf-ruby@w3.org
|
|
97
86
|
executables: []
|
|
@@ -117,15 +106,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
117
106
|
requirements:
|
|
118
107
|
- - ">="
|
|
119
108
|
- !ruby/object:Gem::Version
|
|
120
|
-
version: '2.
|
|
109
|
+
version: '2.4'
|
|
121
110
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
122
111
|
requirements:
|
|
123
112
|
- - ">="
|
|
124
113
|
- !ruby/object:Gem::Version
|
|
125
114
|
version: '0'
|
|
126
115
|
requirements: []
|
|
127
|
-
|
|
128
|
-
rubygems_version: 2.6.14
|
|
116
|
+
rubygems_version: 3.0.6
|
|
129
117
|
signing_key:
|
|
130
118
|
specification_version: 4
|
|
131
119
|
summary: Linked Data content negotiation for Sinatra applications.
|