Sha256: 5ce236e5641f11af84c0cc9212fb42f547fe92bf805da11b3b91016a6207cc56

Contents?: true

Size: 535 Bytes

Versions: 61

Compression:

Stored size: 535 Bytes

Contents

# frozen_string_literal: true

module Buildkite
  module Builder
    module Definition
      module Helper
        def load_definition(file, expected)
          result = eval(file.read, TOPLEVEL_BINDING.dup, file.to_s) # rubocop:disable Security/Eval
          unless result.is_a?(expected)
            raise "#{file} must return a valid definition (#{expected}); got #{result.class}"
          end

          result
        end
      end

      class Pipeline < Proc
      end

      class Template < Proc
      end
    end
  end
end

Version data entries

61 entries across 61 versions & 1 rubygems

Version Path
buildkite-builder-4.16.0 lib/buildkite/builder/definition.rb
buildkite-builder-4.15.1 lib/buildkite/builder/definition.rb
buildkite-builder-4.15.0 lib/buildkite/builder/definition.rb
buildkite-builder-4.14.0 lib/buildkite/builder/definition.rb
buildkite-builder-4.13.0 lib/buildkite/builder/definition.rb
buildkite-builder-4.12.0 lib/buildkite/builder/definition.rb
buildkite-builder-4.11.0 lib/buildkite/builder/definition.rb
buildkite-builder-4.10.0 lib/buildkite/builder/definition.rb
buildkite-builder-4.8.0 lib/buildkite/builder/definition.rb
buildkite-builder-4.7.0 lib/buildkite/builder/definition.rb
buildkite-builder-4.6.0 lib/buildkite/builder/definition.rb
buildkite-builder-4.5.0 lib/buildkite/builder/definition.rb
buildkite-builder-4.4.0 lib/buildkite/builder/definition.rb
buildkite-builder-4.3.0 lib/buildkite/builder/definition.rb
buildkite-builder-4.2.5 lib/buildkite/builder/definition.rb
buildkite-builder-4.2.4 lib/buildkite/builder/definition.rb
buildkite-builder-4.2.3 lib/buildkite/builder/definition.rb
buildkite-builder-4.2.2 lib/buildkite/builder/definition.rb
buildkite-builder-4.2.1 lib/buildkite/builder/definition.rb
buildkite-builder-4.2.0 lib/buildkite/builder/definition.rb