ruby_speech 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,6 @@
1
+ # 0.3.1
2
+ * Get the whole test suite passing on Ruby 1.8.7 and JRuby (thanks to Taylor Carpenter!)
3
+
1
4
  # 0.3.0
2
5
  * Feature (Taylor Carpenter): Added support for GRXML documents with most elements implemented.
3
6
 
data/README.md CHANGED
@@ -46,7 +46,7 @@ Once your `Speak` is fully prepared and you're ready to send it off for processi
46
46
  You may also then need to call `to_s`.
47
47
 
48
48
 
49
- Contruct a GRXML (SGR) document like this:
49
+ Contruct a GRXML (SRGS) document like this:
50
50
 
51
51
  ```ruby
52
52
  require 'ruby_speech'
@@ -59,11 +59,22 @@ module RubySpeech
59
59
  end
60
60
 
61
61
  def self.new(element_name, atts = {}, &block)
62
- super(element_name) do |new_node|
62
+ blk_proc = lambda do |new_node|
63
63
  atts.each_pair { |k, v| new_node.send :"#{k}=", v }
64
64
  block_return = new_node.instance_eval &block if block_given?
65
65
  new_node << new_node.encode_special_chars(block_return) if block_return.is_a?(String)
66
66
  end
67
+
68
+ case RUBY_VERSION.split('.')[0,2].join.to_i
69
+ when 18
70
+ super(element_name).tap do |n|
71
+ blk_proc[n]
72
+ end
73
+ else
74
+ super(element_name) do |n|
75
+ blk_proc[n]
76
+ end
77
+ end
67
78
  end
68
79
 
69
80
  def children
@@ -59,11 +59,22 @@ module RubySpeech
59
59
  end
60
60
 
61
61
  def self.new(element_name, atts = {}, &block)
62
- super(element_name) do |new_node|
62
+ blk_proc = lambda do |new_node|
63
63
  atts.each_pair { |k, v| new_node.send :"#{k}=", v }
64
64
  block_return = new_node.instance_eval &block if block_given?
65
65
  new_node << new_node.encode_special_chars(block_return) if block_return.is_a?(String)
66
66
  end
67
+
68
+ case RUBY_VERSION.split('.')[0,2].join.to_i
69
+ when 18
70
+ super(element_name).tap do |n|
71
+ blk_proc[n]
72
+ end
73
+ else
74
+ super(element_name) do |n|
75
+ blk_proc[n]
76
+ end
77
+ end
67
78
  end
68
79
 
69
80
  def children
@@ -1,3 +1,3 @@
1
1
  module RubySpeech
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
@@ -18,11 +18,11 @@ Gem::Specification.new do |s|
18
18
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
19
  s.require_paths = ["lib"]
20
20
 
21
- s.add_runtime_dependency %q<niceogiri>, [">= 0.0.4"]
21
+ s.add_runtime_dependency %q<niceogiri>, [">= 0.1.0"]
22
22
  s.add_runtime_dependency %q<activesupport>, [">= 3.0.7"]
23
23
 
24
24
  s.add_development_dependency %q<bundler>, ["~> 1.0.0"]
25
- s.add_development_dependency %q<rspec>, ["~> 2.3.0"]
25
+ s.add_development_dependency %q<rspec>, [">= 2.7.0"]
26
26
  s.add_development_dependency %q<ci_reporter>, [">= 1.6.3"]
27
27
  s.add_development_dependency %q<yard>, ["~> 0.7.0"]
28
28
  s.add_development_dependency %q<rake>, [">= 0"]
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: 0.3.0
4
+ version: 0.3.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,23 +9,22 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-09-22 00:00:00.000000000 +01:00
13
- default_executable:
12
+ date: 2011-11-02 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: niceogiri
17
- requirement: &2164745280 !ruby/object:Gem::Requirement
16
+ requirement: &2156086660 !ruby/object:Gem::Requirement
18
17
  none: false
19
18
  requirements:
20
19
  - - ! '>='
21
20
  - !ruby/object:Gem::Version
22
- version: 0.0.4
21
+ version: 0.1.0
23
22
  type: :runtime
24
23
  prerelease: false
25
- version_requirements: *2164745280
24
+ version_requirements: *2156086660
26
25
  - !ruby/object:Gem::Dependency
27
26
  name: activesupport
28
- requirement: &2164744760 !ruby/object:Gem::Requirement
27
+ requirement: &2156086140 !ruby/object:Gem::Requirement
29
28
  none: false
30
29
  requirements:
31
30
  - - ! '>='
@@ -33,10 +32,10 @@ dependencies:
33
32
  version: 3.0.7
34
33
  type: :runtime
35
34
  prerelease: false
36
- version_requirements: *2164744760
35
+ version_requirements: *2156086140
37
36
  - !ruby/object:Gem::Dependency
38
37
  name: bundler
39
- requirement: &2164744280 !ruby/object:Gem::Requirement
38
+ requirement: &2156085660 !ruby/object:Gem::Requirement
40
39
  none: false
41
40
  requirements:
42
41
  - - ~>
@@ -44,21 +43,21 @@ dependencies:
44
43
  version: 1.0.0
45
44
  type: :development
46
45
  prerelease: false
47
- version_requirements: *2164744280
46
+ version_requirements: *2156085660
48
47
  - !ruby/object:Gem::Dependency
49
48
  name: rspec
50
- requirement: &2164743800 !ruby/object:Gem::Requirement
49
+ requirement: &2156085180 !ruby/object:Gem::Requirement
51
50
  none: false
52
51
  requirements:
53
- - - ~>
52
+ - - ! '>='
54
53
  - !ruby/object:Gem::Version
55
- version: 2.3.0
54
+ version: 2.7.0
56
55
  type: :development
57
56
  prerelease: false
58
- version_requirements: *2164743800
57
+ version_requirements: *2156085180
59
58
  - !ruby/object:Gem::Dependency
60
59
  name: ci_reporter
61
- requirement: &2164743320 !ruby/object:Gem::Requirement
60
+ requirement: &2156084680 !ruby/object:Gem::Requirement
62
61
  none: false
63
62
  requirements:
64
63
  - - ! '>='
@@ -66,10 +65,10 @@ dependencies:
66
65
  version: 1.6.3
67
66
  type: :development
68
67
  prerelease: false
69
- version_requirements: *2164743320
68
+ version_requirements: *2156084680
70
69
  - !ruby/object:Gem::Dependency
71
70
  name: yard
72
- requirement: &2164742820 !ruby/object:Gem::Requirement
71
+ requirement: &2156084120 !ruby/object:Gem::Requirement
73
72
  none: false
74
73
  requirements:
75
74
  - - ~>
@@ -77,10 +76,10 @@ dependencies:
77
76
  version: 0.7.0
78
77
  type: :development
79
78
  prerelease: false
80
- version_requirements: *2164742820
79
+ version_requirements: *2156084120
81
80
  - !ruby/object:Gem::Dependency
82
81
  name: rake
83
- requirement: &2164742300 !ruby/object:Gem::Requirement
82
+ requirement: &2156083320 !ruby/object:Gem::Requirement
84
83
  none: false
85
84
  requirements:
86
85
  - - ! '>='
@@ -88,10 +87,10 @@ dependencies:
88
87
  version: '0'
89
88
  type: :development
90
89
  prerelease: false
91
- version_requirements: *2164742300
90
+ version_requirements: *2156083320
92
91
  - !ruby/object:Gem::Dependency
93
92
  name: mocha
94
- requirement: &2164741820 !ruby/object:Gem::Requirement
93
+ requirement: &2156082020 !ruby/object:Gem::Requirement
95
94
  none: false
96
95
  requirements:
97
96
  - - ! '>='
@@ -99,10 +98,10 @@ dependencies:
99
98
  version: '0'
100
99
  type: :development
101
100
  prerelease: false
102
- version_requirements: *2164741820
101
+ version_requirements: *2156082020
103
102
  - !ruby/object:Gem::Dependency
104
103
  name: i18n
105
- requirement: &2164741300 !ruby/object:Gem::Requirement
104
+ requirement: &2156081100 !ruby/object:Gem::Requirement
106
105
  none: false
107
106
  requirements:
108
107
  - - ! '>='
@@ -110,7 +109,7 @@ dependencies:
110
109
  version: '0'
111
110
  type: :development
112
111
  prerelease: false
113
- version_requirements: *2164741300
112
+ version_requirements: *2156081100
114
113
  description: Prepare SSML and GRXML documents with ease
115
114
  email:
116
115
  - ben@langfeld.me
@@ -172,7 +171,6 @@ files:
172
171
  - spec/ruby_speech/ssml_spec.rb
173
172
  - spec/spec_helper.rb
174
173
  - spec/support/matchers.rb
175
- has_rdoc: true
176
174
  homepage: https://github.com/benlangfeld/ruby_speech
177
175
  licenses: []
178
176
  post_install_message:
@@ -193,7 +191,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
193
191
  version: '0'
194
192
  requirements: []
195
193
  rubyforge_project: ruby_speech
196
- rubygems_version: 1.6.2
194
+ rubygems_version: 1.8.10
197
195
  signing_key:
198
196
  specification_version: 3
199
197
  summary: A ruby library for TTS & ASR document preparation
@@ -216,3 +214,4 @@ test_files:
216
214
  - spec/ruby_speech/ssml_spec.rb
217
215
  - spec/spec_helper.rb
218
216
  - spec/support/matchers.rb
217
+ has_rdoc: