ruby_speech 2.2.0 → 2.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ec0d77b52aa0d3a5f6984d3a966592337bf744b8
4
- data.tar.gz: dd2535eab8d121f262017bd29cb881021652b1ea
3
+ metadata.gz: 8d2f6765271223b5fc417d31f0900f66c1cdd366
4
+ data.tar.gz: 3a416c4ee1c850fab6b7cde4a14d01060d725ed8
5
5
  SHA512:
6
- metadata.gz: 23a82e611e67b400e6fd06560e5ae7bcec8a68df565ac6c82378dcb2d86378ac75696b5f6399f39d275c8c98ec9cc0126209b60f1b78bf262bc2b97b65f7f453
7
- data.tar.gz: 9816cb0183ec5138a976417b27beae562590eba32d205076294855a8160f763828bfc84a548fa603e5758970cc73affe65838e84dc541c4abf3054b5bd71ee2c
6
+ metadata.gz: 0e18c6d6732eb36965c454cd9e432ac0057b03104251a550494c237df86b5304fc18e51b8ff956875ae39b23d7df6ffce7462b43f9d5454f980a39ca58d91f8d
7
+ data.tar.gz: 94a964e21a7b6cf4dec062462855ef28e1c889e14413cee7d2e1cf6cbecc8a138782e0a6330cd97cf4a5ff8c72360e00601c61112fdc776afe0e32fee9bc80a8
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,14 +1,14 @@
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
  platform: ruby
6
6
  authors:
7
7
  - Ben Langfeld
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-06-26 00:00:00.000000000 Z
11
+ date: 2013-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri