From 94ad9f9be593d2e56f2444cbc9fbd91367433dcb Mon Sep 17 00:00:00 2001 From: yafeilee Date: Sun, 11 May 2014 18:54:28 +0800 Subject: [PATCH] add spring --- Gemfile | 1 + Gemfile.lock | 2 ++ bin/rails | 9 +++++++++ bin/rake | 7 +++++++ bin/spring | 18 ++++++++++++++++++ 5 files changed, 37 insertions(+) create mode 100755 bin/rails create mode 100755 bin/rake create mode 100755 bin/spring diff --git a/Gemfile b/Gemfile index 0c1a646..447ddf8 100644 --- a/Gemfile +++ b/Gemfile @@ -32,6 +32,7 @@ gem 'sidekiq' gem 'rest-client' group :development do + gem 'spring' gem 'quiet_assets' gem 'guard' gem 'guard-rails' diff --git a/Gemfile.lock b/Gemfile.lock index b8e1b82..d9bba1e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -228,6 +228,7 @@ GEM railties (>= 3.0, < 4.2) slim (~> 2.0) slop (3.5.0) + spring (1.1.2) sprockets (2.8.0) hike (~> 1.2) multi_json (~> 1.0) @@ -293,4 +294,5 @@ DEPENDENCIES sidekiq simple_form slim-rails + spring uglifier (>= 1.3.0) diff --git a/bin/rails b/bin/rails new file mode 100755 index 0000000..0e4077c --- /dev/null +++ b/bin/rails @@ -0,0 +1,9 @@ +#!/usr/bin/env ruby +begin + load File.expand_path("../spring", __FILE__) +rescue LoadError +end + +APP_PATH = File.expand_path('../../config/application', __FILE__) +require File.expand_path('../../config/boot', __FILE__) +require 'rails/commands' diff --git a/bin/rake b/bin/rake new file mode 100755 index 0000000..0fb4e07 --- /dev/null +++ b/bin/rake @@ -0,0 +1,7 @@ +#!/usr/bin/env ruby +begin + load File.expand_path("../spring", __FILE__) +rescue LoadError +end +require 'bundler/setup' +load Gem.bin_path('rake', 'rake') diff --git a/bin/spring b/bin/spring new file mode 100755 index 0000000..253ec37 --- /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