Module: Boom::Remote
Constant Summary
Constants included from Color
Instance Method Summary collapse
-
#allowed?(storage) ⇒ Boolean
Returns true if the user is using a sensible seeming storage backend Params storage, the current storage instance else exits with a warning if not.
- #allowed_storage_types ⇒ Object
- #error_message(storage) ⇒ Object
Methods included from Color
Methods included from Output
Instance Method Details
#allowed?(storage) ⇒ Boolean
Returns true if the user is using a sensible seeming storage backend Params storage, the current storage instance else exits with a warning if not
13 14 15 16 17 18 19 |
# File 'lib/kaboom/remote.rb', line 13 def allowed? storage return true if Boom.local? return true if allowed_storage_types.include? storage.class output storage false end |
#allowed_storage_types ⇒ Object
6 7 8 |
# File 'lib/kaboom/remote.rb', line 6 def allowed_storage_types [Boom::Storage::Gist, Boom::Storage::Mongodb, Boom::Storage::Redis] end |
#error_message(storage) ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/kaboom/remote.rb', line 21 def storage %( #{red("<<----BOOOOOM!!!----->>>> ")} (as in explosion, rather than fast) You probably don't want to use the #{storage.class} storage whilst using boom in remote mode. Your config looks akin to: #{red File.read Boom.config.file} but things might be better with something a little more like: #{cyan Boom::Storage::Redis.sample_config} or #{cyan Boom::Storage::Mongodb.sample_config} Now head yourself on over to #{yellow Boom.config.file} and edit some goodness into it Meanwhile, please enjoy your ordinary boom service: ___________________________________________________ ).gsub(/^ {8}/, '') end |