fluent-plugin-github-activities 0.3.0 → 0.4.0
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8133f90f59fd64a19ee93f670819992b65d3697c
|
|
4
|
+
data.tar.gz: e7dea9ef571e9c2065107e7bec3358f34c47460e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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.
|
|
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
|