Rakefile in watir-webdriver-0.4.1 vs Rakefile in watir-webdriver-0.5.0
- old
+ new
@@ -1,5 +1,7 @@
+$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
+
require 'rubygems'
require 'bundler'
Bundler::GemHelper.install_tasks
require 'rspec/core/rake_task'
@@ -17,14 +19,10 @@
end
end
task :default => :spec
-task :lib do
- $LOAD_PATH.unshift(File.expand_path("lib", File.dirname(__FILE__)))
-end
-
namespace :html5 do
SPEC_URI = "http://www.whatwg.org/specs/web-apps/current-work/"
SPEC_PATH = "support/html5.html"
task :html_lib => :lib do
@@ -84,19 +82,13 @@
desc 'download spec -> generate -> generated.rb'
task :update => [:download, :generate, :overwrite]
end # html5
-begin
- require 'yard'
- Rake::Task[:lib].invoke
- require "yard/handlers/watir"
- YARD::Rake::YardocTask.new do |task|
- task.options = %w[--debug] # this is pretty slow, so nice with some output
- end
-rescue LoadError
- task :yard do
- abort "YARD is not available. In order to run yardoc, you must: sudo gem install yard"
- end
+
+require 'yard'
+require "yard/handlers/watir"
+YARD::Rake::YardocTask.new do |task|
+ task.options = %w[--debug] # this is pretty slow, so nice with some output
end
load "spec/watirspec/watirspec.rake" if File.exist?("spec/watirspec/watirspec.rake")