bipbip 0.7.11 → 0.7.12

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: 9847767e1b42d39beae512246c9984eb5df71fb0
4
- data.tar.gz: 1df668f789e88d2f3a847ba3490ebc9696fa37cd
3
+ metadata.gz: cd824e14974d422165f0041ed7084e931643238a
4
+ data.tar.gz: 7b890679e2f4d29e5b063fe941355dd48088bda8
5
5
  SHA512:
6
- metadata.gz: e3196a398dff8d5f726bf8c59e9a23c67f66a5ed224f779b720be5efbb9ef96a61f47b67de952987aca264f230efd260de47cde851425fd1d3172c123db2ce81
7
- data.tar.gz: fa480f193cb9a747e0763595727c6a0a29c8874ba57041e12d15f703d55091ed44820296f33d9ba78caba3c63c40816ace1ccf44adaf0f0065b8fa8144d56053
6
+ metadata.gz: 8c7814b0a6dd7fe63029aa109faa04e27494dd7cc388d94a06a7eb0d29c0b5920b74e7297bfecc8168ebe68dae8212c0f0ae532a562563a6a707d2e46b8e3358
7
+ data.tar.gz: d6e411957c00020e17abb5f137b94e679d84919f105535c02dbde2087313fbf2de15839b0314f8285fe4eff870d9b627d4d1c414974680758f67b2ba3fe0bbe2
@@ -23,7 +23,13 @@ module Bipbip
23
23
  url = config['url'] || 'http://localhost:8085/status'
24
24
  uri = URI.parse(url)
25
25
 
26
- response = Net::HTTP.get_response(uri)
26
+ request = Net::HTTP::Get.new(uri)
27
+ request['authorization'] = "token #{config['status_token']}" if config['status_token']
28
+
29
+ response = Net::HTTP.start(uri.hostname, uri.port) do |http|
30
+ http.request(request)
31
+ end
32
+
27
33
  unless response.code == '200'
28
34
  raise "Invalid response from server at `#{url}`. Response code `#{response.code}`, message `#{response.message}`, body `#{response.body}`"
29
35
  end
@@ -1,3 +1,3 @@
1
1
  module Bipbip
2
- VERSION = '0.7.11'.freeze
2
+ VERSION = '0.7.12'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bipbip
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.11
4
+ version: 0.7.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cargo Media
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-01-27 00:00:00.000000000 Z
13
+ date: 2017-03-01 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: copperegg-revealmetrics