0.01
Repository is archived
A long-lived project that still receives updates
Client and models for communicating with Zendesk
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

>= 1.37, < 4.0
 Project Readme

GDS Zendesk

This gem was archived. The functionality was ported to Support API.

What is it?

gds_zendesk is a Ruby gem which (partially) wraps the Zendesk REST API v2.

The zendesk_api gem is used under the covers.

Why does it exist?

This gem has certain advantages over the zendesk_api gem:

  • Rails integration
  • A dummy Zendesk client implementation, since Zendesk doesn't provide a staging environment
  • Ability to simulate error conditions

Rails integration

Installation

Simply add the gem to your Gemfile and bundle it up:

gem 'gds_zendesk'

Run the installation generator:

$ rails generate gds_zendesk:install

This generates an initializer at config/initializers/gds_zendesk.rb.

Configuration

Mandatory settings

This gem needs to be configured with a Zendesk username and password (or token) before it can be used. These are set in config/initializers/gds_zendesk.rb

Enabling development mode

Because Zendesk doesn't provide a staging environment, it is advised to use the development mode during development and testing. When this mode is enabled:

  • the real Zendesk client is replaced by an interface-equivalent dummy implementation (which makes no network calls)
  • ticket creation failures can be simulated by including break_zendesk anywhere in the ticket description

Development mode can be enabled by configuring development_mode: true. It is off by default.

Usage

Invoke

GDSZendesk::Client.new(config_options)

to create a new client.

Running tests locally

To run the tests, use the follow:

bundle exec rake default

Licence

MIT License