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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 792a61423210db4d06e2690193e47bc5949ffc6b
4
- data.tar.gz: e0649c47b1ba552d2045cbbde8f37c26ab6365c1
3
+ metadata.gz: dcf7d5e9a611e5d9ab45f89a252e7c793eaf633d
4
+ data.tar.gz: d6b47c40599cbf743d916b38d14b265145125039
5
5
  SHA512:
6
- metadata.gz: c790934d4d403ec1e1a06af7d22c81eb7dea09dcaacc98b2c085ff2025f5ca0aa462c5ae8c2e35b00277e1527b26ee272e45fe5ca1b7e06c93733c03db73c831
7
- data.tar.gz: c208d4dab4609203665386c20995500830a88bbae85ff8fe7dbee2aa91d3f457cbc9088ae81b00d1754040b47e66095c1b77142f48e482062850cc5b04544dea
6
+ metadata.gz: 8a51be7d0e23ffd05e8847a838bfc6db2101861a72e3579fa9b46df19c456469ae0859cf3e35046ca77324c6b6fa5904d5372d696b8a011b2aaa8bf0667e4e09
7
+ data.tar.gz: ad2cad72fae7f98d0cea05e6266a2fc7917b7abfb1e64b9b4e31a398d02eb9f393a17fbebeb7be1e07ea6d2871fae1646eeefaaa835c3d23eb8b0c98b6c4a300
@@ -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
- net_response = Net::HTTP.get_response(URI(endpoint_uri))
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
 
@@ -1,3 +1,3 @@
1
1
  module Parliament
2
- VERSION = '0.6.0'.freeze
2
+ VERSION = '0.6.1'.freeze
3
3
  end
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.0
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-22 00:00:00.000000000 Z
11
+ date: 2017-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: grom