-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
38 lines (30 loc) · 789 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
require 'rubygems'
require 'bundler'
require "bundler/setup"
begin
Bundler.setup(:default, :development)
rescue Bundler::BundlerError => e
$stderr.puts e.message
$stderr.puts 'Run `bundle install` to install missing gems'
exit e.status_code
end
task :environment do
ENV['RACK_ENV'] ||= 'development'
require File.expand_path('../config/environment', __FILE__)
end
desc "API Routes"
task routes: :environment do
API::Base.routes.each do |api|
method = api.request_method.ljust(10)
path = api.path
puts " #{method} #{path}"
end
end
load "tasks/otr-activerecord.rake"
namespace :db do
task :environment do
require_relative 'config/environment'
end
end
#Load tasks
Dir.glob('lib/tasks/*.rake').each { |task| load task }