app_generators/ahn/templates/Rakefile in eric-adhearsion-0.7.999 vs app_generators/ahn/templates/Rakefile in eric-adhearsion-0.8.0
- old
+ new
@@ -1,3 +1,23 @@
require 'rubygems'
-require 'adhearsion'
-require 'adhearsion/tasks'
+
+begin
+ require 'adhearsion'
+ require 'adhearsion/tasks'
+rescue LoadError
+ STDERR.puts "\nCannot load Adhearsion! Not all Rake tasks will be loaded!\n\n"
+end
+
+desc "Writes a .gitignore file that ignores certain SCM annoyances such as log files"
+task :gitignore do
+ ignore_file = "#{Dir.pwd}/.gitignore"
+ if File.exists? ignore_file
+ STDERR.puts "File #{ignore_file} already exists!"
+ else
+ File.open ignore_file, 'w' do |file|
+ # Add other files to the Array below
+ %w[ log ].each do |pattern|
+ file.puts pattern
+ end
+ end
+ end
+end
\ No newline at end of file