gemline 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -4,6 +4,12 @@ Create a tilde-arrow Gemfile line for a gem on rubygems.org using the latest ver
4
4
 
5
5
  If possible, we'll also copy that Gemfile line into the clipboard using pbcopy.
6
6
 
7
+ == Example
8
+
9
+ # gemline rails
10
+ gem "rails", "~> 3.1.1"
11
+ Gem line copied to your clipboard. Ready to paste into your Gemfile
12
+
7
13
  == Install
8
14
 
9
15
  # gem install gemline
data/bin/gemline CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require "gemline"
4
- Gemline.start
4
+ Gemline.query(ARGV[0])
data/gemline.gemspec CHANGED
@@ -1,5 +1,4 @@
1
1
  # -*- encoding: utf-8 -*-
2
- require File.expand_path('../lib/gemline', __FILE__)
3
2
 
4
3
  Gem::Specification.new do |gem|
5
4
  gem.authors = ["Joseph Alba"]
@@ -8,12 +7,12 @@ Gem::Specification.new do |gem|
8
7
  gem.summary = %q{}
9
8
  gem.homepage = "http://github.com/joealba/gemline"
10
9
 
11
- gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
10
+ gem.executables << 'gemline'
12
11
  gem.files = `git ls-files`.split("\n")
13
12
  gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
14
13
  gem.name = "gemline"
15
14
  gem.require_paths = ["lib"]
16
- gem.version = Gemline::VERSION
15
+ gem.version = '0.0.2'
17
16
 
18
17
  gem.add_dependency('crack')
19
18
  # gem.add_development_dependency(%q<rspec>, [">= 2.7.0"])
data/lib/gemline.rb CHANGED
@@ -2,10 +2,9 @@ require 'crack/json'
2
2
  require 'net/http'
3
3
 
4
4
  class Gemline
5
- VERSION = "0.0.1"
6
5
 
7
- def self.start
8
- gem = ARGV[0].to_s.gsub(/[^\w\-]+/,'')
6
+ def self.query(gem)
7
+ gem = gem.to_s.gsub(/[^\w\-]+/,'')
9
8
  if (gem.empty?)
10
9
  puts "Usage: gemline [GEM NAME]"
11
10
  exit
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gemline
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-10-28 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: crack
16
- requirement: &70122338398480 !ruby/object:Gem::Requirement
16
+ requirement: &70320116070580 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70122338398480
24
+ version_requirements: *70320116070580
25
25
  description: Grab the latest Gemfile 'gem' line for a specific Ruby gem
26
26
  email:
27
27
  - joe@joealba.com