debian-mirror-gitlab/config/boot.rb

17 lines
431 B
Ruby
Raw Normal View History

2018-05-09 12:01:36 +05:30
def rails5?
2019-01-03 12:48:30 +05:30
%w[1 true].include?(ENV["RAILS5"])
2018-05-09 12:01:36 +05:30
end
2014-09-02 18:07:02 +05:30
2018-05-09 12:01:36 +05:30
require 'rubygems' unless rails5?
2019-01-03 12:48:30 +05:30
gemfile = rails5? ? "Gemfile.rails5" : "Gemfile"
2018-05-09 12:01:36 +05:30
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../#{gemfile}", __dir__)
2014-09-02 18:07:02 +05:30
2018-05-09 12:01:36 +05:30
# Set up gems listed in the Gemfile.
2016-06-02 11:05:42 +05:30
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
2018-11-18 11:00:15 +05:30
begin
require 'bootsnap/setup'
rescue LoadError
2019-01-03 12:48:30 +05:30
# bootsnap is optional dependency, so if we don't have it it's fine
2018-11-18 11:00:15 +05:30
end