growl-glue 1.0.5 → 1.0.6

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.
data/History.txt CHANGED
@@ -1,3 +1,6 @@
1
+ === 1.0.6 / 2009-01-20
2
+ * Added in a change from "iconofthestoneage":http://github.com/iconofthestoneage to use afplay if available on Leopard. This removes the sndplay dependency if being run on OS X 10.5.
3
+
1
4
  === 1.0.5 / 2008-11-06
2
5
  * Fixed bug with regards to using voices with spaces in the names (e.g. Bad News)
3
6
 
data/README.txt CHANGED
@@ -8,6 +8,7 @@ Simplifies Growl configuration for Autotest.
8
8
  * Comes bundled with sample green/red images, or you can supply your own
9
9
  * Ability to specify OS X speech options (e.g. "Oh No!", if test failure)
10
10
  * Ability to use a different OS X voice for each status
11
+ * Ability to specify sounds for success or failure conditions
11
12
  * RSpec support
12
13
  * Test::Unit support
13
14
 
@@ -38,15 +39,16 @@ OS X Speech:
38
39
  config.say :failure => "PANIC PANIC PANIC"
39
40
  config.voice :failure => "Hysterical"
40
41
 
41
- If you have *sndplay* compiled and in the path, you can have different sounds played based on test success or failure. The "location" below is optional, as it defaults to "/System/Library/Sounds":
42
+ Audio Notifications:
43
+
44
+ If you have *OS X 10.5* -or- *sndplay* compiled and in the path, you can have different sounds played based on test success or failure. The "location" below is optional, as it defaults to "/System/Library/Sounds":
42
45
 
43
46
  config.sound :success => "Glass.aiff"
44
47
  config.sound :pending => "Glass.aiff"
45
48
  config.sound :failure => "Basso.aiff"
46
49
  config.sound :location => "/System/Library/Sounds/" (optional)
47
50
 
48
- GrowlGlue comes with success and error images it will use on test success and error, respectively.
49
- If you wish to supply your own, for example:
51
+ GrowlGlue comes with success and error images it will use on test success and error, respectively. If you wish to supply your own, for example:
50
52
 
51
53
  config.image :success => "~/Library/autotest/success.png"
52
54
  config.image :pending => "~/Library/autotest/pending.png"
@@ -77,7 +79,7 @@ As an example, this is what I normally use:
77
79
 
78
80
  == OPTIONAL:
79
81
 
80
- * sndplay (for #sound notification)
82
+ * sndplay for #sound notification (only needed outside of OS X 10.5). If anyone can tell me if earlier versions of OS X have *afplay* please let me know.
81
83
 
82
84
  == INSTALL:
83
85
 
@@ -64,7 +64,11 @@ module GrowlGlue
64
64
  def self.sndplay(sound)
65
65
  location = @config.option :sound, :location
66
66
  if sound and location
67
- "sndplay #{location}/#{sound} > /dev/null 2>&1"
67
+ if (system("which afplay > /dev/null 2>&1"))
68
+ "afplay #{location}/#{sound} > /dev/null 2>&1"
69
+ else
70
+ "sndplay #{location}/#{sound} > /dev/null 2>&1"
71
+ end
68
72
  end
69
73
  end
70
74
 
@@ -3,8 +3,8 @@ module GrowlGlue
3
3
  class Config
4
4
  attr_reader :options
5
5
 
6
- def initialize
7
- @options={}
6
+ def initialize(options={})
7
+ @options=options
8
8
  end
9
9
 
10
10
  # returns a nested option value
data/lib/growl_glue.rb CHANGED
@@ -3,6 +3,5 @@
3
3
  end
4
4
 
5
5
  module GrowlGlue
6
- VERSION = '1.0.5'
7
-
6
+ VERSION = '1.0.6'
8
7
  end
metadata CHANGED
@@ -1,36 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: growl-glue
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Collin VanDyck
8
8
  autorequire:
9
9
  bindir: bin
10
- cert_chain:
11
- - |
12
- -----BEGIN CERTIFICATE-----
13
- MIIDPDCCAiSgAwIBAgIBADANBgkqhkiG9w0BAQUFADBEMRYwFAYDVQQDDA1nbHVl
14
- ZHRvbXlzZWF0MRUwEwYKCZImiZPyLGQBGRYFZ21haWwxEzARBgoJkiaJk/IsZAEZ
15
- FgNjb20wHhcNMDgwNzA1MTQxMDQ0WhcNMDkwNzA1MTQxMDQ0WjBEMRYwFAYDVQQD
16
- DA1nbHVlZHRvbXlzZWF0MRUwEwYKCZImiZPyLGQBGRYFZ21haWwxEzARBgoJkiaJ
17
- k/IsZAEZFgNjb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCxzsxS
18
- Gbn4WqVr0ASyg1uLNePFDCItoIBO2aTOdPOqdYe3U7Fd2MiWjRy1Z7+vtgTGOw2t
19
- AoyknDBba+Bydm3MB3I3KP6l71LZ5ZYmCQzPvgcFjWbQnJSG5ofROUM5zjZbVx3P
20
- ochIBNVQlwXGDMCdT568KcWAkR5lUlrGl5IoTwezeT05d8k9xZlivP1tmMSMgMTg
21
- DY+9ymQXpTxGiQ29Kc1APfQEgOR48HIS3uGaXXclsdYouA02Uj3Yv/z+yzKZI9UH
22
- MQUiAcqXWc1wxYslYmztTEJGmAQ8nrkP1EJP3t2A62nLPaH1c+ouz48ujWRH4/tV
23
- vpwvCwYvR54o2lZpAgMBAAGjOTA3MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0G
24
- A1UdDgQWBBTgKbCB/wIXhLeePx2M+tvzr3XMvjANBgkqhkiG9w0BAQUFAAOCAQEA
25
- pIU5PinqCLyUTisCNPvwwcz5mJQ1Z+OBLh4K4HGoZs2Tu3oNpEtKkNfgEiVTh3Dg
26
- 9BlFxVgAZZABNLrBKLkTlYtvjyYEIL3DFPU1Hh4sqAGTd67RXZ5Uen+ldO+bXYT8
27
- IB+pt7uev+4hvCUROqRlWQcYVfxXlYpuH4pAYAKmx55x6jcp8mKlHb/CJ52hPEam
28
- i6nPl4R+RQ/Qg5Q99OuWDww5Pt5xOY50sOrDD+momkdf1KHPiQix6zB3WCy2QUn+
29
- AVD9HizuKv4ppv+434afNyHlctXAnJbVzCLwBIxjiaeUi2Wtbo+0NhccuFSXVCrR
30
- jA8FHf4HdyRgbrpT6Mws7g==
31
- -----END CERTIFICATE-----
10
+ cert_chain: []
32
11
 
33
- date: 2008-11-06 00:00:00 -05:00
12
+ date: 2009-01-20 00:00:00 -05:00
34
13
  default_executable:
35
14
  dependencies:
36
15
  - !ruby/object:Gem::Dependency
@@ -91,7 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
70
  requirements: []
92
71
 
93
72
  rubyforge_project: growl-glue
94
- rubygems_version: 1.2.0
73
+ rubygems_version: 1.3.1
95
74
  signing_key:
96
75
  specification_version: 2
97
76
  summary: Easy configuration of Growl + Autotest
data.tar.gz.sig DELETED
Binary file
metadata.gz.sig DELETED
Binary file