negativecode/vines — pull request #24 by elijh (2013-06-02 06:54:24+00:00)
Title: Allow vines to work with nokogiri > 1.5.5

Since nokogiri v1.5.6, Nokogiri::XML::Document::create_element has this code:

if ns = elm.namespace_definitions.find { |n| n.prefix.nil? or n.prefix == '' }
elm.namespace = ns
end

This new nokogiri behavior has the unfortunate consequence of overwriting the namespace set by vines for new nodes in parser.rb.

This pull request changes where the namespace is set by vines so that it does not get overwritten.

Without this change, vines does not work at all with nokogiri > 1.5.5, which is not so good since the current Gemfile will install 1.5.9 by default.