mackerel-client 0.1.0 → 0.1.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: c6d04e00e5c2881c62e69107348ec1df67d61c22
4
- data.tar.gz: 2e05e0a387d92c2d455bf89dd83682cb5ec03b75
3
+ metadata.gz: 484eafb1d615ca3170a466e17a1faaeb79367337
4
+ data.tar.gz: 4dce1406131b8c9b2c6781263fd71b62a3fc7364
5
5
  SHA512:
6
- metadata.gz: 7b67df943bbbf9b8b39d10960027201dda2a465184cdb86ead63aa3431e91d1b5d874a2a37aaaaa57b3bf7e30bde9d0937281779697d0a836895d67be34b1783
7
- data.tar.gz: 9548aa1b053f7aec2c21b693ecca41bc22f26136ef920b984c91acc327791ae0abf770c7d57cf410d238f7fe9e45204ac170d1078bc21e253186e2cc356326db
6
+ metadata.gz: 45071cc8bb854e41d34c88ace12165c725df742af6b7b7cd632c2fca5236c530e967c1aaa5ade3dbc49315286422441e87180620a81f42c66d8c6d18ea71afb5
7
+ data.tar.gz: fe36bddcd86ffdfbd46f1907d2e7a2c1b61d7084f09441f284b18cbdd15ff735216681f5fd251c5d50b76d6afff91fdeddb3f9780a71e57158b8f1bdac8111e1
data/.travis.yml CHANGED
@@ -1,6 +1,9 @@
1
1
  language: ruby
2
- before_install: gem install bundler -v 1.11.2
2
+ before_install:
3
+ # https://github.com/travis-ci/travis-ci/issues/3531
4
+ - gem install bundler # -v 1.7.14 if a specific version is needed
3
5
  rvm:
6
+ - "2.2"
4
7
  - "2.1.1"
5
8
  - "2.0.0"
6
9
  - "1.9.3"
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -11,8 +11,10 @@ module Mackerel
11
11
  ERROR_MESSAGE_FOR_API_KEY_ABSENCE = "API key is absent. Set your API key in a environment variable called MACKEREL_APIKEY."
12
12
 
13
13
  def initialize(args = {})
14
- @origin = args[:mackerel_origin] || 'https://mackerel.io'
15
- @api_key = args[:mackerel_api_key] || raise(ERROR_MESSAGE_FOR_API_KEY_ABSENCE)
14
+ @origin = args[:mackerel_origin] || 'https://mackerel.io'
15
+ @api_key = args[:mackerel_api_key] || raise(ERROR_MESSAGE_FOR_API_KEY_ABSENCE)
16
+ @timeout = args[:timeout] || 30 # Ref: apiRequestTimeout at mackerel-agent
17
+ @open_timeout = args[:open_timeout] || 30 # Ref: apiRequestTimeout at mackerel-agent
16
18
  end
17
19
 
18
20
  def post_host(host)
@@ -160,6 +162,8 @@ module Mackerel
160
162
  faraday.response :logger if ENV['DEBUG']
161
163
  faraday.adapter Faraday.default_adapter
162
164
  faraday.options.params_encoder = Faraday::FlatParamsEncoder
165
+ faraday.options.timeout = @timeout
166
+ faraday.options.open_timeout = @open_timeout
163
167
  end
164
168
  end
165
169
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mackerel-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mackerel developer team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-09 00:00:00.000000000 Z
11
+ date: 2016-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday