A simple ruby client for Metronome
Add this line to your application's Gemfile:
gem 'metronome-client'
And then execute:
$ bundle
Or install it yourself as:
$ gem install metronome-client
Configure with an authentication token
require 'metronome'
Metronome.configure('http://url', token: 'token')
Once the client is configured,
puts Metronome::Job.all
#<Flexirest::ResultIterator:0x007fdddb39d558>
puts Metronome::Job.find('my_job_name')
#<Metronome::Job:0x007fdddb34cc70>
puts Metronome::Run.all(job_id: j.id)
#<Flexirest::ResultIterator:0x007feb06307cf0>
puts Metronome::Run.find(job_id: 'id_one', run_id: 'id')
#<Metronome::Run:0x007fdddb34cc70>
puts Metronome::Metric.all
#<Metronome::Metric:0x007ff1810c8648>
After checking out the repo, run bundle install
to install dependencies. Then, run bundle exec rake test
to run the tests.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and tags, and push the .gem
file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/cduranleau/metronome-ruby.
The gem is available as open source under the terms of the MIT License.