Sha256: 0c2abda69d35b8615dae002a77b8404942e819888a745b482fd727df14900521
Contents?: true
Size: 669 Bytes
Versions: 1
Compression:
Stored size: 669 Bytes
Contents
require "zip/zip" class Joe < Thor alias_method :joe_build, :build def build fetch_jar joe_build end def fetch_jar url = "http://release.seleniumhq.org/selenium-remote-control/1.0.1/selenium-remote-control-1.0.1-dist.zip" file = File.join("tmp", File.basename(url)) FileUtils.mkdir_p("tmp") system "wget #{url} -O #{file}" unless File.exist?(file) Zip::ZipFile.open(file) do |zipfile| jar_file_entry = zipfile.entries.find {|file| file.name =~ /selenium-server\.jar$/} destination = "vendor/selenium-server.jar" FileUtils.rm_rf(destination) zipfile.extract(jar_file_entry, destination) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
selenium-rc-2.1.0 | Thorfile |