outdated-gems 0.2.0 → 0.3.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 +4 -16
- data/outdated-gems.gemspec +1 -11
- metadata +4 -46
- data/lib/gemcutter_json.rb +0 -11
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.3.0
|
data/lib/outdated-gems.rb
CHANGED
@@ -1,7 +1,4 @@
|
|
1
|
-
require 'thread'
|
2
1
|
require 'yaml'
|
3
|
-
require 'versionomy'
|
4
|
-
require 'gemcutter_json'
|
5
2
|
|
6
3
|
file = File.join(Dir.pwd, 'Gemfile.lock')
|
7
4
|
|
@@ -16,25 +13,16 @@ if File.exists?(file)
|
|
16
13
|
end
|
17
14
|
|
18
15
|
outdated_gems = {}
|
19
|
-
m = Mutex.new
|
20
16
|
|
21
|
-
|
22
|
-
gemcutter = GemcutterJson.new(hydra)
|
17
|
+
gem_list = Gem::SpecFetcher.new.list.values.first
|
23
18
|
|
24
19
|
gems.each do |name, v_current|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
else
|
29
|
-
if Versionomy.parse(v_current) < Versionomy.parse(v_latest)
|
30
|
-
m.synchronize { outdated_gems[name] = "#{v_current} => #{v_latest}" }
|
31
|
-
end
|
32
|
-
end
|
20
|
+
latest_gem = gem_list.detect { |g| g.first == name }
|
21
|
+
if latest_gem[1] > Gem::Version.create(v_current)
|
22
|
+
outdated_gems[name] = "#{v_current} => #{latest_gem[1].version}"
|
33
23
|
end
|
34
24
|
end
|
35
25
|
|
36
|
-
hydra.run
|
37
|
-
|
38
26
|
outdated_gems.each do |name, change|
|
39
27
|
puts "#{name}: #{change}"
|
40
28
|
end
|
data/outdated-gems.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{outdated-gems}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.3.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Aaron Gibralter"]
|
@@ -21,7 +21,6 @@ Gem::Specification.new do |s|
|
|
21
21
|
"README",
|
22
22
|
"VERSION",
|
23
23
|
"bin/outdated_gems",
|
24
|
-
"lib/gemcutter_json.rb",
|
25
24
|
"lib/outdated-gems.rb",
|
26
25
|
"outdated-gems.gemspec"
|
27
26
|
]
|
@@ -36,18 +35,9 @@ Gem::Specification.new do |s|
|
|
36
35
|
s.specification_version = 3
|
37
36
|
|
38
37
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
39
|
-
s.add_runtime_dependency(%q<json>, [">= 1.4.0"])
|
40
|
-
s.add_runtime_dependency(%q<monster_mash>, [">= 0.1.0"])
|
41
|
-
s.add_runtime_dependency(%q<versionomy>, [">= 0.3.0"])
|
42
38
|
else
|
43
|
-
s.add_dependency(%q<json>, [">= 1.4.0"])
|
44
|
-
s.add_dependency(%q<monster_mash>, [">= 0.1.0"])
|
45
|
-
s.add_dependency(%q<versionomy>, [">= 0.3.0"])
|
46
39
|
end
|
47
40
|
else
|
48
|
-
s.add_dependency(%q<json>, [">= 1.4.0"])
|
49
|
-
s.add_dependency(%q<monster_mash>, [">= 0.1.0"])
|
50
|
-
s.add_dependency(%q<versionomy>, [">= 0.3.0"])
|
51
41
|
end
|
52
42
|
end
|
53
43
|
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
-
|
7
|
+
- 3
|
8
8
|
- 0
|
9
|
-
version: 0.
|
9
|
+
version: 0.3.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Aaron Gibralter
|
@@ -16,49 +16,8 @@ cert_chain: []
|
|
16
16
|
|
17
17
|
date: 2010-05-07 00:00:00 -04:00
|
18
18
|
default_executable: outdated_gems
|
19
|
-
dependencies:
|
20
|
-
|
21
|
-
name: json
|
22
|
-
prerelease: false
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
-
requirements:
|
25
|
-
- - ">="
|
26
|
-
- !ruby/object:Gem::Version
|
27
|
-
segments:
|
28
|
-
- 1
|
29
|
-
- 4
|
30
|
-
- 0
|
31
|
-
version: 1.4.0
|
32
|
-
type: :runtime
|
33
|
-
version_requirements: *id001
|
34
|
-
- !ruby/object:Gem::Dependency
|
35
|
-
name: monster_mash
|
36
|
-
prerelease: false
|
37
|
-
requirement: &id002 !ruby/object:Gem::Requirement
|
38
|
-
requirements:
|
39
|
-
- - ">="
|
40
|
-
- !ruby/object:Gem::Version
|
41
|
-
segments:
|
42
|
-
- 0
|
43
|
-
- 1
|
44
|
-
- 0
|
45
|
-
version: 0.1.0
|
46
|
-
type: :runtime
|
47
|
-
version_requirements: *id002
|
48
|
-
- !ruby/object:Gem::Dependency
|
49
|
-
name: versionomy
|
50
|
-
prerelease: false
|
51
|
-
requirement: &id003 !ruby/object:Gem::Requirement
|
52
|
-
requirements:
|
53
|
-
- - ">="
|
54
|
-
- !ruby/object:Gem::Version
|
55
|
-
segments:
|
56
|
-
- 0
|
57
|
-
- 3
|
58
|
-
- 0
|
59
|
-
version: 0.3.0
|
60
|
-
type: :runtime
|
61
|
-
version_requirements: *id003
|
19
|
+
dependencies: []
|
20
|
+
|
62
21
|
description: Run `outdated_gems` in a directory containing a Gemfile.lock and it will print the results.
|
63
22
|
email: aaron.gibralter@gmail.com
|
64
23
|
executables:
|
@@ -71,7 +30,6 @@ files:
|
|
71
30
|
- README
|
72
31
|
- VERSION
|
73
32
|
- bin/outdated_gems
|
74
|
-
- lib/gemcutter_json.rb
|
75
33
|
- lib/outdated-gems.rb
|
76
34
|
- outdated-gems.gemspec
|
77
35
|
has_rdoc: true
|
data/lib/gemcutter_json.rb
DELETED