Commit c485b9f1 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Make sure we respect bundler config for Gemfile

parent 6f664eae
#!/usr/bin/env ruby
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
require 'bundler'
ENV['BUNDLE_GEMFILE'] ||=
Bundler.settings[:gemfile] || File.expand_path('../Gemfile', __dir__)
load Gem.bin_path('bundler', 'bundle')
......@@ -5,5 +5,5 @@ begin
rescue LoadError => e
raise unless e.message.include?('spring')
end
require 'bundler/setup'
require_relative '../config/bundler_setup'
load Gem.bin_path('rspec-core', 'rspec')
#!/usr/bin/env ruby
require 'bundler/setup'
require_relative '../config/bundler_setup'
require 'stackprof'
$:.unshift 'spec'
require 'spec_helper'
......
# frozen_string_literal: true
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
require 'bundler'
ENV['BUNDLE_GEMFILE'] ||=
Bundler.settings[:gemfile] || File.expand_path('../Gemfile', __dir__)
# Set up gems listed in the Gemfile.
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
......
# frozen_string_literal: true
require 'bundler'
ENV['BUNDLE_GEMFILE'] ||= Bundler.settings[:gemfile]
require 'bundler/setup'
#!/usr/bin/env ruby
# frozen_string_literal: true
require 'rubygems'
require 'bundler/setup'
require_relative '../../config/bundler_setup'
require 'optparse'
def rails_path(relname)
......
......@@ -76,6 +76,7 @@ COPY ./config/initializers/0_inject_enterprise_edition_module.rb /home/gitlab/co
# Copy VERSION to ensure the COPY succeeds to copy at least one file since ee/app/models/license.rb isn't present in FOSS
# The [b] part makes ./ee/app/models/license.r[b] a pattern that is allowed to return no files (which is the case in FOSS)
COPY VERSION ./ee/app/models/license.r[b] /home/gitlab/ee/app/models/
COPY ./config/bundler_setup.rb /home/gitlab/config/
COPY ./lib/gitlab.rb /home/gitlab/lib/
COPY ./lib/gitlab/utils.rb /home/gitlab/lib/gitlab/
COPY ./INSTALLATION_TYPE ./VERSION /home/gitlab/
......
......@@ -8,7 +8,7 @@ require_relative '../config/initializers/0_inject_enterprise_edition_module'
require_relative 'lib/gitlab'
require 'bundler/setup'
require_relative '../config/bundler_setup'
Bundler.require(:default)
module QA
......
......@@ -2,7 +2,7 @@
# frozen_string_literal: true
require 'bundler/setup'
require_relative '../config/bundler_setup'
require 'request_store'
require 'rake'
......
......@@ -7,7 +7,7 @@ if $".include?(File.expand_path('spec_helper.rb', __dir__))
return
end
require 'bundler/setup'
require_relative '../config/bundler_setup'
ENV['GITLAB_ENV'] = 'test'
ENV['IN_MEMORY_APPLICATION_SETTINGS'] = 'true'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment