outdated-gems 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/README ADDED
@@ -0,0 +1,3 @@
1
+ Given a Gemfile.lock, list gems that have new versions on rubyforge.org.
2
+
3
+ Run `outdated_gems` in a directory containing a Gemfile.lock and it will print the results.
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.0.1
data/bin/outdated_gems ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby -rrubygems
2
+
3
+ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib', 'outdated-gems'))
@@ -0,0 +1,23 @@
1
+ require 'yaml'
2
+ require 'json'
3
+ require 'rest_client'
4
+ require 'versionomy'
5
+
6
+ file = File.join(Dir.pwd, 'Gemfile.lock')
7
+
8
+ if File.exists?(file)
9
+ gemfile = File.open(file) { |yf| YAML::load(yf) }
10
+ gems = gemfile['specs'].inject({}) do |gems, g|
11
+ g = g.to_a[0]
12
+ name = g[0]
13
+ v = g[1]['version']
14
+ v_latest = JSON.parse(RestClient.get("http://gemcutter.org/api/v1/gems/#{name}.json"))['version']
15
+ if Versionomy.parse(v) < Versionomy.parse(v_latest)
16
+ gems[name] = "#{v} => #{v_latest}"
17
+ end
18
+ gems
19
+ end
20
+ gems.each do |name, change|
21
+ puts "#{name}: #{change}"
22
+ end
23
+ end
@@ -0,0 +1,52 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{outdated-gems}
8
+ s.version = "0.0.1"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Aaron Gibralter"]
12
+ s.date = %q{2010-05-06}
13
+ s.default_executable = %q{outdated_gems}
14
+ s.description = %q{Run `outdated_gems` in a directory containing a Gemfile.lock and it will print the results.}
15
+ s.email = %q{aaron.gibralter@gmail.com}
16
+ s.executables = ["outdated_gems"]
17
+ s.extra_rdoc_files = [
18
+ "README"
19
+ ]
20
+ s.files = [
21
+ "README",
22
+ "VERSION",
23
+ "bin/outdated_gems",
24
+ "lib/outdated-gems.rb",
25
+ "outdated-gems.gemspec"
26
+ ]
27
+ s.homepage = %q{http://github.com/agibralter/outdated-gems}
28
+ s.rdoc_options = ["--charset=UTF-8"]
29
+ s.require_paths = ["lib"]
30
+ s.rubygems_version = %q{1.3.6}
31
+ s.summary = %q{Given a Gemfile.lock, list gems that have new versions on rubyforge.org.}
32
+
33
+ if s.respond_to? :specification_version then
34
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
35
+ s.specification_version = 3
36
+
37
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
38
+ s.add_runtime_dependency(%q<json>, [">= 1.4.0"])
39
+ s.add_runtime_dependency(%q<rest-client>, [">= 1.5.0"])
40
+ s.add_runtime_dependency(%q<versionomy>, [">= 0.3.0"])
41
+ else
42
+ s.add_dependency(%q<json>, [">= 1.4.0"])
43
+ s.add_dependency(%q<rest-client>, [">= 1.5.0"])
44
+ s.add_dependency(%q<versionomy>, [">= 0.3.0"])
45
+ end
46
+ else
47
+ s.add_dependency(%q<json>, [">= 1.4.0"])
48
+ s.add_dependency(%q<rest-client>, [">= 1.5.0"])
49
+ s.add_dependency(%q<versionomy>, [">= 0.3.0"])
50
+ end
51
+ end
52
+
metadata ADDED
@@ -0,0 +1,107 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: outdated-gems
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 0
8
+ - 1
9
+ version: 0.0.1
10
+ platform: ruby
11
+ authors:
12
+ - Aaron Gibralter
13
+ autorequire:
14
+ bindir: bin
15
+ cert_chain: []
16
+
17
+ date: 2010-05-06 00:00:00 -04:00
18
+ default_executable: outdated_gems
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
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: rest-client
36
+ prerelease: false
37
+ requirement: &id002 !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ segments:
42
+ - 1
43
+ - 5
44
+ - 0
45
+ version: 1.5.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
62
+ description: Run `outdated_gems` in a directory containing a Gemfile.lock and it will print the results.
63
+ email: aaron.gibralter@gmail.com
64
+ executables:
65
+ - outdated_gems
66
+ extensions: []
67
+
68
+ extra_rdoc_files:
69
+ - README
70
+ files:
71
+ - README
72
+ - VERSION
73
+ - bin/outdated_gems
74
+ - lib/outdated-gems.rb
75
+ - outdated-gems.gemspec
76
+ has_rdoc: true
77
+ homepage: http://github.com/agibralter/outdated-gems
78
+ licenses: []
79
+
80
+ post_install_message:
81
+ rdoc_options:
82
+ - --charset=UTF-8
83
+ require_paths:
84
+ - lib
85
+ required_ruby_version: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ segments:
90
+ - 0
91
+ version: "0"
92
+ required_rubygems_version: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ segments:
97
+ - 0
98
+ version: "0"
99
+ requirements: []
100
+
101
+ rubyforge_project:
102
+ rubygems_version: 1.3.6
103
+ signing_key:
104
+ specification_version: 3
105
+ summary: Given a Gemfile.lock, list gems that have new versions on rubyforge.org.
106
+ test_files: []
107
+