lib/lotus/generators/application/container.rb in lotusrb-0.4.0 vs lib/lotus/generators/application/container.rb in lotusrb-0.4.1

- old
+ new

@@ -17,11 +17,10 @@ cli.class.source_root(source) end def start - opts = { app_name: app_name, lotus_head: @lotus_head, test: @test, database: @database, @@ -89,11 +88,11 @@ gitkeep = '.gitkeep' cli.template(source.join(gitkeep), target.join(dir, gitkeep), opts) end unless git_dir_present? - cli.template(source.join('gitignore.tt'), target.join('.gitignore'), opts) + cli.template(source.join(database_type == :file_system ? 'gitignore.tt' : '.gitignore'), target.join('.gitignore'), opts) cli.run("git init #{Shellwords.escape(target)}", capture: true) end @slice_generator.start end @@ -155,11 +154,13 @@ "postgres://localhost/#{app_name}" when 'sqlite', 'sqlite3' "sqlite://db/#{Shellwords.escape(app_name)}" when 'memory' "memory://localhost/#{app_name}" - else + when 'filesystem' "file:///db/#{app_name}" + else + raise "\"#{@database}\" is not a valid database type" end end def database_environment_uri(environment) case @database