aboutsummaryrefslogtreecommitdiffstats
path: root/test/dummy/bin
diff options
context:
space:
mode:
authorDino Maric <dino.onex@gmail.com>2017-07-27 22:15:38 +0200
committerDavid Heinemeier Hansson <david@loudthinking.com>2017-07-27 15:15:38 -0500
commite64e3f14fd255d91ac0aa7a272741df08da82701 (patch)
tree1fccbf0786ae9f981eae1b8cb736856b50479c23 /test/dummy/bin
parent293db49b7f5969d11d5599f97bd968dbe64c7f8b (diff)
downloadrails-e64e3f14fd255d91ac0aa7a272741df08da82701.tar.gz
rails-e64e3f14fd255d91ac0aa7a272741df08da82701.tar.bz2
rails-e64e3f14fd255d91ac0aa7a272741df08da82701.zip
Introduce the Dummy. (#70)
Diffstat (limited to 'test/dummy/bin')
-rwxr-xr-xtest/dummy/bin/bundle3
-rwxr-xr-xtest/dummy/bin/rails4
-rwxr-xr-xtest/dummy/bin/rake4
-rwxr-xr-xtest/dummy/bin/yarn11
4 files changed, 22 insertions, 0 deletions
diff --git a/test/dummy/bin/bundle b/test/dummy/bin/bundle
new file mode 100755
index 0000000000..66e9889e8b
--- /dev/null
+++ b/test/dummy/bin/bundle
@@ -0,0 +1,3 @@
+#!/usr/bin/env ruby
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
+load Gem.bin_path('bundler', 'bundle')
diff --git a/test/dummy/bin/rails b/test/dummy/bin/rails
new file mode 100755
index 0000000000..0739660237
--- /dev/null
+++ b/test/dummy/bin/rails
@@ -0,0 +1,4 @@
+#!/usr/bin/env ruby
+APP_PATH = File.expand_path('../config/application', __dir__)
+require_relative '../config/boot'
+require 'rails/commands'
diff --git a/test/dummy/bin/rake b/test/dummy/bin/rake
new file mode 100755
index 0000000000..17240489f6
--- /dev/null
+++ b/test/dummy/bin/rake
@@ -0,0 +1,4 @@
+#!/usr/bin/env ruby
+require_relative '../config/boot'
+require 'rake'
+Rake.application.run
diff --git a/test/dummy/bin/yarn b/test/dummy/bin/yarn
new file mode 100755
index 0000000000..c2bacef836
--- /dev/null
+++ b/test/dummy/bin/yarn
@@ -0,0 +1,11 @@
+#!/usr/bin/env ruby
+VENDOR_PATH = File.expand_path('..', __dir__)
+Dir.chdir(VENDOR_PATH) do
+ begin
+ exec "yarnpkg #{ARGV.join(" ")}"
+ rescue Errno::ENOENT
+ $stderr.puts "Yarn executable was not detected in the system."
+ $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
+ exit 1
+ end
+end