This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
log 'Install devise gem 1.1.pre4' | |
inject_into_file "./Gemfile", :after => "# Bundle the extra gems:" do | |
"\n gem 'devise', '1.1.rc1' \n\n" | |
end | |
log 'Collect the gems your application requires' | |
run 'bundle install' | |
log 'Rails generate devise_install' | |
run "rails g devise_install" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
log 'Set Gemfile to Rails 3.0.0.beta3' | |
run 'rm Gemfile' | |
file 'Gemfile', <<-GEMFILE | |
source 'http://rubygems.org' | |
# Bundle edge Rails & Rack: | |
gem 'rails', '3.0.0.beta3', :git => 'git://github.com/rails/rails.git' | |
gem 'rack', '1.1.0', :git => 'git://github.com/rails/rack.git' | |
gem 'rack-mount' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Started GET "/" for 127.0.0.1 at 2010-05-08 00:11:36 | |
Processing by TemplatesController#index as HTML | |
SQL (1.7ms) SELECT name | |
FROM sqlite_master | |
WHERE type = 'table' AND NOT name = 'sqlite_sequence' | |
Template Load (0.3ms) SELECT "templates".* FROM "templates" | |
Rendered templates/index.html.haml within layouts/application (9.1ms) | |
Completed 200 OK in 118ms (Views: 24.8ms | ActiveRecord: 1.9ms) | |
/home/lsoave/.bundle/ruby/1.8/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/actionpack/lib/action_dispatch/http/mime_type.rb:98: warning: already initialized constant RB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Started POST "/templates" for 127.0.0.1 at 2010-05-08 00:16:07 | |
Processing by TemplatesController#create as HTML | |
Parameters: {"authenticity_token"=>"SM2KzyqIu6mhVxIvGpwxkhnJML/MVEkNg5sIM2O/gOI="} | |
SQL (0.8ms) INSERT INTO "templates" ("created_at", "global_options", "name", "updated_at") VALUES ('2010-05-07 22:16:07.475718', NULL, NULL, '2010-05-07 22:16:07.475718') | |
Redirected to http://localhost:3000/templates/1 | |
Completed 302 Found in 58ms | |
/home/lsoave/.bundle/ruby/1.8/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/actionpack/lib/action_dispatch/http/mime_type.rb:98: warning: already initialized constant RB | |

# Created by RailsBoost.com
# Generated at Sat May 08 00:16:07 +0200 2010
# Generator by Hampton Catlin | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# checkout: http://github.com/igrigorik/async-rails/ | |
From bb2a78858cffa7c6937642986e9aca1a4f862c0d Mon Sep 17 00:00:00 2001 | |
From: Ilya Grigorik <[email protected]> | |
Date: Thu, 10 Jun 2010 00:46:48 -0400 | |
Subject: [PATCH] async rails3 | |
--- | |
Gemfile | 6 ++++++ | |
app/controllers/widgets_controller.rb | 6 ++++++ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/integrity/builder.rb b/lib/integrity/builder.rb | |
index 6968d9e..691ff70 100644 | |
--- a/lib/integrity/builder.rb | |
+++ b/lib/integrity/builder.rb | |
@@ -46,7 +46,8 @@ module Integrity | |
end | |
def run | |
- cmd = "(cd #{repo.directory} && #{@build.project.command} 2>&1)" | |
+ cmd = "(cd #{repo.directory} && RUBYOPT=#{pre_bundler_rubyopt} PATH=#{pre_bundler_path} && #{@build.project.command} 2>&1)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'eventmachine' | |
require 'em-websocket' | |
require 'json' | |
class Connection | |
attr_accessor :socket, :user_id | |
def initialize(socket, user_id) | |
@socket = socket |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'benchmark' | |
require 'rubygems' | |
require 'nokogiri' | |
require 'yajl' | |
require 'active_support' | |
ActiveSupport::XmlMini.backend='Nokogiri' | |
require 'active_resource' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://snippets.aktagon.com/snippets/445-How-to-create-a-JSONP-cross-domain-webservice-with-Sinatra-and-Ruby | |
require 'sinatra/base' | |
require 'json/pure' | |
module JSONPatra | |
class App < Sinatra::Base | |
get "/" do | |
callback = params['callback'] | |
json = { :hello => "world!" }.to_json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SampleApp < Padrino::Application | |
register Padrino::Warden | |
Warden::Strategies.add(:password) do | |
def valid? | |
params["email"] || params["password"] | |
end | |
def authenticate! | |
u = Account.authenticate(params["email"], params["password"]) |