Skip to content

Commit

Permalink
Adding spring gem
Browse files Browse the repository at this point in the history
  • Loading branch information
nunommc committed Nov 13, 2015
1 parent 8fef4f8 commit ee37ea2
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 3 deletions.
7 changes: 5 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,25 +47,28 @@ end

group :staging do
gem 'rails_12factor'
gem 'factory_girl_rails' # used on MailPreview
end

group :development do
gem 'foreman'
gem 'mailcatcher'
end

group :development, :development, :test do
gem 'factory_girl_rails' # used on MailPreview, hence needed on staging
end

group :development, :test do
gem 'brakeman'
gem 'capybara'
gem 'factory_girl_rails'
gem 'jshint'
gem 'launchy'
gem 'minitest'
gem 'poltergeist'
gem 'pry-rails'
gem 'pry-byebug'
gem 'rspec-rails'
gem 'spring-commands-rspec'
gem 'shoulda-matchers'
gem 'simplecov'
gem 'simplecov-rcov'
Expand Down
4 changes: 4 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,9 @@ GEM
eventmachine (~> 1.0.0)
thin (~> 1.5.0)
slop (3.6.0)
spring (1.4.1)
spring-commands-rspec (1.0.4)
spring (>= 0.9.1)
sprockets (2.12.4)
hike (~> 1.2)
multi_json (~> 1.0)
Expand Down Expand Up @@ -567,6 +570,7 @@ DEPENDENCIES
simplecov
simplecov-rcov
site_prism
spring-commands-rspec
timecop
uglifier (>= 1.3.0)
unf
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ You can also delete the index:

To run specs without Elasticsearch:

`bundle exec rspec . --tag ~elastic`
`bin/rspec . --tag ~elastic`

## Images

Expand Down
7 changes: 7 additions & 0 deletions bin/rspec
Original file line number Diff line number Diff line change
@@ -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('rspec-core', 'rspec')
15 changes: 15 additions & 0 deletions bin/spring
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/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 }
gem 'spring', match[1]
require 'spring/binstub'
end
end

0 comments on commit ee37ea2

Please sign in to comment.