diff options
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/bundle | 3 | ||||
| -rwxr-xr-x | bin/rails | 31 | ||||
| -rwxr-xr-x | bin/rake | 4 | ||||
| -rwxr-xr-x | bin/setup | 29 |
4 files changed, 39 insertions, 28 deletions
diff --git a/bin/bundle b/bin/bundle new file mode 100755 index 0000000..66e9889 --- /dev/null +++ b/bin/bundle | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | #!/usr/bin/env ruby | ||
| 2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) | ||
| 3 | load Gem.bin_path('bundler', 'bundle') | ||
| @@ -1,29 +1,4 @@ | |||
| 1 | #!/usr/bin/env ruby | 1 | #!/usr/bin/env ruby |
| 2 | # frozen_string_literal: true | 2 | APP_PATH = File.expand_path('../../config/application', __FILE__) |
| 3 | 3 | require_relative '../config/boot' | |
| 4 | # | 4 | require 'rails/commands' |
| 5 | # This file was generated by Bundler. | ||
| 6 | # | ||
| 7 | # The application 'rails' is installed as part of a gem, and | ||
| 8 | # this file is here to facilitate running it. | ||
| 9 | # | ||
| 10 | |||
| 11 | require "pathname" | ||
| 12 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", | ||
| 13 | Pathname.new(__FILE__).realpath) | ||
| 14 | |||
| 15 | bundle_binstub = File.expand_path("../bundle", __FILE__) | ||
| 16 | |||
| 17 | if File.file?(bundle_binstub) | ||
| 18 | if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/ | ||
| 19 | load(bundle_binstub) | ||
| 20 | else | ||
| 21 | abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. | ||
| 22 | Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") | ||
| 23 | end | ||
| 24 | end | ||
| 25 | |||
| 26 | require "rubygems" | ||
| 27 | require "bundler/setup" | ||
| 28 | |||
| 29 | load Gem.bin_path("railties", "rails") | ||
diff --git a/bin/rake b/bin/rake new file mode 100755 index 0000000..1724048 --- /dev/null +++ b/bin/rake | |||
| @@ -0,0 +1,4 @@ | |||
| 1 | #!/usr/bin/env ruby | ||
| 2 | require_relative '../config/boot' | ||
| 3 | require 'rake' | ||
| 4 | Rake.application.run | ||
diff --git a/bin/setup b/bin/setup new file mode 100755 index 0000000..acdb2c1 --- /dev/null +++ b/bin/setup | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | #!/usr/bin/env ruby | ||
| 2 | require 'pathname' | ||
| 3 | |||
| 4 | # path to your application root. | ||
| 5 | APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) | ||
| 6 | |||
| 7 | Dir.chdir APP_ROOT do | ||
| 8 | # This script is a starting point to setup your application. | ||
| 9 | # Add necessary setup steps to this file: | ||
| 10 | |||
| 11 | puts "== Installing dependencies ==" | ||
| 12 | system "gem install bundler --conservative" | ||
| 13 | system "bundle check || bundle install" | ||
| 14 | |||
| 15 | # puts "\n== Copying sample files ==" | ||
| 16 | # unless File.exist?("config/database.yml") | ||
| 17 | # system "cp config/database.yml.sample config/database.yml" | ||
| 18 | # end | ||
| 19 | |||
| 20 | puts "\n== Preparing database ==" | ||
| 21 | system "bin/rake db:setup" | ||
| 22 | |||
| 23 | puts "\n== Removing old logs and tempfiles ==" | ||
| 24 | system "rm -f log/*" | ||
| 25 | system "rm -rf tmp/cache" | ||
| 26 | |||
| 27 | puts "\n== Restarting application server ==" | ||
| 28 | system "touch tmp/restart.txt" | ||
| 29 | end | ||
