Socket
Book a DemoInstallSign in
Socket

peach-ruby

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

peach-ruby

0.5.1
bundlerRubygems
Version published
Maintainers
1
Created
Source

peach-ruby

Ruby library for Peach API

Installation

Install the gem and add to the application's Gemfile by executing:

$ bundle add peach-ruby

If bundler is not being used to manage dependencies, install the gem by executing:

$ gem install peach-ruby

Usage

Configure the SDK with your API Token:

require 'peach-ruby'

Peach.configure do |config|
  config.api_token = '<YOUR API TOKEN>'
end

And then use it:

require 'peach-ruby'

contact = {
  id: 1,
  name: 'John Doe',
  language: 'en',
  last_name: 'Doe',
  account_id: 1,
  first_name: 'John',
  country_code: '91',
  phone_number: '+919988776655'
}
# you may pass in an OpenStruct as well, if needed
Peach::TemplateMessage.deliver('wat_1234abcd', { foo: 'bar' }, contact)

Development

Install dependencies

bin/setup

Run tests

bundle exec rake spec

Use the interactive prompt

bin/console

Install gem locally

bundle exec rake install

Release a new version

We use the rubygems/release-gem@v1 action, which creates the tags and pushes the .gem file to rubygems.org for us.

What we need to do then is:

  • Update version number in version.rb
  • Run bundle install to update Gemfile.lock with the new gem version
  • Add and commit changes and create a Pull Request

The GitHub Action then should ideally take care of the rest.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/trypeach-io/peach-ruby.

FAQs

Package last updated on 28 Sep 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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.