Rakefile in lxc-0.5.0 vs Rakefile in lxc-0.6.0

- old
+ new

@@ -16,60 +16,24 @@ # See the License for the specific language governing permissions and # limitations under the License. # ################################################################################ +require 'rake/clean' + require 'bundler/gem_tasks' -################################################################################ - require 'rspec/core/rake_task' RSpec::Core::RakeTask.new(:spec) -task :default => [:spec] -task :test => [:spec] -################################################################################ - require 'coveralls/rake/task' Coveralls::RakeTask.new -task :coveralls => [:spec, 'coveralls:push'] +require 'ztk/rake/docs' + ################################################################################ -require 'yard' -require 'yard/rake/yardoc_task' - -GEM_NAME = File.basename(Dir.pwd) -DOC_PATH = File.expand_path(File.join("..", "", "#{GEM_NAME}.doc")) - -namespace :doc do - YARD::Rake::YardocTask.new(:pages) do |t| - - # t.files = ['lib/**/*.rb'] - t.options = ['--verbose', '-o', DOC_PATH] - end - - namespace :pages do - - desc 'Generate and publish YARD Documentation to GitHub pages' - task :publish => ['doc:pages'] do - describe = %x(git describe).chomp - stats = %x(bundle exec yard stats).chomp - - commit_message = Array.new - commit_message << "Generated YARD Documentation for #{GEM_NAME.upcase} #{describe}\n\n" - commit_message << stats - - Dir.chdir(DOC_PATH) do - puts(%x{git add -Av}) - puts(%x{git commit -m"#{commit_message.join}"}) - puts(%x{git push origin gh-pages}) - end - end - - end - -end -desc 'Alias to doc:yard' -task 'doc' => 'doc:yard' +task :coveralls => [:spec, 'coveralls:push'] +task :default => [:spec] +task :test => [:spec] ################################################################################