[ANN] nokogiri 1.3.0 Released

A

Aaron Patterson

nokogiri version 1.3.0 has been released!

* <http://nokogiri.rubyforge.org/>
* <http://github.com/tenderlove/nokogiri/wikis>
* <http://github.com/tenderlove/nokogiri/tree/master>
* <http://rubyforge.org/mailman/listinfo/nokogiri-talk>
* <http://github.com/tenderlove/nokogiri/issues>

Nokogiri (鋸) is an HTML, XML, SAX, and Reader parser.

Changes:

### 1.3.0 / 2009-05-30

* New Features

* Builder changes scope based on block arity
* Builder supports methods ending in underscore similar to tagz
* Nokogiri::XML::Node#<=> compares nodes based on Document position
* Nokogiri::XML::Node#matches? returns true if Node can be found with
given selector.
* Nokogiri::XML::Node#ancestors now returns an Nokogiri::XML::NodeSet
* Nokogiri::XML::Node#ancestors will match parents against optional selector
* Nokogiri::HTML::Document#meta_encoding for getting the meta encoding
* Nokogiri::HTML::Document#meta_encoding= for setting the meta encoding
* Nokogiri::XML::Document#encoding= to set the document encoding
* Nokogiri::XML::Schema for validating documents against XSD schema
* Nokogiri::XML::RelaxNG for validating documents against RelaxNG schema
* Nokogiri::HTML::ElementDescription for fetching HTML element descriptions
* Nokogiri::XML::Node#description to fetch the node description
* Nokogiri::XML::Node#accept implements Visitor pattern
* bin/nokogiri for easily examining documents (Thanks Yutaka HARA!)
* Nokogiri::XML::NodeSet now supports more Array and Enumerable operators:
index, delete, slice, - (difference), + (concatenation), & (intersection),
push, pop, shift, ==
* Nokogiri.XML, Nokogiri.HTML take blocks that receive
Nokogiri::XML::parseOptions objects
* Nokogiri::XML::Node#namespace returns a Nokogiri::XML::Namespace
* Nokogiri::XML::Node#namespace= for setting a node's namespace
* Nokogiri::XML::DocumentFragment and Nokogiri::HTML::DocumentFragment
have a sensible API and a more robust implementation.
* JRuby 1.3.0 support via FFI.

* Bugfixes

