librato-metrics 1.5.1 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  ## Changelog
2
2
 
3
+ ### Version 1.6.0
4
+ * Add HTTP proxy support (#112) (Genki Sugawara)
5
+
3
6
  ### Version 1.5.1
4
7
  * Fix bug causing incompatible dates when annotating with block form (#109)
5
8
 
@@ -74,6 +74,7 @@ module Librato
74
74
  #
75
75
  def_delegators :client, :agent_identifier, :annotate, :api_endpoint,
76
76
  :api_endpoint=, :authenticate, :connection,
77
+ :proxy, :proxy=,
77
78
  :faraday_adapter, :faraday_adapter=,
78
79
  :persistence, :persistence=, :persister,
79
80
  :get_composite, :get_metric, :get_measurements, :metrics,
@@ -6,7 +6,7 @@ module Librato
6
6
 
7
7
  def_delegator :annotator, :add, :annotate
8
8
 
9
- attr_accessor :email, :api_key
9
+ attr_accessor :email, :api_key, :proxy
10
10
 
11
11
  # Provide agent identifier for the developer program. See:
12
12
  # http://support.metrics.librato.com/knowledgebase/articles/53548-developer-program
@@ -66,7 +66,7 @@ module Librato
66
66
  # prevent successful creation if no credentials set
67
67
  raise CredentialsMissing unless (self.email and self.api_key)
68
68
  @connection ||= Connection.new(:client => self, :api_endpoint => api_endpoint,
69
- :adapter => faraday_adapter)
69
+ :adapter => faraday_adapter, :proxy => self.proxy)
70
70
  end
71
71
 
72
72
  # Overrride user agent for this client's connections. If you
@@ -19,6 +19,7 @@ module Librato
19
19
  @client = options[:client]
20
20
  @api_endpoint = options[:api_endpoint]
21
21
  @adapter = options[:adapter]
22
+ @proxy = options[:proxy]
22
23
  end
23
24
 
24
25
  # API endpoint that will be used for requests.
@@ -39,6 +40,7 @@ module Librato
39
40
  f.use Librato::Metrics::Middleware::ExpectsStatus
40
41
 
41
42
  f.adapter @adapter || Metrics.faraday_adapter
43
+ f.proxy @proxy if @proxy
42
44
  end.tap do |transport|
43
45
  transport.headers[:user_agent] = user_agent
44
46
  transport.headers[:content_type] = 'application/json'
@@ -1,5 +1,5 @@
1
1
  module Librato
2
2
  module Metrics
3
- VERSION = "1.5.1"
3
+ VERSION = "1.6.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: librato-metrics
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.6.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -37,7 +37,7 @@ cert_chain:
37
37
  bktaNmhlblFBRjFDSDk2WmNxY0pIMTc5UzJ0SWlLRE04a2VlUklVT1BDM1dU
38
38
  MGZhb2svMgpnQTJvemRyODUxYy9uQT09Ci0tLS0tRU5EIENFUlRJRklDQVRF
39
39
  LS0tLS0K
40
- date: 2015-06-16 00:00:00.000000000 Z
40
+ date: 2015-12-02 00:00:00.000000000 Z
41
41
  dependencies:
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: faraday
@@ -155,7 +155,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
155
155
  version: '0'
156
156
  segments:
157
157
  - 0
158
- hash: 1872343750244611276
158
+ hash: -3931930914702254073
159
159
  required_rubygems_version: !ruby/object:Gem::Requirement
160
160
  none: false
161
161
  requirements:
metadata.gz.sig CHANGED
Binary file