parliament-ruby 0.10.0 → 0.10.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2f419f54660e3b063f13a428e6acffdabf7d6d82
4
- data.tar.gz: '091aafe3c454b3285b5baeee9bea302560fbe7ef'
3
+ metadata.gz: 46b3e83963fc700db5e21218949bf9d69b78682e
4
+ data.tar.gz: 23ac86cccfc07c66569f1acf5d5d086911e542e2
5
5
  SHA512:
6
- metadata.gz: 57934dfbca235a92f3c137b26e830aff49c4554dfc55174c93b54691af9b623b32f9d3b547d71c688fd8595065465f74d9ec13da829c74243a2beaa69b816a5d
7
- data.tar.gz: 89a98cb8baf500233969c283e6fbdf43596f6628385584a68990ce805f8febe65f15e47d9bc4f11d4439e941ef3a6a18b51d6e07f373f2f13405269b515e7334
6
+ metadata.gz: ecd1985df2132b317c9829be1eaf631d7307d286967ce49161bc0963b53f2e2657e35dc7d124f67d2a76aaa65469cbc461782075013e5aa903eec81847bbcea2
7
+ data.tar.gz: 238fc6cddcc8c138ba82fb76bd5f54edc5f7a7f3e7c010a74a844dcbf8e6e9cd30b615113c11c43c871fe98cae17f18cae8ff9dca0b527489bd998daab95ee3e
@@ -128,9 +128,10 @@ module Parliament
128
128
  #
129
129
  # @param [Hash] params (optional) additional URI encoded form values to be added to the URI.
130
130
  # @param [String] body (optional) body of the post request.
131
+ # @param [Integer] timeout (optional) a Net::HTTP.read_timeout value passed suring the post.
131
132
  #
132
133
  # @return [Parliament::Response::BaseResponse] a Parliament::Response::BaseResponse object containing all of the data returned from the URL.
133
- def post(params: nil, body: nil)
134
+ def post(params: nil, body: nil, timeout: 60)
134
135
  @query_params = @query_params.merge(params) unless params.nil?
135
136
 
136
137
  endpoint_uri = URI.parse(query_url)
@@ -138,10 +139,11 @@ module Parliament
138
139
 
139
140
  http = Net::HTTP.new(endpoint_uri.host, endpoint_uri.port)
140
141
  http.use_ssl = true if endpoint_uri.scheme == 'https'
142
+ http.read_timeout = timeout
141
143
 
142
144
  request = Net::HTTP::Post.new(
143
- endpoint_uri.request_uri,
144
- 'Content-Type' => 'application/json'
145
+ endpoint_uri.request_uri,
146
+ 'Content-Type' => 'application/json'
145
147
  )
146
148
 
147
149
  add_headers(request)
@@ -1,3 +1,3 @@
1
1
  module Parliament
2
- VERSION = '0.10.0'.freeze
2
+ VERSION = '0.10.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.10.0
4
+ version: 0.10.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-11-07 00:00:00.000000000 Z
11
+ date: 2017-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler