Permalink
Browse files

Merge branch 'release/0.3.1'

  • Loading branch information...
benlangfeld committed Nov 2, 2011
2 parents 7409247 + 6473792 commit 74d48015ca64c99b2c15f903e4e4f4ad73bab22d
Showing with 31 additions and 6 deletions.
  1. +3 −0 CHANGELOG.md
  2. +1 −1 README.md
  3. +12 −1 lib/ruby_speech/grxml/element.rb
  4. +12 −1 lib/ruby_speech/ssml/element.rb
  5. +1 −1 lib/ruby_speech/version.rb
  6. +2 −2 ruby_speech.gemspec
View
@@ -1,3 +1,6 @@
+# 0.3.1
+ * Get the whole test suite passing on Ruby 1.8.7 and JRuby (thanks to Taylor Carpenter!)
+
# 0.3.0
* Feature (Taylor Carpenter): Added support for GRXML documents with most elements implemented.
View
@@ -46,7 +46,7 @@ Once your `Speak` is fully prepared and you're ready to send it off for processi
You may also then need to call `to_s`.
-Contruct a GRXML (SGR) document like this:
+Contruct a GRXML (SRGS) document like this:
```ruby
require 'ruby_speech'
@@ -59,11 +59,22 @@ def inherit(node)
end
def self.new(element_name, atts = {}, &block)
- super(element_name) do |new_node|
+ blk_proc = lambda do |new_node|
atts.each_pair { |k, v| new_node.send :"#{k}=", v }
block_return = new_node.instance_eval &block if block_given?
new_node << new_node.encode_special_chars(block_return) if block_return.is_a?(String)
end
+
+ case RUBY_VERSION.split('.')[0,2].join.to_i
+ when 18
+ super(element_name).tap do |n|
+ blk_proc[n]
+ end
+ else
+ super(element_name) do |n|
+ blk_proc[n]
+ end
+ end
end
def children
@@ -59,11 +59,22 @@ def inherit(node)
end
def self.new(element_name, atts = {}, &block)
- super(element_name) do |new_node|
+ blk_proc = lambda do |new_node|
atts.each_pair { |k, v| new_node.send :"#{k}=", v }
block_return = new_node.instance_eval &block if block_given?
new_node << new_node.encode_special_chars(block_return) if block_return.is_a?(String)
end
+
+ case RUBY_VERSION.split('.')[0,2].join.to_i
+ when 18
+ super(element_name).tap do |n|
+ blk_proc[n]
+ end
+ else
+ super(element_name) do |n|
+ blk_proc[n]
+ end
+ end
end
def children
@@ -1,3 +1,3 @@
module RubySpeech
- VERSION = "0.3.0"
+ VERSION = "0.3.1"
end
View
@@ -18,11 +18,11 @@ Gem::Specification.new do |s|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]
- s.add_runtime_dependency %q<niceogiri>, [">= 0.0.4"]
+ s.add_runtime_dependency %q<niceogiri>, [">= 0.1.0"]
s.add_runtime_dependency %q<activesupport>, [">= 3.0.7"]
s.add_development_dependency %q<bundler>, ["~> 1.0.0"]
- s.add_development_dependency %q<rspec>, ["~> 2.3.0"]
+ s.add_development_dependency %q<rspec>, [">= 2.7.0"]
s.add_development_dependency %q<ci_reporter>, [">= 1.6.3"]
s.add_development_dependency %q<yard>, ["~> 0.7.0"]
s.add_development_dependency %q<rake>, [">= 0"]

0 comments on commit 74d4801

Please sign in to comment.