0.01
No commit activity in last 3 years
No release in over 3 years
Provides ruby support for interacting with the Collins API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 10.4
~> 2.99
~> 0.10
~> 1.21
~> 0.9

Runtime

~> 0.16.0
 Project Readme

Collins::Client

The collins_client gem provides a library for API access to Collins.

Installation

First install rvm

$ bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
$ source ~/.bash_profile
$ rvm requirements
$ rvm install 1.9.3
$ rvm use 1.9.3

Install the collins gem and use it

$ gem install collins_client

Remember, if you don't have 1.9.3 set as the default, before you use collins you'll need to do rvm use 1.9.3.

Usage

#!/usr/bin/env ruby
require 'collins_client'
config = {:username => "foo", :password => "bar", :host => "http://127.0.0.1:8080"}
client = Collins::Client.new config
client.find :HOSTNAME => /^abc.*/

Note for developers

If you are implementing support for a new API endpoint, and that endpoint requires an asset tag, please observe the standard of having the method parameter be named asset_or_tag. For instance do:

def new_method asset_or_tag
  # some work
end

and not

def new_method an_asset
  # some work
end

The AssetClient class depends on this naming convention to know how to appropriately proxy method calls to the collins client instance.