diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2021-06-25 20:27:14 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2021-06-25 20:27:14 +0900 |
commit | 47283d91614ab799dc2347c37885a37f1b91afcb (patch) | |
tree | 5858b9d87e9eb4fff7ef9cb2d131d95f4c3c0f2a /Rakefile | |
parent | 69786e3a666b79c64e0109fa2282ecd359ad4de5 (diff) | |
download | ruby-openssl-47283d91614ab799dc2347c37885a37f1b91afcb.tar.gz |
use Bundler for dependency management and Rake gem tasks
Back in 2016, we chose not to use Bundler in Ruby/OpenSSL development
because Bundler depended on openssl and could not be used for testing
openssl itself - "bundle exec rake test" would end up with loading two
different versions of openssl at the same time.
This has been resolved long time ago. We can now safely use it for
development dependency management and for Rake tasks.
Diffstat (limited to 'Rakefile')
-rw-r--r-- | Rakefile | 24 |
1 files changed, 2 insertions, 22 deletions
@@ -1,12 +1,12 @@ -require 'rake' require 'rake/testtask' require 'rdoc/task' +require 'bundler/gem_tasks' begin require 'rake/extensiontask' Rake::ExtensionTask.new('openssl') rescue LoadError - warn "rake-compiler not installed. Run 'rake install_dependencies' to " \ + warn "rake-compiler not installed. Run 'bundle install' to " \ "install testing dependency gems." end @@ -26,26 +26,6 @@ task :debug do ruby "-I./lib -ropenssl -ve'puts OpenSSL::OPENSSL_VERSION, OpenSSL::OPENSSL_LIBRARY_VERSION'" end -task :install_dependencies do - if ENV["USE_HTTP_RUBYGEMS_ORG"] == "1" - Gem.sources.replace([Gem::Source.new("http://rubygems.org")]) - end - - Gem.configuration.verbose = false - gemspec = Gem::Specification.load('openssl.gemspec') - - gemspec.development_dependencies.each do |dep| - print "Installing #{dep.name} (#{dep.requirement}) ... " - installed = dep.matching_specs - if installed.empty? - installed = Gem.install(dep.name, dep.requirement) - puts "#{installed[0].version}" - else - puts "(found #{installed[0].version})" - end - end -end - namespace :sync do task :from_ruby do sh "./tool/sync-with-trunk" |