Skip to content

Instantly share code, notes, and snippets.

View jackdempsey's full-sized avatar

jack dempsey jackdempsey

View GitHub Profile
desc 'wipe', 'Uninstall all RubyGems related to Merb'
def wipe
windows = PLATFORM =~ /win32|cygwin/ rescue nil
sudo = windows ? "" : "sudo"
`gem list merb`.split("\n").each do |line|
next unless line =~ /^(merb[^ ]+)/
system("#{sudo} gem uninstall #{$1} -a -I -x; true")
end
system("#{sudo} gem uninstall extlib -a -I -x")
end
~ $ mkdir foo
~ $ cd !$
cd foo
~/foo $ thor -T
Tasks
-----
merb:stable [--merb-root=MERBROOT] [--adapter=ADAPTER] Install extlib, merb-core and merb-more from rubygems
merb:edge [--sources=SOURCES] [--merb-root=MERBROOT] [--install] Install extlib, merb-core and merb-more from git HEAD
merb:stable:core [--merb-root=MERBROOT] Install extlib and merb-core from git HEAD
merb:stable:more [--merb-root=MERBROOT] Install merb-more from rubygems
To Start:
Dirty Goose Martini, straight up - 3 olives, 1 each with pimento, blue cheese, and jalapeno stuffing. At first I
didn't like pepper taste (and I love jalapenos) but it kind of grew on me as I realized over time each olive
gives the drink a different flavor. Unique drink.
Small plate of these sesame green beans with candied walnuts - very simple but really great.
Spicy Tuna Tartare, Sesame–Miso Cones, Shaved Bonito, Tobiko - a couple of these, complimentary...sooo good.
A perfect amount of wasabi. This was the first of several moments of the night that reminded me, its ok to
irb~ $ irb
>> require 'rubygems'
=> false
>> require 'rr'
=> true
>> extend RR::Adapters::RRMethods
=> main
>> mock(o = Object.new).foo.mock.bar { 'hi' }
=> #<RR::DoubleDefinition:0x22b7cb0 @block_callback_strategy=:returns, @yields_value=nil, @implementation=#<Proc:0x022bbba8@(irb):4>, after_call_valuenil, double#<RR::Double:0x22b7c88 @times_called_expectation=#<RR::Expectations::TimesCalledExpectation:0x22b6f04 @verify_backtrace=["/usr/local/lib/ruby/gems/1.8/gems/rr-0.5.0/lib/rr/double.rb:26:in `initialize'", "/usr/local/lib/ruby/gems/1.8/gems/rr-0.5.0/lib/rr/double_definition_creator.rb:88:in `new'", "/usr/local/lib/ruby/gems/1.8/gems/rr-0.5.0/lib/rr/double_definition_creator.rb:88:in `setup_double'", "/usr/local/lib/ruby/gems/1.8/gems/rr-0.5.0/lib/rr/double_definition_creator.rb:59:in `create'", "/usr/local/lib/ruby/gems/1.8/gems/rr-0.5.0/lib/rr/double_definition_creator_proxy.rb:14:in `method_missing'", "(irb):4:in `irb_binding'", "/usr/local/lib/ruby/1.8/irb/workspace.rb:52:in `irb_binding'", "
# If you want modules and classes from libraries organized like
# merbapp/lib/magicwand/lib/magicwand.rb to autoload,
# uncomment this.
# Merb.push_path(:lib, Merb.root / "lib") # uses **/*.rb as path glob.
# This is the mechanism for setting up your application layout.
# There are three application layouts in Merb:
#
# 1. Regular app/:type layout of Ruby on Rails fame:
#
# app/models for models
# app/mailers for mailers (special type of controllers)
# app/parts for parts, Merb components
# app/views for templates
# app/controllers for controller
#!/bin/sh
# (C) 2002-2003 Dan Allen and Stefan Kamphausen
# Written by Dan Allen <[email protected]>
# - small additions by Stefan Kamphausen
# - better completion code by Robi Malik [email protected]
# - trailing path support by Damon Harper <[email protected]> Feb 2006
# Globals
#
# bash completion support for core Git.
#
# Copyright (C) 2006,2007 Shawn O. Pearce <[email protected]>
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).
# Distributed under the GNU General Public License, version 2.0.
#
# The contained completion routines provide support for completing:
#
# *) local and remote branch names
alias clean_gems='for i in `gem list merb | cut -f1 -d" " | grep merb | xargs`; do sudo gem cleanup $i --quiet; done'
alias up='[ -d .svn ] && svn up || (git fetch && git rebase origin/master)'
alias rmt="find . -name '*~' -exec rm {} \;"
export PS1='\w `git-branch 2>&1 | grep "*" | awk -F" " "{print \\\$2}"`\$ '
source ~/bin/cdargs-bash.sh # located at http://gist.github.com/21769
source ~/bin/git-completion.bash # located at http://gist.github.com/21770
complete -o default -o nospace -F _git_checkout gco
diff --git a/merb_datamapper/lib/generators/data_mapper_model.rb b/merb_datamapper/lib/generators/data_mapper_model.rb
index 9bc6f78..5b31c92 100644
--- a/merb_datamapper/lib/generators/data_mapper_model.rb
+++ b/merb_datamapper/lib/generators/data_mapper_model.rb
@@ -9,7 +9,7 @@ class Merb::Generators::ModelGenerator
end
def after_generation
- STDOUT << message("Don't forget to define the model schema in your #{file_name.capitalize} class")
+ STDOUT << message("Don't forget to define the model schema in your #{file_name.gsub(/\/(.?)/) { "::" + $1.upcase }.gsub(/(^|_)(.)/) { $2.upcase