Module: RollbarTest
- Defined in:
- lib/rollbar/rollbar_test.rb
Overview
:nodoc:
Class Method Summary collapse
- .confirmed_token? ⇒ Boolean
- .error_message ⇒ Object
- .run ⇒ Object
- .success_message ⇒ Object
- .token_error_message ⇒ Object
Class Method Details
.confirmed_token? ⇒ Boolean
17 18 19 20 21 22 23 |
# File 'lib/rollbar/rollbar_test.rb', line 17 def self.confirmed_token? return true if Rollbar.configuration.access_token puts false end |
.error_message ⇒ Object
29 30 31 32 33 |
# File 'lib/rollbar/rollbar_test.rb', line 29 def self. 'Test failed! You may have a configuration issue, or you could be using a ' \ 'gem that\'s blocking the test. Contact [email protected] if you need ' \ 'help troubleshooting.' end |
.run ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/rollbar/rollbar_test.rb', line 4 def self.run return unless confirmed_token? puts 'Test sending to Rollbar...' result = Rollbar.info('Test message from rollbar:test') if result == 'error' puts else puts end end |
.success_message ⇒ Object
35 36 37 |
# File 'lib/rollbar/rollbar_test.rb', line 35 def self. 'Testing rollbar with "rake rollbar:test". If you can see this, it works.' end |
.token_error_message ⇒ Object
25 26 27 |
# File 'lib/rollbar/rollbar_test.rb', line 25 def self. 'Rollbar needs an access token configured. Check the README for instructions.' end |