squawk 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/squawk.rb +9 -5
- metadata +2 -2
data/Rakefile
CHANGED
data/lib/squawk.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'oauth'
|
2
|
+
|
1
3
|
class Squawk < Struct.new(:status)
|
2
4
|
cattr_accessor :twitter_consumer_key, :twitter_consumer_secret, :twitter_handle, :twitter_access_token, :twitter_secret
|
3
5
|
cattr_reader :events
|
@@ -54,11 +56,13 @@ class Squawk < Struct.new(:status)
|
|
54
56
|
end
|
55
57
|
|
56
58
|
def perform
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
59
|
+
Twitter.configure do |config|
|
60
|
+
config.consumer_key = @@twitter_consumer_key
|
61
|
+
config.consumer_secret = @@twitter_consumer_secret
|
62
|
+
config.oauth_token = @@twitter_access_token
|
63
|
+
config.oauth_token_secret = @@twitter_secret
|
64
|
+
end
|
61
65
|
|
62
|
-
|
66
|
+
Twitter.client.new.update(status)
|
63
67
|
end
|
64
68
|
end
|