Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eml

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eml

  • 3.0.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

EML API integration library for Ruby

The EML API integration library provides convenient access to EML's REST Web Services and Transaction Notification Service for applications written in the Ruby language.

Version 1 supports the UK APIs with Australian support coming as existing code is extracted.

Installation

You don't need this source code unless you want to modify the gem. If you just want to use the package, just include the following in your Gemfile:

gem "eml"

If you are debugging or developing this gem and wish to use it within the context of an existing application, modify your Gemfile to read:

gem "eml", path: "../path_to_gem"

Requirements

  • Ruby 2.6+ (untested in prior versions)

Usage

Each geographical region is a separate module and will need to be configured with your supplied credentials.

require "eml"

EML::UK.configure do |config|
  config.rest_username = "username"
  config.rest_password = "password"
  config.merchant_group = "merchant_id"
  config.program = "program_id"
  config.search_parameter = "program_id"
  config.tns_username = "username"
  config.tns_password = "password"
end

Make sure you never commit your credentials to git. If you are using Ruby on Rails, it is usually best to keep your secrets in your [credentials file]: https://edgeguides.rubyonrails.org/security.html#custom-credentials

Development

Since it is necessary to authenticate with EML to test API resources, credentials and a test card ID are required. The dotenv gem is loaded when tests are run and will look for a .env file in the root directory. A .env.example file has been supplied so you copy it to .env and replace the example values:

cp .env.example .env

The .env file has been added to the .gitignore list and should never been commited to the repository.

Run all tests:

bundle exec rspec

Run a single test suite:

bundle exec rspec spec/path/to/file.rb

Run a single test, include the line number:

bundle exec rspec spec/path/to/file.rb:123

Please ensure that all changes have been run by the Rubocop before creating a pull request:

bundle exec rubocop

FAQs

Package last updated on 07 Aug 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc