diff options
| author | mo <mokha@cisco.com> | 2017-04-27 21:07:40 -0600 |
|---|---|---|
| committer | mo <mokha@cisco.com> | 2017-04-27 21:07:40 -0600 |
| commit | cfcfea9f19fdb11778c66f699f2192a5db5469fd (patch) | |
| tree | c97d535869e18000842195c2bee916300d61f363 | |
| parent | b007fbbe0d857f822933e0ffb7fe6b6f8058e5b2 (diff) | |
add rspec bin stub.
| -rw-r--r-- | Gemfile | 1 | ||||
| -rw-r--r-- | Gemfile.lock | 3 | ||||
| -rw-r--r-- | app/views/layouts/application.html.erb | 1 | ||||
| -rwxr-xr-x | bin/rspec | 14 | ||||
| -rwxr-xr-x | bin/spring | 17 |
5 files changed, 35 insertions, 1 deletions
@@ -56,6 +56,7 @@ group :development do gem 'lol_dba' gem 'pry-rails' gem 'web-console', '~> 2.0' + gem 'spring-commands-rspec' end group :development, :test do diff --git a/Gemfile.lock b/Gemfile.lock index 6c93c60b..7467736d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -484,6 +484,8 @@ GEM spank (1.0.1441140881) spring (2.0.1) activesupport (>= 4.2) + spring-commands-rspec (1.0.4) + spring (>= 0.9.1) sprockets (3.7.1) concurrent-ruby (~> 1.0) rack (> 1, < 3) @@ -609,6 +611,7 @@ DEPENDENCIES simplecov spank spring + spring-commands-rspec sqlite3 teaspoon-jasmine turbolinks diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index f358528e..bdd212e5 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -19,7 +19,6 @@ <%= favicon_link_tag 'apple-touch-icon-114x114.png', rel: 'apple-touch-icon', type: 'image/png', sizes: "114x114" %> <%= yield :head %> <%= javascript_include_tag "application", 'data-turbolinks-track' => true %> -<%# javascript_include_tag "//www.google.com/jsapi", "chartkick" %> <!--[if lt IE 9]> <script src="https://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> diff --git a/bin/rspec b/bin/rspec new file mode 100755 index 00000000..51a46c06 --- /dev/null +++ b/bin/rspec @@ -0,0 +1,14 @@ +#!/usr/bin/env ruby +begin + load File.expand_path('../spring', __FILE__) +rescue LoadError => e + raise unless e.message.include?('spring') +end +require "pathname" +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("rspec-core", "rspec") diff --git a/bin/spring b/bin/spring new file mode 100755 index 00000000..fb2ec2eb --- /dev/null +++ b/bin/spring @@ -0,0 +1,17 @@ +#!/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' + + lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read) + spring = lockfile.specs.detect { |spec| spec.name == "spring" } + if spring + Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path + gem 'spring', spring.version + require 'spring/binstub' + end +end |
