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
| Last login: Sat Jul 26 20:54:27 on ttys007 | |
| ~ $ mkdir git-bug | |
| ~ $ cd git-bug/ | |
| ~/git-bug $ git init | |
| Initialized empty Git repository in /Users/rich/git-bug/.git/ | |
| ~/git-bug $ echo "test line one" > readme | |
| ~/git-bug $ git add readme | |
| ~/git-bug $ git commit -a -m "one" | |
| Created initial commit 541fc1d: one | |
| 1 files changed, 1 insertions(+), 0 deletions(-) |
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
| From 5a37943331e6a12b81ba55d9014c7481427e9d85 Mon Sep 17 00:00:00 2001 | |
| From: Rich Cavanaugh <[email protected]> | |
| Date: Wed, 6 Aug 2008 12:11:20 -0400 | |
| Subject: [PATCH] Add the ability to alias a task name so tasks can be named the same as a built in ruby method. | |
| Add specs for this functionality. | |
| --- | |
| lib/thor.rb | 10 +++++++--- | |
| spec/thor_spec.rb | 17 +++++++++++++++++ | |
| 2 files changed, 24 insertions(+), 3 deletions(-) |
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 ActsAsCommentable | |
| module Shoulda | |
| def should_be_commentable | |
| should_have_many :comments | |
| should_have_class_methods :find_comments_for, :find_comments_by_user | |
| should_have_instance_methods :add_comment, :comments_ordered_by_submitted | |
| end | |
| end | |
| end | |
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 'test_helper' | |
| class AlbumTest < ActiveSupport::TestCase | |
| should_belong_to :profile | |
| should_have_many :entries | |
| should_be_taggable | |
| should_be_commentable | |
| should_be_slugged | |
| end |
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 Author < ActiveRecord::Base | |
| has_many :books do | |
| def correct | |
| map {|b| b.name} | |
| end | |
| def broken | |
| proxy_target.map {|b| b.name} | |
| end | |
| end |
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
| ~/Projects/oss/serviceproxy (git::master) $ github pull --merge jeremydurham | |
| /opt/local/lib/ruby/gems/1.8/gems/defunkt-github-0.3.4/bin/../lib/github/command.rb:57:in `exec': Operation not supported - git pull jeremydurham master (Errno::E045) | |
| from /opt/local/lib/ruby/gems/1.8/gems/defunkt-github-0.3.4/bin/../lib/github/command.rb:57:in `send' | |
| from /opt/local/lib/ruby/gems/1.8/gems/defunkt-github-0.3.4/bin/../lib/github/command.rb:57:in `run' | |
| from /opt/local/lib/ruby/gems/1.8/gems/defunkt-github-0.3.4/bin/../lib/github/command.rb:45:in `git_exec' | |
| from /opt/local/lib/ruby/gems/1.8/gems/defunkt-github-0.3.4/lib/commands/commands.rb:109:in `command' | |
| from /opt/local/lib/ruby/gems/1.8/gems/defunkt-github-0.3.4/bin/../lib/github/command.rb:25:in `send' | |
| from /opt/local/lib/ruby/gems/1.8/gems/defunkt-github-0.3.4/bin/../lib/github/command.rb:25:in `call' | |
| from /opt/local/lib/ruby/gems/1.8/gems/defunkt-github-0.3.4/bin/../lib/github.rb:74:in `invoke' | |
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
| Error during failsafe response: closed stream | |
| [ pid=20176 file=Hooks.cpp:508 time=2009-04-03 10:00:56.78 ]: | |
| Backend process 9361 did not return a valid HTTP response. It returned: [Status] | |
| *** Exception NoMethodError in application (undefined method `[]=' for nil:NilClass) (process 9361): | |
| from /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/passenger-2.1.0/lib/phusion_passenger/rack/request_handler.rb:68:in `process_request' | |
| from /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/passenger-2.1.0/lib/phusion_passenger/abstract_request_handler.rb:197:in `main_loop' | |
| from /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/passenger-2.1.0/lib/phusion_passenger/railz/application_spawner.rb:340:in `start_request_handler' | |
| from /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/passenger-2.1.0/lib/phusion_passenger/railz/application_spawner.rb:298:in `handle_spawn_application' | |
| from /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/pa |
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 Author < ActiveRecord::Base | |
| acts_as_revisable :on_delete => :revise | |
| end | |
| class AuthorRevision < ActiveRecord::Base | |
| acts_as_revision | |
| end | |
| @author = Author.create(:name => 'Rich') | |
| @author.destroy |
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 Link < ActiveRecord::Base | |
| acts_as_revisable | |
| belongs_to :post | |
| end |
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
| def self.included(receiver) | |
| receiver.named_scope :latest_before, lambda {|time| {:conditions => ['created_at < ?', time]}} | |
| end |
OlderNewer