lib/cached_resource/configuration.rb in cached_resource-2.3.0 vs lib/cached_resource/configuration.rb in cached_resource-2.3.1
- old
+ new
@@ -1,9 +1,12 @@
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.new)
\ No newline at end of file