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 |
22
History.txt
22
History.txt
|
@ -1,14 +1,30 @@
|
|||
== 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
|
||||
|
||||
* 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)
|
||||
|
||||
== 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
|
||||
|
||||
== 0.3.0 / 2008-11-07
|
||||
|
||||
|
|
2
Rakefile
2
Rakefile
|
@ -28,7 +28,7 @@ spec = Gem::Specification.new do |s|
|
|||
s.extra_rdoc_files = %w(README.txt MIT-LICENSE.txt)
|
||||
|
||||
# Dependencies
|
||||
s.add_dependency "nokogiri", ">= 1.0.3"
|
||||
s.add_dependency "nokogiri", ">= 1.1.0"
|
||||
end
|
||||
|
||||
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__)))
|
||||
|
||||
module Webrat
|
||||
VERSION = '0.3.2'
|
||||
VERSION = '0.3.4'
|
||||
|
||||
def self.root #:nodoc:
|
||||
defined?(RAILS_ROOT) ? RAILS_ROOT : Merb.root
|
||||
end
|
||||
|
||||
def self.require_xml
|
||||
gem "nokogiri", ">= 1.1.0"
|
||||
|
||||
# We need Nokogiri's CSS to XPath support, even if using
|
||||
# REXML and Hpricot for parsing and searching
|
||||
require "nokogiri"
|
||||
|
||||
if on_java?
|
||||
require "hpricot"
|
||||
require "rexml/document"
|
||||
else
|
||||
require "webrat/core/nokogiri"
|
||||
end
|
||||
end
|
||||
|
||||
def self.on_java?
|
||||
RUBY_PLATFORM =~ /java/
|
||||
end
|
||||
end
|
||||
|
||||
# We need Nokogiri's CSS to XPath support, even if using REXML
|
||||
require "nokogiri/css"
|
||||
|
||||
# Require nokogiri and fall back on rexml
|
||||
begin
|
||||
require "nokogiri"
|
||||
require "webrat/core/nokogiri"
|
||||
rescue LoadError => e
|
||||
require "rexml/document"
|
||||
warn("Standard REXML library is slow. Please consider installing nokogiri.\nUse \"sudo gem install nokogiri\"")
|
||||
end
|
||||
|
||||
Webrat.require_xml
|
||||
require "webrat/core"
|
||||
|
||||
# TODO: This is probably not a good idea.
|
||||
|
|
Loading…
Reference in New Issue