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?
%w[1 true].include?(ENV["RAILS5"])
end
2014-09-02 18:07:02 +05:30
2018-05-09 12:01:36 +05:30
require 'rubygems' unless rails5?
gemfile = rails5? ? "Gemfile.rails5" : "Gemfile"
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
# bootsnap is optional dependency, so if we don't have it it's fine
end