This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Bundler
|
||||
module Plugin
|
||||
class Installer
|
||||
class Git < Bundler::Source::Git
|
||||
def cache_path
|
||||
@cache_path ||= begin
|
||||
git_scope = "#{base_name}-#{uri_hash}"
|
||||
|
||||
Plugin.cache.join("bundler", "git", git_scope)
|
||||
end
|
||||
end
|
||||
|
||||
def install_path
|
||||
@install_path ||= begin
|
||||
git_scope = "#{base_name}-#{shortref_for_path(revision)}"
|
||||
|
||||
Plugin.root.join("bundler", "gems", git_scope)
|
||||
end
|
||||
end
|
||||
|
||||
def root
|
||||
Plugin.root
|
||||
end
|
||||
|
||||
def generate_bin(spec, disable_extensions = false)
|
||||
# Need to find a way without code duplication
|
||||
# For now, we can ignore this
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,26 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Bundler
|
||||
module Plugin
|
||||
class Installer
|
||||
class Path < Bundler::Source::Path
|
||||
def root
|
||||
SharedHelpers.in_bundle? ? Bundler.root : Plugin.root
|
||||
end
|
||||
|
||||
def eql?(other)
|
||||
return unless other.class == self.class
|
||||
expanded_original_path == other.expanded_original_path &&
|
||||
version == other.version
|
||||
end
|
||||
|
||||
alias_method :==, :eql?
|
||||
|
||||
def generate_bin(spec, disable_extensions = false)
|
||||
# Need to find a way without code duplication
|
||||
# For now, we can ignore this
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,19 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Bundler
|
||||
module Plugin
|
||||
class Installer
|
||||
class Rubygems < Bundler::Source::Rubygems
|
||||
private
|
||||
|
||||
def rubygems_dir
|
||||
Plugin.root
|
||||
end
|
||||
|
||||
def cache_path
|
||||
Plugin.cache
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user