<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.
# gemline rails gem "rails", "~> 4.0.1" Gem line copied to your clipboard. Ready to paste into your Gemfile
# 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
# gemline rails >> Gemfile
# 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
# gem install gemline
# gemline [GEM NAME]
-
A –pre option to grab the latest prerelease version
-
An –open option to open the gem’s rubygems.org page in the default browser