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

lontara_utilities

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lontara_utilities

  • 3.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Lontara Utilities

Build Version: 3.0.0

This is a collection of utilities for your Ruby project provided by Lontara. These are:

  • LontaraUtilities - a collection of utilities
  • HTTPClient - Client for HTTP Connection
  • RMQ::Client - Client for RabbitMQ Connection
  • RMQ::Server - Server for RabbitMQ Connection
  • Git - An interface to Git Branch and Release
  • BaseError - Custom Error inherited from StandardError with some features

Installation

Open your terminal and type:

gem install lontara_utilities

or add this line to your application's Gemfile:

gem 'lontara_utilities'

If you wanna use the git method, you need to install git first, and then initialize it in your project directory.

For Rails project, you can use initializer to run RMQ Server. Just add rmq.rb file in config/initializers directory, and add this code:

Note: Currently we only support RPCConsumer (from RPC Pattern) or Subscriber (from Pub/Sub Messaging Pattern) server.

require 'lontara_utilities/rmq'

LontaraUtilities::RMQ.start(
  server: 'RPCConsumer',
  url: ENV.fetch('RABBITMQ_URL', 'amqp://guest:guest@rmqserver:5672'),
  queue: ENV.fetch('RABBITMQ_QUEUE_VOUCHER', 'lontara-dev.voucher')
)

Usage

You can require this utilities by adding require 'lontara_utilities', or you can require each utilities separately.

require 'lontara_utilities/http_client'

LontaraUtilities::HTTPClient.get('http://example.com')

But, if lontara_utilities or it's alias: lontara is required, you can call these methods using method format.

require 'lontara_utilities' # or require 'lontara'

Lontara.http_client.get(url: 'http://example.com')

For usage of each utilities, please refer to the documentation: Lontara Utilities

Contributing

Bug reports and pull requests are welcome on GitHub at Lontara Utilities.

FAQs

Package last updated on 20 Feb 2024

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