added 260907 version of worker toolkit
This commit is contained in:
3
worker-toolkit-flaredown/repo/backend/bin/bundle
Executable file
3
worker-toolkit-flaredown/repo/backend/bin/bundle
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env ruby
|
||||
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", __FILE__)
|
||||
load Gem.bin_path("bundler", "bundle")
|
||||
9
worker-toolkit-flaredown/repo/backend/bin/rails
Executable file
9
worker-toolkit-flaredown/repo/backend/bin/rails
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env ruby
|
||||
if ENV["RAILS_ENV"] == "test"
|
||||
require "simplecov"
|
||||
SimpleCov.start "rails"
|
||||
puts "required simplecov"
|
||||
end
|
||||
APP_PATH = File.expand_path("../config/application", __dir__)
|
||||
require_relative "../config/boot"
|
||||
require "rails/commands"
|
||||
4
worker-toolkit-flaredown/repo/backend/bin/rake
Executable file
4
worker-toolkit-flaredown/repo/backend/bin/rake
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env ruby
|
||||
require_relative "../config/boot"
|
||||
require "rake"
|
||||
Rake.application.run
|
||||
16
worker-toolkit-flaredown/repo/backend/bin/rspec
Executable file
16
worker-toolkit-flaredown/repo/backend/bin/rspec
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env ruby
|
||||
#
|
||||
# This file was generated by Bundler.
|
||||
#
|
||||
# The application 'rspec' is installed as part of a gem, and
|
||||
# this file is here to facilitate running it.
|
||||
#
|
||||
|
||||
require "pathname"
|
||||
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
||||
Pathname.new(__FILE__).realpath)
|
||||
|
||||
require "rubygems"
|
||||
require "bundler/setup"
|
||||
|
||||
load Gem.bin_path("rspec-core", "rspec")
|
||||
33
worker-toolkit-flaredown/repo/backend/bin/setup
Executable file
33
worker-toolkit-flaredown/repo/backend/bin/setup
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env ruby
|
||||
require "fileutils"
|
||||
|
||||
# path to your application root.
|
||||
APP_ROOT = File.expand_path("..", __dir__)
|
||||
|
||||
def system!(*args)
|
||||
system(*args, exception: true)
|
||||
end
|
||||
|
||||
FileUtils.chdir APP_ROOT do
|
||||
# This script is a way to set up or update your development environment automatically.
|
||||
# This script is idempotent, so that you can run it at any time and get an expectable outcome.
|
||||
# Add necessary setup steps to this file.
|
||||
|
||||
puts "== Installing dependencies =="
|
||||
system! "gem install bundler --conservative"
|
||||
system("bundle check") || system!("bundle install")
|
||||
|
||||
# puts "\n== Copying sample files =="
|
||||
# unless File.exist?("config/database.yml")
|
||||
# FileUtils.cp "config/database.yml.sample", "config/database.yml"
|
||||
# end
|
||||
|
||||
puts "\n== Preparing database =="
|
||||
system! "bin/rails db:prepare"
|
||||
|
||||
puts "\n== Removing old logs and tempfiles =="
|
||||
system! "bin/rails log:clear tmp:clear"
|
||||
|
||||
puts "\n== Restarting application server =="
|
||||
system! "bin/rails restart"
|
||||
end
|
||||
4
worker-toolkit-flaredown/repo/backend/bin/system_spec
Executable file
4
worker-toolkit-flaredown/repo/backend/bin/system_spec
Executable file
@@ -0,0 +1,4 @@
|
||||
# Eg:
|
||||
# bin/system_spec
|
||||
# bin/system_spec --format doc spec/system/signup_spec.rb
|
||||
bundle exec rspec --tag type:system "$@"
|
||||
29
worker-toolkit-flaredown/repo/backend/bin/update
Executable file
29
worker-toolkit-flaredown/repo/backend/bin/update
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env ruby
|
||||
require "pathname"
|
||||
require "fileutils"
|
||||
include FileUtils
|
||||
|
||||
# path to your application root.
|
||||
APP_ROOT = Pathname.new File.expand_path("../../", __FILE__)
|
||||
|
||||
def system!(*args)
|
||||
system(*args) || abort("\n== Command #{args} failed ==")
|
||||
end
|
||||
|
||||
chdir APP_ROOT do
|
||||
# This script is a way to update your development environment automatically.
|
||||
# Add necessary update steps to this file.
|
||||
|
||||
puts "== Installing dependencies =="
|
||||
system! "gem install bundler --conservative"
|
||||
system "bundle check" or system! "bundle install"
|
||||
|
||||
puts "\n== Updating database =="
|
||||
system! "bin/rails db:migrate"
|
||||
|
||||
puts "\n== Removing old logs and tempfiles =="
|
||||
system! "bin/rails log:clear tmp:clear"
|
||||
|
||||
puts "\n== Restarting application server =="
|
||||
system! "bin/rails restart"
|
||||
end
|
||||
Reference in New Issue
Block a user