Project

dashy4r

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Intercept endpoint calls to notify a Dash server about endpoint status
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.0
~> 2.0.1
~> 3.0.0

Runtime

~> 1.16
~> 1.5.10
~> 1.6.7
~> 1.2.4
 Project Readme

dashy4r

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

Build Status

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  :name => 'My Web Service', :meta => { :environment => 'My Environment' }
    runner.block_to_run do
      # your code goes here (example with success response)
      1
    end
    runner.valid_response? do |response|
      # your code goes here (example with some conditional)
      response == 1
    end
  end

Very Important

Works only with ruby 1.8.7