Skip to content

mecampbellsoup/btc_price

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

BTC Price

Because bitcoin is awesome!

What does it do?

From within your Code (or really any) directory, run:

git clone [email protected]:mecampbellsoup/btc_price.git;

then:

cd btc_price.

If you do not have the memcached gem, go get it:

gem install memcached.

Next, start (and immediately background) your cache process with:

memcached -p 11211 &;

and finally you can run the gem's executable:

btc_price.

You should see some content in STDOUT like this:

External services status: Good.
Current BTC price: $622.21.

If you run the executable again (btc_price), you'll notice it's much faster. This is because the library uses memcached to cache the BTC price and avoid making redundant API requests.

Why did I write this library?

I wrote this small library initially to learn about caching and how to implement it in Ruby.

We started using a text file for caching and later on switched to Memcached.

I like to hack on this on the weekends in order to improve my OOP and design skills.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages