20

RORO May Lightning Preso Madness

Embed Size (px)

DESCRIPTION

My 4 preso mixed bag from the May RORO Sydney meetup

Citation preview

Page 2: RORO May Lightning Preso Madness
Page 3: RORO May Lightning Preso Madness
Page 4: RORO May Lightning Preso Madness

CufonFast text replacement with canvas and VML - no Flash or images required.

Page 5: RORO May Lightning Preso Madness
Page 6: RORO May Lightning Preso Madness
Page 7: RORO May Lightning Preso Madness

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html> <head> <script src="cufon.js" type="text/javascript"></script> <script src="fontin.font.js" type="text/javascript"></script> <script type="text/javascript"> Cufon.replace("h1"); </script> </head> <body> <h1>Look mah, it's Fontin!</h1> </body></html>

Page 8: RORO May Lightning Preso Madness
Page 9: RORO May Lightning Preso Madness
Page 10: RORO May Lightning Preso Madness

ValidationsVIEW-FIRST

Page 11: RORO May Lightning Preso Madness
Page 12: RORO May Lightning Preso Madness

Cucumber StoriesSIMPLIFYING

Page 13: RORO May Lightning Preso Madness
Page 14: RORO May Lightning Preso Madness

Feature: Administering school subscriptions

In order to manage a school's textbook subscriptions As a super user I want to be add and remove textbooks from a school's subscriptions Scenario: index Given I am logged in as a super-user And a school "Gymea Tech" exists When I go to the school admin book subscriptions for "Gymea Tech" Then I see the page

Page 15: RORO May Lightning Preso Madness

Feature: Administering school subscriptions

In order to manage a school's textbook subscriptions As a super user I want to be add and remove textbooks from a school's subscriptions Scenario: index Given I am logged in as a super-user And a school "Gymea Tech" exists When I go to the school admin book subscriptions for "Gymea Tech" Then I see the page

Page 16: RORO May Lightning Preso Madness

def path_to(page_name) case page_name when /^the homepage$/ root_path

when /^the books page$/ books_path

when /^the login page$/ login_path when /^logout$/ logout_path when /^the forgot password page$/ new_forgot_password_path

when /^the register page$/ register_path

when /^the admin$/ admin_path when /^the super\-users admin$/ admin_super_users_path when /^the schools admin$/ admin_schools_path

when /^new school admin$/ new_admin_school_path when /^the school admin for "(.*)"$/ admin_school_path(school_with_name($1)) when /^the school admin book subscriptions for "(.*)"$/ admin_school_book_subscriptions_path(school_with_name($1))

when /^the admin school admins path for "(.*)"$/ admin_school_admins_path(school_with_name($1)) when /^the book homepage for "(.*)"$$/ book_path(book_with_title($1))

when /^the first article in "(.*)"$/ book = book_with_title($1) book_article_path(book, book.articles.first)

when /^the text version of the first article in "(.*)"$/ book = book_with_title($1) book_article_path(book, book.articles.first, "text") when /^the image path "(.*)" for "(.*)"$/ book_image_path(book_with_title($2), $1.split("/")) else raise "Mapping from \"#{page_name}\" to a path not defined" endend

Page 17: RORO May Lightning Preso Madness

Feature: Feedback form

Scenario: submitting feedback w/ an email address Given logged in When post /feedback with {:email => "[email protected]"} Then response 302 to /feedback/thanks?reply=true And [email protected] receives an email

Page 18: RORO May Lightning Preso Madness

When /^post ([^\s]+) with (\{.*\})$/ do |path, params| post path, eval(params)end

Page 19: RORO May Lightning Preso Madness
Page 20: RORO May Lightning Preso Madness

TIM LUCASTWITTER.COM/TOOLMANTIM

TOOLMANTIM.COM