-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
42 lines (31 loc) · 1014 Bytes
/
Rakefile
File metadata and controls
42 lines (31 loc) · 1014 Bytes
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
33
34
35
36
37
38
39
40
41
42
# frozen_string_literal: true
require 'bundler/gem_tasks'
require 'rake/testtask'
require 'rubocop/rake_task'
require 'rubygems/package_task'
gemspec = Gem::Specification.load("#{__dir__}/sin_deep_merge.gemspec")
if RUBY_ENGINE == 'jruby'
require 'rake/javaextensiontask'
Rake::JavaExtensionTask.new('sin_deep_merge', gemspec) do |task|
task.ext_dir = 'ext/java'
task.source_version = '1.8'
task.target_version = '1.8'
end
else
require 'rake/extensiontask'
Rake::ExtensionTask.new('sin_deep_merge', gemspec) do |task|
task.lib_dir = 'lib/sin_deep_merge'
end
end
Gem::PackageTask.new(gemspec)
Rake::TestTask.new(:test) do |task|
task.pattern = 'test/**/test_*.rb'
end
RuboCop::RakeTask.new(:rubocop) do |task|
task.options = ['--format', ENV['RUBOCOP_FORMAT']] if ENV['RUBOCOP_FORMAT']
end
task benchmark: [:compile] do
RubyVM::YJIT.enable if defined?(RubyVM::YJIT) && !RubyVM::YJIT.enabled?
require_relative 'script/deep_merge_benchmark'
DeepMergeBenchmark.run
end