gh-archive 0.15 → 0.16
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 +5 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f339fca5ebd3f7ee085fa257b47567993ab776efd3ba143e424a6bab2ca1712
|
4
|
+
data.tar.gz: bd3709e9067fbc5ba0a7b92f156c3fa6f87d26bc81b0a969f7020526f31b5264
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d56ecf4dc4101cf162d02e49f62dc77592bc652b9933b7413cb40f56eb25c595a20eed8fbc42e1f96830048d16520299972094b0d29b14f400befc5c21e1672
|
7
|
+
data.tar.gz: 5a7e8c158271b1b540e76e1b68f93ece7cebed8d29057728c6ac93b536f3f3417b89fffddcbe57c80e75269cda9ff719fef84e5bb0558dd52fd8842f80e44f55
|
data/lib/gh-archive.rb
CHANGED
@@ -318,9 +318,10 @@ class OnlineGHAProvider < GHAProvider
|
|
318
318
|
while @cache.full?
|
319
319
|
sleep 1
|
320
320
|
end
|
321
|
+
|
322
|
+
filename = self.get_gha_filename(current_time)
|
321
323
|
@max_retries.times do
|
322
324
|
begin
|
323
|
-
filename = self.get_gha_filename(current_time)
|
324
325
|
URI.open("http://data.gharchive.org/#{filename}") do |gz|
|
325
326
|
content = self.read_gha_file(gz)
|
326
327
|
@cache.put(filename, content)
|
@@ -394,7 +395,9 @@ class OnlineGHAProvider < GHAProvider
|
|
394
395
|
end
|
395
396
|
|
396
397
|
def has?(name)
|
397
|
-
|
398
|
+
@mutex.synchronize do
|
399
|
+
return @cache.has_key?(name)
|
400
|
+
end
|
398
401
|
end
|
399
402
|
|
400
403
|
def full?
|