Sha256: 3e57c2b16c35e0854373043aeeeb65e6179965945da364f6f268abf6aeb7ce44

Contents?: true

Size: 794 Bytes

Versions: 8

Compression:

Stored size: 794 Bytes

Contents

# frozen_string_literal: true
module Shipit
  module Api
    class CCMenuController < BaseController
      require_permission :read, :stack

      class NoDeploy
        def id
          0
        end

        def ended_at
          Time.now.utc
        end

        def running?
          false
        end
      end

      def show
        latest_deploy = stack.deploys_and_rollbacks.last || NoDeploy.new
        render('shipit/ccmenu/project', formats: [:xml], locals: { stack: stack, deploy: latest_deploy })
      end

      private

      def stack
        @stack ||= Stack.from_param!(params[:stack_id])
      end

      def authenticate_api_client
        @current_api_client = ApiClient.authenticate(params[:token])
        super unless @current_api_client
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
shipit-engine-0.39.0 app/controllers/shipit/api/ccmenu_controller.rb
shipit-engine-0.38.0 app/controllers/shipit/api/ccmenu_controller.rb
shipit-engine-0.37.0 app/controllers/shipit/api/ccmenu_controller.rb
shipit-engine-0.36.1 app/controllers/shipit/api/ccmenu_controller.rb
shipit-engine-0.36.0 app/controllers/shipit/api/ccmenu_controller.rb
shipit-engine-0.35.1 app/controllers/shipit/api/ccmenu_controller.rb
shipit-engine-0.35.0 app/controllers/shipit/api/ccmenu_controller.rb
shipit-engine-0.34.0 app/controllers/shipit/api/ccmenu_controller.rb