Skip to content

Commit

Permalink
standardize
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoroth committed Feb 13, 2023
1 parent 41a7357 commit 4aba492
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions lib/install/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,27 @@
# add default_url_options to development.rb for Action Mailer
if defined?(ActionMailer)
lines = development_working_path.readlines
unless lines.find { |line| line.include?("config.action_mailer.default_url_options") }
if lines.find { |line| line.include?("config.action_mailer.default_url_options") }
say "⏩ Action Mailer default_url_options already defined. Skipping."
else
index = lines.index { |line| line =~ /^Rails.application.configure do/ }
lines.insert index + 1, " config.action_mailer.default_url_options = {host: \"localhost\", port: 3000}\n\n"
development_working_path.write lines.join

say "✅ Action Mailer default_url_options defined"
else
say "⏩ Action Mailer default_url_options already defined. Skipping."
end
end

# add default_url_options to development.rb for Action Controller
lines = development_working_path.readlines
unless lines.find { |line| line.include?("config.action_controller.default_url_options") }
if lines.find { |line| line.include?("config.action_controller.default_url_options") }
say "⏩ Action Controller default_url_options already defined. Skipping."
else
index = lines.index { |line| line =~ /^Rails.application.configure do/ }
lines.insert index + 1, " config.action_controller.default_url_options = {host: \"localhost\", port: 3000}\n"
development_working_path.write lines.join

say "✅ Action Controller default_url_options defined"
else
say "⏩ Action Controller default_url_options already defined. Skipping."
end

complete_step :development
2 changes: 1 addition & 1 deletion lib/tasks/cable_ready/cable_ready.rake
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ CR_FOOTGUNS = {
}

def run_install_template(template, force: false, trace: false)
puts "--- [#{template}] ----"
puts "--- [#{template} - #{CR_STEPS[template]}] ----"

if Rails.root.join("tmp/cable_ready_installer/halt").exist?
FileUtils.rm(Rails.root.join("tmp/cable_ready_installer/halt"))
Expand Down

0 comments on commit 4aba492

Please sign in to comment.