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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 34e56868b3474c1d898348f2852a6f3bd4ee428c
4
- data.tar.gz: affbb65218728b331919a86c3060a8feea9298c1
3
+ metadata.gz: 1c99d1ae425928061930339394dbdd34afa9b35d
4
+ data.tar.gz: ec36a85fb20e15099573efddde228c2897a471ca
5
5
  SHA512:
6
- metadata.gz: 3eda8fe8ff0b20701cab558809a92aad10dcdc4257ae82a461efac1222f9a430c870ddb88040c877ef138bfddbd2d7bf1756ea0d2a746ca71fe28244df872e5d
7
- data.tar.gz: bc138d89fa1c8bbe4c76779f0a9fe87cb2f49f08e3fe746c593d80bc0b40be8e44c6da68815f6f9851e8275af10b6cd42ba34c03cb94fb3bb4866e8221351a17
6
+ metadata.gz: 449a6f51607a7d54236d6dd3422c1dacde32d627fd01809ad0ed2e1d24092dfe9bf765c1e2eac3843fe192259a20ad48f439dffd12acce1ed3f999c9f4c70ef1
7
+ data.tar.gz: 541bd88fb2419b7bb4d63b68f76090d42af5ccc5376cf04b9ff66edf08597aba84cd39dec05f001f9d7001fbf46f21655428a9e65633fb04b2db2a4cc656651a
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.
@@ -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.1.8'
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
@@ -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.1.8', SAPI5::VERSION)
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 test_SpWaveFormatEx
100
- assert_nothing_raised{ SpWaveFormatEx.new }
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 self.shutdown
104
- @@xp = nil
102
+ def test_SpWaveFormatEx
103
+ assert_nothing_raised{ SpWaveFormatEx.new }
105
104
  end
106
105
  end
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'win32-sapi'
5
- spec.version = '0.1.8'
5
+ spec.version = '0.2.0'
6
6
  spec.author = 'Daniel J. Berger'
7
7
  spec.license = 'Artistic 2.0'
8
8
  spec.email = 'djberg96@gmail.com'
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.1.8
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: 2015-11-20 00:00:00.000000000 Z
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
- �J�dTu�u�%>��mB�0uO����,3'D�y(��,P��4?����1���S��� v3 �<9���`�R �W��&��9 Tg1�óO�M��hV}4�[�r��x��[C�O/4q2�g�}'���DD����z45R+�D{^ӥ��nex5[U���H_~d�.��f��Mk:��Eg��<&l^�L.�{s3%$h7f��ΒD�'t�䡊�}SWb ��ྔ�$��$�͹����
1
+ ,��AhJ+3����:S@D�m�X��w���� Uc3ّاR 6��Ȃ��ϵz��4�}kV! ]��Q���eFYC���!�G$��Ez)$9*ڏev qY���10U|�d���
2
+ ����6o�QC���àf�O�n���Ѧu��e�Sޕ�j�9�]Jɼ��TN]�fdY ��^�.��A��kk�i�0+5��� v�J���ħ��;��3�� �