Skip to content

dashy4r is a gem that helps you use ruby to integrate with Dashy

License

Notifications You must be signed in to change notification settings

fabiopereira/dashy4r

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dashy4r

dashy4r is a gem that helps you use ruby to integrate with Dashy

Documentation

Installing

gem install dashy4r

Usage

Configuration file

Create a file dashy_config.yml

app_id: <YOUR_APP_ID>
url: <YOUR_DASHY_URL>
timeout: <YOUR_TIMEOUT_IN_SECONDS>

Enable configuration

  Dashy::Base.enable_with_config '<path for your dashy_config.yml>'

Simplest way of reporting status. It will fail if any exception is raised

  require 'dashy4r'

  Dashy::Runner.run_and_report_status_for do
    # your code goes here
    run_something_that_you_want_to_report_status
  end

A more complete Runner setup where you can set options and also validate the response the response is the return of your block to run

  require 'dashy4r'

  Dashy::Runner.config_and_run do |runner|
    runner.with_options  :environment => 'My Environment', :endpoint => 'My Web Service'
    runner.block_to_run do
      # your code goes here
      run_something_that_you_want_to_report_status_and_returns_something
    end
    runner.valid_response? do |response|
      # your code goes here
      validates_response_and_returns_a_boolean(response)
    end
  end

Very Important

Works only with ruby 1.8.7

About

dashy4r is a gem that helps you use ruby to integrate with Dashy

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages