squawk 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/Rakefile +1 -1
  2. data/lib/squawk.rb +9 -5
  3. metadata +2 -2
data/Rakefile CHANGED
@@ -7,7 +7,7 @@ Jeweler::Tasks.new do |gem|
7
7
  gem.homepage = "http://github.com/avand/squawk"
8
8
  gem.authors = ["Avand Amiri"]
9
9
  gem.files = FileList["[A-Z]*", "{lib}/**/*"]
10
- gem.version = '1.0.2'
10
+ gem.version = '1.0.3'
11
11
 
12
12
  gem.add_dependency("twitter", "1.0.0")
13
13
  end
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
- oauth = Twitter::OAuth.new(@@twitter_consumer_key, @@twitter_consumer_secret, :sign_in => true)
58
- oauth.authorize_from_access(@@twitter_access_token, @@twitter_secret)
59
-
60
- twitter = Twitter::Base.new(oauth)
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
- twitter.update(status)
66
+ Twitter.client.new.update(status)
63
67
  end
64
68
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 0
8
- - 2
9
- version: 1.0.2
8
+ - 3
9
+ version: 1.0.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Avand Amiri