Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

file 30 lines (27 sloc) 0.993 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
require 'rubygems'
require 'hoe'

$LOAD_PATH.unshift File.join(File.dirname(__FILE__), "lib")
require 'mechanize'

class MechHoe < Hoe
  def define_tasks
    super
    desc "Update SSL Certificate"
    Rake::Task.define_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
  end
end

MechHoe.new('mechanize', WWW::Mechanize::VERSION) do |p|
  p.rubyforge_name = 'mechanize'
  p.author = 'Aaron Patterson'
  p.email = 'aaronp@rubyforge.org'
  p.summary = "Mechanize provides automated web-browsing"
  p.extra_deps = [['hpricot', '>= 0.5.0']]
end
Something went wrong with that request. Please try again.