Public Gists by jeremymcanally

Gravatar
Sat Nov 21 07:48:30 -0800 2009
1
2
3
[codestuff (master)]$ sudo gem install session
Bulk updating Gem source index for: http://gems.github.com
ERROR: While executing gem ... (Gem::RemoteSourceException)
Gravatar
Wed Nov 04 14:58:12 -0800 2009
1
2
3
class ShapeController < AC::Base
  SHAPES = { 'square' => Shape::Square, 'circle' => Shape::Circle }
 
Gravatar
Sat May 09 21:49:42 -0700 2009
1
2
3
plugin 'restful-authentication', :git => 'git://github.com/technoweenie/restful-authentication.git'
plugin 'open_id_authentication', :git => 'git://github.com/rails/open_id_authentication.git'
plugin 'exception_notifier', :git => 'git://github.com/rails/exception_notification.git'
Gravatar
Wed Apr 15 08:23:52 -0700 2009
1
2
3
def create_from_string(klass, string = "")
  # like calling String.new or something because
  # klass is a variable representing the class you passed in
Gravatar
Mon Apr 06 07:10:37 -0700 2009
1
2
3
def logging_features_deprecated
  # Currently not deprecated; change to true when it is deprecated
  proc { false }
Gravatar
Tue Mar 24 17:11:48 -0700 2009
1
2
3
tags = ["one", "two", "three", "one", "two", "one"]
 
counts = Hash.new(0)
Gravatar
Mon Jan 26 12:18:23 -0800 2009
1
2
3
// Objects
[thing shouldEqual:thing];
 
Gravatar
Sun Jan 25 14:52:49 -0800 2009
1
2
[expect([myArray count]) shouldEqual:3]
[expect([obj isActive]) shouldBeTrue]
Gravatar
Sun Jan 25 11:28:51 -0800 2009
1
2
3
// Rather than:
 
    STAssertEquals(32, [centigradeFreezingPoint intValue],
Gravatar
Sat Jan 24 10:11:40 -0800 2009
1
2
3
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -Ilib:lib:test "/Library/Ruby/Gems/1.8/gems/rake-0.8.3/lib/rake/rake_test_loader.rb" "test/dsl_test.rb" "test/foundry_test.rb"
/Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:442:in `load_missing_constant': uninitialized constant ActiveSupport::MessageVerifier (NameError)
from /Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:77:in `const_missing'
Gravatar
Fri Jan 23 21:42:37 -0800 2009
1
2
3
model User
  factory :valid, :name => "Jeremy", "login" => "jeremy", :admin => false
  factory :admin, :admin => true
Gravatar
Thu Jan 08 14:00:36 -0800 2009
1
2
3
  6) Error:
test_should_show_page(PagesControllerTest::TestWithAnonymous19197610::TestViewing19197450):
ArgumentError: wrong number of arguments (0 for 1)
Gravatar
Sun Jan 04 19:28:16 -0800 2009
1
2
3
~/code/context(master) > sloccount lib/ test/
Creating filelist for lib
Creating filelist for test
Gravatar
Fri Jan 02 10:15:30 -0800 2009
1
2
3
  SQL (0.1ms) SET NAMES 'utf8'
  SQL (0.1ms) SET SQL_AUTO_IS_NULL=0
/!\ FAILSAFE /!\ Fri Jan 02 00:29:13 -0600 2009
Gravatar
Wed Dec 31 15:53:55 -0800 2008
1
2
3
# Put me in an initializer!
module ActionController
  module Routing
Gravatar
Tue Dec 02 08:05:11 -0800 2008
1
2
3
Add "-m/--template" option to Rails generator to apply template to generated application. For example:
 
    # Install plugins from git or svn
Gravatar
Mon Dec 01 17:21:03 -0800 2008
1
2
3
require File.dirname(__FILE__) + '/scm/scm'
require File.dirname(__FILE__) + '/scm/git'
require File.dirname(__FILE__) + '/scm/svn'
Gravatar
Mon Nov 17 16:01:21 -0800 2008
1
2
3
/Users/jeremymcanally/code/modular/vendor/rails/activesupport/lib/active_support/dependencies.rb:571:in `to_constant_name': Anonymous modules have no name to be referenced by (ArgumentError)
from /Users/jeremymcanally/code/modular/vendor/rails/activesupport/lib/active_support/dependencies.rb:383:in `qualified_name_for'
from /Users/jeremymcanally/code/modular/vendor/rails/activesupport/lib/active_support/dependencies.rb:101:in `const_missing'
Gravatar
Sat Nov 15 07:37:28 -0800 2008
1
2
3
module ActionController
  module Routing
    class RouteSet
Gravatar
Thu Oct 23 08:40:37 -0700 2008
1
2
3
template(:awesome) do
  puts "this is fantastic"
end