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.19.2 lib/pe_build/util/versioned_path.rb
vagrant-pe_build-0.19.1 lib/pe_build/util/versioned_path.rb
vagrant-pe_build-0.19.0 lib/pe_build/util/versioned_path.rb
vagrant-pe_build-0.18.2 lib/pe_build/util/versioned_path.rb
vagrant-pe_build-0.18.1 lib/pe_build/util/versioned_path.rb
vagrant-pe_build-0.18.0 lib/pe_build/util/versioned_path.rb
vagrant-pe_build-0.17.14 lib/pe_build/util/versioned_path.rb
vagrant-pe_build-0.17.13 lib/pe_build/util/versioned_path.rb
vagrant-pe_build-0.17.12 lib/pe_build/util/versioned_path.rb
vagrant-pe_build-0.17.11 lib/pe_build/util/versioned_path.rb
vagrant-pe_build-0.17.10 lib/pe_build/util/versioned_path.rb
vagrant-pe_build-0.17.9 lib/pe_build/util/versioned_path.rb
vagrant-pe_build-0.17.8 lib/pe_build/util/versioned_path.rb
vagrant-pe_build-0.17.7 lib/pe_build/util/versioned_path.rb
vagrant-pe_build-0.17.6 lib/pe_build/util/versioned_path.rb
vagrant-pe_build-0.17.5 lib/pe_build/util/versioned_path.rb
vagrant-pe_build-0.17.4 lib/pe_build/util/versioned_path.rb
vagrant-pe_build-0.17.3 lib/pe_build/util/versioned_path.rb
vagrant-pe_build-0.17.2 lib/pe_build/util/versioned_path.rb
vagrant-pe_build-0.17.1 lib/pe_build/util/versioned_path.rb