My Recent Pastes (183 and counting)

Pastes by defunkt (183 and counting)

Pages:

Below are the 15 most recent pasties by defunkt.

March 20, 2007
6:12PM EDT
by defunkt

Index: lib/test/spec/rails/test_unit_ext.rb
===================================================================
--- lib/test/spec/rails/test_unit_ext.rb        (revision 7505)
+++ lib/test/spec/rails/test_unit_ext.rb        (working copy)
@@ -5,6 +5,10 @@

March 20, 2007
1:27PM EDT
by defunkt

def create
  @personnel = @resource.personnel.build(params[:personnel])

  @personnel.save!
  respond_to do |format|

February 22, 2007
4:17AM EDT
by defunkt

## hax
ActionController::Base.class_eval do
  def render_with_debug(*args)
    options = args.first
    if options.is_a?(Hash) && options[:debug]

February 20, 2007
2:41AM EDT
by defunkt

base.class_eval do
  #alias_method_chain :method_missing, :will_paginate
  alias :method_missing_without_will_paginate :method_missing
  alias :method_missing :method_missing_with_will_paginate
  define_method(:per_page) { 30 } unless respond_to? :per_page

February 16, 2007
1:16AM EDT
by defunkt

acts_as_cached
acts_as_indexed
acts_as_textiled
annotate_models
attachment_fu

February 16, 2007
1:07AM EDT
by defunkt

account_location
acts_as_textiled
betternestedset
candy
cascading_javascripts

February 11, 2007
6:54PM EDT
by defunkt

abstract (1.0.0)
actionmailer (1.3.1, 1.2.5.5848, 1.2.5)
actionpack (1.13.1, 1.12.5)
actionwebservice (1.2.1, 1.1.6.5848, 1.1.6)
activerecord (1.15.1, 1.14.4)

February 10, 2007
9:41PM EDT
by defunkt

module FakeFixtures
  extend self

  def load_fixtures(options = {})
    setup_buckets

February 02, 2007
2:32PM EDT
by defunkt

if RAILS_ENV == 'test'
  require 'test/spec'

  Test::Spec::Should.send    :alias_method, :have, :be
  Test::Spec::ShouldNot.send :alias_method, :have, :be

February 01, 2007
8:28PM EDT
by defunkt

  def newsletters
    return @newsletters if @newsletters
    returning @newsletters = client.getNewslettersByBrand(BRAND) do |newsletters|
      def newsletters.[](list_id)
        list_id.is_a?(String) ?  detect { |newsletter| newsletter.listId == list_id } : at(list_id)

February 01, 2007
5:32PM EDT
by defunkt

<% cache :boards_tag_cloud, :ttl => 2.hours do %>
  <%= render :partial => 'shared/tag_cloud', :locals => { :header => 'Popular Boards', :tags => Board.tag_cloud, :value => :topic_count } %>
<% end %>

January 30, 2007
5:30PM EDT
by defunkt

    def find_with_last(*args)
      return find_without_last(*args) unless args.first == :last
      find_without_last(:first, (args[1] || {}).merge(:order => 'id desc'))
    end
    alias_method_chain :find, :last

January 29, 2007
4:35PM EDT
by defunkt

  upstream subtlety {
    server 127.0.0.1:8021;
  }


January 29, 2007
4:33PM EDT
by defunkt

if at = ARGV.index('--update')
  ssh = 'ssh ' << (ARGV[at+1] || 'chris@errtheblog.com')
  puts `#{ssh} 'cd sites/subtlety; svn up; rm feeds/*'`
  exec "#{ssh} 'sudo /etc/init.d/rv restart'"
end

January 28, 2007
1:01AM EDT
by defunkt

_

Next page

Previous page