* Fixed a problem with nil passed to CDATA constructor
* Fragment method deals with regular expression characters
(Thanks Joel!) LH #73
* Fixing builder scope issues LH #61, LH #74, LH #70
* Fixed a problem when adding a child could remove the child namespace LH#78
* Fixed bug with unlinking a node then reparenting it. (GH#22)
* Fixed failure to catch errors during XSLT parsing (GH#32)
* Fixed a bug with attribute conditions in CSS selectors (GH#36)
* Fixed intolerance of HTML attributes without values in Node#before/after/inner_html=. (GH#35)

* <http://nokogiri.rubyforge.org/>
* <http://github.com/tenderlove/nokogiri/wikis>
* <http://github.com/tenderlove/nokogiri/tree/master>
* <http://rubyforge.org/mailman/listinfo/nokogiri-talk>
* <http://github.com/tenderlove/nokogiri/issues>
 
I

Iii Iii

gem install nokogiri
The mirrors probably aren't updated yet.

But it still doesn't work under mingw version of Ruby 1.9.1. It's very
frustrated when you need testing app using webrat :-|...
 
C

Charles Oliver Nutter

Congratulations on the JRuby support! Nokogiri has to be one of the #1
most requested items for us. And hopefully over the summer we'll get a
Java+Ruby(+ no C at all) version released too!
 
P

Philip Rhoades

People,

I had problems getting v1.2.3 installed so for this version I firstly
uninstalled the previous version. This time the gem install went OK and
"gem list" gives:

nokogiri (1.3.0)

but when I run the demo program I get:

./t095.rb:3:in `require': no such file to load -- nokogiri (LoadError)

and the same from irb:

irb
irb(main):001:0> require 'nokogiri'
LoadError: no such file to load -- nokogiri
from (irb):1:in `require'
from (irb):1

What now?

Thanks,

Phil.


nokogiri version 1.3.0 has been released!

*<http://nokogiri.rubyforge.org/>
*<http://github.com/tenderlove/nokogiri/wikis>
*<http://github.com/tenderlove/nokogiri/tree/master>
*<http://rubyforge.org/mailman/listinfo/nokogiri-talk>
*<http://github.com/tenderlove/nokogiri/issues>

Nokogiri (鋸) is an HTML, XML, SAX, and Reader parser.

Changes:

### 1.3.0 / 2009-05-30

* New Features

* Builder changes scope based on block arity
* Builder supports methods ending in underscore similar to tagz
* Nokogiri::XML::Node#<=> compares nodes based on Document position
* Nokogiri::XML::Node#matches? returns true if Node can be found with
given selector.
* Nokogiri::XML::Node#ancestors now returns an Nokogiri::XML::NodeSet
* Nokogiri::XML::Node#ancestors will match parents against optional selector
* Nokogiri::HTML::Document#meta_encoding for getting the meta encoding
* Nokogiri::HTML::Document#meta_encoding= for setting the meta encoding
* Nokogiri::XML::Document#encoding= to set the document encoding
* Nokogiri::XML::Schema for validating documents against XSD schema
* Nokogiri::XML::RelaxNG for validating documents against RelaxNG schema
* Nokogiri::HTML::ElementDescription for fetching HTML element descriptions
* Nokogiri::XML::Node#description to fetch the node description
* Nokogiri::XML::Node#accept implements Visitor pattern
* bin/nokogiri for easily examining documents (Thanks Yutaka HARA!)
* Nokogiri::XML::NodeSet now supports more Array and Enumerable operators:
index, delete, slice, - (difference), + (concatenation),& (intersection),
push, pop, shift, ==
* Nokogiri.XML, Nokogiri.HTML take blocks that receive
Nokogiri::XML::parseOptions objects
* Nokogiri::XML::Node#namespace returns a Nokogiri::XML::Namespace
* Nokogiri::XML::Node#namespace= for setting a node's namespace
* Nokogiri::XML::DocumentFragment and Nokogiri::HTML::DocumentFragment
have a sensible API and a more robust implementation.
* JRuby 1.3.0 support via FFI.

* Bugfixes

* Fixed a problem with nil passed to CDATA constructor
* Fragment method deals with regular expression characters
(Thanks Joel!) LH #73
* Fixing builder scope issues LH #61, LH #74, LH #70
* Fixed a problem when adding a child could remove the child namespace LH#78
* Fixed bug with unlinking a node then reparenting it. (GH#22)
* Fixed failure to catch errors during XSLT parsing (GH#32)
* Fixed a bug with attribute conditions in CSS selectors (GH#36)
* Fixed intolerance of HTML attributes without values in Node#before/after/inner_html=. (GH#35)

*<http://nokogiri.rubyforge.org/>
*<http://github.com/tenderlove/nokogiri/wikis>
*<http://github.com/tenderlove/nokogiri/tree/master>
*<http://rubyforge.org/mailman/listinfo/nokogiri-talk>
*<http://github.com/tenderlove/nokogiri/issues>

--
Philip Rhoades

GPO Box 3411
Sydney NSW 2001
Australia
E-mail: (e-mail address removed)
 
M

Michael Guterl

People,

I had problems getting v1.2.3 installed so for this version I firstly
uninstalled the previous version. =C2=A0This time the gem install went OK= and
"gem list" gives:

=C2=A0nokogiri (1.3.0)

but when I run the demo program I get:

=C2=A0./t095.rb:3:in `require': no such file to load -- nokogiri (LoadErr= or)

and the same from irb:

=C2=A0irb
=C2=A0irb(main):001:0> require 'nokogiri'
=C2=A0LoadError: no such file to load -- nokogiri
=C2=A0 =C2=A0 =C2=A0 =C2=A0from (irb):1:in `require'
=C2=A0 =C2=A0 =C2=A0 =C2=A0from (irb):1

What now?

require 'rubygems'
require 'nokogiri'

Did you try that?

Best,
Michael Guterl
 
E

Eric Hodel

That works - thanks! - shouldn't the line "require 'rubygems'" be in
the example code

It should be self-evident that if you install software using RubyGems
you need to load RubyGems to use that software
 
T

Tim Hunter

Eric said:
It should be self-evident that if you install software using RubyGems
you need to load RubyGems to use that software

+1. We probably should have T-shirts printed up that say that.
 
B

Bil Kleb

Eric said:
It should be self-evident that if you install software using RubyGems
you need to load RubyGems to use that software

It might be, but I get tripped up by "require 'rubygems'" every few
months anyway.

When can RubyGems merge with Ruby? Or can't it?

Later,
 
F

Florian Gilcher

It might be, but I get tripped up by "require 'rubygems'" every few
months anyway.

When can RubyGems merge with Ruby? Or can't it?

Later,

It is in 1.9.

For Ruby 1.8, setting the environment variable RUBY_OPTS to "-
rubygems" pretty much does what you want.

Regards,
Florian Gilcher

--
Florian Gilcher

smtp: (e-mail address removed)
jabber: (e-mail address removed)
gpg: 533148E2
 
E

Eric Hodel

It might be, but I get tripped up by "require 'rubygems'" every few
months anyway.

When can RubyGems merge with Ruby? Or can't it?

RubyGems was merged for 1.9
 
M

Marcin Raczkowski

Old discusion. But my 2$ ;)

If you deploy to for example boxed environment, or host that does have
ruby but don't have rubygems, or project requires that all dependencies
(gems in this case) be unpacked and stored in svn/git. You might find
that his little `require 'rubygems'` suddenly breaks application
deployed into production.

It's a host responsibility to provide library, whatever way it sees fit
- rubygems is just one option.
 
F

Florian Gilcher

Old discusion. But my 2$ ;)

If you deploy to for example boxed environment, or host that does
have ruby but don't have rubygems, or project requires that all
dependencies (gems in this case) be unpacked and stored in svn/git.
You might find that his little `require 'rubygems'` suddenly breaks
application deployed into production.

It's a host responsibility to provide library, whatever way it sees
fit - rubygems is just one option.


I would consider this an edge-case, especially because it is easily
fixed by supplying an empty file named "rubygems.rb" somewhere inside
the load-path, essentially turning `require 'rubygems'` into a noop.

The real "problem" in this is the fact that rubygems also provides the
only common way of expressing a dependency via the `gem` method, which
would then break. So, either we had a generic, gem-independent way of
expressing "i want to require library X in version Y" (which we don't
have) or the library maintainer would not be allowed to use gem -
possibly breaking the library silently in a multitude of setups. I
think it is a library responsibility to express the environment in
which it is able to run.

I guess this status quo is okay.

Regards,
Florian Gilcher

--
Florian Gilcher

smtp: (e-mail address removed)
jabber: (e-mail address removed)
gpg: 533148E2
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,045
Latest member
DRCM

Latest Threads

Top