exe/mvc_one in mvc_one-0.1.0.pre.rc4 vs exe/mvc_one in mvc_one-0.1.0.pre.rc5

- old
+ new

@@ -80,10 +80,19 @@ secrets_yml = ERB.new(File.read(File.join(gem_path, 'templates/general/secrets_yml.erb'))) File.write "#{name_normalized}/config/secrets.yml", secrets_yml.result(binding) gemfile = ERB.new(File.read(File.join(gem_path, 'templates/general/gemfile.erb'))) File.write "#{name_normalized}/Gemfile", gemfile.result(binding) + + app_layout = ERB.new(File.read(File.join(gem_path, 'templates/app/application_layout.slim.erb'))) + File.write "#{name_normalized}/app/views/application_layout.slim", app_layout + + welcome_controller = ERB.new(File.read(File.join(gem_path, 'templates/app/welcome_controller_rb.erb'))) + File.write "#{name_normalized}/app/controllers/welcome_controller.rb", welcome_controller.result(binding) + + welcome_index = ERB.new(File.read(File.join(gem_path, 'templates/app/welcome_index.slim'))) + File.write "#{name_normalized}/app/views/welcome/index.slim", welcome_index end def make_default_dirs(root_dir_name) raise Error, "Project directory already exists: #{root_dir_name}" if Dir.exist? root_dir_name @@ -96,13 +105,13 @@ %w[controllers models views contracts config].each do |dir_name| Dir.mkdir("#{root_dir_name}/app/#{dir_name}") end end - end - def gem_path - File.expand_path("#{File.dirname(__FILE__)}/..") + def gem_path + File.expand_path("#{File.dirname(__FILE__)}/..") + end end end MvcOne::MyCLI.start(ARGV)