outdated-gems 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/outdated-gems.rb +3 -1
- data/outdated-gems.gemspec +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2.0
|
data/lib/outdated-gems.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'thread'
|
1
2
|
require 'yaml'
|
2
3
|
require 'versionomy'
|
3
4
|
require 'gemcutter_json'
|
@@ -15,6 +16,7 @@ if File.exists?(file)
|
|
15
16
|
end
|
16
17
|
|
17
18
|
outdated_gems = {}
|
19
|
+
m = Mutex.new
|
18
20
|
|
19
21
|
hydra = Typhoeus::Hydra.new(:max_concurrency => 20)
|
20
22
|
gemcutter = GemcutterJson.new(hydra)
|
@@ -25,7 +27,7 @@ if File.exists?(file)
|
|
25
27
|
raise "Error fetching version for #{name} gem."
|
26
28
|
else
|
27
29
|
if Versionomy.parse(v_current) < Versionomy.parse(v_latest)
|
28
|
-
outdated_gems[name] = "#{v_current} => #{v_latest}"
|
30
|
+
m.synchronize { outdated_gems[name] = "#{v_current} => #{v_latest}" }
|
29
31
|
end
|
30
32
|
end
|
31
33
|
end
|
data/outdated-gems.gemspec
CHANGED