tweetlr 0.1.31 → 0.1.32
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/config/tweetlr.yml +16 -15
- data/lib/tweetlr/processors/twitter.rb +1 -1
- data/lib/tweetlr.rb +1 -1
- data/spec/combinators/twitter_tumblr_combinator_spec.rb +5 -0
- data/tweetlr.gemspec +1 -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: dc3d92929654e85bfe0f117c779b3a9b6225ac58
|
4
|
+
data.tar.gz: 80d893afe0cf1abeb525f84dcea01737b85ec4b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9fa0c58aaa2c5980810ef5d7d94c7b3b63447bd3f4645ad533ab81b36c67bbb5815842aaf32e4a70c29e126354d2243b9c94fefd865c2581c7ccf860e2ef350
|
7
|
+
data.tar.gz: 3c20b5a5e927886de415ac392431f1ef80973118f8a14454aa57411fc8cc215c66501b8fd538939f164ad93f71652b1baece3157f9e89292e1b3f377d3c64f83
|
data/config/tweetlr.yml
CHANGED
@@ -1,22 +1,23 @@
|
|
1
1
|
results_per_page: 100
|
2
2
|
result_type: recent
|
3
|
-
search_term: '
|
3
|
+
search_term: '#uxcamphh' #find tweets containing any of these terms
|
4
4
|
start_at_tweet_id: 61847783463854082 # the tweet id to start searching at
|
5
|
-
twitter_app_consumer_key: YOUR APPS TWITTER API KEY
|
6
|
-
twitter_app_consumer_secret: YOUR APPS TWITTER API SECRET
|
7
|
-
twitter_oauth_token: YOUR APPS TWITTER API OAUTH TOKEN
|
8
|
-
twitter_oauth_token_secret: YOUR APPS TWITTER API OAUTH TOKEN SECRET
|
9
5
|
api_endpoint_twitter: 'http://search.twitter.com/search.json'
|
10
6
|
api_endpoint_tumblr: 'http://www.tumblr.com'
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
7
|
+
twitter_app_consumer_key: 'odF5yj4pF39WeQBGCLSpbw'
|
8
|
+
twitter_app_consumer_secret: 'dRF8y3cPdQ3sHmmvmsNtk5AF8HMunhWNwxAscRO9o'
|
9
|
+
twitter_oauth_token: '745060136-UoQCtpEvGxfZ9DpodYgweTY9b6ifQREIgqfZtOic'
|
10
|
+
twitter_oauth_token_secret: '0W6KPPCXjdz5FkEWN9o7jUWWkWe8eH7YthowfgP0'
|
11
|
+
tumblr_oauth_api_key: 'RZ4dIVY2MSBpCPeUQ2XtsEG88kP6fGBdSNOkZahoi2FQfnNwoz'
|
12
|
+
tumblr_oauth_api_secret: 'DNVKBxN90qxVHVFkpBandNnxFgAiNg8WzKjcja333f2sO9hZ1z'
|
13
|
+
tumblr_oauth_access_token_key: '94VHmfFAYGTuei5X2sajBnEEH5gOvE3C4RyraIx6KIycaLKnxa'
|
14
|
+
tumblr_oauth_access_token_secret: 'xuZ2SbOjyibcmDevNoP3NirCH8EXcL5QIHsvKySoZT9nTpCQRO'
|
15
|
+
tumblr_blog_hostname: 'tweetlr-testlr.tumblr.com' #e.g. mysubblog.tumblr.com
|
16
|
+
instagram_oauth_api_key: 'd63158ea340c466ebf1790d313402e4f'
|
17
|
+
instagram_oauth_api_secret: '7fdef35a4c61461e89f93b6fd1b56cf6'
|
18
|
+
instagram_oauth_access_token: '2626119.d63158e.99f1305e5e1543bd8f78c0fc43ebfe57'
|
19
|
+
embedly_key: 'c2a0fc113dee4170968431baba757f99' #tweetlr uses http://embedly.com for link processing. a free plan containing an api key is available & recommended to use in order to ensure full support
|
20
|
+
update_period: 10 #check for updates every 300 secs = 5 minutes
|
18
21
|
shouts: 'says' # will be concatenated after the username, before the message: @mr_x says: awesome things on a photo!
|
19
|
-
loglevel:
|
22
|
+
loglevel: 0 # 0: debug, 1: info (default), 2: warn, 3: error, 5: fatal
|
20
23
|
whitelist: #twitter accounts in that list will have their tweets published immediately. post from others will be saved as drafts. blank list will publish all tweets immediately
|
21
|
-
- whitey_mc_whitelist
|
22
|
-
- sven_kr
|
@@ -13,7 +13,7 @@ module Tweetlr::Processors
|
|
13
13
|
|
14
14
|
#checks if the message is a retweet
|
15
15
|
def self.retweet?(message)
|
16
|
-
message.index('RT @') || message.index(%{"@}) || message.index("\u201c@") #detect retweets
|
16
|
+
message.index('RT @') || message.index(%{"@}) || message.index("\u201c@") || message.index('MT @') #detect retweets
|
17
17
|
end
|
18
18
|
|
19
19
|
#extract the links from a given tweet
|
data/lib/tweetlr.rb
CHANGED
@@ -7,6 +7,7 @@ describe Tweetlr::Combinators::TwitterTumblr do
|
|
7
7
|
@third_link = "https://imageurl.com"
|
8
8
|
@twitter_response = {"from_user_id_str"=>"1915714", "profile_image_url"=>"http://a0.twimg.com/profile_images/386000279/2_normal.jpg", "created_at"=>"Sun, 17 Apr 2011 16:48:42 +0000", "from_user"=>"whitey_Mc_whIteLIst", "id_str"=>"59659561224765440", "metadata"=>{"result_type"=>"recent"}, "to_user_id"=>nil, "text"=>"Rigaer #wirsounterwegs #{@first_link} @ Augenarzt Dr. Lierow #{@second_link} #{@third_link}", "id"=>59659561224765440, "from_user_id"=>1915714, "geo"=>{"type"=>"Point", "coordinates"=>[52.5182, 13.454]}, "iso_language_code"=>"de", "place"=>{"id"=>"3078869807f9dd36", "type"=>"city", "full_name"=>"Berlin, Berlin"}, "to_user_id_str"=>nil, "source"=>"<a href="http://instagr.am" rel="nofollow">instagram</a>"}
|
9
9
|
@retweet = @twitter_response.merge "text" => "bla bla RT @fgd: tueddelkram"
|
10
|
+
@mt_retweet = @twitter_response.merge "text" => "bla bla MT @fgd: tueddelkram"
|
10
11
|
@new_style_retweet = @twitter_response.merge "text" => "and it scales! \u201c@moeffju: http://t.co/8gUSPKu #hktbl1 #origami success! :)\u201d"
|
11
12
|
@new_style_retweet_no_addition = @twitter_response.merge "text" => "\u201c@moeffju: http://t.co/8gUSPKu #hktbl1 #origami success! :)\u201d"
|
12
13
|
@non_whitelist_tweet = @twitter_response.merge 'from_user' => 'nonwhitelist user'
|
@@ -81,6 +82,10 @@ describe Tweetlr::Combinators::TwitterTumblr do
|
|
81
82
|
post = Tweetlr::Combinators::TwitterTumblr::generate_photo_post_from_tweet @retweet, :whitelist => @whitelist
|
82
83
|
post.should_not be
|
83
84
|
end
|
85
|
+
it "should not use old school 'MT' retweets which would produce double blog posts" do
|
86
|
+
post = Tweetlr::Combinators::TwitterTumblr::generate_photo_post_from_tweet @mt_retweet, :whitelist => @whitelist
|
87
|
+
post.should_not be
|
88
|
+
end
|
84
89
|
context "should not use new style retweets which would produce double blog posts" do
|
85
90
|
it "for quotes in context" do
|
86
91
|
post = Tweetlr::Combinators::TwitterTumblr::generate_photo_post_from_tweet @new_style_retweet, :whitelist => @whitelist
|
data/tweetlr.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tweetlr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.32
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sven Kraeuter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: daemons
|