makeup
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
begin
|
begin
|
||||||
load File.expand_path("../spring", __FILE__)
|
load File.expand_path('../spring', __FILE__)
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
end
|
end
|
||||||
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
begin
|
begin
|
||||||
load File.expand_path("../spring", __FILE__)
|
load File.expand_path('../spring', __FILE__)
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
end
|
end
|
||||||
require_relative '../config/boot'
|
require_relative '../config/boot'
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ Dir.chdir APP_ROOT do
|
|||||||
# This script is a starting point to setup your application.
|
# This script is a starting point to setup your application.
|
||||||
# Add necessary setup steps to this file:
|
# Add necessary setup steps to this file:
|
||||||
|
|
||||||
puts "== Installing dependencies =="
|
puts '== Installing dependencies =='
|
||||||
system "gem install bundler --conservative"
|
system 'gem install bundler --conservative'
|
||||||
system "bundle check || bundle install"
|
system 'bundle check || bundle install'
|
||||||
|
|
||||||
# puts "\n== Copying sample files =="
|
# puts "\n== Copying sample files =="
|
||||||
# unless File.exist?("config/database.yml")
|
# unless File.exist?("config/database.yml")
|
||||||
@@ -18,12 +18,12 @@ Dir.chdir APP_ROOT do
|
|||||||
# end
|
# end
|
||||||
|
|
||||||
puts "\n== Preparing database =="
|
puts "\n== Preparing database =="
|
||||||
system "bin/rake db:setup"
|
system 'bin/rake db:setup'
|
||||||
|
|
||||||
puts "\n== Removing old logs and tempfiles =="
|
puts "\n== Removing old logs and tempfiles =="
|
||||||
system "rm -f log/*"
|
system 'rm -f log/*'
|
||||||
system "rm -rf tmp/cache"
|
system 'rm -rf tmp/cache'
|
||||||
|
|
||||||
puts "\n== Restarting application server =="
|
puts "\n== Restarting application server =="
|
||||||
system "touch tmp/restart.txt"
|
system 'touch tmp/restart.txt'
|
||||||
end
|
end
|
||||||
|
|||||||
+5
-5
@@ -4,12 +4,12 @@
|
|||||||
# It gets overwritten when you run the `spring binstub` command.
|
# It gets overwritten when you run the `spring binstub` command.
|
||||||
|
|
||||||
unless defined?(Spring)
|
unless defined?(Spring)
|
||||||
require "rubygems"
|
require 'rubygems'
|
||||||
require "bundler"
|
require 'bundler'
|
||||||
|
|
||||||
if (match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m))
|
if (match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m))
|
||||||
Gem.paths = { "GEM_PATH" => [Bundler.bundle_path.to_s, *Gem.path].uniq }
|
Gem.paths = { 'GEM_PATH' => [Bundler.bundle_path.to_s, *Gem.path].uniq }
|
||||||
gem "spring", match[1]
|
gem 'spring', match[1]
|
||||||
require "spring/binstub"
|
require 'spring/binstub'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
require File.expand_path('../boot', __FILE__)
|
require File.expand_path('../boot', __FILE__)
|
||||||
|
|
||||||
require "rails"
|
require 'rails'
|
||||||
# Pick the frameworks you want:
|
# Pick the frameworks you want:
|
||||||
require "active_model/railtie"
|
require 'active_model/railtie'
|
||||||
require "active_job/railtie"
|
require 'active_job/railtie'
|
||||||
# require "active_record/railtie"
|
# require "active_record/railtie"
|
||||||
require "action_controller/railtie"
|
require 'action_controller/railtie'
|
||||||
require "action_mailer/railtie"
|
require 'action_mailer/railtie'
|
||||||
require "action_view/railtie"
|
require 'action_view/railtie'
|
||||||
require "sprockets/railtie"
|
require 'sprockets/railtie'
|
||||||
# require "rails/test_unit/railtie"
|
# require "rails/test_unit/railtie"
|
||||||
|
|
||||||
# Require the gems listed in Gemfile, including any gems
|
# Require the gems listed in Gemfile, including any gems
|
||||||
|
|||||||
Reference in New Issue
Block a user