diff options
author | Heiko Bernlöhr <Heiko.Bernloehr@FreeIT.de> | 2021-12-18 19:49:37 +0100 |
---|---|---|
committer | Heiko Bernlöhr <Heiko.Bernloehr@FreeIT.de> | 2022-09-15 09:58:24 +0200 |
commit | e731b29f11d51d21b27a17949cc9302f22c5012c (patch) | |
tree | f17cd5261a8862c0a45583f9afa84baddaf214d9 /bin | |
parent | ed3904f66a623fed71dc898a85ac04c7d770a745 (diff) | |
download | ecs-e731b29f11d51d21b27a17949cc9302f22c5012c.tar.gz ecs-e731b29f11d51d21b27a17949cc9302f22c5012c.zip |
Rails 6.1.4.4
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/rails | 4 | ||||
-rwxr-xr-x | bin/rake | 4 | ||||
-rwxr-xr-x | bin/setup | 8 | ||||
-rwxr-xr-x | bin/spring | 15 | ||||
-rwxr-xr-x | bin/yarn | 12 |
5 files changed, 17 insertions, 26 deletions
@@ -1,4 +1,4 @@ #!/usr/bin/env ruby APP_PATH = File.expand_path('../config/application', __dir__) -require_relative '../config/boot' -require 'rails/commands' +require_relative "../config/boot" +require "rails/commands" @@ -1,4 +1,4 @@ #!/usr/bin/env ruby -require_relative '../config/boot' -require 'rake' +require_relative "../config/boot" +require "rake" Rake.application.run @@ -1,5 +1,5 @@ #!/usr/bin/env ruby -require 'fileutils' +require "fileutils" # path to your application root. APP_ROOT = File.expand_path('..', __dir__) @@ -9,8 +9,8 @@ def system!(*args) end FileUtils.chdir APP_ROOT do - # This script is a way to setup or update your development environment automatically. - # This script is idempotent, so that you can run it at anytime and get an expectable outcome. + # 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 ==' @@ -18,7 +18,7 @@ FileUtils.chdir APP_ROOT do system('bundle check') || system!('bundle install') # Install JavaScript dependencies - # system('bin/yarn') + system! 'bin/yarn' # puts "\n== Copying sample files ==" # unless File.exist?('config/database.yml') diff --git a/bin/spring b/bin/spring deleted file mode 100755 index 7fe232c..0000000 --- a/bin/spring +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env ruby - -# This file loads spring without using Bundler, in order to be fast. -# It gets overwritten when you run the `spring binstub` command. - -unless defined?(Spring) - require 'rubygems' - require 'bundler' - - if (match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m)) - Gem.paths = { 'GEM_PATH' => [Bundler.bundle_path.to_s, *Gem.path].uniq.join(Gem.path_separator) } - gem 'spring', match[1] - require 'spring/binstub' - end -end @@ -1,9 +1,15 @@ #!/usr/bin/env ruby APP_ROOT = File.expand_path('..', __dir__) Dir.chdir(APP_ROOT) do - begin - exec "yarnpkg", *ARGV - rescue Errno::ENOENT + yarn = ENV["PATH"].split(File::PATH_SEPARATOR). + select { |dir| File.expand_path(dir) != __dir__ }. + product(["yarn", "yarn.cmd", "yarn.ps1"]). + map { |dir, file| File.expand_path(file, dir) }. + find { |file| File.executable?(file) } + + if yarn + exec yarn, *ARGV + else $stderr.puts "Yarn executable was not detected in the system." $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install" exit 1 |