win32-sapi 0.1.8 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/CHANGES +5 -0
- data/lib/win32/sapi5.rb +11 -1
- data/test/test_win32_sapi5.rb +10 -11
- data/win32-sapi.gemspec +1 -1
- metadata +2 -2
- metadata.gz.sig +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c99d1ae425928061930339394dbdd34afa9b35d
|
4
|
+
data.tar.gz: ec36a85fb20e15099573efddde228c2897a471ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 449a6f51607a7d54236d6dd3422c1dacde32d627fd01809ad0ed2e1d24092dfe9bf765c1e2eac3843fe192259a20ad48f439dffd12acce1ed3f999c9f4c70ef1
|
7
|
+
data.tar.gz: 541bd88fb2419b7bb4d63b68f76090d42af5ccc5376cf04b9ff66edf08597aba84cd39dec05f001f9d7001fbf46f21655428a9e65633fb04b2db2a4cc656651a
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/CHANGES
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
== 0.2.0 - 4-Mar-2016
|
2
|
+
* Added some constants to the SpVoice class for the Speak method. Inspired
|
3
|
+
by github user "casper".
|
4
|
+
* Removed explicit checks for Windows XP in the tests. No longer supported.
|
5
|
+
|
1
6
|
== 0.1.8 - 20-Nov-2015
|
2
7
|
* This gem is now signed.
|
3
8
|
* Gem related tasks in the Rakefile now assume Rubygems 2.x.
|
data/lib/win32/sapi5.rb
CHANGED
@@ -13,7 +13,7 @@ module Win32
|
|
13
13
|
#
|
14
14
|
class SAPI5 < WIN32OLE
|
15
15
|
# The version of the win32-sapi library.
|
16
|
-
VERSION = '0.
|
16
|
+
VERSION = '0.2.0'
|
17
17
|
end
|
18
18
|
|
19
19
|
# The SpAudioFormat automation object represents an audio format.
|
@@ -180,6 +180,16 @@ module Win32
|
|
180
180
|
# immediately.
|
181
181
|
#
|
182
182
|
class SpVoice < SAPI5
|
183
|
+
|
184
|
+
# For use with the Speak method.
|
185
|
+
|
186
|
+
SPF_DEFAULT = 0 # Not asynchronous
|
187
|
+
SPF_ASYNC = 1 # Asynchronous
|
188
|
+
SPF_PURGEBEFORESPEAK = 2 # Purges all pending speak requests prior to this speak call.
|
189
|
+
SPF_IS_FILENAME = 4 # The string passed is a file name, and the file text should be spoken.
|
190
|
+
SPF_IS_XML = 8 # The input text will be parsed for XML markup.
|
191
|
+
SPF_IS_NOT_XML = 16 # The input text should not be considered XML markup.
|
192
|
+
|
183
193
|
def initialize
|
184
194
|
super("{96749377-3391-11D2-9EE3-00C04F797396}")
|
185
195
|
end
|
data/test/test_win32_sapi5.rb
CHANGED
@@ -14,12 +14,8 @@ require 'win32/sapi5'
|
|
14
14
|
include Win32
|
15
15
|
|
16
16
|
class TC_Win32_SAPI5 < Test::Unit::TestCase
|
17
|
-
def self.startup
|
18
|
-
@@xp = ["5.1", "5.2"].include?(`ver`.strip[/\d\.\d/])
|
19
|
-
end
|
20
|
-
|
21
17
|
def test_version
|
22
|
-
assert_equal('0.
|
18
|
+
assert_equal('0.2.0', SAPI5::VERSION)
|
23
19
|
end
|
24
20
|
|
25
21
|
def test_SpAudioFormat
|
@@ -35,7 +31,6 @@ class TC_Win32_SAPI5 < Test::Unit::TestCase
|
|
35
31
|
end
|
36
32
|
|
37
33
|
def test_SpInProcRecoContext
|
38
|
-
omit_if(@@xp, "SpInProcRecoContext skipped on Windows XP")
|
39
34
|
assert_nothing_raised{ SpInProcRecoContext.new }
|
40
35
|
end
|
41
36
|
|
@@ -76,7 +71,6 @@ class TC_Win32_SAPI5 < Test::Unit::TestCase
|
|
76
71
|
end
|
77
72
|
|
78
73
|
def test_SpSharedRecoContext
|
79
|
-
omit_if(@@xp, "SpSharedRecoContext skipped on Windows XP")
|
80
74
|
assert_nothing_raised{ SpSharedRecoContext.new }
|
81
75
|
end
|
82
76
|
|
@@ -96,11 +90,16 @@ class TC_Win32_SAPI5 < Test::Unit::TestCase
|
|
96
90
|
assert_nothing_raised{ SpVoice.new }
|
97
91
|
end
|
98
92
|
|
99
|
-
def
|
100
|
-
|
93
|
+
def test_SpVoice_constants
|
94
|
+
assert_equal(0, SpVoice::SPF_DEFAULT)
|
95
|
+
assert_equal(1, SpVoice::SPF_ASYNC)
|
96
|
+
assert_equal(2, SpVoice::SPF_PURGEBEFORESPEAK)
|
97
|
+
assert_equal(4, SpVoice::SPF_IS_FILENAME)
|
98
|
+
assert_equal(8, SpVoice::SPF_IS_XML)
|
99
|
+
assert_equal(16, SpVoice::SPF_IS_NOT_XML)
|
101
100
|
end
|
102
101
|
|
103
|
-
def
|
104
|
-
|
102
|
+
def test_SpWaveFormatEx
|
103
|
+
assert_nothing_raised{ SpWaveFormatEx.new }
|
105
104
|
end
|
106
105
|
end
|
data/win32-sapi.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: win32-sapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel J. Berger
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
EJYzxdPOrx2n6NYR3Hk+vHP0U7UBSveI6+qx+ndQYaeyCn+GRX2PKS9h66YF/Q1V
|
31
31
|
tGSHgAmcLlkdGgan182qsE/4kKM=
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date:
|
33
|
+
date: 2016-03-04 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: test-unit
|
metadata.gz.sig
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
|
1
|
+
,��AhJ+3����:S@D�m�X��w����Uc3ّاR� 6��Ȃ��ϵz��4�}kV!]��Q���e�F�YC���!�G$��E�z�)$9*ڏe�v�q�Y���1�0�U|�d���
|
2
|
+
����6o�QC���àf�O�n���Ѧu��e�Sޕ�j�9�]Jɼ��TN]�fdY ��^�.��A��kk�i�0+5��� v�J���ħ��;��3���
|