My Recent Pastes (39 and counting)

Pastes by Duane Johnson (39 and counting)

Pages: 1 3

Below are the 15 most recent pasties by Duane Johnson.

September 18, 2007
9:45AM EDT
by Duane Johnson

require 'mocha/central'

module Mocha
  
  module SetupAndTeardown

September 18, 2007
9:43AM EDT
by Duane Johnson

irb --> require 'mocha'
    ==> true

irb --> require 'stubba'
    ==> true

September 18, 2007
1:01AM EDT
by Duane Johnson

  class Controller < AbstractController
    # cattr_accessor :_subclasses
    # self._subclasses = []
    
    class_inheritable_accessor :_session_id_key, :_session_expiry

September 18, 2007
12:57AM EDT
by Duane Johnson

  class Controller < AbstractController
    cattr_accessor :_subclasses
    self._subclasses = []
    
    class_inheritable_accessor :_session_id_key, :_session_expiry

September 18, 2007
12:57AM EDT
by Duane Johnson

  class Controller < AbstractController
    cattr_accessor :_subclasses
    self._subclasses = []
    
    class_inheritable_accessor :_session_id_key, :_session_expiry

September 12, 2007
4:11PM EDT
by Duane Johnson

r.match("/admin") do |a|
  a.resources(:spoons) do |b|
    b.resources(:forks) do |c|
      c.resources(:keyboards)
    end

September 12, 2007
4:06PM EDT
by Duane Johnson

r.match("/admin") do |a|
  a.match("/spoons").resources.to(:controller => "spoons")
  a.match("/:spoon_id") do |b|
    b.match("/forks").resources.to(:controller => "forks")
    b.match("/:fork_id") do |c|

September 09, 2007
12:13PM EDT
by Duane Johnson

  class Config
    class << self
      def defaults
        @defaults ||= {
          :host => "0.0.0.0",

September 06, 2007
7:16PM EDT
by Duane Johnson

irb --> h = Hash.new({})
    ==> {}

irb --> h[:one] = 1
    ==> 1

September 06, 2007
6:27PM EDT
by Duane Johnson

development:
  sequel: &default
    adapter: mysql
    database: sample_development
    username: teh_user

September 06, 2007
6:18PM EDT
by Duane Johnson

# Add your own ruby code here for app specific stuff. This file gets loaded
# after the framework is loaded.
puts "Started merb_init.rb ..."

puts "Loading dependencies..."

September 06, 2007
2:17PM EDT
by Duane Johnson

MERB_PATHS.each do |glob|
  Dir[MERB_ROOT + glob].each { |m| require m }
end

September 05, 2007
10:05PM EDT
by Duane Johnson

1)
MissingSourceFile in 'Merb::Gems.required called without a block should return a hash of required gems'
no such file to load -- --- 
merb-plugin-that-does-not-exist: 
  version: 0.1.2

September 05, 2007
4:34PM EDT
by Duane Johnson

puts "Started merb_init.rb ..."
require 'active_record'
ActiveRecord::Base.verification_timeout = 14400
ActiveRecord::Base.logger = MERB_LOGGER

September 05, 2007
12:24AM EDT
by Duane Johnson

      def remove_constant(const, base = nil)
        parts = const.to_s.split("::")
        base ||= parts.size == 1 ? Object : parts[0..-2].join("::").to_const
        object = parts[-1].intern
        puts "Removing #{const} -- #{object} from #{base}"

Next page