cosgrove 0.0.3.1 → 0.0.3.2
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/Gemfile.lock +1 -1
- data/lib/cosgrove/upvote_job.rb +8 -2
- data/lib/cosgrove/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c14eb423f8c640e3c91e8a3c6208f674686e52fd
|
|
4
|
+
data.tar.gz: 475c9bd350356ffa2655b4d72644336780678e64
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 25f73224d202592f54396403e410e3dd73c2d0c1820417570b1ef78fdfebcf45a4cbcf60e79957ba4d29f89b82b1c707bba2f61c8aaa493dfe3824f026324c08
|
|
7
|
+
data.tar.gz: a775c5663d071d5cf97215d1e006accb5324888b2617fe50a0c64b34fc0b2cb495efc5da0b713698bcb17fbd61719cf7b13a264c764b54c7f50d8880e5010754
|
data/Gemfile.lock
CHANGED
data/lib/cosgrove/upvote_job.rb
CHANGED
|
@@ -47,6 +47,12 @@ module Cosgrove
|
|
|
47
47
|
cashout_time = Time.parse(cashout_time + 'Z')
|
|
48
48
|
end
|
|
49
49
|
|
|
50
|
+
active_votes = if post.active_votes.class == String
|
|
51
|
+
active_votes = JSON[post.active_votes]
|
|
52
|
+
else
|
|
53
|
+
post.active_votes
|
|
54
|
+
end
|
|
55
|
+
|
|
50
56
|
nope = if created > 1.minute.ago
|
|
51
57
|
"Give it a second! It's going to SPACE! Can you give it a second to come back from space?"
|
|
52
58
|
elsif created > 20.minutes.ago
|
|
@@ -59,7 +65,7 @@ module Cosgrove
|
|
|
59
65
|
elsif post.json_metadata.include?('nsfw')
|
|
60
66
|
puts "Won't vote because json_metadata includes: nsfw"
|
|
61
67
|
'Unable to vote on that.'
|
|
62
|
-
elsif
|
|
68
|
+
elsif active_votes.map{ |v| v['voter'] }.include?('blacklist-a')
|
|
63
69
|
puts "Won't vote blacklist-a voted."
|
|
64
70
|
'Unable to vote on that.'
|
|
65
71
|
elsif (rep = to_rep(post.author_reputation).to_f) < 25.0
|
|
@@ -77,7 +83,7 @@ module Cosgrove
|
|
|
77
83
|
'Unable to vote. Your account has been resticted.'
|
|
78
84
|
elsif today_count > 10 && vote_ratio > 0.1
|
|
79
85
|
"Maybe later. It seems like I've been voting for #{author_name} quite a bit lately."
|
|
80
|
-
elsif
|
|
86
|
+
elsif active_votes.map{ |v| v['voter'] }.include?(steem_account)
|
|
81
87
|
title = post.title
|
|
82
88
|
title = post.permlink if title.empty?
|
|
83
89
|
"I already voted on #{title} by #{post.author}."
|
data/lib/cosgrove/version.rb
CHANGED