Rakefile 879 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/usr/bin/env rake
  2. begin
  3. require 'bundler/setup'
  4. rescue LoadError
  5. puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
  6. end
  7. require 'rake'
  8. require 'rspec/core/rake_task'
  9. $:.push File.expand_path("../lib", __FILE__)
  10. require "orm_adapter/version"
  11. task :default => :spec
  12. RSpec::Core::RakeTask.new(:spec)
  13. begin
  14. require 'yard'
  15. YARD::Rake::YardocTask.new(:doc) do |t|
  16. t.files = ['lib/**/*.rb', 'README.rdoc']
  17. end
  18. rescue LoadError
  19. task :doc do
  20. puts "install yard to generate the docs"
  21. end
  22. end
  23. Bundler::GemHelper.install_tasks
  24. task :release => :check_gemfile
  25. task :check_gemfile do
  26. if File.exists?("Gemfile.lock") && File.read("Gemfile.lock") != File.read("Gemfile.lock.development")
  27. cp "Gemfile.lock", "Gemfile.lock.development"
  28. raise "** Gemfile.lock.development has been updated, please commit these changes."
  29. end
  30. end