Skip to content

Commit 7231488

Browse files
committed
dev: format JAR_DEPENDENCIES to one-dep-per-line
to try to minimize merge conflicts going forward
1 parent 340ffaf commit 7231488

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed

lib/nokogiri/jruby/nokogiri_jars.rb

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,24 @@
4141

4242
# generated by the :vendor_jars rake task
4343
module Nokogiri
44-
JAR_DEPENDENCIES = {"com.fasterxml.woodstox:woodstox-core"=>"6.2.6", "commons-codec:commons-codec"=>"1.15", "isorelax:isorelax"=>"20030108", "jakarta.activation:jakarta.activation-api"=>"1.2.2", "jakarta.xml.bind:jakarta.xml.bind-api"=>"2.3.3", "net.sf.saxon:Saxon-HE"=>"9.6.0-4", "net.sourceforge.htmlunit:neko-htmlunit"=>"2.63.0", "nu.validator:jing"=>"20200702VNU", "org.apache.santuario:xmlsec"=>"2.3.1", "org.codehaus.woodstox:stax2-api"=>"4.2.1", "org.nokogiri:nekodtd"=>"0.1.11.noko1", "org.slf4j:slf4j-api"=>"1.7.36", "xalan:serializer"=>"2.7.2", "xalan:xalan"=>"2.7.2", "xerces:xercesImpl"=>"2.12.2", "xml-apis:xml-apis"=>"1.4.01"}.freeze
44+
JAR_DEPENDENCIES = {
45+
"com.fasterxml.woodstox:woodstox-core" => "6.2.6",
46+
"commons-codec:commons-codec" => "1.15",
47+
"isorelax:isorelax" => "20030108",
48+
"jakarta.activation:jakarta.activation-api" => "1.2.2",
49+
"jakarta.xml.bind:jakarta.xml.bind-api" => "2.3.3",
50+
"net.sf.saxon:Saxon-HE" => "9.6.0-4",
51+
"net.sourceforge.htmlunit:neko-htmlunit" => "2.63.0",
52+
"nu.validator:jing" => "20200702VNU",
53+
"org.apache.santuario:xmlsec" => "2.3.1",
54+
"org.codehaus.woodstox:stax2-api" => "4.2.1",
55+
"org.nokogiri:nekodtd" => "0.1.11.noko1",
56+
"org.slf4j:slf4j-api" => "1.7.36",
57+
"xalan:serializer" => "2.7.2",
58+
"xalan:xalan" => "2.7.2",
59+
"xerces:xercesImpl" => "2.12.2",
60+
"xml-apis:xml-apis" => "1.4.01",
61+
}.freeze
4562
XERCES_VERSION = JAR_DEPENDENCIES["xerces:xercesImpl"]
4663
NEKO_VERSION = JAR_DEPENDENCIES["net.sourceforge.htmlunit:neko-htmlunit"]
4764
end

rakelib/extensions.rake

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,19 +381,29 @@ if java?
381381
desc "Vendor java dependencies"
382382
task :vendor_jars do
383383
require "jars/installer"
384+
384385
FileUtils.rm(FileList["lib/nokogiri/jruby/*/**/*.jar"], verbose: true)
386+
385387
jars = Jars::Installer.vendor_jars!("lib/nokogiri/jruby")
386388
jar_dependencies = jars.sort_by(&:gav).each_with_object({}) do |a, d|
387389
g, a, v = a.gav.split(":")
388390
name = [g, a].join(":")
389391
d[name] = v
390392
end
393+
394+
# output this to try to minimize git merge conflicts going forward
395+
string_rep = "{\n"
396+
jar_dependencies.each do |ga, v|
397+
string_rep += " #{ga.inspect} => #{v.inspect},\n"
398+
end
399+
string_rep += " }"
400+
391401
File.open("lib/nokogiri/jruby/nokogiri_jars.rb", "a") do |f|
392402
f.puts
393403
f.puts <<~EOF
394404
# generated by the :vendor_jars rake task
395405
module Nokogiri
396-
JAR_DEPENDENCIES = #{jar_dependencies}.freeze
406+
JAR_DEPENDENCIES = #{string_rep}.freeze
397407
XERCES_VERSION = JAR_DEPENDENCIES["xerces:xercesImpl"]
398408
NEKO_VERSION = JAR_DEPENDENCIES["net.sourceforge.htmlunit:neko-htmlunit"]
399409
end

0 commit comments

Comments
 (0)