parliament-utils 0.8.1 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c6b4ce12878d5fe1c90e193a370f0a917729fec0
|
4
|
+
data.tar.gz: d0f85799c92f964fbc43a5fe447f4904af47bbac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d9525cff15f63470678d51a9b3c5329af8526b9554105ec9bc1d2385fc01ba7341c895ee603f45934500fe38ce4463f1ade1ba920e917d18c79df01854cc0eb
|
7
|
+
data.tar.gz: 6ee4c3d99fd68d9f9165b810365b78e8b9f6c8155d70a0abeab7bfab8f9384e290c4af47ae054eb159b97ac9a9c4ed52e18091b6fef983b1a3b2685cbe914566
|
@@ -5,16 +5,19 @@ module Parliament
|
|
5
5
|
module Utils
|
6
6
|
module Helpers
|
7
7
|
module ParliamentHelper
|
8
|
-
def self.parliament_request
|
8
|
+
def self.parliament_request(request_number: 1)
|
9
|
+
headers = {'Ocp-Apim-Subscription-Key' => ENV['PARLIAMENT_AUTH_TOKEN'] }
|
10
|
+
headers['Request-Id'] = "#{ENV['ApplicationInsights.request.id']}#{request_number}" if ENV['ApplicationInsights.request.id']
|
11
|
+
|
9
12
|
Parliament::Request::UrlRequest.new(
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
+
builder: Parliament::Builder::NTripleResponseBuilder,
|
14
|
+
headers: headers,
|
15
|
+
decorators: Parliament::Grom::Decorator
|
13
16
|
)
|
14
17
|
end
|
15
18
|
|
16
|
-
def parliament_request
|
17
|
-
Parliament::Utils::Helpers::ParliamentHelper.parliament_request
|
19
|
+
def parliament_request(request_number: 1)
|
20
|
+
Parliament::Utils::Helpers::ParliamentHelper.parliament_request(request_number)
|
18
21
|
end
|
19
22
|
end
|
20
23
|
end
|
@@ -24,8 +24,7 @@ module Parliament
|
|
24
24
|
#
|
25
25
|
# @return [Parliament::Response]
|
26
26
|
def self.filter_response_data(request, *filters)
|
27
|
-
|
28
|
-
response.filter(*filters)
|
27
|
+
request.get.filter(*filters)
|
29
28
|
end
|
30
29
|
|
31
30
|
# Returns the base namespace used for filtering parliamentary data within sparql queries
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parliament-utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rebecca Appleyard
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parliament-ruby
|