Skip to content

Instantly share code, notes, and snippets.

@simonjefford
simonjefford / merb-core dependencies patch
Created August 10, 2008 20:28
A patch to merb-core and merb-freezer that adds functionality like rails config.gem
lib/merb-core/bootloader.rb | 6 +-----
lib/merb-core/config.rb | 7 +++++++
lib/merb-core/core_ext/kernel.rb | 5 +++--
spec/private/core_ext/kernel_spec.rb | 2 +-
4 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/lib/merb-core/bootloader.rb b/lib/merb-core/bootloader.rb
index 5853c1a..585cfd0 100644
--- a/lib/merb-core/bootloader.rb
@simonjefford
simonjefford / gist:6856
Created August 22, 2008 21:17
How can I make this work?
module URI
def self.parse_with_options(uri_str, opts = {})
parsed_uri = self.parse(uri_str)
class << parsed_uri
def options
opts
end
end
parsed_uri
end
@simonjefford
simonjefford / thisweek
Created March 10, 2009 11:11
A script which uses the Leopard calendar tool to show one week of events. Works great with GeekTool
#!/usr/bin/ruby
require 'rubygems'
require 'osx/cocoa'
include OSX
NSBundle.bundleWithPath("/System/Library/Frameworks/CalendarStore.framework").load
ns_import :CalendarStore
class NSDate
#!/usr/bin/ruby
require 'rubygems'
require 'osx/cocoa'
include OSX
NSBundle.bundleWithPath("/System/Library/Frameworks/CalendarStore.framework").load
ns_import :CalendarStore
class NSDate
@simonjefford
simonjefford / firebug_logger.rb
Created October 14, 2009 13:20
My CodeRack competition entry
# See also http://github.com/simonjefford/rack_firebug_logger
# for this middleware + tests + a rails plugin
class FirebugLogger
def initialize(app, options = {})
@app = app
@options = options
end
def call(env)
dup._call(env)
directory "vendor/rails", :glob => "{*/,}*.gemspec"
git "git://github.com/rails/arel.git"
git "git://github.com/rails/rack.git"
gem "rails", "3.0.pre"
git "git://github.com/thoughtbot/paperclip.git"
gem "paperclip"
diff --git a/actionpack/test/controller/capture_test.rb b/actionpack/test/controller/capture_test.rb
index 06a5af6..d1dbd53 100644
--- a/actionpack/test/controller/capture_test.rb
+++ b/actionpack/test/controller/capture_test.rb
@@ -61,6 +61,11 @@ class CaptureTest < ActionController::TestCase
assert_equal expected_content_for_output, @response.body
end
+ def test_proper_block_detection
+ @todo = "some todo"
self.window.rootViewController = self.testDocsController;
[[self window] setRootViewController:[self testDocsController]];
info it worked if it ends with ok
verbose cli [ 'node',
verbose cli '/Users/simon/code/npm/cli.js',
verbose cli 'install',
verbose cli '-g',
verbose cli '-f' ]
info using [email protected]
info using [email protected]
verbose config file /Users/simon/.npmrc
verbose config file /usr/local/etc/npmrc
Backtrace:
0: clojure.lang.Reflector.invokeConstructor(Reflector.java:163)
1: currency_puzzle.rates$convert.invoke(rates.clj:46)
[No Locals]
2: currency_puzzle.core$_main$fn__2204.invoke(core.clj:9)