tilia-http 4.1.0.3 → 4.1.0.5

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: fcf677f29a8c07b860b1883d7afb8d7ff05dca62
4
- data.tar.gz: 6d3726fcf7f3331d79fd657f9d5e5bc24ed2058e
3
+ metadata.gz: c431ff418e1a762240f228f4377aa5e5bcd72cde
4
+ data.tar.gz: 70a61b39407f8c123855c72d70b9f4db5c21844e
5
5
  SHA512:
6
- metadata.gz: 792cfb805cf6e08b2c07696cd983bfd0e3881d8b849f5a8b57c8ad67c741f3eb4855f33fb59f6494a34bf3e40bb9e86dae9cd6615d14533705c1e312ec57719d
7
- data.tar.gz: 0ff8f61036049719ab012a637eef6356db813c6a42d8293340d20c826b8e861cf6cf8671fccf6ef591d3be92355ef74fb08c4ba80ce30ee79e23f39ae2e8f315
6
+ metadata.gz: 4014e54c6b40c0849ba916eac8dde2f7a59553dd72d8932eaffd6d2373bf57bb94ce22a04bfca9ed6042f647f5d8e6b8dd6b26b8281fd910325e27dcbb44357d
7
+ data.tar.gz: 820e94c7bec2806b39d015ef8a396455e13a1431d2dd2ee0675ee6365b1f0af527662fa19b0ecef2175012548df5d9297f12dcac13784b1ab502716220aa84c7
@@ -14,7 +14,7 @@ request = Tilia::Http::Request.new('GET', 'http://www.jakobsack.de/')
14
14
 
15
15
  client = Tilia::Http::Client.new
16
16
  # client.add_curl_setting(proxy: 'localhost:8888')
17
- response = client.send(request)
17
+ response = client.send_request(request)
18
18
 
19
19
  puts 'Response:'
20
20
  puts response.to_s
@@ -30,7 +30,7 @@ app = proc do |env|
30
30
  client = Tilia::Http::Client.new
31
31
 
32
32
  # Sends the HTTP request to the server
33
- response = client.send(sub_request)
33
+ response = client.send_request(sub_request)
34
34
 
35
35
  # Sends the response back to the client that connected to the proxy.
36
36
  sapi.send_response(response)
@@ -59,7 +59,7 @@ module Tilia
59
59
  @hydra = nil
60
60
  @throw_exceptions = false
61
61
  @max_redirects = 5
62
- @hydra_settings = {
62
+ @curl_settings = {
63
63
  header: false, # RUBY otherwise header will be part of response.body
64
64
  nobody: false
65
65
  }
@@ -70,7 +70,7 @@ module Tilia
70
70
  #
71
71
  # @param RequestInterface request
72
72
  # @return [ResponseInterface]
73
- def send(request)
73
+ def send_request(request)
74
74
  emit('beforeRequest', [request])
75
75
 
76
76
  retry_count = 0
@@ -261,7 +261,7 @@ module Tilia
261
261
  # @param mixed value
262
262
  # @return [void]
263
263
  def add_curl_setting(name, value)
264
- @hydra_settings[name] = value
264
+ @curl_settings[name] = value
265
265
  end
266
266
 
267
267
  protected
@@ -403,7 +403,7 @@ module Tilia
403
403
  # TODO: document
404
404
  def create_client(request)
405
405
  settings = {}
406
- @hydra_settings.each do |key, value|
406
+ @curl_settings.each do |key, value|
407
407
  settings[key] = value
408
408
  end
409
409
 
@@ -3,7 +3,7 @@ module Tilia
3
3
  # This class contains the version number for the HTTP package
4
4
  class Version
5
5
  # Full version number
6
- VERSION = '4.1.0.3'
6
+ VERSION = '4.1.0.5'
7
7
  end
8
8
  end
9
9
  end
@@ -116,7 +116,7 @@ module Tilia
116
116
  end
117
117
  )
118
118
 
119
- response = client.send(request)
119
+ response = client.send_request(request)
120
120
 
121
121
  assert_equal(200, response.status)
122
122
  end
@@ -140,7 +140,7 @@ module Tilia
140
140
  end
141
141
  )
142
142
 
143
- assert_raises(ClientException) { client.send(request) }
143
+ assert_raises(ClientException) { client.send_request(request) }
144
144
 
145
145
  assert(called)
146
146
  end
@@ -170,7 +170,7 @@ module Tilia
170
170
  end
171
171
  )
172
172
 
173
- client.send(request)
173
+ client.send_request(request)
174
174
  assert_equal(2, called)
175
175
  end
176
176
 
@@ -200,7 +200,7 @@ module Tilia
200
200
  end
201
201
  )
202
202
 
203
- response = client.send(request)
203
+ response = client.send_request(request)
204
204
  assert_equal(3, called)
205
205
  assert_equal(2, error_called)
206
206
  assert_equal(200, response.status)
@@ -218,7 +218,7 @@ module Tilia
218
218
  end
219
219
  )
220
220
 
221
- error = assert_raises(Exception) { client.send(request) }
221
+ error = assert_raises(Exception) { client.send_request(request) }
222
222
  assert_kind_of(ClientHttpException, error)
223
223
  assert_equal(404, error.http_status)
224
224
  assert_kind_of(Response, error.response)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tilia-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.0.3
4
+ version: 4.1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jakob Sack
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-07 00:00:00.000000000 Z
11
+ date: 2016-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport