This repository was archived by the owner on Apr 1, 2025. It is now read-only.
forked from ActsAsParanoid/acts_as_paranoid
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
executable file
·55 lines (43 loc) · 1.31 KB
/
Rakefile
File metadata and controls
executable file
·55 lines (43 loc) · 1.31 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
# frozen_string_literal: true
require "bundler/gem_tasks"
require "rake/testtask"
require "rdoc/task"
require "rubocop/rake_task"
gemspec = eval(File.read(Dir["*.gemspec"].first))
namespace :test do
versions = Dir["gemfiles/*.gemfile"]
.map { |gemfile_path| gemfile_path.split(%r{/|\.})[1] }
versions.each do |version|
desc "Test acts_as_paranoid against #{version}"
task version do
sh "BUNDLE_GEMFILE='gemfiles/#{version}.gemfile' bundle install --quiet"
sh "BUNDLE_GEMFILE='gemfiles/#{version}.gemfile' bundle exec rake -t test"
end
end
desc "Run all tests for acts_as_paranoid"
task all: versions
end
Rake::TestTask.new(:test) do |t|
t.libs << "test"
t.pattern = "test/test_*.rb"
t.verbose = true
end
RuboCop::RakeTask.new
desc "Generate documentation for the acts_as_paranoid plugin."
Rake::RDocTask.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = "rdoc"
rdoc.title = "ActsAsParanoid"
rdoc.options << "--line-numbers" << "--inline-source"
rdoc.rdoc_files.include("README")
rdoc.rdoc_files.include("lib/**/*.rb")
end
desc "Install gem locally"
task install: :build do
system "gem install pkg/#{gemspec.name}-#{gemspec.version}"
end
desc "Clean automatically generated files"
task :clean do
FileUtils.rm_rf "pkg"
end
desc "Default: run unit tests"
task default: "test:all"