ruby_speech 2.2.0-java → 2.2.1-java

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # [develop](https://github.com/benlangfeld/ruby_speech)
2
2
 
3
+ # [2.2.1](https://github.com/benlangfeld/ruby_speech/compare/v2.2.0...v2.2.1) - [2013-07-02](https://rubygems.org/gems/ruby_speech/versions/2.2.1)
4
+ * Bugfix: Ensure that concatenating documents doesn't mutate the originals on JRuby
5
+
3
6
  # [2.2.0](https://github.com/benlangfeld/ruby_speech/compare/v2.1.2...v2.2.0) - [2013-06-26](https://rubygems.org/gems/ruby_speech/versions/2.2.0)
4
7
  * Bugfix: Constant autoload in rbx C extensions doesn't work properly
5
8
  * Bugfix: No longer subclass or copy nodes, use delegation instead
@@ -106,8 +106,8 @@ module RubySpeech
106
106
  self.class.new(new_doc).tap do |new_element|
107
107
  new_doc.root = new_element.node
108
108
  if Nokogiri.jruby?
109
- new_element.add_child self.nokogiri_children
110
- new_element.add_child other.nokogiri_children
109
+ new_element.add_child self.clone.nokogiri_children
110
+ new_element.add_child other.clone.nokogiri_children
111
111
  else
112
112
  # TODO: This is yucky because it requires serialization
113
113
  new_element.add_child self.nokogiri_children.to_xml
@@ -1,3 +1,3 @@
1
1
  module RubySpeech
2
- VERSION = "2.2.0"
2
+ VERSION = "2.2.1"
3
3
  end
@@ -144,11 +144,16 @@ module RubySpeech
144
144
  grammar2 = Grammar.new doc
145
145
  grammar2 << Rule.new(doc, :id => 'millie', :scope => 'public', :content => "Hi Millie")
146
146
 
147
+ grammar1_string = grammar1.to_s
148
+ grammar2_string = grammar2.to_s
149
+
147
150
  expected_concat = Grammar.new doc
148
151
  expected_concat << Rule.new(doc, :id => 'frank', :scope => 'public', :content => "Hi Frank")
149
152
  expected_concat << Rule.new(doc, :id => 'millie', :scope => 'public', :content => "Hi Millie")
150
153
 
151
154
  concat = grammar1 + grammar2
155
+ grammar1.to_s.should == grammar1_string
156
+ grammar2.to_s.should == grammar2_string
152
157
  concat.should == expected_concat
153
158
  concat.document.root.should == concat
154
159
  concat.to_s.should_not include('default')
@@ -155,12 +155,15 @@ module RubySpeech
155
155
  "Hi, I'm Frank"
156
156
  end
157
157
  end
158
+ speak1_string = speak1.to_s
159
+
158
160
  speak2 = SSML.draw do
159
161
  string "Hello there"
160
162
  voice :name => 'millie' do
161
163
  "Hi, I'm Millie"
162
164
  end
163
165
  end
166
+ speak2_string = speak2.to_s
164
167
 
165
168
  expected_concat = SSML.draw do
166
169
  voice :name => 'frank' do
@@ -173,6 +176,8 @@ module RubySpeech
173
176
  end
174
177
 
175
178
  concat = (speak1 + speak2)
179
+ speak1.to_s.should == speak1_string
180
+ speak2.to_s.should == speak2_string
176
181
  concat.should == expected_concat
177
182
  concat.document.root.should == concat
178
183
  concat.to_s.should_not include('default')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_speech
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  prerelease:
6
6
  platform: java
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-26 00:00:00.000000000 Z
12
+ date: 2013-07-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri