Compare commits
7 Commits
master
...
0-3-stable
Author | SHA1 | Date | |
---|---|---|---|
|
6da3371d84 | ||
|
3a956304a3 | ||
|
3d522a476a | ||
|
6d5205b7b7 | ||
|
5ccb10a411 | ||
|
ce799388c2 | ||
|
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
|
||||
|
||||
* 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
|
||||
|
||||
|
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
|
||||
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.
|
||||
|
Loading…
Reference in New Issue
Block a user