This file contains hidden or 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
on "#list" do | |
map :bgcolor => :color | |
@members.each_with_index do |m, i| | |
element(:bgcolor => i % 2 == 0 ? '#FFCCCC' : '#CCCCFF') | |
end | |
end | |
on("#name").tag.content = @member.name | |
This file contains hidden or 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 Calculator < Omerta::Grammar | |
def initialize | |
@vars = {} | |
end | |
rule :space => ' ' | |
rule(:var => "<letter>:x <space>*") { |x| x } | |
rule :num do |
This file contains hidden or 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
module ModelTemplates | |
@@cache = {} | |
def self.cache; @@cache end | |
def self.included target | |
target.extend ClassMethods | |
end | |
def assign_model_template_attributes model, attributes | |
model.send :attributes=, attributes, false |
This file contains hidden or 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 adjacent | |
# by John Barnette | |
# to annoy Josh Susser and Aaron Patterson | |
# use to require files relative to the current file: | |
# | |
# require adjacent("foo") # require current-dir/lib | |
# require adjacent("lib", "foo") # joins path segments so you don't have to | |
module Kernel |
This file contains hidden or 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
Stuart Mackenzie: Well, it's a well known fact, Sonny Jim, that there's a secret | |
society of the five wealthiest people in the world, known as | |
The Pentavirate, who run everything in the world, including | |
the newspapers, and meet tri-annually at a secret country | |
mansion in Colorado, known as The Meadows. | |
Tony Giardino: So who's in this Pentavirate? | |
Stuart Mackenzie: The Queen, The Vatican, The Gettys, The Rothschilds, AND | |
Colonel Sanders before he went tits up. Oh, I hated the |
This file contains hidden or 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/hoe/git.rb b/lib/hoe/git.rb | |
index 463d5c0..c51e70b 100644 | |
--- a/lib/hoe/git.rb | |
+++ b/lib/hoe/git.rb | |
@@ -60,6 +60,18 @@ class Hoe #:nodoc: | |
puts | |
end | |
+ desc "Update the manifest with Git's file list. Use Hoe's excludes." | |
+ task "git:manifest" do |
This file contains hidden or 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
RAILS_ROOT ||= ENV["RAILS_ROOT"] | |
namespace :bundle do | |
js_bundle = Rails.root + "/public/javascripts/bundle.js" | |
js_files = Dir[Rails.root + "/public/javascripts/{github,jquery}.*.js"].sort | |
task :all => [ js_bundle, :gist_js, :css ] | |
file js_bundle => js_files do |task| | |
require 'lib/js_minimizer' |
This file contains hidden or 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
# e.g., | |
# rake db:pg test | |
# ...swaps database.yml, runs the tests, and swaps back to the default. | |
# | |
# I have: | |
# config/database.yml | |
# config/database.pg.yml | |
# config/database.sqlite.yml | |
def temporarily_swap_db_to engine |
This file contains hidden or 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
1) | |
'Bundler::Environment only requires gems specific to the requested environment' FAILED | |
expected: "nil", | |
got: "" (using ==) | |
/Users/jbarnette/work/bundler/spec/bundler/environment_spec.rb:31:in `block (3 levels) in <top (required)>' | |
/Users/jbarnette/work/bundler/spec/bundler/environment_spec.rb:25:in `chdir' | |
/Users/jbarnette/work/bundler/spec/bundler/environment_spec.rb:25:in `block (2 levels) in <top (required)>' | |
/opt/local/lib/ruby1.9/1.9.1/timeout.rb:44:in `timeout' | |
2) |
This file contains hidden or 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
(in /Users/drnic/newproj) | |
rake announce # publish # Announce your release. | |
rake check_extra_deps # deps # Install missing dependencies. | |
rake check_manifest # debug # Verify the manifest. | |
rake clean # # Clean up all the extras. | |
rake config_hoe # debug # Create a fresh ~/.hoerc file. | |
rake debug_email # publish # Generate email announcement file. | |
rake debug_gem # debug # Show information about the gem. | |
rake deps:email # deps # Print a contact list for gems dependent on this gem | |
rake deps:fetch # deps # Fetch all the dependent gems of this gem into tarballs |