module Flucti module Utilities module CoreExt def self.apply! # Proper version of #constantize, since ActiveSupport's behaves strangely. String.class_eval do def constantize split('::').inject(Object) { |mod, name| mod.const_get(name) } end end Pathname.class_eval do alias_method :/, :+ protected :+ end # Thorough version of `unhook!'. ActiveSupport::Dependencies.unhook! ActiveSupport::Dependencies::ClassConstMissing.module_eval do def const_missing(*args) super end end ActiveSupport::Inflector.inflections do |inflect| inflect.singular('databases', 'database') end WebService::RemoteCollection.class_eval do include ConnectionErrorHandling end end end end end