summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2016-06-07 18:37:38 +0000
committerStan Hu <stanhu@gmail.com>2016-06-07 18:37:38 +0000
commit2cbb17da31be0d18e8457232255da0bd5ac87db5 (patch)
tree84c50811bc17c7f02fbe662cdfeadf1ae728fd64
parentbabf20c8ab2c2186590758b193de953c5efdefb4 (diff)
parent88b0a9efc44a792a7fd9f2263a1c85b9ef552504 (diff)
downloadgitlab-ce-2cbb17da31be0d18e8457232255da0bd5ac87db5.tar.gz
Merge branch 'load-knapsack-if-defined' into 'master'
Load knapsack in Rakefile only when is bundled Fixes `production` builds: https://dev.gitlab.org/gitlab/omnibus-gitlab/builds/85407 cc @marin See merge request !4514
-rw-r--r--Gemfile2
-rwxr-xr-xRakefile3
2 files changed, 2 insertions, 3 deletions
diff --git a/Gemfile b/Gemfile
index 482a6c18dd7..08592607c03 100644
--- a/Gemfile
+++ b/Gemfile
@@ -308,6 +308,7 @@ group :development, :test do
gem 'benchmark-ips', require: false
gem "license_finder", require: false
+ gem 'knapsack'
end
group :test do
@@ -316,7 +317,6 @@ group :test do
gem 'webmock', '~> 1.21.0'
gem 'test_after_commit', '~> 0.4.2'
gem 'sham_rack'
- gem 'knapsack'
end
group :production do
diff --git a/Rakefile b/Rakefile
index 16261bf8ae2..85fff2d51eb 100755
--- a/Rakefile
+++ b/Rakefile
@@ -3,11 +3,10 @@
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require File.expand_path('../config/application', __FILE__)
-require 'knapsack'
relative_url_conf = File.expand_path('../config/initializers/relative_url', __FILE__)
require relative_url_conf if File.exist?("#{relative_url_conf}.rb")
Gitlab::Application.load_tasks
-Knapsack.load_tasks
+Knapsack.load_tasks if defined?(Knapsack)