lib/lotus/generators/slice.rb in lotusrb-0.3.2 vs lib/lotus/generators/slice.rb in lotusrb-0.4.0

- old
+ new

@@ -31,21 +31,18 @@ } templates = { 'application.rb.tt' => 'application.rb', 'config/routes.rb.tt' => 'config/routes.rb', - 'config/mapping.rb.tt' => 'config/mapping.rb', - 'action.rb.tt' => 'controllers/home/index.rb', 'views/application_layout.rb.tt' => 'views/application_layout.rb', 'templates/application.html.erb.tt' => 'templates/application.html.erb', - 'view.rb.tt' => 'views/home/index.rb', - 'templates/template.html.erb.tt' => 'templates/home/index.html.erb', } empty_directories = [ - "public/javascripts", - "public/stylesheets" + 'controllers', + 'public/javascripts', + 'public/stylesheets' ] # Add testing directories (spec/ is the default for both MiniTest and RSpec) empty_directories << [ "../../spec/#{ opts[:slice_name] }/features", @@ -69,16 +66,11 @@ ## # Per environment .env # ['development', 'test'].each do |environment| - # Add WEB_DATABASE_URL="file:///db/web_development" - cli.append_to_file target.join("config/.env.#{ environment }") do - %(#{ opts[:upcase_slice_name] }_DATABASE_URL="file:///db/#{ opts[:slice_name] }_#{ environment }"\n) - end - # Add WEB_SESSIONS_SECRET="abc123" (random hex) - cli.append_to_file target.join("config/.env.#{ environment }") do + cli.append_to_file target.join(".env.#{ environment }") do %(#{ opts[:upcase_slice_name] }_SESSIONS_SECRET="#{ SecureRandom.hex(32) }"\n) end end ##