Commit a1411511 authored by Benjamin Neff's avatar Benjamin Neff

Add script/configure_bundler to set correct bundler options

parent 63fcc9c1
#!/usr/bin/env ruby
# frozen_string_literal: true
require_relative "../config/bundler_helper"
rails_env = BundlerHelper.rails_env
database = BundlerHelper.database
puts "Configuring Bundler for #{rails_env} environment and #{database} database."
def config(option)
puts "$ bin/bundle config --local #{option}"
system("#{File.join(__dir__, '../bin/bundle')} config --local #{option}")
config("jobs #{`nproc`}")
config("with #{database}")
if rails_env == "production"
config("without test:development")
elsif rails_env == "test"
config("without development")
if rails_env != "development"
config("path vendor/bundle")
config("frozen 1")
config("disable_shared_gems true")
if `gcc -dumpversion`.split(".").first.to_i >= 5
config("build.sigar \"--with-cppflags='-fgnu89-inline'\"")
puts "Bundler configured! Please run 'bin/bundle install' now."
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