summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorHeiko Bernlöhr <Heiko.Bernloehr@FreeIT.de>2021-12-18 19:49:37 +0100
committerHeiko Bernlöhr <Heiko.Bernloehr@FreeIT.de>2022-09-15 09:58:24 +0200
commite731b29f11d51d21b27a17949cc9302f22c5012c (patch)
treef17cd5261a8862c0a45583f9afa84baddaf214d9 /bin
parented3904f66a623fed71dc898a85ac04c7d770a745 (diff)
downloadecs-e731b29f11d51d21b27a17949cc9302f22c5012c.tar.gz
ecs-e731b29f11d51d21b27a17949cc9302f22c5012c.zip
Rails 6.1.4.4
Diffstat (limited to 'bin')
-rwxr-xr-xbin/rails4
-rwxr-xr-xbin/rake4
-rwxr-xr-xbin/setup8
-rwxr-xr-xbin/spring15
-rwxr-xr-xbin/yarn12
5 files changed, 17 insertions, 26 deletions
diff --git a/bin/rails b/bin/rails
index 0739660..6fb4e40 100755
--- a/bin/rails
+++ b/bin/rails
@@ -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"
diff --git a/bin/rake b/bin/rake
index 1724048..4fbf10b 100755
--- a/bin/rake
+++ b/bin/rake
@@ -1,4 +1,4 @@
#!/usr/bin/env ruby
-require_relative '../config/boot'
-require 'rake'
+require_relative "../config/boot"
+require "rake"
Rake.application.run
diff --git a/bin/setup b/bin/setup
index 5853b5e..90700ac 100755
--- a/bin/setup
+++ b/bin/setup
@@ -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
diff --git a/bin/yarn b/bin/yarn
index 460dd56..9fab2c3 100755
--- a/bin/yarn
+++ b/bin/yarn
@@ -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