Sha256: add153e99f93eaa66e3a19d0a6395aec0c29095530603a343c69eb2da7997f7c

Contents?: true

Size: 575 Bytes

Versions: 4

Compression:

Stored size: 575 Bytes

Contents

require 'deployinator/helpers/deploy'
require 'json'

module Deployinator::Views
  class DeploysStatus < Layout
    include Deployinator::Helpers::DeployHelpers
    
    self.template_file = "#{File.dirname(__FILE__)}/../templates/deploys_status.mustache"

    def current_deploys
      ret = []
      JSON.parse(get_list_of_deploys.to_json).each do |deploy|
        ret << { "stack" => deploy['stack'], "stage" => deploy['stage'] }
      end
      if (ret.length>0)
        ret
      else
        { "stack" => "alcohol", "stage" => "consuming" }
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
etsy-deployinator-1.1.1 lib/deployinator/views/deploys_status.rb
etsy-deployinator-1.1.0 lib/deployinator/views/deploys_status.rb
etsy-deployinator-1.0.2 lib/deployinator/views/deploys_status.rb
etsy-deployinator-1.0.1 lib/deployinator/views/deploys_status.rb