save_and_open_page
have_button(locator)| group :production do | |
| gem 'unicorn' | |
| # Enable gzip compression on heroku, but don't compress images. | |
| gem 'heroku-deflater' | |
| # Heroku injects it if it's not in there already | |
| gem 'rails_12factor' | |
| end |
| // clear canvas | |
| canvas.clear(); | |
| // add red rectangl | |
| canvas.add(new fabric.Rect({ | |
| width: 50, height: 50, left: 50, top: 50, fill: 'rgb(255,0,0)' | |
| })); | |
| canvas.add(new fabric.Rect({ | |
| width: 50, height: 50, left: 110, top: 50, fill: 'rgb(255,0,0)' |
| require 'rspec' | |
| describe "Behaviour" do | |
| it "should pass" do | |
| true.should eq true | |
| end | |
| it "should fail" do | |
| true.should eq false | |
| end |
| # define a method to run rake tasks | |
| def run_rake(task, options={}, &block) | |
| rake = fetch(:rake, 'rake') | |
| rails_env = fetch(:rails_env, 'production') | |
| command = "cd #{current_path} && #{rake} #{task} RAILS_ENV=#{rails_env}" | |
| run(command, options, &block) | |
| end |
| # initializers/devise.rb | |
| config.omniauth :facebook, [APP_ID], [APP_SECRET] | |
| config.omniauth :facebook_app1, [APP_ID], [APP_SECRET], :iframe => true, :scope => 'publish_stream,offline_access,email' | |
| config.omniauth :facebook_app2, [APP_ID], [APP_SECRET], :iframe => true, :scope => 'publish_stream,offline_access,email' |
| psql postgres -c "create database circular_fkeys_left" | |
| psql circular_fkeys_left <<EOS | |
| create table foos(id integer primary key, bar_id integer); | |
| create table bars(id integer primary key, foo_id integer); | |
| insert into foos(id, bar_id) values(1, 5); | |
| insert into bars(id, foo_id) values(5, 1); | |
| alter table foos add constraint bar_fk foreign key(bar_id) references bars; | |
| alter table bars add constraint foo_fk foreign key(foo_id) references foos; | |
| EOS |