moobooks 0.2.0 → 0.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a015cf1b4143a7fca8c88b5fe96603fb35965282
4
- data.tar.gz: 3a908d3527ede6484d570ad790a8f352d768fd1d
3
+ metadata.gz: 0c0f68da0dc856349d81ddda4fa84cd6b3113214
4
+ data.tar.gz: ec1904739d1211e0b32f0be093580ea3c2edbb7d
5
5
  SHA512:
6
- metadata.gz: 56e081fee01e291ba1f13b8d0ff74db005f80bc2a07811d2d6e6d41a74bf3a22911edf5bb3b265d74cbd12904edd501a130bba09f80b9beaee57a22cc3d39579
7
- data.tar.gz: 057f27e94db5afdc545ccf9a21799eb823560e3fa96fe1be3fd1f47dbc9c6caa90091346fc7f2f799961037deee9d039ea95b52b837cb8ecdbdd21d64b24721e
6
+ metadata.gz: 3bf6ca888daaf86956301d89328e57944488c0be2cad0b9c2b15c28fc3db40f717544b001425a8b55e0bed7dc477fc38031bd02cc7d8bcad90c43054868443cf
7
+ data.tar.gz: 479b6a1230f4e34a5a71b1ca0b0b76bc37c34b597cb0e0a269b4e3bdd3dbe15da5cdf3bca120fd7cb9800482936d9fb33a851cdda813a92e8ca8b33180805fbc
@@ -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 = ARGV.map do |name|
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.compact
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|
@@ -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
- # @twitter_client.update(@status) unless @twitter_client.nil?
69
+ @twitter_client.update(@status) unless @twitter_client.nil?
69
70
  @status
70
71
  end
71
72
 
@@ -23,7 +23,7 @@
23
23
  module Moobooks
24
24
  MAJOR = 0
25
25
  MINOR = 2
26
- PATCH = 0
26
+ PATCH = 1
27
27
  NAME = 'moobooks'
28
28
  VERSION = "#{MAJOR}.#{MINOR}.#{PATCH}"
29
29
  DESCRIPTION = 'A framework and CLI to create and manage ebook '\
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moobooks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maxine Michalski