Equitrac::Utilities
Equitrac utilities help you run any EQCmd command within ruby. It use SSH by default so make sure you windows server is setup for ssh.
CHANGE LOG
Installation
Add this line to your application's Gemfile:
gem 'equitrac-utilities'
And then execute:
$ bundle
Or install it yourself as:
$ gem install equitrac-utilities
Usage
Initialize server object
require 'equitrac-utilities'
server = Equitrac::Connection.new "host.exemple.com", "admin", "server-name", "password"
ENV['EQUITRAC_HOST'] = "host.exemple.com"
ENV['EQUITRAC_USER'] = "admin"
ENV['EQUITRAC_SERVICE_NAME'] = "server-name"
ENV['EQUITRAC_HOST_PASSWORD'] = "password"
server = Equitrac::Connection.new
if you want to use key based authentication just ignore the password.
Generate add user command
min_user_params = {
user_id: "jdoe",
init_bal: 50.0,
user_name: "John DOE",
email: "jdoe@exemple.com",
dept_name: "employee",
primary_pin: 0420,
}
cmd = Equitrac::Utilities::User.add( min_user_params )
Execute command
server.execute(cmd)
server.execute(cmd, {verify_host_key: false})
Development
After checking out the repo, run bin/setup
to install dependencies. Then, run rake test
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
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.
Test
using:
rake test TEST=test/equitrac/*
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/las-it/equitrac-utilities.
Pull requests need tests.
License
The gem is available as open source under the terms of the MIT License.
All rights on Equitrac are owned by Nuance Communications, Inc.