# File lib/smart_proxy_omaha/metadata_provider.rb, line 5 def initialize(options) @contentpath = options.fetch(:contentpath) end
# File lib/smart_proxy_omaha/metadata_provider.rb, line 9 def get(track, release) Metadata.new(JSON.parse(File.read(metadata_file(track, release)))) end
# File lib/smart_proxy_omaha/metadata_provider.rb, line 13 def store(metadata) File.write(metadata_file(metadata.track, metadata.release), metadata.to_json) end
# File lib/smart_proxy_omaha/metadata_provider.rb, line 19 def metadata_file(track, release) File.join(contentpath, track, release.to_s, 'metadata.json') end