Sha256: 3a663e96300b7ad3ff3a2aaaeefe88bd0d99cf6f7afa05fa1878f977b401193b

Contents?: true

Size: 893 Bytes

Versions: 54

Compression:

Stored size: 893 Bytes

Contents

module PEBuild
  module Util
    # @api private
    #
    # @since 0.9.0
    module VersionedPath

      # Substitute release information into a path.
      #
      # @param path [String] A path.
      # @param version [String, nil] A string that will be substituted for any
      #   `:version` token in `path`.
      # @param series [String, nil] A string that will be substituted for any
      #   `:series` token in `path`.
      #
      # @return [String]
      def self.versioned_path(path, version = nil, series = nil)
        result = path.dup
        result.gsub!(/:version/, version) unless version.nil?
        result.gsub!(/:series/, series) unless series.nil?

        result
      end

      # FIXME: This code is basically lifted from:
      #
      #     PEBuild::Archive#versioned_path
      #
      # These two uses need to be cleaned up and consolidated.

    end
  end
end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
vagrant-pe_build-0.11.0 lib/pe_build/util/versioned_path.rb
vagrant-pe_build-0.10.4 lib/pe_build/util/versioned_path.rb
vagrant-pe_build-0.10.3 lib/pe_build/util/versioned_path.rb
vagrant-pe_build-0.10.2 lib/pe_build/util/versioned_path.rb
vagrant-pe_build-0.10.1 lib/pe_build/util/versioned_path.rb
vagrant-pe_build-0.10.0 lib/pe_build/util/versioned_path.rb
vagrant-pe_build-0.9.7 lib/pe_build/util/versioned_path.rb
vagrant-pe_build-0.9.6 lib/pe_build/util/versioned_path.rb
vagrant-pe_build-0.9.5 lib/pe_build/util/versioned_path.rb
vagrant-pe_build-0.9.4 lib/pe_build/util/versioned_path.rb
vagrant-pe_build-0.9.3 lib/pe_build/util/versioned_path.rb
vagrant-pe_build-0.9.2 lib/pe_build/util/versioned_path.rb
vagrant-pe_build-0.9.1 lib/pe_build/util/versioned_path.rb
vagrant-pe_build-0.9.0 lib/pe_build/util/versioned_path.rb