fluent-plugin-fluent-package-update-notifier 0.2.1 → 0.2.3
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 704390e4009c8f26172f3a4d0b3ef884f2706a489a08707baeead961d410b93a
|
4
|
+
data.tar.gz: a011595aa750f45b9b33d060ab747372e8f0a0a22063ce9769c8332a06d59edf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 359a49db2513531fb2b16cdd667cc046ecef52a724704fbcd19ede5558c021728035d56ae40ac0b9fefea080fcb5dbcb13913475673d2cc9576efbc4389da6f0
|
7
|
+
data.tar.gz: ce9f6476ceb6f6ca79c0d96a501ef7912093b7125743e00ee972ec340fe946c710f407be552c1986cb9e63d6cbff18268abdfca98ef365b80b9cf148b06b7400
|
data/CHANGELOG.md
CHANGED
@@ -21,7 +21,7 @@ module Fluent
|
|
21
21
|
begin
|
22
22
|
require ENV["FLUENT_PACKAGE_CONFIG"] || DEFAULT_PACKAGE_CONFIG_PATH
|
23
23
|
rescue LoadError
|
24
|
-
@logger.
|
24
|
+
@logger.info "Failed to load #{ENV["FLUENT_PACKAGE_CONFIG"] || DEFAULT_PACKAGE_CONFIG_PATH}"
|
25
25
|
end
|
26
26
|
@host_os = RbConfig::CONFIG['host_os']
|
27
27
|
Specinfra.configuration.backend = windows? ? :cmd : :exec
|
@@ -42,7 +42,7 @@ module Fluent
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def cached_tags_path
|
45
|
-
ENV["FLUENT_PACKAGE_TAGS_PATH"] ?
|
45
|
+
ENV["FLUENT_PACKAGE_TAGS_PATH"] ?
|
46
46
|
ENV["FLUENT_PACKAGE_TAGS_PATH"] : "#{@tmp_dir}/fluent-package-tags.json"
|
47
47
|
end
|
48
48
|
|
@@ -51,20 +51,16 @@ module Fluent
|
|
51
51
|
end
|
52
52
|
|
53
53
|
def fetch_tags
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
yield JSON.parse(json)
|
63
|
-
end
|
54
|
+
if tags_cached?
|
55
|
+
yield JSON.parse(File.open(cached_tags_path).read)
|
56
|
+
else
|
57
|
+
URI.open(release_tags_url) do |resource|
|
58
|
+
File.open(cached_tags_path, "w+") do |f|
|
59
|
+
json = resource.read
|
60
|
+
f.write(json)
|
61
|
+
yield JSON.parse(json)
|
64
62
|
end
|
65
63
|
end
|
66
|
-
rescue => e
|
67
|
-
@logger.error "Failed to fetch tags", error: e
|
68
64
|
end
|
69
65
|
end
|
70
66
|
|
@@ -176,6 +172,7 @@ module Fluent
|
|
176
172
|
end
|
177
173
|
end
|
178
174
|
end
|
175
|
+
ensure
|
179
176
|
FileUtils.rm_rf(@tmp_dir)
|
180
177
|
end
|
181
178
|
|