twitterpunch 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/twitterpunch.rb +1 -1
- data/lib/twitterpunch/configuration.rb +0 -1
- data/lib/twitterpunch/poster.rb +14 -1
- data/resources/tweet_sent.wav +0 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b8362aed8fc073bc763307c26112f5f053063ff
|
4
|
+
data.tar.gz: 052ff8f173251398173c89f4150ebd4682765808
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d54befe3240d10e2f577da3dfec8b983b744b56f69be43215f46a45ac9a8e0a9842f065643cb4e0464e081244791187767d8845f54307b5d0925b40d6999a349
|
7
|
+
data.tar.gz: 4cb3f30a5ef4c3410b341455e2bc2addaa000f02851eac7564f7dd18679e09615ee59cd16dc583b737506372395c1d7c3a7ffa05a2c0adaf066b95ef508b7df7
|
data/lib/twitterpunch.rb
CHANGED
@@ -60,7 +60,6 @@ module Twitterpunch
|
|
60
60
|
:handle => "fassford",
|
61
61
|
:photodir => "~/Pictures/twitterpunch/",
|
62
62
|
:logfile => '/var/log/twitterpunch',
|
63
|
-
:sendsound => "/System/Library/PrivateFrameworks/ToneLibrary.framework/Versions/A/Resources/AlertTones/tweet_sent.caf",
|
64
63
|
}
|
65
64
|
end
|
66
65
|
end
|
data/lib/twitterpunch/poster.rb
CHANGED
@@ -14,7 +14,20 @@ module Twitterpunch
|
|
14
14
|
message = "#{@config[:messages].sample} ##{@config[:hashtag]}"
|
15
15
|
@client.update_with_media(message, File.new(File.expand_path(img)))
|
16
16
|
|
17
|
-
|
17
|
+
soundfile = @config[:sendsound] || "#{@config[:resources]}/tweet_sent.wav"
|
18
|
+
|
19
|
+
case RUBY_PLATFORM
|
20
|
+
when /mingw|cygwin/
|
21
|
+
begin
|
22
|
+
require 'win32/sound'
|
23
|
+
Win32::Sound.play(soundfile)
|
24
|
+
rescue LoadError
|
25
|
+
puts 'gem install win32-sound to enable sounds.'
|
26
|
+
end
|
27
|
+
when /darwin/
|
28
|
+
system("afplay #{soundfile}")
|
29
|
+
end
|
30
|
+
|
18
31
|
end
|
19
32
|
end
|
20
33
|
end
|
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twitterpunch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Ford
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: twitter
|
@@ -119,6 +119,7 @@ files:
|
|
119
119
|
- resources/Twitterpunch.workflow/Contents/QuickLook/Thumbnail.png
|
120
120
|
- resources/Twitterpunch.workflow/Contents/document.wflow
|
121
121
|
- resources/say.vbs
|
122
|
+
- resources/tweet_sent.wav
|
122
123
|
homepage: http://binford2k.com
|
123
124
|
licenses: []
|
124
125
|
metadata: {}
|