aboutsummaryrefslogtreecommitdiffstats
path: root/Rakefile
blob: 5dc4dfaaa7b63a183047d28c44b9fcdd9a10e209 (plain)
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
31
32
gem 'rake-compiler'

require 'rake'
require 'rake/extensiontask'
require 'rake/testtask'
require 'rdoc/task'

Rake::ExtensionTask.new('openssl')

# the same as before
Rake::TestTask.new do |t|
  t.libs << 'test'
  t.warning = true
end

RDoc::Task.new do |rdoc|
  rdoc.rdoc_files.include("README.md", "lib/**/*.rb", "ext/**/*.c")
end

task :test => :debug
task :debug do
  sh "ruby -ropenssl -e 'puts OpenSSL::OPENSSL_LIBRARY_VERSION'"
end

task :sync do
  trunk = ENV.fetch("RUBY_TRUNK_PATH", "../ruby")

  sh "cp #{trunk}/ext/openssl/*.c #{trunk}/ext/openssl/*.h #{trunk}/ext/openssl/*.rb ext/openssl/."
  sh "cp -R #{trunk}/ext/openssl/lib/* lib/."
  sh "cp #{trunk}/test/openssl/test_*.rb test/."
  sh "cp #{trunk}/test/openssl/utils.rb test/utils.rb"
end