Method: Deployer#specs

Defined in:
lib/deployer.rb

#specs(context = nil) ⇒ Object



124
125
126
127
128
129
130
131
132
# File 'lib/deployer.rb', line 124

def specs(context = nil)
  context ||= default_context
  context = context.to_s
  @specs[context] ||= begin
    paths = git.ls_tree(commit, "platform/#{context}/")['blob'].keys
    raise "No specs found for context #{context}"  unless paths.present?
    paths.map { |path| YAML.load_stream( git.show(commit, path) ) }.flatten.compact
  end
end