Sha256: 1b6ca4b30164a204bb43b619eba7fbf0914d45b0872b3127eef587f74a4c1047

Contents?: true

Size: 364 Bytes

Versions: 1

Compression:

Stored size: 364 Bytes

Contents

module Vendorise
  class Arborist
    attr_reader :path, :url

    def initialize(path, url)
      @path = path
      @url = url
    end

    def subtree_already_exists?
      Dir.exist?(path)
    end

    def subtree_command
      cmd = subtree_already_exists? ? "pull" : "add"
      "git subtree #{cmd} --prefix #{path} #{url} master --squash"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vendorise-0.2.0 lib/vendorise/arborist.rb