Compare commits
7 Commits
master
...
0-3-stable
Author | SHA1 | Date |
---|---|---|
Bryan Helmkamp | 6da3371d84 | |
Bryan Helmkamp | 3a956304a3 | |
Bryan Helmkamp | 3d522a476a | |
Bryan Helmkamp | 6d5205b7b7 | |
Bryan Helmkamp | 5ccb10a411 | |
Bryan Helmkamp | ce799388c2 | |
Bryan Helmkamp | 95e3260142 |
20
History.txt
20
History.txt
|
@ -1,12 +1,28 @@
|
||||||
|
== 0.3.4 / 2008-12-29
|
||||||
|
|
||||||
|
* 1 Minor enhancement
|
||||||
|
|
||||||
|
* Fix compatibility with Nokogiri 1.1.0 on JRuby
|
||||||
|
|
||||||
|
* 1 Bug fix
|
||||||
|
|
||||||
|
* Correct version for Nokogiri dependency in gem
|
||||||
|
|
||||||
|
== 0.3.3 / 2008-12-28
|
||||||
|
|
||||||
|
* 1 Minor enhancement
|
||||||
|
|
||||||
|
* Fix compatibility with Nokogiri 1.1.0 on MRI
|
||||||
|
|
||||||
== 0.3.2 / 2008-11-08
|
== 0.3.2 / 2008-11-08
|
||||||
|
|
||||||
* Minor enhancements
|
* 1 Minor enhancement
|
||||||
|
|
||||||
* Fixes behavior or have_tag when a block is passed. It passes the matched node(s) to the block for further specs again. (Carl Lerche)
|
* Fixes behavior or have_tag when a block is passed. It passes the matched node(s) to the block for further specs again. (Carl Lerche)
|
||||||
|
|
||||||
== 0.3.1 / 2008-11-07
|
== 0.3.1 / 2008-11-07
|
||||||
|
|
||||||
* Minor enhancements
|
* 1 Minor enhancement
|
||||||
|
|
||||||
* Use @_webrat_session instance variable instead of @session for Merb integration to avoid collisions
|
* Use @_webrat_session instance variable instead of @session for Merb integration to avoid collisions
|
||||||
|
|
||||||
|
|
2
Rakefile
2
Rakefile
|
@ -28,7 +28,7 @@ spec = Gem::Specification.new do |s|
|
||||||
s.extra_rdoc_files = %w(README.txt MIT-LICENSE.txt)
|
s.extra_rdoc_files = %w(README.txt MIT-LICENSE.txt)
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
s.add_dependency "nokogiri", ">= 1.0.3"
|
s.add_dependency "nokogiri", ">= 1.1.0"
|
||||||
end
|
end
|
||||||
|
|
||||||
Rake::GemPackageTask.new(spec) do |package|
|
Rake::GemPackageTask.new(spec) do |package|
|
||||||
|
|
|
@ -3,25 +3,33 @@ require "rubygems"
|
||||||
$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__))) unless $LOAD_PATH.include?(File.expand_path(File.dirname(__FILE__)))
|
$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__))) unless $LOAD_PATH.include?(File.expand_path(File.dirname(__FILE__)))
|
||||||
|
|
||||||
module Webrat
|
module Webrat
|
||||||
VERSION = '0.3.2'
|
VERSION = '0.3.4'
|
||||||
|
|
||||||
def self.root #:nodoc:
|
def self.root #:nodoc:
|
||||||
defined?(RAILS_ROOT) ? RAILS_ROOT : Merb.root
|
defined?(RAILS_ROOT) ? RAILS_ROOT : Merb.root
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
# We need Nokogiri's CSS to XPath support, even if using REXML
|
def self.require_xml
|
||||||
require "nokogiri/css"
|
gem "nokogiri", ">= 1.1.0"
|
||||||
|
|
||||||
# Require nokogiri and fall back on rexml
|
# We need Nokogiri's CSS to XPath support, even if using
|
||||||
begin
|
# REXML and Hpricot for parsing and searching
|
||||||
require "nokogiri"
|
require "nokogiri"
|
||||||
require "webrat/core/nokogiri"
|
|
||||||
rescue LoadError => e
|
if on_java?
|
||||||
|
require "hpricot"
|
||||||
require "rexml/document"
|
require "rexml/document"
|
||||||
warn("Standard REXML library is slow. Please consider installing nokogiri.\nUse \"sudo gem install nokogiri\"")
|
else
|
||||||
|
require "webrat/core/nokogiri"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.on_java?
|
||||||
|
RUBY_PLATFORM =~ /java/
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Webrat.require_xml
|
||||||
require "webrat/core"
|
require "webrat/core"
|
||||||
|
|
||||||
# TODO: This is probably not a good idea.
|
# TODO: This is probably not a good idea.
|
||||||
|
|
Loading…
Reference in New Issue