Sha256: 13d06a1818aee34314994c877085119537f5cb574095cb1d5421a7e4a7dff2ac

Contents?: true

Size: 536 Bytes

Versions: 23

Compression:

Stored size: 536 Bytes

Contents

module Shipit
  module Api
    class TasksController < BaseController
      require_permission :read, :stack
      require_permission :deploy, :stack, only: :trigger

      def index
        render_resources stack.tasks
      end

      def show
        render_resource stack.tasks.find(params[:id])
      end

      params do
        accepts :env, Hash, default: {}
      end
      def trigger
        render_resource stack.trigger_task(params[:task_name], current_user, env: params.env), status: :accepted
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
shipit-engine-0.19.0 app/controllers/shipit/api/tasks_controller.rb
shipit-engine-0.18.1 app/controllers/shipit/api/tasks_controller.rb
shipit-engine-0.18.0 app/controllers/shipit/api/tasks_controller.rb
shipit-engine-0.17.0 app/controllers/shipit/api/tasks_controller.rb
shipit-engine-0.16.0 app/controllers/shipit/api/tasks_controller.rb
shipit-engine-0.15.0 app/controllers/shipit/api/tasks_controller.rb
shipit-engine-0.14.0 app/controllers/shipit/api/tasks_controller.rb
shipit-engine-0.13.0 app/controllers/shipit/api/tasks_controller.rb
shipit-engine-0.12.1 app/controllers/shipit/api/tasks_controller.rb
shipit-engine-0.12.0 app/controllers/shipit/api/tasks_controller.rb
shipit-engine-0.11.0 app/controllers/shipit/api/tasks_controller.rb
shipit-engine-0.10.0 app/controllers/shipit/api/tasks_controller.rb
shipit-engine-0.9.0 app/controllers/shipit/api/tasks_controller.rb
shipit-engine-0.8.9 app/controllers/shipit/api/tasks_controller.rb
shipit-engine-0.8.8 app/controllers/shipit/api/tasks_controller.rb
shipit-engine-0.8.7 app/controllers/shipit/api/tasks_controller.rb
shipit-engine-0.8.6 app/controllers/shipit/api/tasks_controller.rb
shipit-engine-0.8.5 app/controllers/shipit/api/tasks_controller.rb
shipit-engine-0.8.4 app/controllers/shipit/api/tasks_controller.rb
shipit-engine-0.8.3 app/controllers/shipit/api/tasks_controller.rb