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 RouteFilter | |
| class << self | |
| def routes | |
| ActionController::Routing::Routes.routes | |
| end | |
| def controllers | |
| ::Object.subclasses_of( ::ActionController::Base ) |
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
| # Delivers a TMail::Mail object. By default, it delivers the cached mail | |
| # object (from the <tt>create!</tt> method). If no cached mail object exists, and | |
| # no alternate has been given as the parameter, this will fail. | |
| def deliver!(mail = @mail) | |
| raise "no mail object available for delivery!" unless mail | |
| unless logger.nil? | |
| logger.info "Sent mail to #{Array(recipients).join(', ')}" | |
| logger.debug "\n#{mail.encoded}" | |
| 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
| ExceptionNotifier.exception_recipients = %w([email protected]) | |
| ExceptionNotifier.class_eval do | |
| remove_method :template_root | |
| ExceptionNotifier.template_root = "#{RAILS_ROOT}/vendor/plugins/exception_notification/lib/../views" | |
| 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
| assert_raise(FiberError){ | |
| Fiber.yield | |
| } |
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
| # Returns the path to the rails/init.rb file for the given extension, | |
| # or nil if no gem provides it. | |
| def init_path_for_extension(extension) | |
| return if extension.blank? | |
| return unless spec = Gem.searcher.find(extension.to_s) | |
| returning File.join(spec.full_gem_path, 'rails', 'init.rb') do |path| | |
| return unless File.file?(path) | |
| 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
| diff --git a/lib/query_memcached.rb b/lib/query_memcached.rb | |
| index c911388..715c47d 100644 | |
| --- a/lib/query_memcached.rb | |
| +++ b/lib/query_memcached.rb | |
| @@ -88,6 +88,7 @@ module ActiveRecord | |
| end | |
| +if ActiveRecord::ConnectionAdapters.const_defined?( 'PostgreSQLAdapter' ) | |
| class PostgreSQLAdapter < AbstractAdapter |
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 Technoweenie | |
| module AttachmentFu | |
| module InstanceMethods | |
| def self.included( base ) | |
| base.define_callbacks *[:after_resize, :after_attachment_saved, :before_thumbnail_saved] | |
| end | |
| def callback_with_args(method, arg = self) |
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
| lourens$ sudo gem install caffeine | |
| Building native extensions. This could take a while... | |
| caffeine.c: In function 'key_from_segments': | |
| caffeine.c:712: warning: incompatible implicit declaration of built-in function 'mempcpy' | |
| caffeine.c: In function 'md5_digest': | |
| caffeine.c:872: warning: pointer targets in passing argument 1 of 'MD5' differ in signedness | |
| /usr/bin/ld: warning multiple definitions of symbol _setregid | |
| /opt/local/lib/libruby.dylib(process.o) definition of _setregid | |
| /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libpthread.dylib(setregid.So) definition of _setregid | |
| /usr/bin/ld: warning multiple definitions of symbol _setreuid |
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
| libmemcache-1.4.0.rc2 lourens$ ./configure && make && make install |
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
| e2fsprogs-1.39 lourens$ cd lib/uuid | |
| e2fsprogs-1.39 lourens$ make && sudo make install | |