diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7d9dfb2b8..0c2a09a6d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,7 +22,7 @@ jobs: ruby-version: ${{ matrix.ruby }} - name: depends - run: rake install_dependencies + run: bundle install - name: compile run: rake compile -- --enable-debug @@ -50,7 +50,7 @@ jobs: mingw: _upgrade_ openssl - name: depends - run: rake install_dependencies + run: bundle install # pkg-config is disabled because it can pick up the different OpenSSL installation # SSL_DIR is set as needed by MSP-Greg/setup-ruby-pkgs @@ -110,7 +110,7 @@ jobs: ruby-version: ${{ matrix.ruby }} - name: depends - run: rake install_dependencies + run: bundle install - name: compile run: rake compile -- --enable-debug --with-openssl-dir=$HOME/.openssl/${{ matrix.openssl }} diff --git a/.gitignore b/.gitignore index 1be08834f..8474e505f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +/.bundle +/Gemfile.lock /doc/ /pkg/ /tmp/ diff --git a/Gemfile b/Gemfile new file mode 100644 index 000000000..df5b0b423 --- /dev/null +++ b/Gemfile @@ -0,0 +1,8 @@ +source "https://rubygems.org" + +gemspec + +gem "rake" +gem "rake-compiler" +gem "test-unit", "~> 3.0" +gem "rdoc" diff --git a/Rakefile b/Rakefile index dedcce5d0..d8beef464 100644 --- a/Rakefile +++ b/Rakefile @@ -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" diff --git a/openssl.gemspec b/openssl.gemspec index 471a3c426..f178e7025 100644 --- a/openssl.gemspec +++ b/openssl.gemspec @@ -17,10 +17,5 @@ Gem::Specification.new do |spec| spec.required_ruby_version = ">= 2.3.0" - spec.add_development_dependency "rake" - spec.add_development_dependency "rake-compiler" - spec.add_development_dependency "test-unit", "~> 3.0" - spec.add_development_dependency "rdoc" - spec.metadata["msys2_mingw_dependencies"] = "openssl" end