For some reason, #submit isn't part of Capybara's public API.
For reference, here is Capybara's ...
:sunny: | |
:zap: | |
:leaves: | |
:lipstick: | |
:cop: | |
:wheelchair: | |
:fish: | |
:hammer: | |
:moneybag: | |
:calling: |
def tip(msg); puts; puts msg; puts "-"*100; end | |
# | |
# 30 Ruby 1.9 Tips, Tricks & Features: | |
# http://www.igvita.com/2011/02/03/new-ruby-19-features-tips-tricks/ | |
# | |
tip "Upgrading to Ruby 1.9 is simple: rvm install 1.9.2 && rvm --default 1.9.2" | |
tip "Ruby 1.9 supports named captures in regular expressions!" |
/* | |
As of version 1.1.2, Propane will load and execute the contents of | |
~/Library/Application Support/Propane/unsupported/caveatPatchor.js | |
immediately following the execution of its own enhancer.js file. | |
You can use this mechanism to add your own customizations to Campfire | |
in Propane. | |
Below you'll find two customization examples. |
For some reason, #submit isn't part of Capybara's public API.
For reference, here is Capybara's ...
module RubyExt | |
module Boolean | |
module ClassMethods | |
def boolean? | |
["TrueClass", "FalseClass"].include?(self.name) | |
end | |
end | |
module InstanceMethods | |
def boolean? |
function rake { | |
if [ -e Gemfile ]; then | |
bundle exec rake $@ | |
else | |
`which rake` $@ | |
fi | |
} |
# Ruby 1.9 Fast require: | |
# https://gist.github.com/1008945 | |
curl https://raw.github.com/gist/1008945/7532898172cd9f03b4c0d0db145bc2440dcbb2f6/load.patch > load.patch | |
# Ruby 1.9.2 GC Patch: | |
# https://gist.github.com/856296 | |
curl https://raw.github.com/gist/856296/a19ac26fe7412ef398bd9f57e61f06fef1f186fe/patch-1.9.2-gc.patch > gc.patch | |
rvm install 1.9.2-p180 --patch load.patch,gc.patch -n loadgc | |
rm gc.patch load.patch |
def set_mobile_agent | |
page.driver.header('User-Agent', 'iPhone') | |
end | |
def js_click(selector) | |
page.driver.execute_script "$('##{selector}').click()" | |
end | |
def screenshot | |
require 'capybara/util/save_and_open_page' |
#!/bin/bash | |
# | |
# Check a "few" things to help write more maintainable Go code. | |
# | |
# OK, it's fairly comprehensive. So simply remove or comment out | |
# anything you don't want. | |
# | |
# Don't forget to install (go get) each of these tools. | |
# More info at the URLs provided. | |
# |
upstream app { | |
server unix:/srv/app/current/tmp/sockets/unicorn.sock fail_timeout=0; | |
} | |
server { | |
listen 80; | |
server_name www.app.com; | |
rewrite ^/(.*) http://app.com/$1 permanent; | |
} | |
server { |