lib/cached_resource/configuration.rb in cached_resource-2.3.4 vs lib/cached_resource/configuration.rb in cached_resource-3.0.0

- old
+ new

@@ -1,17 +1,18 @@ module CachedResource # The Configuration class manages class specific options # for cached resource. class Configuration < OpenStruct - # Determine and set an appropriate ordered hash based on the current ruby version - ORDERED_HASH = RUBY_VERSION.to_f < 1.9 ? ActiveSupport::OrderedHash : Hash - # default or fallback cache without rails CACHE = ActiveSupport::Cache::MemoryStore.new # default of fallback logger without rails - LOGGER = ActiveSupport::BufferedLogger.new(NilIO.instance) + LOGGER = if defined?(ActiveSupport::Logger) + ActiveSupport::Logger.new(NilIO.instance) + else + ActiveSupport::BufferedLogger.new(NilIO.instance) + end # prefix for log messages LOGGER_PREFIX = "[cached_resource]" # Initialize a Configuration with the given options, overriding any \ No newline at end of file