Sha256: ebb6731059c9fcc3678a23caa1bd205d847ecd8865908d91ef8936eb517f8476

Contents?: true

Size: 425 Bytes

Versions: 7

Compression:

Stored size: 425 Bytes

Contents

# frozen_string_literal: true

module Buildkite
  module Builder
    class Plugin
      attr_reader :uri, :source, :version, :attributes

      def initialize(uri, attributes = {})
        @uri = uri
        @source, @version = uri.split('#')
        @attributes = attributes
      end

      def to_h
        Buildkite::Pipelines::Helpers.sanitize(uri => (attributes&.empty? ? nil : attributes))
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
buildkite-builder-3.8.3 lib/buildkite/builder/plugin.rb
buildkite-builder-3.8.2 lib/buildkite/builder/plugin.rb
buildkite-builder-3.8.1 lib/buildkite/builder/plugin.rb
buildkite-builder-3.8.0 lib/buildkite/builder/plugin.rb
buildkite-builder-3.7.0 lib/buildkite/builder/plugin.rb
buildkite-builder-3.6.0 lib/buildkite/builder/plugin.rb
buildkite-builder-3.5.0 lib/buildkite/builder/plugin.rb