27.02.2013 Views

Rails%203%20In%20Action

Rails%203%20In%20Action

Rails%203%20In%20Action

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

xii<br />

13<br />

14<br />

CONTENTS<br />

12.2 Subscribing to updates 325<br />

Testing comment subscription 325 ■ Automatically adding a user<br />

to a watchlist 327 ■ Unsubscribing from ticket notifications 328<br />

12.3 Real-world email 333<br />

Testing real-world email 334 ■ Configuring Action Mailer 336<br />

Connecting to Gmail 337<br />

12.4 Receiving emails 340<br />

Setting a reply-to address 340 ■ Receiving a reply 342<br />

12.5 Summary 345<br />

Designing an API 347<br />

13.1 The projects API 349<br />

Your first API 351 ■ Serving an API 354 ■ API<br />

authentication 355 ■ Error reporting 356 ■ Serving<br />

XML 358 ■ Creating projects 360 ■ Restricting access to only<br />

admins 362 ■ A single project 365 ■ No project for you! 368<br />

Updating a project 370 ■ Exterminate! 372<br />

13.2 Beginning the tickets API 374<br />

13.3 Rate limiting 377<br />

One request, two request, three request, four 377 ■ No more,<br />

thanks! 379 ■ Back to zero 380<br />

13.4 Versioning an API 381<br />

Creating a new version 381<br />

13.5 Summary 384<br />

Deployment 385<br />

14.1 Server setup 386<br />

Setting up a server using VirtualBox 386 ■ Installing the<br />

base 388<br />

14.2 RVM and Ruby 389<br />

Installing RVM 389 ■ Installing Ruby 390<br />

14.3 Creating a user for the app 391<br />

Key-based authentication 391 ■ Disabling password<br />

authentication 393<br />

14.4 The database server 394<br />

Creating a database and user 394 ■ Ident authentication 395

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!