aboutsummaryrefslogtreecommitdiff
path: root/bin/spring
diff options
context:
space:
mode:
authorhellekin <hellekin@cepheide.org>2021-01-22 05:32:15 +0100
committerhellekin <hellekin@cepheide.org>2021-01-22 05:32:15 +0100
commitb54a8458d5029b3494165b7430e21b3ae34ecc0c (patch)
tree32ea6fc6b8774f672325fec52f0ffc97229a9568 /bin/spring
parent1c1aead78192982e221179de6688b944e5b01bf6 (diff)
downloadincommon-map-b54a8458d5029b3494165b7430e21b3ae34ecc0c.tar.gz
Upgrade Rails and add StimulusJS support
Diffstat (limited to 'bin/spring')
-rwxr-xr-xbin/spring14
1 files changed, 14 insertions, 0 deletions
diff --git a/bin/spring b/bin/spring
new file mode 100755
index 0000000..9675cce
--- /dev/null
+++ b/bin/spring
@@ -0,0 +1,14 @@
+#!/usr/bin/env ruby
+if !defined?(Spring) && [nil, "development", "test"].include?(ENV["RAILS_ENV"])
+ gem "bundler"
+ require "bundler"
+
+ # Load Spring without loading other gems in the Gemfile, for speed.
+ Bundler.locked_gems.specs.find { |spec| spec.name == "spring" }&.tap do |spring|
+ Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
+ gem "spring", spring.version
+ require "spring/binstub"
+ rescue Gem::LoadError
+ # Ignore when Spring is not installed.
+ end
+end