lib/natra/generators/app/app_generator.rb in natra-0.0.2 vs lib/natra/generators/app/app_generator.rb in natra-0.0.3
- old
+ new
@@ -7,11 +7,10 @@
include Thor::Actions
desc "Creates a new Sinatra application"
argument :name, :type => :string, :desc => "The name of the new application"
class_option :capistrano, :type => :boolean, :desc => "Include Capistrano configuration"
- class_option :database, :aliases => "-d", :default => "", :desc => "The type of database to use"
class_option :redis, :type => :boolean, :desc => "Include Redis configuration"
class_option :rvm, :type => :boolean, :desc => "Create .ruby-version (ruby-2.1.0) and .ruby-gemset"
class_option :bundle, :type => :boolean, :desc => "Run bundle after generating the app"
class_option :git, :type => :boolean, :desc => "Initialize a Git repository"
@@ -74,14 +73,14 @@
def create_readme
template("README.md", File.join(@app_path, "README.md"))
end
def create_db_config
- template("config/db.yml", File.join(@app_path, "config/db.yml")) unless @database.empty?
+ template("config/db.yml", File.join(@app_path, "config/db.yml"))
end
def create_database_initializer
- template("config/initializers/database.rb", File.join(@app_path, "config/initializers/database.rb")) unless @database.empty?
+ template("config/initializers/database.rb", File.join(@app_path, "config/initializers/database.rb"))
end
def create_redis_config
copy_file("config/redis.yml", File.join(@app_path, "config/redis.yml")) if @redis
end