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/bundler/cli.rb b/lib/bundler/cli.rb | |
index 3314db0..16e6498 100644 | |
--- a/lib/bundler/cli.rb | |
+++ b/lib/bundler/cli.rb | |
@@ -91,6 +91,8 @@ module Bundler | |
"Don't update the existing gem cache." | |
method_option "quiet", :type => :boolean, :banner => | |
"Only output warnings and errors." | |
+ method_option "no-auto-update", :type => :boolean, :banner => | |
+ "Do not bundle itself" |
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
# temporary monkey patch to apply patch described in: | |
# http://github.com/rack/rack/issues/issue/6 | |
module Rack | |
module Utils | |
module Multipart | |
def self.parse_multipart(env) | |
unless env['CONTENT_TYPE'] =~ | |
%r|\Amultipart/.*boundary=\"?([^\";,]+)\"?|n | |
nil |
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
var sys = require('sys'), | |
http = require('http'), | |
spawn = require('child_process').spawn | |
// this is a simple proxy | |
http.createServer(function(req, res) { | |
// and here is the problem: if I try to do any IO before | |
// proxying (like making another request or spawning) it | |
// freezes the whole thing. |
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
describe 'Bacon and Mocha sucks together' do | |
it "sucks when you have a spec using only mocha, not bacon, to assert something" do | |
str = 'a' | |
str.expects(:size) | |
str.size | |
end | |
end | |
# this raises Bacon::Error: empty specification | |
# after spending 20 minutes trying to fix I decided to just add |
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 Post < Sequel::Model | |
one_to_many :taggings | |
many_to_many :tags, :join_table => :taggings | |
end | |
class Tag < Sequel::Model | |
one_to_many :taggings | |
end | |
class Tagging < Sequel::Model |
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 'sinatra' | |
require 'builder' | |
def home | |
content_type 'text/xml', :charset => 'utf-8' | |
builder do |xml| | |
xml.instruct! | |
xml.Response do | |
xml.Gather("numDigits" => "1", "action" => "press", "method" => "POST") do | |
xml.Say "For a good time, press 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
remote = Rush::Box.new('[email protected]') | |
remote.bash("ls") |
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
# APP_ROOT/config/rackup.ru | |
require File.dirname(__FILE__) + "/../myapp" | |
set_option :run, false | |
set_option :env, :production | |
disable :reload | |
run Sinatra.application | |
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/app/models/hot_slug.rb b/app/models/hot_slug.rb | |
index 9798a94..93718c0 100644 | |
--- a/app/models/hot_slug.rb | |
+++ b/app/models/hot_slug.rb | |
@@ -8,7 +8,14 @@ class HotSlug < ActiveRecord::Base | |
end | |
def railgun_slug | |
- RestClient::Resource.new("http://#{instance.local_ip}:1000/slugs/#{slug}", 'core', 'ASL938i54lDfU') | |
+ RestClient::Resource.new("http://#{instance.local_ip}:1000/slugs/#{slug}", :user => 'core', :password => 'ASL938i54lDfU', :headers => environment) |
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 File.dirname(__FILE__) + "/../app/mailer.rb" | |
set_option :run, false | |
set_option :env, ENV['APP_ENV'] || :development | |
run Sinatra.application | |