Sha256: 40542bab51be8a5a0cd8df623a9c15146e1c336dde7d16ab88f4493c33be890b
Contents?: true
Size: 731 Bytes
Versions: 5
Compression:
Stored size: 731 Bytes
Contents
desc 'Download and unpack the latest HtmlUnit assembly' task :snapshot do files = %w[ http://build.canoo.com/htmlunit/artifacts/htmlunit-2.6-SNAPSHOT-with-dependencies.zip ] files.each do |url| basename = File.basename(url) shortname = basename[/(.+?)\.zip/, 1].sub("-with-dependencies", '') sh "curl -O #{url}" sh "rm -rf lib/celerity/htmlunit/*.jar" sh "unzip -tq #{basename}" sh %Q{unzip -C #{basename} "#{shortname}/lib/*.jar" -d lib/celerity/htmlunit } puts "Fixing paths..." sh "cp -R lib/celerity/htmlunit/#{shortname}/lib/*.jar lib/celerity/htmlunit/" puts "Cleaning..." rm_r "lib/celerity/htmlunit/#{shortname}/" rm basename puts "...done!" end end
Version data entries
5 entries across 5 versions & 4 rubygems