lib/boppers/generator/app/config/boppers.rb in boppers-0.0.10 vs lib/boppers/generator/app/config/boppers.rb in boppers-0.0.11

- old
+ new

@@ -6,11 +6,11 @@ # Load the stdout notifier. # Check https://github.com/fnando/boppers#notifiers for more # information about notifiers. require "boppers/notifier/stdout" -Config = Env::Vars.new do +Config = SuperConfig.new do # mandatory :sendgrid_username, string # mandatory :sendgrid_password, string # mandatory :sendgrid_domain, string end @@ -48,11 +48,16 @@ # Configure your boppers. # A bopper is anything that responds to #call, like a lambda. # The following example returns the current time. config.boppers << lambda do - Boppers.notify("Current time", "Now is #{Time.now}") + $stdout.sync = true + Boppers.notify( + :time, + title: "Current time", + message: "Now is #{Time.now}" + ) end # A bopper can also configure the polling interval by defining a # method `#interval`. If this method is not available, the default # value will be used (1-minute). The following example runs every second. @@ -66,10 +71,14 @@ # 1 # end # # def call # @count += 1 - # Boppers.notify("Counter", "[#{Time.now}] Current count is #{@count}") + # Boppers.notify( + # :counter, + # title: "Counter", + # message: "[#{Time.now}] Current count is #{@count}" + # ) # end # end # # config.boppers << Counter.new