curate_tumblr 1.0.7 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +8 -4
- data/curate_tumblr.gemspec +1 -1
- data/example/readme +5 -3
- data/lib/curate_tumblr/tumblr/client.rb +1 -1
- data/spec/curate_tumblr/render/render_reblog_spec.rb +7 -5
- data/spec/factories.rb +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Curate Tumblr Ruby Gem
|
2
2
|
|
3
|
-
Reblog and follow in your Tumblr from a file of links.
|
3
|
+
Reblog, extract and follow in your Tumblr from a file of tumblr links.
|
4
4
|
|
5
5
|
Grow you Tumblr audience by automating the boring tasks !
|
6
6
|
|
@@ -25,10 +25,11 @@ and **config (with oauth)** is in
|
|
25
25
|
|
26
26
|
### Features
|
27
27
|
|
28
|
-
* *
|
28
|
+
* *add tumblr links* to your tumblr queue
|
29
|
+
* *follow tumblr source and author* : in separate task to not to waste Tumblr requests
|
30
|
+
* *polite with tumblr* : random sleep and stop if detect tumblr errors
|
29
31
|
* *extract informations from posts* : other tumblrs to follow, external links to see...
|
30
|
-
* *add visibility to your reblogs* : add tags and link
|
31
|
-
* *separate follow from reblog* : not to waste Tumblr requests
|
32
|
+
* *add visibility to your reblogs* : add tags and link to your tumblr
|
32
33
|
* *config in realtime* : you can stop it or change parameters when running
|
33
34
|
|
34
35
|
### Important
|
@@ -225,6 +226,9 @@ and *reblog_post_key* to reblog it in CurateTumblr::Publish::Reblog
|
|
225
226
|
|
226
227
|
## Versions ##
|
227
228
|
|
229
|
+
v1.0.8
|
230
|
+
* Little bug in get_hash_post
|
231
|
+
|
228
232
|
v1.0.7
|
229
233
|
* Better check config file
|
230
234
|
|
data/curate_tumblr.gemspec
CHANGED
@@ -2,7 +2,7 @@ Gem::Specification.new do |gem|
|
|
2
2
|
gem.add_dependency 'tumblr_client'
|
3
3
|
gem.add_dependency 'logger'
|
4
4
|
gem.name = 'curate_tumblr'
|
5
|
-
gem.version = '1.0.
|
5
|
+
gem.version = '1.0.8'
|
6
6
|
gem.authors = ['David Tysman']
|
7
7
|
gem.description = 'CurateTumblr - reblog and follow Tumblr links, extract infos from the posts, add tags and links'
|
8
8
|
gem.summary = 'Reblog and follow Tumblr'
|
data/example/readme
CHANGED
@@ -1,9 +1,11 @@
|
|
1
1
|
Reblog and follow tumblr links in the queue of a (fictive) kubricklove.tumblr.com
|
2
2
|
|
3
|
+
Important : you have to create your tumblr and config oauth
|
4
|
+
|
3
5
|
kubricklove_reblog.rb :
|
4
|
-
For each tumblr link, it
|
5
|
-
Reblog and Follow scripts set the tumblr name and the folder for config, links and logs.
|
6
|
+
For each tumblr link, it send the link in tumblr queue with tags and title, add the tumblr author and the source of post in tofollow file, and search in the post content if there is any link to follow or to add to external links.
|
6
7
|
|
7
|
-
|
8
|
+
Please note this tumblr doesn't exist and oauth in config yaml is empty
|
8
9
|
You can copy this example and make it work by replacing "kubricklove" by your tumblr name and set valid oauth in config file
|
10
|
+
|
9
11
|
To config oauth please follow the tumblr documentation (your tumblr must give the authorization to the application) : http://www.tumblr.com/docs/en/api/v2#blog-likes
|
@@ -118,7 +118,7 @@ module CurateTumblr
|
|
118
118
|
tumblr_url = get_tumblr_domain if tumblr_url.empty?
|
119
119
|
|
120
120
|
hash_posts_multiple = client_get_posts( tumblr_url, post_id )
|
121
|
-
return false if hash_posts_multiple.has_key?( "status" ) && !check_hash_status( hash_posts_multiple)
|
121
|
+
return false if !hash_posts_multiple || hash_posts_multiple.has_key?( "status" ) && !check_hash_status( hash_posts_multiple)
|
122
122
|
if !CurateTumblr.hash_multiple_posts_valid?( hash_posts_multiple )
|
123
123
|
log_tumblr.error "#{__method__} hash_posts_multiple #{hash_posts_multiple} are not valid for tumblr_url=#{tumblr_url} and post_id=#{post_id}"
|
124
124
|
return false
|
@@ -58,15 +58,17 @@ end
|
|
58
58
|
|
59
59
|
describe "render" do
|
60
60
|
it "all links" do
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
61
|
+
render_reblog.get_max.should > count_reblogs
|
62
|
+
render_reblog.render_links_from_file.should be_true
|
63
|
+
render_reblog.get_count.should eq( count_reblogs )
|
64
|
+
render_reblog.get_all_published_id.count.should eq( count_reblogs )
|
65
|
+
links_file = render_reblog.get_links_torender_from_file
|
66
|
+
links_file.empty?.should be_true
|
66
67
|
end
|
67
68
|
|
68
69
|
it "direct reblog" do
|
69
70
|
render = CurateTumblr.reblog( get_tumblr_name, get_tumblr_directory, false )
|
71
|
+
render.get_max.should > count_reblogs
|
70
72
|
render.get_count.should eq( count_reblogs )
|
71
73
|
end
|
72
74
|
end
|
data/spec/factories.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: curate_tumblr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-08-
|
12
|
+
date: 2013-08-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: tumblr_client
|