dashing 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/templates/project/Gemfile +4 -1
- data/templates/project/jobs/twitter.rb +21 -10
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
N2Q3MzM2YmQzYjQyOTQxYjk2OGNjMjRkMjBiMjM1Mzg1N2NhODkyMQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZjkxYWEzZmIwNjliZDM1Yjg1OTljNmY4MDY0NDhkYTQzMTcyMDc2ZA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OGYwZGVlZTFkMThkMzJkNjZhNGQ5ZTI0ODI0OTAzY2VkNTc2MmYxNzFhYTI2
|
10
|
+
NjIyNjZlOTNhNmVmMTA1MzBlZGY4YmU5ZDRhYjBjZjM4YmZmODFjYWM3Mzg1
|
11
|
+
NzhiOWM5Zjg2NDQ3MGUwMTRkZTM4ZGJmNmMxZWMxMmU1ZTUzOGY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MGUxNDU0NzAwMmFmNGI1Zjg2ODNiNzU5Mjk2OGMzYWM4YTRlMTc4ZGUyNjBk
|
14
|
+
ZjZhMTFlY2U1NTI4MWRmMzU0M2E3NGZiOTJmYTJjODExYmQxYTI4NzZjYTg5
|
15
|
+
MzM0MzA5YzlmYTNiM2Y1OWI3N2ZiYzFmZGUyYTAwMDliY2ZmNzY=
|
data/templates/project/Gemfile
CHANGED
@@ -1,17 +1,28 @@
|
|
1
|
-
require '
|
2
|
-
|
1
|
+
require 'twitter'
|
2
|
+
|
3
|
+
|
4
|
+
#### Get your twitter keys & secrets:
|
5
|
+
#### https://dev.twitter.com/docs/auth/tokens-devtwittercom
|
6
|
+
Twitter.configure do |config|
|
7
|
+
config.consumer_key = 'YOUR_CONSUMER_KEY'
|
8
|
+
config.consumer_secret = 'YOUR_CONSUMER_SECRET'
|
9
|
+
config.oauth_token = 'YOUR_OAUTH_TOKEN'
|
10
|
+
config.oauth_token_secret = 'YOUR_OAUTH_SECRET'
|
11
|
+
end
|
3
12
|
|
4
13
|
search_term = URI::encode('#todayilearned')
|
5
14
|
|
6
15
|
SCHEDULER.every '10m', :first_in => 0 do |job|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
16
|
+
begin
|
17
|
+
tweets = Twitter.search("#{search_term}").results
|
18
|
+
|
19
|
+
if tweets
|
20
|
+
tweets.map! do |tweet|
|
21
|
+
{ name: tweet.user.name, body: tweet.text, avatar: tweet.user.profile_image_url_https }
|
22
|
+
end
|
23
|
+
send_event('twitter_mentions', comments: tweets)
|
13
24
|
end
|
14
|
-
|
15
|
-
|
25
|
+
rescue Twitter::Error
|
26
|
+
puts "\e[33mFor the twitter widget to work, you need to put in your twitter API keys in the jobs/twitter.rb file.\e[0m"
|
16
27
|
end
|
17
28
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dashing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Beauchamp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-06-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
prerelease: false
|