save_and_open_page
have_button(locator)
module RackHeaderHack | |
def set_headers(headers) | |
driver = page.driver | |
def driver.env | |
@env.merge(super) | |
end | |
def driver.env=(env) | |
@env = env | |
end | |
driver.env = headers |
class CustomError < StandardError | |
def initialize(e = nil) | |
super e | |
set_backtrace e.backtrace if e | |
end | |
end | |
def run | |
r = Runner.new | |
r.fail |
class API::V1::BaseController < ApplicationController | |
skip_before_filter :verify_authenticity_token | |
before_filter :cors_preflight_check | |
after_filter :cors_set_access_control_headers | |
def cors_set_access_control_headers | |
headers['Access-Control-Allow-Origin'] = '*' | |
headers['Access-Control-Allow-Methods'] = 'POST, GET, PUT, DELETE, OPTIONS' |
UPDATE pg_database SET datallowconn = TRUE WHERE datname = 'template0'; | |
\c template0 | |
UPDATE pg_database SET datistemplate = FALSE WHERE datname = 'template1'; | |
DROP DATABASE template1; | |
CREATE DATABASE template1 WITH TEMPLATE = 'template0'; | |
\c template1 | |
UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template1'; | |
UPDATE pg_database SET datallowconn = FALSE WHERE datname = 'template0'; |