Sha256: 73384eaa372b520ad7f12870d73aa1e044b07d72aa46068a2b6b97531812e2ad

Contents?: true

Size: 1.62 KB

Versions: 9

Compression:

Stored size: 1.62 KB

Contents

require 'rake/testtask'
require 'rubygems/package_task'
require 'bundler/gem_tasks'
require 'rake/extensiontask'
require 'rake/clean'
require 'rdoc/task'
require 'benchmark'


CLEAN.include(
  "tmp",
  "lib/2.0",
  "lib/2.1",
  "lib/2.2",
  "lib/2.3",
  "lib/2.4",
  "lib/2.5",
  "lib/2.6",
  "lib/2.7",
  "lib/3.0",
  "lib/bcrypt_pbkdf_ext.so"
)
CLOBBER.include(
  "doc",
  "pkg"
)

task 'gem:windows' do
  require 'rake_compiler_dock'
  sh "bundle package"   # Avoid repeated downloads of gems by using gem files from the host.
  RakeCompilerDock.sh "bundle && rake cross native gem RUBY_CC_VERSION=3.0.0:2.7.0:2.6.0:2.5.0:2.4.0:2.3.0:2.2.2:2.1.6:2.0.0"
end

task 'gem:windows:release' do
  version = Gem::Specification::load("bcrypt_pbkdf.gemspec").version
  sh "gem push pkg/bcrypt_pbkdf-#{version}-x86-mingw32.gem"
  sh "gem push pkg/bcrypt_pbkdf-#{version}-x64-mingw32.gem"
end

GEMSPEC = Gem::Specification.load("bcrypt_pbkdf.gemspec")

task :default => [:compile, :spec]

desc "Run all tests"
Rake::TestTask.new do |t|
  #t.pattern =
  t.test_files = FileList['test/**/*_test.rb']
  t.ruby_opts = ['-w']
  t.libs << "test"
  t.verbose = true
end
task :spec => :test

desc 'Generate RDoc'
RDoc::Task.new do |rdoc|
  rdoc.rdoc_dir = 'doc/rdoc'
  rdoc.options += GEMSPEC.rdoc_options
  rdoc.template = ENV['TEMPLATE'] if ENV['TEMPLATE']
  rdoc.rdoc_files.include(*GEMSPEC.extra_rdoc_files)
end

Gem::PackageTask.new(GEMSPEC) do |pkg|
  pkg.need_zip = true
  pkg.need_tar = true
end

Rake::ExtensionTask.new("bcrypt_pbkdf_ext", GEMSPEC) do |ext|
  ext.ext_dir = 'ext/mri'
  ext.cross_compile = true
  ext.cross_platform = ['x86-mingw32', 'x64-mingw32']
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
vagrant-unbundled-2.2.19.0 vendor/bundle/ruby/3.0.0/gems/bcrypt_pbkdf-1.1.0/Rakefile
vagrant-unbundled-2.2.18.0 vendor/bundle/ruby/3.0.0/gems/bcrypt_pbkdf-1.1.0/Rakefile
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/3.0.0/gems/bcrypt_pbkdf-1.1.0/Rakefile
bcrypt_pbkdf-1.1.0-x64-mingw32 Rakefile
bcrypt_pbkdf-1.1.0-x86-mingw32 Rakefile
bcrypt_pbkdf-1.1.0 Rakefile
bcrypt_pbkdf-1.1.0.rc2-x64-mingw32 Rakefile
bcrypt_pbkdf-1.1.0.rc2-x86-mingw32 Rakefile
bcrypt_pbkdf-1.1.0.rc2 Rakefile