Sha256: a42a36591f8c0169515cf0cfc7d37d6790c0bd082b2ee1ec9b211193141eb779

Contents?: true

Size: 889 Bytes

Versions: 10

Compression:

Stored size: 889 Bytes

Contents

module Shipit
  class ShipitController < ApplicationController
    layout 'shipit'

    helper GithubUrlHelper
    helper StacksHelper
    helper TasksHelper
    helper DeploysHelper
    helper ChunksHelper

    helper Shipit::Engine.routes.url_helpers
    include Shipit::Engine.routes.url_helpers

    before_action :toogle_bootstrap_feature, :ensure_required_settings

    include Shipit::Authentication

    # Respond to HTML by default
    respond_to :html

    # Prevent CSRF attacks by raising an exception.
    # For APIs, you may want to use :null_session instead.
    protect_from_forgery with: :exception

    private

    def toogle_bootstrap_feature
      prepend_view_path(Shipit.bootstrap_view_path) if Shipit.feature_bootstrap?
    end

    def ensure_required_settings
      return if Shipit.all_settings_present?

      render 'shipit/missing_settings'
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
shipit-engine-0.20.1 app/controllers/shipit/shipit_controller.rb
shipit-engine-0.20.0 app/controllers/shipit/shipit_controller.rb
shipit-engine-0.19.0 app/controllers/shipit/shipit_controller.rb
shipit-engine-0.18.1 app/controllers/shipit/shipit_controller.rb
shipit-engine-0.18.0 app/controllers/shipit/shipit_controller.rb
shipit-engine-0.17.0 app/controllers/shipit/shipit_controller.rb
shipit-engine-0.16.0 app/controllers/shipit/shipit_controller.rb
shipit-engine-0.15.0 app/controllers/shipit/shipit_controller.rb
shipit-engine-0.14.0 app/controllers/shipit/shipit_controller.rb
shipit-engine-0.13.0 app/controllers/shipit/shipit_controller.rb