tumblr_draftking 0.9.0.2 → 0.9.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/draftking/posts/post.rb +1 -1
- data/lib/draftking/posts.rb +5 -1
- data/lib/draftking/version.rb +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: 19b8f8d0b44e95c6f4cb027946cab3822bf3afb0
|
4
|
+
data.tar.gz: 90eaaa8b530770b958ded47566b8ac0044ac7066
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4abd939e2d8cc687e7a5fbcf4a7e97a146ff8c5880f08fd6747247452d8315b3774bff641b50df5090bee037273220bf8cc9b233d76a7bb70c471fd18595e70
|
7
|
+
data.tar.gz: 90d2a12404235f1d3f36852bea1da71a0e11b8e28a9e762532d78d79ab5bd9144f25be538f20014e29751871b74d6e1a3bcdfd14dac78a006a05906f7bc55dcf
|
data/CHANGELOG.md
CHANGED
data/lib/draftking/posts/post.rb
CHANGED
data/lib/draftking/posts.rb
CHANGED
@@ -45,13 +45,17 @@ module DK
|
|
45
45
|
print "Setup\r" unless @mute
|
46
46
|
process_options(options)
|
47
47
|
act_on_blog(name: @blog_name)
|
48
|
-
posts = @shuffle ? get_posts.reverse
|
48
|
+
posts = @shuffle ? shufflex(get_posts.reverse, 3) : get_posts.reverse
|
49
49
|
posts = posts.take(@limit) if @limit
|
50
50
|
work = posts_to_queue(posts)
|
51
51
|
reporter = options[:reporter] || DK::Reporter
|
52
52
|
[work, work.size, Queue.new, reporter]
|
53
53
|
end
|
54
54
|
|
55
|
+
def shufflex(arr, num)
|
56
|
+
(0..num).to_a.inject(arr) { |m, _| m = m.shuffle; m }
|
57
|
+
end
|
58
|
+
|
55
59
|
# Create queue of Posts for worker threads
|
56
60
|
def posts_to_queue(posts)
|
57
61
|
work_q = Queue.new
|
data/lib/draftking/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tumblr_draftking
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.0.
|
4
|
+
version: 0.9.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Meissa Dia
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-03-
|
11
|
+
date: 2018-03-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tumblr_client
|