Compare commits

...

7 Commits

Author SHA1 Message Date
Bryan Helmkamp 6da3371d84 Bumping version number to 0.3.4 2008-12-29 00:38:40 -05:00
Bryan Helmkamp 3a956304a3 History 2008-12-29 00:38:23 -05:00
Bryan Helmkamp 3d522a476a Fixing require statement for Nokogiri on JRuby 2008-12-29 00:36:53 -05:00
Bryan Helmkamp 6d5205b7b7 Bump nokogiri dependency version to 1.1.0 2008-12-29 00:36:00 -05:00
Bryan Helmkamp 5ccb10a411 History 2008-12-28 18:26:43 -05:00
Bryan Helmkamp ce799388c2 Bumping version number to 0.3.3 2008-12-27 20:41:35 -05:00
Bryan Helmkamp 95e3260142 Update requires to fix compatibility with Nokogiri 1.1.0 2008-12-27 20:41:29 -05:00
3 changed files with 41 additions and 17 deletions

View File

@ -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
* 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

View File

@ -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|

View File

@ -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
end
# We need Nokogiri's CSS to XPath support, even if using REXML
require "nokogiri/css"
def self.require_xml
gem "nokogiri", ">= 1.1.0"
# Require nokogiri and fall back on rexml
begin
# We need Nokogiri's CSS to XPath support, even if using
# REXML and Hpricot for parsing and searching
require "nokogiri"
require "webrat/core/nokogiri"
rescue LoadError => e
if on_java?
require "hpricot"
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
Webrat.require_xml
require "webrat/core"
# TODO: This is probably not a good idea.