Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJonne Haß <me@jhass.eu>2014-11-30 23:09:43 +0300
committerJonne Haß <me@jhass.eu>2014-12-01 10:06:07 +0300
commita580171e3239a298f8edc7f500a7041ef3fa4171 (patch)
tree52ca228372fe09496aeed1cd07a7533902fe1732 /bin
parent4cadc2d51c2f61730fe18148532f550b1d64a02c (diff)
Replace spork with spring, update & use binstubs
Spring is the recommended application preloader for rails
Diffstat (limited to 'bin')
-rwxr-xr-xbin/autospec16
-rwxr-xr-xbin/compass16
-rwxr-xr-xbin/cucumber17
-rwxr-xr-xbin/foreman16
-rwxr-xr-xbin/rails4
-rwxr-xr-xbin/rake4
-rwxr-xr-xbin/rspec17
-rwxr-xr-xbin/sass16
-rwxr-xr-xbin/sass-convert16
-rwxr-xr-xbin/scss16
-rwxr-xr-xbin/spork16
-rwxr-xr-xbin/spring18
12 files changed, 34 insertions, 138 deletions
diff --git a/bin/autospec b/bin/autospec
deleted file mode 100755
index 64dcb9cb0..000000000
--- a/bin/autospec
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/usr/bin/env ruby
-#
-# This file was generated by Bundler.
-#
-# The application 'autospec' 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', 'autospec')
diff --git a/bin/compass b/bin/compass
deleted file mode 100755
index e1ac74938..000000000
--- a/bin/compass
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/usr/bin/env ruby
-#
-# This file was generated by Bundler.
-#
-# The application 'compass' 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('compass', 'compass')
diff --git a/bin/cucumber b/bin/cucumber
index caa06543c..12971cdce 100755
--- a/bin/cucumber
+++ b/bin/cucumber
@@ -1,16 +1,7 @@
#!/usr/bin/env ruby
-#
-# This file was generated by Bundler.
-#
-# The application 'cucumber' 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'
+begin
+ load File.expand_path("../spring", __FILE__)
+rescue LoadError
+end
require 'bundler/setup'
-
load Gem.bin_path('cucumber', 'cucumber')
diff --git a/bin/foreman b/bin/foreman
deleted file mode 100755
index 586c07e08..000000000
--- a/bin/foreman
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/usr/bin/env ruby
-#
-# This file was generated by Bundler.
-#
-# The application 'foreman' 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('foreman', 'foreman')
diff --git a/bin/rails b/bin/rails
index 728cd85aa..7feb6a30e 100755
--- a/bin/rails
+++ b/bin/rails
@@ -1,4 +1,8 @@
#!/usr/bin/env ruby
+begin
+ load File.expand_path("../spring", __FILE__)
+rescue LoadError
+end
APP_PATH = File.expand_path('../../config/application', __FILE__)
require_relative '../config/boot'
require 'rails/commands'
diff --git a/bin/rake b/bin/rake
index 17240489f..8017a0271 100755
--- a/bin/rake
+++ b/bin/rake
@@ -1,4 +1,8 @@
#!/usr/bin/env ruby
+begin
+ load File.expand_path("../spring", __FILE__)
+rescue LoadError
+end
require_relative '../config/boot'
require 'rake'
Rake.application.run
diff --git a/bin/rspec b/bin/rspec
index 0c86b5c6f..20060ebd7 100755
--- a/bin/rspec
+++ b/bin/rspec
@@ -1,16 +1,7 @@
#!/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'
+begin
+ load File.expand_path("../spring", __FILE__)
+rescue LoadError
+end
require 'bundler/setup'
-
load Gem.bin_path('rspec-core', 'rspec')
diff --git a/bin/sass b/bin/sass
deleted file mode 100755
index d65bb10a3..000000000
--- a/bin/sass
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/usr/bin/env ruby
-#
-# This file was generated by Bundler.
-#
-# The application 'sass' 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('sass', 'sass')
diff --git a/bin/sass-convert b/bin/sass-convert
deleted file mode 100755
index ddde743f3..000000000
--- a/bin/sass-convert
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/usr/bin/env ruby
-#
-# This file was generated by Bundler.
-#
-# The application 'sass-convert' 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('sass', 'sass-convert')
diff --git a/bin/scss b/bin/scss
deleted file mode 100755
index 9f5e435d6..000000000
--- a/bin/scss
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/usr/bin/env ruby
-#
-# This file was generated by Bundler.
-#
-# The application 'scss' 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('sass', 'scss')
diff --git a/bin/spork b/bin/spork
deleted file mode 100755
index a127260ef..000000000
--- a/bin/spork
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/usr/bin/env ruby
-#
-# This file was generated by Bundler.
-#
-# The application 'spork' 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('spork', 'spork')
diff --git a/bin/spring b/bin/spring
new file mode 100755
index 000000000..7f24d96fb
--- /dev/null
+++ b/bin/spring
@@ -0,0 +1,18 @@
+#!/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)
+ ENV["GEM_PATH"] = ([Bundler.bundle_path.to_s] + Gem.path).join(File::PATH_SEPARATOR)
+ ENV["GEM_HOME"] = ""
+ Gem.paths = ENV
+
+ gem "spring", match[1]
+ require "spring/binstub"
+ end
+end