Sha256: 288e1e8ee64aef80a19b9f01a85089719074582d1d5db9992cdfbe363ec418eb

Contents?: true

Size: 560 Bytes

Versions: 158

Compression:

Stored size: 560 Bytes

Contents

# frozen_string_literal: true

require 'overcommit'
require 'overcommit/hook/pre_commit/base'

module Overcommit
  module Hook
    module PreCommit
      # CircleCI plugin for Overcommit to validate config file (.circleci/config.yml)
      class CircleCi < Base
        # @return [Symbol, Array<[Symbol, String]>]
        def run
          result = execute(command)
          return :pass if result.success?

          if result.success?
            :pass
          else
            [:fail, result.stderr]
          end
        end
      end
    end
  end
end

Version data entries

158 entries across 158 versions & 2 rubygems

Version Path
punchlist-1.3.2 .git-hooks/pre_commit/circle_ci.rb
punchlist-1.3.1 .git-hooks/pre_commit/circle_ci.rb
checkoff-0.201.0 .git-hooks/pre_commit/circle_ci.rb
checkoff-0.200.0 .git-hooks/pre_commit/circle_ci.rb
checkoff-0.199.0 .git-hooks/pre_commit/circle_ci.rb
checkoff-0.198.0 .git-hooks/pre_commit/circle_ci.rb
checkoff-0.197.0 .git-hooks/pre_commit/circle_ci.rb
checkoff-0.196.0 .git-hooks/pre_commit/circle_ci.rb
checkoff-0.195.0 .git-hooks/pre_commit/circle_ci.rb
checkoff-0.194.0 .git-hooks/pre_commit/circle_ci.rb
checkoff-0.193.0 .git-hooks/pre_commit/circle_ci.rb
checkoff-0.192.0 .git-hooks/pre_commit/circle_ci.rb
checkoff-0.191.0 .git-hooks/pre_commit/circle_ci.rb
checkoff-0.190.0 .git-hooks/pre_commit/circle_ci.rb
checkoff-0.189.0 .git-hooks/pre_commit/circle_ci.rb
checkoff-0.188.0 .git-hooks/pre_commit/circle_ci.rb
checkoff-0.187.0 .git-hooks/pre_commit/circle_ci.rb
checkoff-0.186.0 .git-hooks/pre_commit/circle_ci.rb
checkoff-0.185.0 .git-hooks/pre_commit/circle_ci.rb
checkoff-0.184.0 .git-hooks/pre_commit/circle_ci.rb