Rakefile in ore-0.10.0 vs Rakefile in ore-0.11.0

- old
+ new

@@ -1,36 +1,35 @@ require 'rubygems' -require 'rake' begin - gem 'rubygems-tasks', '~> 0.2' - require 'rubygems/tasks' - - Gem::Tasks.new + require 'bundler/setup' rescue LoadError => e - warn e.message - warn "Run `gem install rubygems-tasks` to install 'rubygems/tasks'." + abort e.message end -begin - gem 'rspec', '~> 2.4' - require 'rspec/core/rake_task' +require 'rake' - RSpec::Core::RakeTask.new -rescue LoadError - task :spec do - abort "Please run `gem install rspec` to install RSpec." - end -end +require 'rubygems/tasks' +Gem::Tasks.new + +require 'rspec/core/rake_task' +RSpec::Core::RakeTask.new + task :test => :spec task :default => :spec -begin - gem 'yard', '~> 0.8' - require 'yard' - - YARD::Rake::YardocTask.new -rescue LoadError - task :yard do - abort "Please run `gem install yard` to install YARD." +require 'yard' +YARD::Rake::YardocTask.new + +namespace :update do + Dir['data/ore/templates/*'].each do |template| + name = File.basename(template) + + if File.exist?(File.join(template,'.git')) + desc "Updates the #{name} template" + task name do + Dir.chdir(template) { sh 'git pull' } + sh 'git', 'commit', template + end + end end end