Rakefile in curate-0.3.2 vs Rakefile in curate-0.4.2
- old
+ new
@@ -18,13 +18,26 @@
rdoc.options << '--line-numbers'
rdoc.rdoc_files.include('README.rdoc')
rdoc.rdoc_files.include('lib/**/*.rb')
end
-APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
-load 'rails/tasks/engine.rake'
+Dir.glob('tasks/*.rake').each { |r| import r }
+Bundler::GemHelper.install_tasks
+task :default => 'ci'
-Bundler::GemHelper.install_tasks
+task :release => ['release:update_template']
-task :default => 'app:curate:travis'
+namespace :release do
+
+ desc 'Make sure the application template is updated'
+ task :update_template do
+ application_template_directory = File.expand_path("../lib/generators/curate/", __FILE__)
+ application_template_erb = File.join(application_template_directory, "application_template.rb.erb")
+ application_template_output = File.join(application_template_directory, "application_template.rb")
+ buffer = ERB.new(File.read(application_template_erb)).result(binding)
+ File.open(application_template_output, 'w+') do |file|
+ file.puts buffer
+ end
+ end
+end