-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
37 lines (30 loc) · 862 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_relative './config/environment'
require 'dotenv/tasks'
require 'sinatra/asset_pipeline/task'
require 'bundler/audit/task'
require './nightbot-mover'
Bundler::Audit::Task.new
Sinatra::AssetPipeline::Task.define! NightbotMover
begin
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
rescue LoadError
end
Dir['./lib/tasks/*.rake'].each { |f| load f }
task console: :environment do
STDOUT.puts "Console Environment: #{ENV.fetch('RACK_ENV')}"
Pry.config.add_hook(:before_session, :enable_sql_logger) do
end
Pry.start
end
task environment: :dotenv do
Dotenv.load(".env.#{ENV.fetch('RACK_ENV')}")
require File.expand_path('config/environment', File.dirname(__FILE__))
end
namespace :db do
task load_config: :environment do
require './config/environment'
require './nightbot-mover'
end
end
task default: ['spec']