An open API service indexing awesome lists of open source software.

https://github.com/rhuanbarreto/ip21-ruby

IP21 Database connection for Ruby. With this gem you will be able to connect to IP21 and execute queries against the database using SQL statements.
https://github.com/rhuanbarreto/ip21-ruby

aspentech ip21 rails ruby sinatra sqlplus

Last synced: about 2 months ago
JSON representation

IP21 Database connection for Ruby. With this gem you will be able to connect to IP21 and execute queries against the database using SQL statements.

Awesome Lists containing this project

README

          

# Aspentech IP21 Ruby Gem

[![Gem Version](https://badge.fury.io/rb/ip21@2x.png)](https://badge.fury.io/rb/ip21)

With this gem you will be able to connect to IP21 and execute queries against the database using SQL statements or fetching from history or KPI table definitions.

Full documentation on https://rubydoc.info/gems/ip21

## Installing

To install this gem, use the following command:

```sh
$ gem install ip21
```

Or add to your Gemfile:

```ruby
# Gemfile
gem 'ip21'
```

And use the class in your code to execute queries:

```ruby
require 'ip21' # If you are using Ruby. Don't need require if you use Rails

IP21.new(
auth: {
account: 'john.doe',
domain: 'contoso.com',
password: 'set_your_own_password'
},
sqlplus_address: '127.0.0.1',
ip21_address: '127.0.0.1',
).query('SELECT IP_PLANT_AREA, Name, IP_DESCRIPTION FROM IP_AnalogDef')
```

## Prerequisites

- IP21 Database
- SQLPlus with REST installed

## Authentication

This gem uses Windows authentication (NTLM) to connect to SQLPlus, so don't forget to set your credentials correctly.

On domain you can use the NETBIOS name (CONTOSO) or the normal domain name (contoso.com)

# Changelog
See the [commit page](https://github.com/rhuanbarreto/ip21-ruby/commits) for a list of changes.

# License
IP21 Gem by Rhuan Barreto. IP21 Gem is licensed under the MIT license. Please see the LICENSE file for more information.