No commit activity in last 3 years
No release in over 3 years
uses ssh to connect to an Equitrac server and send user commands
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.16
~> 10.5
~> 3.7

Runtime

~> 4.2
 Project Readme

Codeship Status for LAS-IT/equitrac_utilities

EquitracUtilities

This is an easy to use ruby wrapper for Equitrac Express using EQCmd.exe.
So far only user management commands are written. These command are query, add, delete, lock, unlock, and modify.

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

Change Log

  • 0.1.4 2020-03-03

    • gem update
    • fix rake vulnerability
  • 0.1.3 2018-05-28

    • more Error handling updates and examples
    • added new command for setting user balances(user_adjust_set)
  • 0.1.2 2018-05-25 - OOPS, missed readme and gemlock

  • 0.1.1 2018-05-25 - Error Handling improvements

    • for missing methods (actions)
    • for missing user_id
    • for user_ids with embedded spaces
    • cleanup for user_id with trailing & leading spaces
  • 0.1.0 2018-05-24 - initial release

Usage

# configure
# Use environmental variables
###################

# connect using
require 'equitrac_utilities/connection'
eq = EquitracUtilities::Connection.new

# sample user information
# the dept_name from the example users must exist in your Equitrac environment
# also the primary_ pin can not be currently in use in your Equitrac environment
users = { primary_pin: 99999,
          user_id: "username1",
          email: "username1@example.com",
          user_name: "FirstName1 LastName1",
          dept_name: 'employee', init_bal: 0.0 }
update_users = { primary_pin: 99999,
          user_id: "username1",
          email: "nameduser1@example.com",
          user_name: "NewName1 OldName1",
          dept_name: 'student', init_bal: 0.0 }

##############
# QUERY USER
# ------------
# query user details
eq.run(command: :user_query, attributes: users)
# => "Can't find the specified account in database."
#
# Confirm existence of user
eq.run(command: :user_exists?, attributes: users)
# => False
#
# CREATE USER
# -------------
# add new user to the equitrac system
eq.run(command: :user_add, attributes: users)
# =>"ADD command processed successfully.\r\n\r\n"
#
# Confirm existence of user
eq.run(command: :user_exists?, attributes: users)
# => True
#
# query user details
eq.run(command: :user_query, attributes: users)
# => "User_ID" "User_Full_Name" "User_Email" "Balance" "Account_Limit" "Account_Status"
#    "username "FirstName1 LastName1" "username1@example.com" "$0.00" "$0.00" "Unlocked"
#
# MODIFY USER ACCOUNT
# --------------------
# modify user account
eq.run(command: :user_modify, attributes: update_users)
# => "MODIFY command processed successfully.\r\n\r\n"
# get user details
eq.run(command: :user_query, attributes: users)
# => "User_ID" "User_Full_Name" "User_Email" "Balance" "Account_Limit" "Account_Status"
#    "username "NewName1 OldName1" "nameduser1@example.com" "$0.00" "$0.00" "Unlocked"
#
# lock user accont
eq.run(command: :user_lock, attributes: users)
# => "LOCK/UNLOCK command processed successfully.\r\n\r\n"
#
# get user details
eq.run(command: :user_query, attributes: users)
# => "User_ID" "User_Full_Name" "User_Email" "Balance" "Account_Limit" "Account_Status"
#    "username "NewName1 OldName1" "nameduser1@example.com" "$0.00" "$0.00" "Locked"
#
# unlock user accont
eq.run(command: :user_unlock, attributes: users)
# => "LOCK/UNLOCK command processed successfully.\r\n\r\n"
#
# get user details
eq.run(command: :user_query, attributes: users)
# => "User_ID" "User_Full_Name" "User_Email" "Balance" "Account_Limit" "Account_Status"
#    "username "NewName1 OldName1" "nameduser1@example.com" "$0.00" "$0.00" "Unocked"
#
# DELETE USER
# ------------
eq.run(command: :user_delete, attributes: users)
# =>"DELETE command processed successfully.\r\n\r\n"
#
# Confirm existence of user
eq.run(command: :user_exists?, attributes: users)
# => False
#

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec 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.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/equitrac_utilities. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the EquitracUtilities project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.