cloudformation-tool 0.8.0 → 0.8.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
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d2a83cfc75b879dad0a43b01551dc7b94a704940c63b4714a8d82c6b9a0d5fc2
|
|
4
|
+
data.tar.gz: 08817637b50c73e103aa5a5b9df710bd7a58019fc364fdf8fd4ac08efca10fbc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a029e581598ebd4f8c63abf0e625e1ac0e45077d3ce5a23e1e2dd9155ef5b7a7fb564c5b0f8498f7694e4c535457c16ce0179446125b5ce318d6a360cc0f584a
|
|
7
|
+
data.tar.gz: d54398228a4b36c80bb022563c4eaea85d9762d63bae8ff654499a9a904c3a1a63fa67e88cd6384dd174f21837fb19b347db30d2f0886772d84b236b084f1768
|
|
@@ -40,7 +40,14 @@ module CloudFormationTool
|
|
|
40
40
|
zip_data
|
|
41
41
|
end
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
def fetch_from_url(uri_str)
|
|
44
|
+
$__fetch_cache ||= Hash.new do |h, url|
|
|
45
|
+
h[url] = fetch_from_url_real(url)
|
|
46
|
+
end
|
|
47
|
+
$__fetch_cache[uri_str]
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def fetch_from_url_real(uri_str, limit = 10)
|
|
44
51
|
raise ArgumentError, 'too many HTTP redirects' if limit == 0
|
|
45
52
|
response = Net::HTTP.get_response(URI(uri_str))
|
|
46
53
|
case response
|