gh-archive 0.14 → 0.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gh-archive.rb +8 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de82207e7b0f5588a694e22b9d94c8e15e6812e8ad2dd433a8c78080c3629253
|
4
|
+
data.tar.gz: 7bc6e39cb4834922e29764744a3a753d8cea34052b44b282126b520b36f69d64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1acd0b50fdba7cf5944e50670817ad41879ea273b27c79d87d6463b0bc438220b9a806aba2db879b4dbe8394439f24a66ec9bace2a466f51fbb44755eefd6d99
|
7
|
+
data.tar.gz: a30a6de0c073840eff54b7f0678bd996a794194d2a19ae35db1559b7d8ff4ec4f29591f36a6f114878d4737d29406ba919f8907b6706afb2f7b6ab7e8bcd4c26
|
data/lib/gh-archive.rb
CHANGED
@@ -285,7 +285,12 @@ class OnlineGHAProvider < GHAProvider
|
|
285
285
|
sleep 1
|
286
286
|
end
|
287
287
|
|
288
|
-
|
288
|
+
data = @cache.get(filename)
|
289
|
+
if data
|
290
|
+
return data
|
291
|
+
else
|
292
|
+
raise DownloadArchiveException, "Could not scan #{filename}: data unavailable."
|
293
|
+
end
|
289
294
|
else
|
290
295
|
URI.open("http://data.gharchive.org/#{filename}") do |gz|
|
291
296
|
return self.read_gha_file(gz)
|
@@ -338,6 +343,8 @@ class OnlineGHAProvider < GHAProvider
|
|
338
343
|
@logger.warn("Could not unzip, cache and analyze the zip at #{current_time}: " + e.message)
|
339
344
|
end
|
340
345
|
end
|
346
|
+
|
347
|
+
@cache.put(filename, nil) unless @cache.has?(filename)
|
341
348
|
end
|
342
349
|
|
343
350
|
def each(from = Time.gm(2015, 1, 1), to = Time.now)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gh-archive
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.15'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Simone Scalabrino
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-10-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: code-assertions
|