lib/hephaestus/app_builder.rb in hephaestus-0.4.0 vs lib/hephaestus/app_builder.rb in hephaestus-0.5.0

- old
+ new

@@ -71,11 +71,11 @@ end def setup_slack_logger config = <<~EOD config.after_initialize do - Rails.logger.extend(ActiveSupport::Logger.broadcast(SlackWebhookLogger.logger)) + Rails.logger.broadcast_to(SlackWebhookLogger.logger) end EOD configure_environment("production", config) configure_environment("staging", config) configure_environment("test", config) @@ -156,20 +156,20 @@ end def replace_generic_variables say(set_color("Replacing generic variable names...", :cyan)) replace_in_files(destination_root, /App(?!lication)/, short_app_name.capitalize) - replace_in_files(destination_root, %r{(?<!yetto|plugs\.yetto\.)app(?!lication|/|roximate)}, short_app_name.downcase) + replace_in_files(destination_root, %r{(?<!yetto|sw|plugs\.yetto\.)app(?!lication|/|roximate)}, short_app_name.downcase) replace_in_files(destination_root, "PlugApp", app_name.underscore.camelcase) replace_in_files(destination_root, "plug-app", app_name.dasherize) replace_in_files("destination_root}/.github/workflows/test.yml", "plug-app", app_name.dasherize) replace_in_files(destination_root, "PLUG_APP", app_name.underscore.upcase) - # these usually take the form of "plug_app", as a hack to prevent them from changing by the other - # rename methods...I think. I actually can't say for sure I remember what it's for. - replace_in_files(destination_root, "plug_", "") + replace_in_files(destination_root, "plug_app", app_name.underscore) - # this is erroneously changed + # these are erroneously changed replace_in_file("script/server", "/usr/src/#{short_app_name.downcase}", "/usr/src/app") + replace_in_file("vendor/fly/fly-production.toml", "#{short_app_name.downcase} = ", "app = ") + replace_in_file("vendor/fly/fly-staging.toml", "#{short_app_name.downcase} = ", "app =") end private def short_app_name