diff --git a/README.md b/README.md index 495c97a..4e884ec 100644 --- a/README.md +++ b/README.md @@ -28,11 +28,13 @@ Then, install the gem with the high security trust policy: gem install mtgox -P HighSecurity -## Alias +## Executable After installing the gem, you can get the current price for 1 BTC in USD by -typing `btc` in your bash shell simply by setting the following alias: +typing `btc` in your bash shell: + + $ btc + 50.00 - alias btc='ruby -r rubygems -r mtgox -e "puts MtGox.ticker.sell"' ## Documentation [http://rdoc.info/gems/mtgox][documentation] diff --git a/bin/btc b/bin/btc new file mode 100644 index 0000000..3428024 --- /dev/null +++ b/bin/btc @@ -0,0 +1,5 @@ +#!/usr/bin/env ruby + +require 'mtgox' + +puts MtGox.ticker.sell diff --git a/mtgox.gemspec b/mtgox.gemspec index 4eda4b0..6585342 100644 --- a/mtgox.gemspec +++ b/mtgox.gemspec @@ -8,9 +8,11 @@ Gem::Specification.new do |spec| spec.add_dependency 'multi_json', '~> 1.0' spec.add_development_dependency 'bundler', '~> 1.0' spec.author = "Erik Michaels-Ober" + spec.bindir = 'bin' spec.cert_chain = ['certs/sferik.pem'] spec.description = %q{Ruby wrapper for the Mt. Gox Trade API. Mt. Gox allows you to trade US Dollars (USD) for Bitcoins (BTC) or Bitcoins for US Dollars.} spec.email = 'sferik@gmail.com' + spec.executable = 'btc' spec.files = `git ls-files`.split("\n") spec.files = %w(.yardopts CONTRIBUTING.md LICENSE.md README.md Rakefile mtgox.gemspec) spec.files += Dir.glob("lib/**/*.rb")