socialoud 0.1.3 → 0.1.4
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 +4 -4
- data/lib/socialoud/services/twitter.rb +9 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8252cb68b08b87da1c95ed662f680b12018e4217
|
4
|
+
data.tar.gz: 66714a2c7cdf41301ef660f0db7d5eb648106471
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2089bfe1378fd49c8edb57f71ec657686ca8ee901e924e2444b311d8bc17a828f99954df486ac0e08dd667d28fefcad2c08d8e80b2a05d4f8f1b31a3e2ed827
|
7
|
+
data.tar.gz: 5d69f5ef42221e4c2e216b8e6e2466b5feaa471a60ef8aa03a2e6f879ddf2ba85d167b0068d83a83f02623b7feebe8ea79ba7c03b2b869b5ca27fe5691d4ffb1
|
@@ -7,6 +7,14 @@ module Socialoud
|
|
7
7
|
|
8
8
|
def setup!
|
9
9
|
@username = @data['user'] || @data
|
10
|
+
|
11
|
+
::Twitter.configure do |config|
|
12
|
+
config.consumer_key = @data['consumer_key']
|
13
|
+
config.consumer_secret = @data['consumer_secret']
|
14
|
+
config.oauth_token = @data['oauth_token']
|
15
|
+
config.oauth_token_secret = @data['oauth_token_secret']
|
16
|
+
end
|
17
|
+
|
10
18
|
@client = ::Twitter::Client.new
|
11
19
|
end
|
12
20
|
|
@@ -15,7 +23,7 @@ module Socialoud
|
|
15
23
|
end
|
16
24
|
|
17
25
|
def last_tweet
|
18
|
-
last_tweets = @client.user_timeline(@
|
26
|
+
last_tweets = @client.user_timeline(@username, {:count => 5})
|
19
27
|
(last_tweets.select {|t| t['text'].index('@') != 0 }.first || last_tweets.first)['text']
|
20
28
|
end
|
21
29
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: socialoud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Endel Dreyer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-07-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: twitter
|