fluent-plugin-github-activities 0.3.0 → 0.4.0

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: 86e9e9a0a689ec6d7ad2c9e0f9dcaa05d932ce69
4
- data.tar.gz: c7a2502403c7cc773fced9752fa1590fc616cba6
3
+ metadata.gz: 8133f90f59fd64a19ee93f670819992b65d3697c
4
+ data.tar.gz: e7dea9ef571e9c2065107e7bec3358f34c47460e
5
5
  SHA512:
6
- metadata.gz: a7abc34e2f2bd886d51c46b21c7b304647f58682234f2f5f62f66d811cf8b9450966d3f7b773475c22a0890f2ecac6654b6d2531abc071ecbb09837cc5a82730
7
- data.tar.gz: 5515a6b80db99bc93ffdea84a1d62059fc6762c1c84716b57d8efc468fa48cde3816901ad9e2b513643baf2a059b109cd75801991231e35abd5965d686c87fb5
6
+ metadata.gz: 1f4921f84438dee4134f1685ce95da788eb731ed1fb2a67cc88dcde1a1be03c9a213b09dd74349e5068c1b0bb41719850a3896da82c039b4ff6a34f7bd18eb0e
7
+ data.tar.gz: da531444b368936dec4c321efc61c174bd2ccd9575ea239c3f2a9c35ad0bb42cf5f63526e53058bf8c61de5ea3fced393e51a1340c24b4c320f1bdbb4ff5f43e
@@ -19,7 +19,7 @@
19
19
 
20
20
  Gem::Specification.new do |spec|
21
21
  spec.name = "fluent-plugin-github-activities"
22
- spec.version = "0.3.0"
22
+ spec.version = "0.4.0"
23
23
  spec.authors = ["YUKI Hiroshi"]
24
24
  spec.email = ["yuki@clear-code.com"]
25
25
  spec.summary = "Fluentd plugin to crawl public activities on the GitHub."
@@ -329,14 +329,14 @@ module Fluent
329
329
 
330
330
  def http_get(uri, extra_headers={})
331
331
  parsed_uri = URI(uri)
332
+ if @access_token
333
+ extra_headers["Authorization"] = "token #{@access_token}"
334
+ end
332
335
  response = nil
333
336
  http = Net::HTTP.new(parsed_uri.host, parsed_uri.port)
334
337
  http.use_ssl = parsed_uri.is_a?(URI::HTTPS)
335
338
  http.start do |http|
336
339
  http_request = Net::HTTP::Get.new(parsed_uri.path, extra_headers)
337
- if @access_token
338
- extra_headers["Authorization"] = "token #{@access_token}"
339
- end
340
340
  response = http.request(http_request)
341
341
  end
342
342
  response
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-github-activities
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - YUKI Hiroshi