gemr 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -0
- data/Gemfile +3 -0
- data/README.md +25 -0
- data/Rakefile +1 -0
- data/bin/gemr +8 -0
- data/gemr.gemspec +18 -0
- data/lib/gemr.rb +3 -0
- data/lib/gemr/rubygems/versions.rb +22 -0
- data/lib/gemr/version.rb +3 -0
- metadata +55 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
gemr -- A quick gem for displaying the latest versions of gems.
|
2
|
+
====================================
|
3
|
+
|
4
|
+
## DESCRIPTION
|
5
|
+
|
6
|
+
Tired of going to rubygems.org to lookup the latest version of gems? Gemr allows you to quickly query for the latest versions of any gem on Rubygems from the command line!
|
7
|
+
|
8
|
+
## INSTALLATION
|
9
|
+
|
10
|
+
$ gem install gemr
|
11
|
+
|
12
|
+
## USAGE
|
13
|
+
|
14
|
+
Simply pass one or more gem names to the gemr executable, like so:
|
15
|
+
|
16
|
+
$ gemr porter rspec-rails
|
17
|
+
|
18
|
+
### Example Output:
|
19
|
+
|
20
|
+
Finding latest gem versions...
|
21
|
+
|
22
|
+
gem "porter", "~> 1.0.2"
|
23
|
+
gem "rspec-rails", "~> 2.6.1"
|
24
|
+
|
25
|
+
The results are formatted for inclusion in your Gemfile.
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/bin/gemr
ADDED
data/gemr.gemspec
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "gemr/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "gemr"
|
7
|
+
s.version = Gemr::VERSION
|
8
|
+
s.authors = ["Kenny Johnston"]
|
9
|
+
s.email = ["kjohnston.ca@gmail.com"]
|
10
|
+
s.homepage = ""
|
11
|
+
s.summary = %q{A quick gem for displaying the latest versions of gems.}
|
12
|
+
s.description = %q{A quick gem for displaying the latest versions of gems.}
|
13
|
+
|
14
|
+
s.files = `git ls-files`.split("\n")
|
15
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
16
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
17
|
+
s.require_paths = ["lib"]
|
18
|
+
end
|
data/lib/gemr.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
module Gemr
|
2
|
+
module Rubygems
|
3
|
+
class Versions
|
4
|
+
|
5
|
+
def self.latest(gems=[])
|
6
|
+
puts "\nFinding latest gem versions...\n\n"
|
7
|
+
gems.each do |g|
|
8
|
+
begin
|
9
|
+
response = open("https://rubygems.org/api/v1/versions/#{g}.json").read
|
10
|
+
versions = JSON.parse(response)
|
11
|
+
latest_version = versions.first["number"]
|
12
|
+
puts "gem \"#{g}\", \"~> #{latest_version}\""
|
13
|
+
rescue
|
14
|
+
puts "Could not find \"#{g}\" gem on http://rubygems.org."
|
15
|
+
end
|
16
|
+
end
|
17
|
+
puts ""
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
data/lib/gemr/version.rb
ADDED
metadata
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: gemr
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Kenny Johnston
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2011-08-24 00:00:00.000000000Z
|
13
|
+
dependencies: []
|
14
|
+
description: A quick gem for displaying the latest versions of gems.
|
15
|
+
email:
|
16
|
+
- kjohnston.ca@gmail.com
|
17
|
+
executables:
|
18
|
+
- gemr
|
19
|
+
extensions: []
|
20
|
+
extra_rdoc_files: []
|
21
|
+
files:
|
22
|
+
- .gitignore
|
23
|
+
- Gemfile
|
24
|
+
- README.md
|
25
|
+
- Rakefile
|
26
|
+
- bin/gemr
|
27
|
+
- gemr.gemspec
|
28
|
+
- lib/gemr.rb
|
29
|
+
- lib/gemr/rubygems/versions.rb
|
30
|
+
- lib/gemr/version.rb
|
31
|
+
homepage: ''
|
32
|
+
licenses: []
|
33
|
+
post_install_message:
|
34
|
+
rdoc_options: []
|
35
|
+
require_paths:
|
36
|
+
- lib
|
37
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
38
|
+
none: false
|
39
|
+
requirements:
|
40
|
+
- - ! '>='
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '0'
|
43
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
44
|
+
none: false
|
45
|
+
requirements:
|
46
|
+
- - ! '>='
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '0'
|
49
|
+
requirements: []
|
50
|
+
rubyforge_project:
|
51
|
+
rubygems_version: 1.8.6
|
52
|
+
signing_key:
|
53
|
+
specification_version: 3
|
54
|
+
summary: A quick gem for displaying the latest versions of gems.
|
55
|
+
test_files: []
|