tidy up logic

- the extension template already had a gitignore
This commit is contained in:
Karl Freeman 2014-03-11 11:08:41 +00:00
parent 772de85ce3
commit 9fb4470248

View file

@ -27,7 +27,7 @@ module Middleman::Cli
# The extension task
# @param [String] name
def extension
generate_gitignore!
copy_file 'extension/gitignore', File.join(name, '.gitignore') unless options[:'skip-git']
template 'extension/Rakefile', File.join(name, 'Rakefile')
template 'extension/gemspec', File.join(name, "#{name}.gemspec")
template 'extension/Gemfile', File.join(name, 'Gemfile')
@ -40,14 +40,5 @@ module Middleman::Cli
# Output a .gitignore file
class_option :git, :type => :boolean, :default => true
no_tasks {
# Write a .gitignore file for project
# @return [void]
def generate_gitignore!
return if options[:'skip-git']
copy_file 'shared/gitignore', File.join(name, '.gitignore')
end
}
end
end