logglier 0.2.9 → 0.2.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- Yzc0NmNmOWNjZTQwMjA0YzQ2ZmFmMjAwMWJlNThhN2RmOWE2NjA0NQ==
4
+ MWRiZTU4NmIzNWVmZDVkZmUyMzFkODY1ZmZmOTMxMDAwNzY5YjdiZQ==
5
5
  data.tar.gz: !binary |-
6
- YTVkMDI0ZTRiYjc1YTYzMjYwY2ZhMzUyZTZmZDBlNDU0ODc3MTc4OQ==
6
+ YjY4MGFjYjk2MmVlMzJjNmJlZmFjYTlkZmQ3ZDNjZmJhNjY3YTczYw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NjAzMTNhMTQ0Y2YwNjZlZjU0NzNjYjk0MjM1ODBhZjMwZjE5ZjdmYTRjYmM0
10
- YjFmZmNmZjE5MDRiNTNlZWZiNGU3MGJlZDYyNjA0NTgxMTZiNGUwMTg3YTA4
11
- NWQzYjY4YzNkYTQ5YzY2ODE1ODhhYmZjY2IxMzM0YjY5ODVhNWI=
9
+ ZjM2ZWIzNzFlZWJiNDY3MmFiYThiY2VmZWZjNWVjNGM2ODkyODM5OGViYzhh
10
+ YWE3OGVhMGVlNGUxZTIxYTM3NzhhMTY4YWQzYmIyYmYxNTk5YWZhNmI0Y2M2
11
+ ZWI0NDNmMTE5NzJmMTgyNmQwY2RjNjYzNGJmZGFjMzUwNWU2MjU=
12
12
  data.tar.gz: !binary |-
13
- NWNhOWM3MjU1ZjE0MjNiNWIxOTEwYThiODQ5ZDNlODgyZTNkMjNjZjM4NDY4
14
- ZWUwMGIyYTU3OWY3ZWU2MTE2NzRlMTNjNWRiOTUwY2E1YjgwYjQ4ZDUwM2Zk
15
- MGFkOWY4MzZhZWUxMmVlNzY2M2Y4Y2ViOTg1Y2M3NmUzMTlhNTE=
13
+ ZDdiODNmMjJiNTQ3YTQ4YzY3NGJlODFmMzNhY2JhZWFjNGNiYzE0NTkyYzU4
14
+ OTBkYzQ1MDJhMjFjOGZjMGZmNDE0ZjEyNzFmZmRkNTkzZDY3MGQ4ZGNiNTYw
15
+ ZjI2MDEwMmQ3ZGNmZDFiYjY4N2E2NjAwOWY5YmQ5YjgxODA2YjE=
@@ -42,8 +42,7 @@ module Logglier
42
42
  else
43
43
  @headers['Content-Type'] = 'text/plain'
44
44
  end
45
-
46
- connect!
45
+ @http = nil
47
46
  end
48
47
 
49
48
  # Delivers the message via HTTP, handling errors
@@ -53,18 +52,23 @@ module Logglier
53
52
  retries = 0
54
53
 
55
54
  begin
55
+ if @http.nil?
56
+ connect!
57
+ end
58
+
56
59
  @http.request_post(@input_uri.path, message, @headers)
57
60
  rescue *RETRY_EXCEPTIONS => e
61
+ @http = nil
58
62
  if retries < RETRIES
59
63
  retries += 1
60
64
  failsafe_retrying(e, message, retries)
61
- sleep retries
62
- connect!
65
+ sleep(retries)
63
66
  retry
64
67
  else
65
68
  failsafe_errored(e, message)
66
69
  end
67
70
  rescue Exception => e
71
+ @http = nil
68
72
  failsafe_errored(e, message)
69
73
  end
70
74
  end
@@ -72,7 +76,7 @@ module Logglier
72
76
  private
73
77
 
74
78
  def connect!
75
- @http_class = Net::HTTP::Proxy(@proxy_addr, @proxy_port, @proxy_user, @proxy_user)
79
+ @http_class = Net::HTTP::Proxy(@proxy_addr, @proxy_port, @proxy_user, @proxy_password)
76
80
  @http = @http_class.new(@input_uri.host, @input_uri.port)
77
81
 
78
82
  if @input_uri.scheme == 'https'
@@ -1,3 +1,3 @@
1
1
  module Logglier
2
- VERSION = '0.2.9'
2
+ VERSION = '0.2.10'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logglier
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.9
4
+ version: 0.2.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edward Muller (aka freeformz)
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-11 00:00:00.000000000 Z
11
+ date: 2013-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake