Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'release/0.5.2'

  • Loading branch information...
commit cdd9ffb15029d5a29de00c7a1156570e90593410 2 parents edd0dc0 + 3bb7bc7
@benlangfeld benlangfeld authored
View
5 CHANGELOG
@@ -1,4 +1,7 @@
-v0.5.1
+v0.5.2
+ Bugfix(benlangfeld): Remove specs for the Nokogiri extensions which were moved out
+
+v0.5.1 - yanked
Feature(benlangfeld): Abstract out Nokogiri extensions and helpers into new Niceogiri gem for better sharing
Documentation(benlangfeld)
View
2  blather.gemspec
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
s.add_dependency("eventmachine", ["~> 0.12.6"])
s.add_dependency("nokogiri", [">= 1.4.0"])
- s.add_dependency("niceogiri", [">= 0.0.3"])
+ s.add_dependency("niceogiri", [">= 0.0.4"])
s.add_dependency("minitest", [">= 1.7.1"])
s.add_dependency("activesupport", [">= 3.0.7"])
View
2  lib/blather/version.rb
@@ -1,4 +1,4 @@
module Blather
# Blather version number
- VERSION = '0.5.1'
+ VERSION = '0.5.2'
end
View
83 spec/blather/core_ext/nokogiri_spec.rb
@@ -1,83 +0,0 @@
-require 'spec_helper'
-
-describe 'Nokogiri::XML::Node' do
- before { @doc = Nokogiri::XML::Document.new }
-
- it 'aliases #name to #element_name' do
- node = Nokogiri::XML::Node.new 'foo', @doc
- node.must_respond_to :element_name
- node.element_name.must_equal node.name
- end
-
- it 'aliases #name= to #element_name=' do
- node = Nokogiri::XML::Node.new 'foo', @doc
- node.must_respond_to :element_name=
- node.element_name.must_equal node.name
- node.element_name = 'bar'
- node.element_name.must_equal 'bar'
- end
-
- it 'allows symbols as hash keys for attributes' do
- attrs = Nokogiri::XML::Node.new('foo', @doc)
- attrs['foo'] = 'bar'
-
- attrs['foo'].must_equal 'bar'
- attrs[:foo].must_equal 'bar'
- end
-
- it 'ensures a string is passed to the attribute setter' do
- attrs = Nokogiri::XML::Node.new('foo', @doc)
- attrs[:foo] = 1
- attrs[:foo].must_equal '1'
-
- attrs[:jid] = Blather::JID.new('n@d/r')
- attrs[:jid].must_equal 'n@d/r'
- end
-
- it 'removes an attribute when set to nil' do
- attrs = Nokogiri::XML::Node.new('foo', @doc)
- attrs['foo'] = 'bar'
-
- attrs['foo'].must_equal 'bar'
- attrs['foo'] = nil
- attrs['foo'].must_be_nil
- end
-
- it 'allows attribute values to change' do
- attrs = Nokogiri::XML::Node.new('foo', @doc)
- attrs['foo'] = 'bar'
-
- attrs['foo'].must_equal 'bar'
- attrs['foo'] = 'baz'
- attrs['foo'].must_equal 'baz'
- end
-
- it 'allows symbols as the path in #xpath' do
- node = Nokogiri::XML::Node.new('foo', @doc)
- node.must_respond_to :find
- @doc.root = node
- @doc.xpath(:foo).first.wont_be_nil
- @doc.xpath(:foo).first.must_equal @doc.xpath('/foo').first
- end
-
- it 'allows symbols as namespace names in #xpath' do
- node = Nokogiri::XML::Node.new('foo', @doc)
- node.namespace = node.add_namespace('bar', 'baz')
- @doc.root = node
- node.xpath('/bar:foo', :bar => 'baz').first.wont_be_nil
- end
-
- it 'aliases #xpath to #find' do
- node = Nokogiri::XML::Node.new('foo', @doc)
- node.must_respond_to :find
- @doc.root = node
- node.find('/foo').first.wont_be_nil
- end
-
- it 'has a helper function #find_first' do
- node = Nokogiri::XML::Node.new('foo', @doc)
- node.must_respond_to :find
- @doc.root = node
- node.find_first('/foo').must_equal node.find('/foo').first
- end
-end
Please sign in to comment.
Something went wrong with that request. Please try again.