tweetlr 0.1.36 → 0.1.37

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 029243d3b6528766dcae41aabcb7457d29c71841
4
- data.tar.gz: dfc413c772f58d3ccb4a4cfb984994fe90d9ae24
3
+ metadata.gz: 6bad6b9fecdbf193dcd34f69f1449dedbde80031
4
+ data.tar.gz: 11cb0c84349c462497bdd1bafa182f73c3acf22b
5
5
  SHA512:
6
- metadata.gz: 7db0eb42bcaee7afe8a0b4b1ed6cb00f016d5a7f8689b74aac3bc33049b8430f30211f84fc1fd00e566d024b5df746af3f486f91588167d3c6391389c660a9de
7
- data.tar.gz: 19d622dd9c1e254be6fdf866d02f7ade6f1c4386785191f65865dec510ae253a1ee544bee0576f4797d010dd6a7f1355f64c478621c5e8667c92c390b0480872
6
+ metadata.gz: a85243e24df556b756839de2e34a2d92112297e5d95b08d721aa4f7ef5cb17dda52fe84542cab918d7ee1f18b3109a46cd9430cc40aac65d872255dbb581171f
7
+ data.tar.gz: ffa7bcee67c79a6667d22ed2baaa5efc81e4e6f32f823097e8003819b502e15158036ebf19c218b793fa9bbe54da6aa6d8251bfed36b027fa2a02531ad2a1856
@@ -2,7 +2,7 @@ require 'tweetlr/log_aware'
2
2
  require 'tweetlr/core'
3
3
 
4
4
  module Tweetlr
5
- VERSION = '0.1.36'
5
+ VERSION = '0.1.37'
6
6
 
7
7
  API_ENDPOINT_TWITTER = 'http://search.twitter.com/search.json'
8
8
  API_ENDPOINT_TUMBLR = 'http://www.tumblr.com'
@@ -12,6 +12,7 @@ module Tweetlr::Combinators
12
12
  end
13
13
  #extract a linked image file's url from a tweet. first found image will be used.
14
14
  def self.extract_image_url(tweet, embedly_key=nil)
15
+ log.debug "extracting image url..."
15
16
  links = Tweetlr::Processors::Twitter::extract_links tweet
16
17
  image_url = nil
17
18
  if links
@@ -20,6 +21,7 @@ module Tweetlr::Combinators
20
21
  return image_url if Tweetlr::Processors::PhotoService::photo? image_url
21
22
  end
22
23
  end
24
+ log.debug "extracting image url done."
23
25
  image_url
24
26
  end
25
27
  #generate the data for a tumblr photo entry by parsing a tweet
@@ -32,8 +34,10 @@ private
32
34
  whitelist = options[:whitelist]
33
35
  whitelist.each {|entry| entry.downcase!} if (whitelist && whitelist.size != 0)
34
36
  if !Tweetlr::Processors::Twitter::retweet? tweet['text']
35
- log.debug "tweet: #{tweet}"
37
+ log.debug "tweet: #{tweet['text']}"
36
38
  tumblr_post = prepare_tumblr_post options, tweet, whitelist
39
+ log.debug "tumblr post: #{tumblr_post}"
40
+ tumblr_post
37
41
  end
38
42
  end
39
43
  def self.prepare_tumblr_post(options, tweet, whitelist)
@@ -124,8 +124,10 @@ module Tweetlr::Processors
124
124
  private
125
125
  def self.process_link(link, embedly_key)
126
126
  url = nil
127
+ log.info "embedly processing the link..."
127
128
  url = image_url_embedly link, embedly_key
128
129
  if url.nil? #fallback to self written image extractors
130
+ log.info "embedly wasn't able to process the link, using self written extractors..."
129
131
  url = image_url_eyeem link if link.index 'eyeem.com'
130
132
  url = image_url_instagram link if (link.index('instagr.am') || link.index('instagram.com'))
131
133
  url = image_url_twitpic link if link.index 'twitpic'
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "tweetlr"
3
- s.version = "0.1.36"
3
+ s.version = "0.1.37"
4
4
  s.author = "Sven Kraeuter"
5
5
  s.email = "sven.kraeuter@gmail.com"
6
6
  s.homepage = "http://tweetlr.5v3n.com"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tweetlr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.36
4
+ version: 0.1.37
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sven Kraeuter