Sha256: 5f2fe95b499b923849eb1090d4e33444bb413adc7ca9255c2b302e5e1e9e00e1

Contents?: true

Size: 907 Bytes

Versions: 10

Compression:

Stored size: 907 Bytes

Contents

module Shipit
  class Status
    module Common
      def unknown?
        state == 'unknown'.freeze
      end

      def pending?
        state == 'pending'.freeze
      end

      def success?
        state == 'success'.freeze
      end

      def error?
        state == 'error'.freeze
      end

      def failure?
        state == 'failure'.freeze
      end

      def missing?
        false
      end

      def group?
        false
      end

      def simple_state
        state == 'error'.freeze ? 'failure'.freeze : state
      end

      def allowed_to_fail?
        commit.soft_failing_statuses.include?(context)
      end

      def hidden?
        commit.hidden_statuses.include?(context)
      end

      def blocking?
        !success? && commit.blocking_statuses.include?(context)
      end

      def required?
        commit.required_statuses.include?(context)
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
shipit-engine-0.31.0 app/models/shipit/status/common.rb
shipit-engine-0.30.0 app/models/shipit/status/common.rb
shipit-engine-0.29.0 app/models/shipit/status/common.rb
shipit-engine-0.28.1 app/models/shipit/status/common.rb
shipit-engine-0.28.0 app/models/shipit/status/common.rb
shipit-engine-0.27.1 app/models/shipit/status/common.rb
shipit-engine-0.27.0 app/models/shipit/status/common.rb
shipit-engine-0.26.0 app/models/shipit/status/common.rb
shipit-engine-0.25.1 app/models/shipit/status/common.rb
shipit-engine-0.25.0 app/models/shipit/status/common.rb