Class: ForgePackXZUrlsSanitizer

Inherits:
BaseSanitizer show all
Defined in:
lib/wonko_the_sane/input/forge_installer_profile_input.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.pack_xz_libsObject

Returns the value of attribute pack_xz_libs.



89
90
91
# File 'lib/wonko_the_sane/input/forge_installer_profile_input.rb', line 89

def pack_xz_libs
  @pack_xz_libs
end

Class Method Details

.sanitize(file) ⇒ Object



92
93
94
95
96
97
98
99
100
# File 'lib/wonko_the_sane/input/forge_installer_profile_input.rb', line 92

def self.sanitize(file)
  file.client.downloads.map! do |lib|
    if self.pack_xz_libs.include? WonkoTheSane::Util::MavenIdentifier.new(lib.name).group
      lib.maven_base_url = 'http://repo.spongepowered.org/maven/'
    end
    lib
  end
  file
end