lib/engineyard-metadata/chef_dna.rb in engineyard-metadata-0.2.0 vs lib/engineyard-metadata/chef_dna.rb in engineyard-metadata-0.2.1

- old
+ new

@@ -3,20 +3,21 @@ %w{ active_support/json }.each do |active_support_3_requirement| require active_support_3_requirement end if ActiveSupport::VERSION::MAJOR == 3 +require 'eat' module EY class Metadata # An adapter that reads from /etc/chef/dna.json, which is only available on cloud instances. class ChefDna PATH = '/etc/chef/dna.json' include SshAliasHelper def dna # :nodoc: - @dna ||= ActiveSupport::JSON.decode File.read(PATH) + @dna ||= ActiveSupport::JSON.decode eat(PATH) end def application # :nodoc: dna['engineyard']['environment']['apps'].detect { |a| a['name'] == EY.metadata.app_name } end