lib/generators/umlaut/install_generator.rb in umlaut-4.0.0.beta5 vs lib/generators/umlaut/install_generator.rb in umlaut-4.0.0

- old
+ new

@@ -94,16 +94,32 @@ end end def asset_hooks guarded(:asset_hooks) do - generate("umlaut:asset_hooks") + # generate tries to invoke rails from the command line, at which point + # it will complain about not yet having a db defined. + #generate("umlaut:asset_hooks") + + # try like so instead which seems to work, and is faster too. + log :generate, "umlaut:asset_hooks" + Rails::Generators.invoke("umlaut:asset_hooks") end end def local_umlaut_controller guarded(:local_umlaut_controller) do copy_file("app/controllers/umlaut_controller.rb") + end + end + + def config_colorize_logging + guarded(:config_colorize_logging) do + application(nil, env: "production") do + "# Umlaut generated this, because Umlaut does some colorized\n" + + " # logging, and Rails really ought to default to false in production.\n" + + " config.colorize_logging = false\n" + end end end def post_install_message say("\n Umlaut installed, now:", :yellow)