mirror of
https://github.com/pry/pry-rails.git
synced 2022-11-09 12:36:03 -05:00
37 lines
876 B
Ruby
37 lines
876 B
Ruby
require "rubygems"
|
|
require "bundler/setup"
|
|
require "bundler/gem_tasks"
|
|
require "rake/testtask"
|
|
require "appraisal"
|
|
|
|
Rake::TestTask.new do |t|
|
|
t.libs.concat %w(pry-rails spec)
|
|
t.pattern = "spec/*_spec.rb"
|
|
end
|
|
|
|
desc 'Start the Rails server'
|
|
task :server => :development_env do
|
|
require 'rails/commands/server'
|
|
Rails::Server.start(
|
|
:server => 'WEBrick',
|
|
:environment => 'development',
|
|
:Host => '0.0.0.0',
|
|
:Port => 3000,
|
|
:config => 'config/config.ru'
|
|
)
|
|
end
|
|
|
|
desc 'Start the Rails console'
|
|
task :console => :development_env do
|
|
require 'rails/commands/console'
|
|
Rails::Console.start(Rails.application)
|
|
end
|
|
|
|
task :development_env do
|
|
ENV['RAILS_ENV'] = 'development'
|
|
require File.expand_path('../spec/config/environment', __FILE__)
|
|
Dir.chdir(Rails.application.root)
|
|
end
|
|
|
|
# Must invoke indirectly, using `rake appraisal`.
|
|
task :default => [:test]
|