Project

gemline

0.0
No release in over 3 years
Low commit activity in last 3 years
Grab the latest Gemfile 'gem' line for a specific Ruby gem
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 3.0

Runtime

>= 0
>= 1.3.5
 Project Readme

gemline¶ ↑

<img src=“https://travis-ci.org/joealba/gemline.svg?branch=master” alt=“Build Status” />

Create a tilde-arrow Gemfile line for a gem on rubygems.org using the latest version number available according to the rubygems api.

If possible, we’ll also copy that Gemfile line into the clipboard using pbcopy.

Examples¶ ↑

Normal Gemfile usage¶ ↑

# gemline rails
gem "rails", "~> 4.0.1"
  Gem line copied to your clipboard.  Ready to paste into your Gemfile

Including group designation¶ ↑

# gemline rails --group development,test
gem "rails", "~> 4.0.1", :group => [:development, :test]
  Gem line copied to your clipboard.  Ready to paste into your Gemfile

Append your Gemfile¶ ↑

# gemline rails >> Gemfile

Gemspec style¶ ↑

# gemline rails -g
gem.add_dependency "rails", "~> 4.0.1"
  Gem line copied to your clipboard.  Ready to paste into your Gemfile

# gemline rails -g --group development
gem.add_development_dependency "rails", "~> 4.0.1"
  Gem line copied to your clipboard.  Ready to paste into your Gemfile

Gemline – It’s not just for the command line anymore. You can use it in your bootstrapping code too.¶ ↑

require 'gemline'
puts Gemline.new('rails').gemline
puts Gemline.new('rails', :group => :development).gemline

Install¶ ↑

# gem install gemline

Usage¶ ↑

# gemline [GEM NAME]

Upcoming features¶ ↑

  • A –pre option to grab the latest prerelease version

  • An –open option to open the gem’s rubygems.org page in the default browser