Skip to content

Instantly share code, notes, and snippets.

View halorgium's full-sized avatar

Tim Carey-Smith halorgium

View GitHub Profile
#define IN_ACCESS 0x00000001 /* File was accessed */
#define IN_MODIFY 0x00000002 /* File was modified */
#define IN_ATTRIB 0x00000004 /* Metadata changed */
#define IN_CLOSE_WRITE 0x00000008 /* Writtable file was closed */
#define IN_CLOSE_NOWRITE 0x00000010 /* Unwrittable file closed */
#define IN_OPEN 0x00000020 /* File was opened */
#define IN_MOVED_FROM 0x00000040 /* File was moved from X */
#define IN_MOVED_TO 0x00000080 /* File was moved to Y */
#define IN_CREATE 0x00000100 /* Subfile was created */
#define IN_DELETE 0x00000200 /* Subfile was deleted */
---
publish_on_announce: false
exclude: !ruby/regexp /tmp$|CVS|\.svn|\.git|\/\._|\/\..*\.sw\w|\.gemspec/
signing_key_file: ~/.gem/gem-private_key.pem
signing_cert_file: ~/.gem/gem-public_cert.pem
blogs:
- user: user
url: url
extra_headers:
mt_convert_breaks: markdown
diff --git a/merb-action-args/lib/merb-action-args/get_args.rb b/merb-action-args/lib/merb-action-args/get_args.rb
index 7eca955..0487b76 100644
--- a/merb-action-args/lib/merb-action-args/get_args.rb
+++ b/merb-action-args/lib/merb-action-args/get_args.rb
@@ -83,7 +83,7 @@ unless RUBY_PLATFORM == "java"
klass, meth = self.to_s.split(/ /).to_a[1][0..-2].split("#")
# Remove stupidity for #<Method: Class(Object)#foo>
klass = $` if klass =~ /\(/
- ParseTreeArray.translate(Object.const_get(klass), meth).get_args
+ ParseTreeArray.translate(Object.full_const_get(klass), meth).get_args
# dm-core branches
1212607349 2008-06-04 14:22:29 -0500 db40b2fcba7e239f00f5056f33961fd5d389d33a origin/extlib-integration
1214517249 2008-06-26 17:54:09 -0400 a74d23f5fe892d6ff2789db4bdee31f822bbcd06 origin/visibility_api_clean_up
1215018544 2008-07-02 12:09:04 -0500 1c70f1e958374ba670dc8028e2ae4c17c6b39a5c origin/sel
1219823744 2008-08-27 09:55:44 +0200 b00eb2cbd5f18dfd2277853c38c4be6e000acff3 origin/prune
1225510008 2008-10-31 22:26:48 -0500 e5df3f6a58ae7e591f188359e33984fbccea9cfd origin/HEAD
1225510008 2008-10-31 22:26:48 -0500 e5df3f6a58ae7e591f188359e33984fbccea9cfd origin/ast
1225510008 2008-10-31 22:26:48 -0500 e5df3f6a58ae7e591f188359e33984fbccea9cfd origin/master
diff --git a/merb-core/spec/public/abstract_controller/spec_helper.rb b/merb-core/spec/public/abstract_controller/spec_helper.rb
index fd1b282..fcb6d9c 100644
--- a/merb-core/spec/public/abstract_controller/spec_helper.rb
+++ b/merb-core/spec/public/abstract_controller/spec_helper.rb
@@ -15,12 +15,9 @@ module Merb::Test::Behaviors
def dispatch_should_make_body(klass, body, action = :index, opts = {}, env = {}, &blk)
klass = Merb::Test::Fixtures::Abstract.const_get(klass)
- if opts.key?(:presets)
- controller = klass.new
# The crutial thing here is that the work inside "run" is only done once.
# There should be no side-effects inside the examples
Spec.describe "When making a request to '/login'" do
describe "as an unauthenticated user" do
run do
@response = request("/login")
end
it "returns a 401 status" do
diff --git a/rubygems.rb b/rubygems.rb
index e85d97c..8fa9466 100644
--- a/rubygems.rb
+++ b/rubygems.rb
@@ -102,6 +102,7 @@ module Gem
@configuration = nil
@loaded_specs = {}
+ @loaded_stacks = {}
@platforms = []
diff --git a/merb-core/lib/merb-core/dispatch/dispatcher.rb b/merb-core/lib/merb-core/dispatch/dispatcher.rb
index cbd5cf3..ffe9234 100644
--- a/merb-core/lib/merb-core/dispatch/dispatcher.rb
+++ b/merb-core/lib/merb-core/dispatch/dispatcher.rb
@@ -124,33 +124,26 @@ module Merb
#
# :api: private
def dispatch_exception(exception)
+ exceptions.unshift exception
+
@halorgium
halorgium / app.rb
Created June 2, 2009 03:01 — forked from kematzy/app.rb
# Example of how to use multiple Routes in external files/modules
require 'rubygems'
require 'sinatra/base'
# set the root of the whole app
APP_ROOT = File.dirname(File.expand_path(__FILE__)) unless defined?(APP_ROOT)
require "sinatra-external_routes_example"
@halorgium
halorgium / gist:1221268
Created September 16, 2011 05:24 — forked from mkb/gist:1218376
#!/usr/bin/env ruby -wKU
@actions = Hash.new {|h,k| h[k] = []}
def tell_program(name, &block)
@actions['songstart'] << lambda do |*args|
IO.popen("osascript", "w") do |f|
f.puts %Q{
tell application "System Events"
if exists process "#{name}" then