Browse files

Merge branch 'release/0.1.4'

  • Loading branch information...
2 parents 709a57e + ab0df05 commit 5e6029f310ea6210ba0624cde5f29c22d07ec643 @benlangfeld committed Aug 6, 2011
Showing with 28 additions and 6 deletions.
  1. +14 −0 .travis.yml
  2. +4 −0 CHANGELOG.md
  3. +5 −3 lib/ruby_speech/ssml/speak.rb
  4. +1 −1 lib/ruby_speech/version.rb
  5. +1 −1 ruby_speech.gemspec
  6. +3 −1 spec/ruby_speech/ssml/speak_spec.rb
View
14 .travis.yml
@@ -0,0 +1,14 @@
+rvm:
+ - 1.9.2
+ - rbx
+ - rbx-2.0
+ - jruby
+ - ruby-head
+
+notifications:
+ irc: "irc.freenode.org#adhearsion-dev"
+
+branches:
+ only:
+ - master
+ - develop
View
4 CHANGELOG.md
@@ -1,3 +1,7 @@
+# 0.1.4
+ Bugfix: Speak#+ now returns a brand new Speak rather than modifying the original object
+ Bugfix: Speak#+ now re-sets the namespace on child elements to ensure no default namespace prefix is added
+
# 0.1.3
Bugfix: Strings included via the DSL (both as a block return value and by calling #string) are now properly escaped
View
8 lib/ruby_speech/ssml/speak.rb
@@ -8,7 +8,7 @@ module SSML
class Speak < Element
include XML::Language
- VALID_CHILD_TYPES = [Nokogiri::XML::Element, String, Break, Emphasis, Prosody, SayAs, Voice].freeze
+ VALID_CHILD_TYPES = [String, Break, Emphasis, Prosody, SayAs, Voice].freeze
##
# Create a new SSML speak root element
@@ -52,8 +52,10 @@ def to_doc
end
def +(other)
- other.children.each { |child| self << child }
- self
+ self.class.new(:base_uri => base_uri).tap do |new_speak|
+ new_speak.children = self.children + other.children
+ new_speak.children.each { |c| c.namespace = new_speak.namespace }
+ end
end
def eql?(o)
View
2 lib/ruby_speech/version.rb
@@ -1,3 +1,3 @@
module RubySpeech
- VERSION = "0.1.3"
+ VERSION = "0.1.4"
end
View
2 ruby_speech.gemspec
@@ -24,7 +24,7 @@ Gem::Specification.new do |s|
s.add_development_dependency %q<bundler>, ["~> 1.0.0"]
s.add_development_dependency %q<rspec>, ["~> 2.3.0"]
s.add_development_dependency %q<ci_reporter>, [">= 1.6.3"]
- s.add_development_dependency %q<yard>, ["~> 0.6.0"]
+ s.add_development_dependency %q<yard>, ["~> 0.7.0"]
s.add_development_dependency %q<rake>, [">= 0"]
s.add_development_dependency %q<mocha>, [">= 0"]
s.add_development_dependency %q<i18n>, [">= 0"]
View
4 spec/ruby_speech/ssml/speak_spec.rb
@@ -141,7 +141,9 @@ module SSML
expected_concat << Voice.new(:name => 'frank', :content => "Hi, I'm Frank")
expected_concat << Voice.new(:name => 'millie', :content => "Hi, I'm Millie")
- (speak1 + speak2).should == expected_concat
+ concat = (speak1 + speak2)
+ concat.should == expected_concat
+ concat.to_s.should_not include('default')
end
end # Speak
end # SSML

0 comments on commit 5e6029f

Please sign in to comment.