-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rakefile
33 lines (26 loc) · 872 Bytes
/
Rakefile
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
begin
require "bundler/setup"
rescue LoadError
puts "You must `gem install bundler` and `bundle install` to run rake tasks"
end
gemfile_name = File.basename(ENV["BUNDLE_GEMFILE"], ".gemfile")
rails_version = gemfile_name == "Gemfile" ? "5.1" : gemfile_name
ENV["COGY_DUMMY_APP_PATH"] = File.expand_path("../test/dummies/#{rails_version}", __FILE__)
APP_RAKEFILE = "#{ENV['COGY_DUMMY_APP_PATH']}/Rakefile".freeze
load "rails/tasks/engine.rake"
load "rails/tasks/statistics.rake"
Bundler::GemHelper.install_tasks
require "rake/testtask"
Rake::TestTask.new(:test) do |t|
t.libs << "lib"
t.libs << "test"
t.pattern = "test/**/*_test.rb"
t.verbose = false
end
require "yard"
YARD::Rake::YardocTask.new do |t|
t.files = ["app/**/*.rb", "config/**/*.rb", "lib/**/*.rb"]
end
require "rubocop/rake_task"
RuboCop::RakeTask.new
task default: [:test, :rubocop]