NOTE: This is outdated. Check the comments below for more up-to-date forks of this gist.
Improved YARD CHEATSHEET http://yardoc.org
forked from https://gist.github.com/chetan/1827484 which is from early 2012 and contains outdated information.
NOTE: This is outdated. Check the comments below for more up-to-date forks of this gist.
forked from https://gist.github.com/chetan/1827484 which is from early 2012 and contains outdated information.
require 'prawn' | |
require 'prawn/measurements' | |
# I have a small collection of links to the resources I used to figure all | |
# this out: http://pinboard.in/u:fidothe/t:pdfx | |
module PDFX | |
class PageBox | |
include Prawn::Measurements | |
attr_reader :bleed_mm |
if [ -f "$rvm_path/scripts/rvm" ]; then | |
source "$rvm_path/scripts/rvm" | |
if [ -f ".rvmrc" ]; then | |
source ".rvmrc" | |
fi | |
if [ -f ".ruby-version" ]; then | |
rvm use `cat .ruby-version` | |
fi |
## Most important settings
Create a new facebook app (1) and make sure the canvas url (2) in the basic tab matches the host and port configured with Capybara.server_port and Capybara.app_host. Activating sandbox mode (3) in the advanced tab enables you to roll without providing an SSL canvas url. You want to set the display mode (4) of your facebook dialogs to page, which is also the default.
framework "WebKit" | |
class Widget | |
class RPC | |
class << self | |
public :include | |
end | |
def initialize(widget) | |
@widget = widget |
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |