forked from glebm/rails_email_preview
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRakefile
More file actions
36 lines (31 loc) · 779 Bytes
/
Copy pathRakefile
File metadata and controls
36 lines (31 loc) · 779 Bytes
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
# encoding: UTF-8
begin
require 'bundler/setup'
rescue LoadError
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
end
# Load dummy app tasks
if ENV['DUMMY']
APP_RAKEFILE = File.expand_path('../spec/dummy/Rakefile', __FILE__)
load 'rails/tasks/engine.rake'
end
Bundler::GemHelper.install_tasks
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
task default: :spec
desc 'Start development web server'
task :dev do
host = 'localhost'
port = 9292
require 'puma'
require 'rails/commands/server'
ENV['RACK_ENV'] = ENV['RAILS_ENV'] = 'development'
Dir.chdir 'spec/dummy'
Rack::Server.start(
environment: 'development',
Host: host,
Port: port,
config: 'config.ru',
server: 'puma'
)
end