From 0a99e6e2facee4126509c41b987aa88f1520626e Mon Sep 17 00:00:00 2001
From: Robert Speicher <rspeicher@gmail.com>
Date: Wed, 6 May 2015 15:31:24 -0400
Subject: [PATCH] Remove 'jasmine' gem

jasmine-rails still requires it as a dependency, but for some reason
running `rake jasmine:ci` produced test failures but
`rake spec:javascript` didn't.
---
 Gemfile                |  1 -
 Gemfile.lock           |  6 ------
 lib/tasks/jasmine.rake | 12 ++++++++++++
 3 files changed, 12 insertions(+), 7 deletions(-)
 create mode 100644 lib/tasks/jasmine.rake

diff --git a/Gemfile b/Gemfile
index 05e26f5b72d02..f950c5be15463 100644
--- a/Gemfile
+++ b/Gemfile
@@ -248,7 +248,6 @@ group :development, :test do
   # PhantomJS driver for Capybara
   gem 'poltergeist', '~> 1.5.1'
 
-  gem 'jasmine', '~> 2.2.0'
   gem 'jasmine-rails'
 
   gem "spring", '~> 1.3.1'
diff --git a/Gemfile.lock b/Gemfile.lock
index 3334917797e5c..6f58c4f4fda1d 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -290,11 +290,6 @@ GEM
     i18n (0.7.0)
     ice_cube (0.11.1)
     ice_nine (0.10.0)
-    jasmine (2.2.0)
-      jasmine-core (~> 2.2)
-      phantomjs
-      rack (>= 1.2.1)
-      rake
     jasmine-core (2.2.0)
     jasmine-rails (0.10.8)
       jasmine-core (>= 1.3, < 3.0)
@@ -726,7 +721,6 @@ DEPENDENCIES
   hipchat (~> 1.5.0)
   html-pipeline (~> 1.11.0)
   httparty
-  jasmine (~> 2.2.0)
   jasmine-rails
   jquery-atwho-rails (~> 1.0.0)
   jquery-rails
diff --git a/lib/tasks/jasmine.rake b/lib/tasks/jasmine.rake
new file mode 100644
index 0000000000000..9e2cceffa19f6
--- /dev/null
+++ b/lib/tasks/jasmine.rake
@@ -0,0 +1,12 @@
+# Since we no longer explicitly require the 'jasmine' gem, we lost the
+# `jasmine:ci` task used by GitLab CI jobs.
+#
+# This provides a simple alias to run the `spec:javascript` task from the
+# 'jasmine-rails' gem.
+task jasmine: ['jasmine:ci']
+
+namespace :jasmine do
+  task :ci do
+    Rake::Task['spec:javascript'].invoke
+  end
+end
-- 
GitLab