-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
39 lines (30 loc) · 803 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
34
35
36
37
38
39
# Copyright (c) 2018 Danil Pismenny <[email protected]>
# frozen_string_literal: true
# require 'rubygems'
# require 'bundler/setup'
require_relative 'config/application'
require 'rake'
task :environment do
ENV['RACK_ENV'] ||= 'development'
require File.expand_path('config/environment', __dir__)
end
task routes: :environment do
Zoldy::API.routes.each do |route|
method = route.request_method.ljust(10)
path = route.origin
puts " #{method} #{path}"
end
end
begin
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
rescue LoadError => err
puts err
end
require 'rubocop/rake_task'
RuboCop::RakeTask.new(:rubocop) do |t|
t.options = ['--display-cop-names']
t.fail_on_error = true
t.requires << 'rubocop-rspec'
end
task default: %i[spec rubocop]