Project

mergent

0.0
No release in over a year
Ruby library for the Mergent API. See https://mergent.co for details.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

Mergent Ruby Library

Gem Version CI

The Mergent Ruby library provides convenient access to the Mergent API from applications written in the Ruby language.

Installation

Add this line to your application's Gemfile:

gem "mergent"

And then execute:

$ bundle install

Or install it yourself as:

$ gem install mergent

Usage

The library needs to be configured with your project's API key. Set Mergent.api_key to its value:

# set the Mergent API key
Mergent.api_key = "..."

# create a Task
task = Mergent::Task.create({ request: { url: "https://example.com" } })

# get the newly created Task's ID
task.id

# create a Schedule
schedule = Mergent::Schedule.create({ cron: "0 8 * * *", request: { url: "https://example.com" } })

# get the newly created Schedule's cron schedule
schedule.cron

See the Mergent Ruby docs for more details.

Development

After checking out the repo, run bundle to install dependencies. Then, run rake spec to run the tests.

To install this gem onto your local machine, run bundle exec rake install.

To release a new version, update the changelog, bump the version number in version.rb, commit that change, and then run bundle exec rake release, which will create a git tag for the version, push git commits and the created tag, and push the .gem file to rubygems.org.

Contributing

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

Distributing

  1. Update the changelog in CHANGELOG.md
  2. Update the version in lib/mergent/version.rb
  3. Commit the version bump and tag using git tag $VERSION
  4. Push with git push --tags
  5. Build & publish with rake release

License

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