From 47c3642cf1b806829960c2c205fabfa715a29d09 Mon Sep 17 00:00:00 2001 From: Guilherme Goettems Schneider Date: Fri, 2 Feb 2018 14:32:46 -0200 Subject: [PATCH] Add line break after check_yarn_integrity template config Use Rails 5 API when available, making easier to drop support of Rails 4.2 in future. --- lib/install/template.rb | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/install/template.rb b/lib/install/template.rb index 01ba87946..b4ae37309 100644 --- a/lib/install/template.rb +++ b/lib/install/template.rb @@ -18,9 +18,18 @@ say "Adding configurations" +check_yarn_integrity_config = ->(value) { <= 5 + environment check_yarn_integrity_config.call("true"), env: :development + environment check_yarn_integrity_config.call("false"), env: :production +else + inject_into_file "config/environments/development.rb", "\n #{check_yarn_integrity_config.call("true")}", after: "Rails.application.configure do", verbose: false + inject_into_file "config/environments/production.rb", "\n #{check_yarn_integrity_config.call("false")}", after: "Rails.application.configure do", verbose: false +end if File.exists?(".gitignore") append_to_file ".gitignore", <<-EOS