Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

42 lines (36 sloc) 1.288 kB
require 'rubygems'
require 'hoe'
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), "lib")
require 'mechanize'
HOE = Hoe.new('mechanize', WWW::Mechanize::VERSION) do |p|
p.rubyforge_name = 'mechanize'
p.developer('Aaron Patterson','aaronp@rubyforge.org')
p.developer('Mike Dalessio','mike.dalessio@gmail.com')
p.summary = "Mechanize provides automated web-browsing"
p.extra_deps = [['hpricot', '>= 0.5.0']]
end
desc "Update SSL Certificate"
task('ssl_cert') do |p|
sh "openssl genrsa -des3 -out server.key 1024"
sh "openssl req -new -key server.key -out server.csr"
sh "cp server.key server.key.org"
sh "openssl rsa -in server.key.org -out server.key"
sh "openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt"
sh "cp server.key server.pem"
sh "mv server.key server.csr server.crt server.pem test/data/"
sh "rm server.key.org"
end
namespace :gem do
desc 'Generate a gem spec'
task :spec do
File.open("#{HOE.name}.gemspec", 'w') do |f|
HOE.spec.version = "#{HOE.version}.#{Time.now.strftime("%Y%m%d%H%M%S")}"
f.write(HOE.spec.to_ruby)
end
end
end
desc "Run code-coverage analysis"
task :coverage do
rm_rf "coverage"
sh "rcov -x Library -I lib:test #{Dir[*HOE.test_globs].join(' ')}"
end
Jump to Line
Something went wrong with that request. Please try again.