Skip to content

Commit

Permalink
Merge pull request #20 from imkmf/add-btc-executable
Browse files Browse the repository at this point in the history
Add BTC executable to pull current BTC->USD rate. Update README accordingly
  • Loading branch information
sferik committed Mar 19, 2013
2 parents 66e6b09 + 60ab606 commit e03e0c9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Expand Up @@ -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]
Expand Down
5 changes: 5 additions & 0 deletions bin/btc
@@ -0,0 +1,5 @@
#!/usr/bin/env ruby

require 'mtgox'

puts MtGox.ticker.sell
2 changes: 2 additions & 0 deletions mtgox.gemspec
Expand Up @@ -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")
Expand Down

0 comments on commit e03e0c9

Please sign in to comment.