lib/engineyard-metadata.rb in engineyard-metadata-0.2.2 vs lib/engineyard-metadata.rb in engineyard-metadata-0.2.3
- old
+ new
@@ -1,6 +1,16 @@
+require 'engineyard-metadata/version'
+require 'engineyard-metadata/metadata'
+
module EY
- autoload :Metadata, 'engineyard-metadata/metadata'
def self.metadata
- Metadata.instance
+ @metadata ||= if ::File.directory?('/var/log/engineyard')
+ Metadata::Insider.new
+ else
+ Metadata::Outsider.new
+ end
+ end
+
+ def self.reload_metadata
+ @metadata = nil
end
end