Class: FlareUp::Emitter
- Inherits:
-
Object
- Object
- FlareUp::Emitter
- Defined in:
- lib/flare_up/emitter.rb
Constant Summary collapse
- RISKY_OPTIONS =
[ :aws_access_key, :aws_secret_key, :redshift_username, :redshift_password ]
Class Method Summary collapse
-
.error(message) ⇒ Object
TODO: How do we test this?.
-
.info(message) ⇒ Object
TODO: How do we test this?.
-
.sanitize(message) ⇒ Object
TODO: How do we test this?.
-
.store_options(options) ⇒ Object
TODO: How do we test this?.
Class Method Details
.error(message) ⇒ Object
TODO: How do we test this?
13 14 15 |
# File 'lib/flare_up/emitter.rb', line 13 def self.error() $stderr.puts sanitize("\x1b[31m#{}") unless ENV['TESTING'] end |
.info(message) ⇒ Object
TODO: How do we test this?
18 19 20 |
# File 'lib/flare_up/emitter.rb', line 18 def self.info() $stdout.puts sanitize() unless ENV['TESTING'] end |
.sanitize(message) ⇒ Object
TODO: How do we test this?
23 24 25 26 27 28 29 |
# File 'lib/flare_up/emitter.rb', line 23 def self.sanitize() RISKY_OPTIONS.each do |risky_option| .gsub!(@BOOT_OPTIONS[risky_option], 'REDACTED') if @BOOT_OPTIONS[risky_option] end .gsub!(/\e\[(\d+)(;\d+)*m/, '') unless @BOOT_OPTIONS[:colorize_output] end |
.store_options(options) ⇒ Object
TODO: How do we test this?
32 33 34 |
# File 'lib/flare_up/emitter.rb', line 32 def self.() @BOOT_OPTIONS = end |