parliament-ruby 0.6.0 → 0.6.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/request.rb +16 -1
- data/lib/parliament/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dcf7d5e9a611e5d9ab45f89a252e7c793eaf633d
|
4
|
+
data.tar.gz: d6b47c40599cbf743d916b38d14b265145125039
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a51be7d0e23ffd05e8847a838bfc6db2101861a72e3579fa9b46df19c456469ae0859cf3e35046ca77324c6b6fa5904d5372d696b8a011b2aaa8bf0667e4e09
|
7
|
+
data.tar.gz: ad2cad72fae7f98d0cea05e6266a2fc7917b7abfb1e64b9b4e31a398d02eb9f393a17fbebeb7be1e07ea6d2871fae1646eeefaaa835c3d23eb8b0c98b6c4a300
|
data/lib/parliament/request.rb
CHANGED
@@ -108,7 +108,22 @@ module Parliament
|
|
108
108
|
endpoint_uri = URI.parse(api_endpoint)
|
109
109
|
endpoint_uri.query = URI.encode_www_form(params.to_a) unless params.nil?
|
110
110
|
|
111
|
-
|
111
|
+
http = Net::HTTP.new(endpoint_uri.host, endpoint_uri.port)
|
112
|
+
http.use_ssl = true if endpoint_uri.scheme == 'https'
|
113
|
+
|
114
|
+
net_response = http.start do |h|
|
115
|
+
api_request = Net::HTTP::Get.new(endpoint_uri.request_uri)
|
116
|
+
api_request.add_field('Accept', 'application/n-triples')
|
117
|
+
|
118
|
+
h.request api_request
|
119
|
+
end
|
120
|
+
|
121
|
+
# net_response = Net::HTTP.start(endpoint_uri.host, endpoint_uri.port, use_ssl: true).start do |http|
|
122
|
+
# request = Net::HTTP::Get.new(endpoint_uri)
|
123
|
+
# request.add_field('Accept', 'application/n-triples')
|
124
|
+
#
|
125
|
+
# http.request(request)
|
126
|
+
# end
|
112
127
|
|
113
128
|
handle_errors(net_response)
|
114
129
|
|
data/lib/parliament/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parliament-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Rayner
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: grom
|