From 05aa71ccd965d3c366d50231a6b1b29f05aba373 Mon Sep 17 00:00:00 2001
From: Robert Speicher <rspeicher@gmail.com>
Date: Wed, 6 May 2015 16:50:47 -0400
Subject: [PATCH] Remove jasmine-rails; add teaspoon

---
 Gemfile                                    | 10 ++++++----
 Gemfile.lock                               | 21 +++++++++++----------
 config/initializers/6_rack_profiler.rb     |  2 +-
 config/routes.rb                           |  1 -
 spec/javascripts/support/jasmine.yml       | 15 ---------------
 spec/javascripts/support/jasmine_helper.rb | 15 ---------------
 6 files changed, 18 insertions(+), 46 deletions(-)
 delete mode 100644 spec/javascripts/support/jasmine.yml
 delete mode 100644 spec/javascripts/support/jasmine_helper.rb

diff --git a/Gemfile b/Gemfile
index 26981f3e0a3..82a74616bb1 100644
--- a/Gemfile
+++ b/Gemfile
@@ -253,11 +253,13 @@ group :development, :test do
   # PhantomJS driver for Capybara
   gem 'poltergeist', '~> 1.5.1'
 
-  gem 'jasmine-rails'
+  gem 'teaspoon', '~> 1.0.0'
+  gem 'teaspoon-jasmine'
 
-  gem "spring", '~> 1.3.1'
-  gem "spring-commands-rspec", '1.0.4'
-  gem "spring-commands-spinach", '1.0.0'
+  gem 'spring', '~> 1.3.1'
+  gem 'spring-commands-rspec',    '~> 1.0.0'
+  gem 'spring-commands-spinach',  '~> 1.0.0'
+  gem 'spring-commands-teaspoon', '~> 0.0.2'
 
   gem "byebug"
 end
diff --git a/Gemfile.lock b/Gemfile.lock
index 7dbc3b4ffa9..d14940bbf01 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -300,12 +300,6 @@ GEM
     i18n (0.7.0)
     ice_cube (0.11.1)
     ice_nine (0.10.0)
-    jasmine-core (2.2.0)
-    jasmine-rails (0.10.8)
-      jasmine-core (>= 1.3, < 3.0)
-      phantomjs (>= 1.9)
-      railties (>= 3.2.0)
-      sprockets-rails
     jquery-atwho-rails (1.0.1)
     jquery-rails (3.1.0)
       railties (>= 3.0, < 5.0)
@@ -400,7 +394,6 @@ GEM
     parser (2.2.0.2)
       ast (>= 1.1, < 3.0)
     pg (0.15.1)
-    phantomjs (1.9.8.0)
     poltergeist (1.5.1)
       capybara (~> 2.1)
       cliver (~> 0.3.1)
@@ -594,6 +587,8 @@ GEM
       spring (>= 0.9.1)
     spring-commands-spinach (1.0.0)
       spring (>= 0.9.1)
+    spring-commands-teaspoon (0.0.2)
+      spring (>= 0.9.1)
     sprockets (2.11.0)
       hike (~> 1.2)
       multi_json (~> 1.0)
@@ -608,6 +603,10 @@ GEM
     stringex (2.5.2)
     task_list (1.0.2)
       html-pipeline
+    teaspoon (1.0.2)
+      railties (>= 3.2.5, < 5)
+    teaspoon-jasmine (2.2.0)
+      teaspoon (>= 1.0.0)
     temple (0.6.7)
     term-ansicolor (1.2.2)
       tins (~> 0.8)
@@ -737,7 +736,6 @@ DEPENDENCIES
   hipchat (~> 1.5.0)
   html-pipeline (~> 1.11.0)
   httparty
-  jasmine-rails
   jquery-atwho-rails (~> 1.0.0)
   jquery-rails
   jquery-scrollto-rails
@@ -798,11 +796,14 @@ DEPENDENCIES
   slim
   spinach-rails
   spring (~> 1.3.1)
-  spring-commands-rspec (= 1.0.4)
-  spring-commands-spinach (= 1.0.0)
+  spring-commands-rspec (~> 1.0.0)
+  spring-commands-spinach (~> 1.0.0)
+  spring-commands-teaspoon (~> 0.0.2)
   stamp
   state_machine
   task_list (= 1.0.2)
+  teaspoon (~> 1.0.0)
+  teaspoon-jasmine
   test_after_commit
   thin
   tinder (~> 1.9.2)
diff --git a/config/initializers/6_rack_profiler.rb b/config/initializers/6_rack_profiler.rb
index 38a5fa98dc2..59934e210fe 100644
--- a/config/initializers/6_rack_profiler.rb
+++ b/config/initializers/6_rack_profiler.rb
@@ -5,5 +5,5 @@ if Rails.env.development?
   Rack::MiniProfilerRails.initialize!(Rails.application)
   Rack::MiniProfiler.config.position = 'right'
   Rack::MiniProfiler.config.start_hidden = true
-  Rack::MiniProfiler.config.skip_paths << '/specs'
+  Rack::MiniProfiler.config.skip_paths << %w(/specs /teaspoon)
 end
diff --git a/config/routes.rb b/config/routes.rb
index bf2cb6421c5..567691a643e 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -2,7 +2,6 @@ require 'sidekiq/web'
 require 'api/api'
 
 Gitlab::Application.routes.draw do
-  mount JasmineRails::Engine => '/specs' if defined?(JasmineRails)
   use_doorkeeper do
     controllers applications: 'oauth/applications',
                 authorized_applications: 'oauth/authorized_applications',
diff --git a/spec/javascripts/support/jasmine.yml b/spec/javascripts/support/jasmine.yml
deleted file mode 100644
index 168c9618643..00000000000
--- a/spec/javascripts/support/jasmine.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-# path to parent directory of spec_files
-# relative path from Rails.root
-#
-# Alternatively accept an array of directory to include external spec files
-# spec_dir:
-#   - spec/javascripts
-#   - ../engine/spec/javascripts
-#
-# defaults to spec/javascripts
-spec_dir: spec/javascripts
-
-# list of file expressions to include as specs into spec runner
-# relative path from spec_dir
-spec_files:
-  - "**/*[Ss]pec.{js.coffee,js,coffee}"
diff --git a/spec/javascripts/support/jasmine_helper.rb b/spec/javascripts/support/jasmine_helper.rb
deleted file mode 100644
index 4d73aec5a31..00000000000
--- a/spec/javascripts/support/jasmine_helper.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-#Use this file to set/override Jasmine configuration options
-#You can remove it if you don't need it.
-#This file is loaded *after* jasmine.yml is interpreted.
-#
-#Example: using a different boot file.
-#Jasmine.configure do |config|
-#   config.boot_dir = '/absolute/path/to/boot_dir'
-#   config.boot_files = lambda { ['/absolute/path/to/boot_dir/file.js'] }
-#end
-#
-#Example: prevent PhantomJS auto install, uses PhantomJS already on your path.
-#Jasmine.configure do |config|
-#   config.prevent_phantom_js_auto_install = true
-#end
-#
-- 
GitLab