Skip to content

Instantly share code, notes, and snippets.

View rsutphin's full-sized avatar

Rhett Sutphin rsutphin

  • Human Practice, Inc.
  • Chicago, Illinois
View GitHub Profile
@rsutphin
rsutphin / script.md
Created March 19, 2010 21:17
Script to reproduce bundler issue 210

Generate app

$ rails -m http://gist.github.com/raw/338169/3a1d8e8eb1dde41479d2606019c0df031df7d872/rails23-bundler-template.rb foo
$ cd foo

Add a gem which provides generators to the Gemfile

source :gemcutter
gem 'rails', '2.3.5', :require => nil

gem 'sqlite3-ruby'

@rsutphin
rsutphin / module_super_with_alias.rb
Created March 31, 2010 14:13
MRI 1.8.x quirk with alias and super for included modules
module A
def foo
"a"
end
alias bar foo
end
module B
def foo
Gem::Specification.new do |s|
s.name = "A"
s.version = "0.0.0"
s.summary = "Gem A"
end
@rsutphin
rsutphin / build.yaml
Created May 26, 2010 18:44
Demonstration for ivy4r issue #3
gems:
- ivy4r
ivy:
settings.file: ivysettings.xml
@rsutphin
rsutphin / build.yaml
Created May 26, 2010 21:52
Demonstrates ivy4r issues #6 and #4
gems:
- ivy4r
ivy:
settings.file: ivysettings.xml
define 'foo' do
Java.java.lang.System.setProperty("foo", "bar")
end
@rsutphin
rsutphin / mongrel-handled.txt
Created September 10, 2010 14:35
Example for rack/rack issue 52
# server running with `rackup -s mongrel multiple.ru`
$ curl -v http://127.0.0.1:9292/
* About to connect() to 127.0.0.1 port 9292 (#0)
* Trying 127.0.0.1... connected
* Connected to 127.0.0.1 (127.0.0.1) port 9292 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.20.0 (i386-apple-darwin10.3.0) libcurl/7.20.0 OpenSSL/0.9.8n zlib/1.2.5 libidn/1.18
> Host: 127.0.0.1:9292
> Accept: */*
@rsutphin
rsutphin / multiple.ru
Created September 10, 2010 16:23
Example for thin issue #20
run proc { |env|
[
200,
{ "Content-Type" => "text/plain", "X-Foo" => "Bar\nBaz" },
["Foo?\n"]
]
}
@rsutphin
rsutphin / .gitignore
Created January 23, 2011 22:55
Odd problem with decimal PKs and validation failures in ActiveRecord's save! on JRuby
Gemfile.lock
*.sqlite3
@rsutphin
rsutphin / Gemfile
Created April 1, 2011 16:13
Test case for JRuby/1.9 mode/bundler-for-gem problem
gemspec