Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Cloning Internet Applications with Ruby

You're reading from   Cloning Internet Applications with Ruby Make clones of some of the best applications on the Web using the dynamic and object-oriented features of Ruby

Arrow left icon
Product type Paperback
Published in Aug 2010
Publisher Packt
ISBN-13 9781849511063
Length 336 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Chang Sau Sheong Chang Sau Sheong
Author Profile Icon Chang Sau Sheong
Chang Sau Sheong
Arrow right icon
View More author details
Toc

Building the clone


Now that we have a clear understanding of the clone we want to build, let's get into it. If you notice from the design discussion above, in terms of features the clone is relatively simple when compared with Flickr. However, you will realize to implement even just a portion of Flickr's core features does take some effort. In this chapter, the building of the clone will take up a significant part of the description. Now let's get on with it!

Configuration

Before we start building the application, let's configure AWS. From the preceding section you would have gotten the AWS access and secret keys. In config.rb we enter these keys.

S3_CONFIG = {}
S3_CONFIG['AWS_ACCESS_KEY'] = '<access key here>'
S3_CONFIG['AWS_SECRET_KEY'] = '<secret key here>'

Then in models.rb, we create a constant called S3 that is an interface to S3. We set this interface to be multi-threaded and to use HTTP as its protocol. We need the interface to be multi-threaded because we need interface...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image