parliament-ntriple 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/parliament/ntriple.rb +55 -8
- data/lib/parliament/ntriple/version.rb +1 -1
- data/parliament-ntriple.gemspec +2 -2
- metadata +19 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e3dd09c5be5ce20cb330d49d4965a3a35b48731c
|
4
|
+
data.tar.gz: 611b84fb8051553bd8b0a6e536ff030e6f9759a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 132bfbaec83772496778823c557aa4577764acf3d16a9e3e868107cb4cae4cc72fdfc028c7143647fa1c82d0a2853d9c36dcf32f57030ce64abed1452e8b85d3
|
7
|
+
data.tar.gz: 241fb9a82e78f62cb3d53614ae3f40890f8671c09d27fa62db0f067b1d744a67d0460a498e3ce503fceb71a2f8412a03883e346f31e752889fd854bbdc0cb101
|
data/lib/parliament/ntriple.rb
CHANGED
@@ -1,16 +1,63 @@
|
|
1
|
-
require 'parliament'
|
2
|
-
require 'grom'
|
3
|
-
|
4
|
-
require 'parliament/ntriple/version'
|
5
|
-
require 'parliament/ntriple/utils'
|
6
|
-
require 'parliament/response/ntriple_response'
|
7
|
-
require 'parliament/builder/ntriple_response_builder'
|
8
|
-
|
9
1
|
# Namespace for classes and modules that handle connections to, and processing of data from the parliamentary API.
|
10
2
|
# @since 0.1.0
|
11
3
|
module Parliament
|
12
4
|
# NTriple namespace
|
13
5
|
# @since 0.1.0
|
14
6
|
module NTriple
|
7
|
+
class << self
|
8
|
+
def load!
|
9
|
+
if parliament_response?
|
10
|
+
register_parliament_response
|
11
|
+
register_ntriple_response
|
12
|
+
else
|
13
|
+
raise(LoadError, "Missing requirement 'Parliament::Response'. Have you added `gem 'parliament-ruby'` to your Gemfile?")
|
14
|
+
end
|
15
|
+
|
16
|
+
if parliament_builder?
|
17
|
+
register_parliament_builder
|
18
|
+
register_ntriple_builder
|
19
|
+
else
|
20
|
+
raise(LoadError, "Missing requirement 'Parliament::Builder'. Have you added `gem 'parliament-ruby'` to your Gemfile?")
|
21
|
+
end
|
22
|
+
|
23
|
+
register_grom
|
24
|
+
register_ntriple
|
25
|
+
end
|
26
|
+
|
27
|
+
def parliament_response?
|
28
|
+
defined?(::Parliament::Response)
|
29
|
+
end
|
30
|
+
|
31
|
+
def parliament_builder?
|
32
|
+
defined?(::Parliament::Builder)
|
33
|
+
end
|
34
|
+
|
35
|
+
def register_parliament_response
|
36
|
+
require 'parliament/response'
|
37
|
+
end
|
38
|
+
|
39
|
+
def register_parliament_builder
|
40
|
+
require 'parliament/builder'
|
41
|
+
end
|
42
|
+
|
43
|
+
def register_ntriple_response
|
44
|
+
require 'parliament/response/ntriple_response'
|
45
|
+
end
|
46
|
+
|
47
|
+
def register_ntriple_builder
|
48
|
+
require 'parliament/builder/ntriple_response_builder'
|
49
|
+
end
|
50
|
+
|
51
|
+
def register_ntriple
|
52
|
+
require 'parliament/ntriple/version'
|
53
|
+
require 'parliament/ntriple/utils'
|
54
|
+
end
|
55
|
+
|
56
|
+
def register_grom
|
57
|
+
require 'grom'
|
58
|
+
end
|
59
|
+
end
|
15
60
|
end
|
16
61
|
end
|
62
|
+
|
63
|
+
Parliament::NTriple.load!
|
data/parliament-ntriple.gemspec
CHANGED
@@ -21,7 +21,6 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.require_paths = ['lib']
|
22
22
|
|
23
23
|
spec.add_dependency 'grom', '~> 0.3.6'
|
24
|
-
spec.add_dependency 'parliament-ruby', '~> 0.7.5.pre'
|
25
24
|
|
26
25
|
spec.add_development_dependency 'bundler', '~> 1.14'
|
27
26
|
spec.add_development_dependency 'rake', '~> 10.0'
|
@@ -30,5 +29,6 @@ Gem::Specification.new do |spec|
|
|
30
29
|
spec.add_development_dependency 'simplecov', '~> 0.12'
|
31
30
|
spec.add_development_dependency 'vcr', '~> 3.0'
|
32
31
|
spec.add_development_dependency 'webmock', '~> 2.3'
|
33
|
-
spec.add_development_dependency 'parliament-grom-decorators', '~> 0.
|
32
|
+
spec.add_development_dependency 'parliament-grom-decorators', '~> 0.1.0'
|
33
|
+
spec.add_development_dependency 'parliament-ruby', '~> 0.7.6'
|
34
34
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parliament-ntriple
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rebecca Appleyard
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: grom
|
@@ -24,20 +24,6 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 0.3.6
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: parliament-ruby
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 0.7.5.pre
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: 0.7.5.pre
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: bundler
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -142,14 +128,28 @@ dependencies:
|
|
142
128
|
requirements:
|
143
129
|
- - "~>"
|
144
130
|
- !ruby/object:Gem::Version
|
145
|
-
version: 0.
|
131
|
+
version: 0.1.0
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: 0.1.0
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: parliament-ruby
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: 0.7.6
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: 0.
|
152
|
+
version: 0.7.6
|
153
153
|
description: Parliamentary NTriple response builder
|
154
154
|
email:
|
155
155
|
- rklappleyard@gmail.com
|
@@ -195,7 +195,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
195
195
|
version: '0'
|
196
196
|
requirements: []
|
197
197
|
rubyforge_project:
|
198
|
-
rubygems_version: 2.6.
|
198
|
+
rubygems_version: 2.6.8
|
199
199
|
signing_key:
|
200
200
|
specification_version: 4
|
201
201
|
summary: Parliamentary NTriple response builder
|