Project

unit-ruby

0.01
The project is in a healthy, maintained state
A Ruby gem for communicating with the Unit API.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.4.0
~> 13.0
~> 3.0
~> 1.24.1
~> 2.7.6
>= 0

Runtime

~> 1.8.0
>= 6.1.5, < 7.1.0
 Project Readme

Documentation

The documentation for the Unit API can be found here.

Installation

Add this line to your application's Gemfile:

gem 'unit-ruby'

And then execute:

$ bundle

Or install it yourself as:

$ gem install unit-ruby

Usage

To get started, add an initializer file for the unit-ruby gem e.g. in config/initializers/unit.rb.

require 'unit-ruby'

Unit.configure do |config|
    config.api_key = ENV['UNIT_API_KEY']
    config.base_url = ENV['UNIT_BASE_URL']
    config.trust_token = ENV['UNIT_TRUST_TOKEN] # optional
end

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

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

Releasing

In order to publish this gem on RubyGems.org, you will need to create a RubyGems account. Note that multi-factor authentication must be set up on your account before a gem can be published.

Once your account is set up, the following operations will facilitate publishing the latest version of the gem:

  1. After making your changes to the gem, update the version number in version.rb and open a PR for review using semantic versioning
  2. Ensure that PR request is approved by appropriate member(s) of the engineering team before publishing the gem in the below steps
  3. Run gem build unit-ruby. This will build a version of the gem called unit-ruby-[gem version number].gem
  4. Push this latest version of the gem to RubyGems.org by calling gem push unit-ruby-[gem version number].gem
  5. Merge PR into main branch

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/retirable/unit-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

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

Code of Conduct

Everyone interacting in the Unit project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.