moobooks 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/plushies +6 -9
- data/lib/moobooks/plush.rb +2 -1
- data/lib/moobooks/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: 0c0f68da0dc856349d81ddda4fa84cd6b3113214
|
4
|
+
data.tar.gz: ec1904739d1211e0b32f0be093580ea3c2edbb7d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3bf6ca888daaf86956301d89328e57944488c0be2cad0b9c2b15c28fc3db40f717544b001425a8b55e0bed7dc477fc38031bd02cc7d8bcad90c43054868443cf
|
7
|
+
data.tar.gz: 479b6a1230f4e34a5a71b1ca0b0b76bc37c34b597cb0e0a269b4e3bdd3dbe15da5cdf3bca120fd7cb9800482936d9fb33a851cdda813a92e8ca8b33180805fbc
|
data/bin/plushies
CHANGED
@@ -52,22 +52,19 @@ plush_configs = JSON.parse(File.read(plush_config), symbolize_names: true)
|
|
52
52
|
|
53
53
|
cmd = ARGV.shift
|
54
54
|
|
55
|
-
plushies =
|
56
|
-
conf = plush_configs[name.to_sym]
|
57
|
-
if conf.nil?
|
58
|
-
warn "Plush \"#{name}\" not known"
|
59
|
-
log.warn "Plush \"#{name}\" not known"
|
60
|
-
next
|
61
|
-
end
|
55
|
+
plushies = plush_configs.map do |name, conf|
|
62
56
|
Moobooks::Plush.new(name, conf, apps)
|
63
|
-
end
|
57
|
+
end
|
64
58
|
|
65
59
|
case cmd
|
66
60
|
when ['-h']
|
67
61
|
print_help(true)
|
68
62
|
when 'post'
|
69
|
-
plushies.each do |plush|
|
63
|
+
plushies.shuffle.each do |plush|
|
70
64
|
log.info "Plush \"#{plush.name}\" said: \"#{plush.post_status!}\""
|
65
|
+
r = rand(300)
|
66
|
+
log.info("Sleeping for #{r} seconds.")
|
67
|
+
sleep r
|
71
68
|
end
|
72
69
|
when 'update'
|
73
70
|
plushies.each do |plush|
|
data/lib/moobooks/plush.rb
CHANGED
@@ -39,6 +39,7 @@ module Moobooks
|
|
39
39
|
# @return [Hash] Names of original accounts
|
40
40
|
attr_reader :originals
|
41
41
|
|
42
|
+
attr_reader :twitter_client
|
42
43
|
# @author Maxine Michalski
|
43
44
|
#
|
44
45
|
# Initializer for Plushies
|
@@ -65,7 +66,7 @@ module Moobooks
|
|
65
66
|
# Method to post statuses to all available social platforms
|
66
67
|
def post_status!
|
67
68
|
@status = @model.update(280)
|
68
|
-
|
69
|
+
@twitter_client.update(@status) unless @twitter_client.nil?
|
69
70
|
@status
|
70
71
|
end
|
71
72
|
|
data/lib/moobooks/version.rb
CHANGED