Skip to content

3M™ Standard Interchange Protocol client implementation in Ruby

License

Notifications You must be signed in to change notification settings

mangolanguages/sip2-ruby

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Travis Build Status Gem Version

3M™ Standard Interchange Protocol v2 (SIP2) client implementation in Ruby

This is a gem wrapping the SIP v2 protocol.

http://multimedia.3m.com/mws/media/355361O/sip2-protocol.pdf

Installation

Add this line to your application's Gemfile:

gem 'sip2'

And then execute:

$ bundle

Protocol support

So far only login (code 93) and patron_information (code 63) are supported

Usage

client = Sip2::Client.new(host: 'my.sip2.host.net', port: 6001)
patron =
  client.connect do |connection|
    if connection.login 'sip_username', 'sip_password'
      connection.patron_information 'patron_username', 'patron_password'
    end
  end

puts 'Valid patron' if patron && patron.authenticated?

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/Studiosity/sip2-ruby.

Note that spec tests are appreciated to minimise regressions. Before submitting a PR, please ensure that:

$ rspec

and

$ rubocop

both succeed

License

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

About

3M™ Standard Interchange Protocol client implementation in Ruby

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%