Low commit activity in last 3 years
A long-lived project that still receives updates
A Ruby client that enables quick and easy interactions with the Manifest.ly api
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.0

Runtime

~> 0.15
 Project Readme

Manifest.ly Ruby Client

Gem Version Build Status

A Ruby client that enables quick and easy interactions with the Manifest.ly api.

Getting Started

Installation

Add this line to your application's Gemfile:

gem 'manifestly-client'

And then execute:

$ bundle

Or install it yourself as:

$ gem install manifestly-client

Basic Usage

You may begin using the entity methods after specifying the MANIFESTLY_API_KEY variable in the environment.

require 'manifestly'

ENV['MANIFESTLY_API_KEY'] = '<secret>'
puts Manifestly::Entity::Workflow.list.inspect

Workflow entity

You may create a new workflow by passing a hash of data to the Workflow constructor and invoking the create method. Some internal fields (like id) will be injected back in to the object after it is created.

data = {title: 'Test Workflow', external_id: 'abc123'}
workflow = Manifestly::Entity::Workflow.new(data)
workflow.create

If you specify an external_id for a local reference, Manifest.ly will use an upsert methodology (if the workflow does not exist it will be created - otherwise it will be updated). This effectively means that create/update/save function identically for workflows.

data = {title: 'Test Workflow Upsert', external_id: 'def456'}
workflow = Manifestly::Entity::Workflow.new(data).create

workflow.title = "#{workflow.title} (updated)"
workflow.create

You may delete a workflow if you specified an external_id when creating it.

data = {title: 'Test Workflow Delete', external_id: 'ghi789'}
workflow = Manifestly::Entity::Workflow.new(data).create
workflow.delete
Workflow Steps entity

Steps may be passed in when creating a workflow via the steps field.

data = {title: 'Test Workflow with steps', external_id: 'jkl012', steps: [{title: 'Step One'}]}
workflow = Manifestly::Entity::Workflow.new(data)
workflow.create

Checklist Run entity

You may start a new checklist run by passing a hash of data to the ChecklistRun constructor and invoking the create method. You must include the internal id of an existing workflow as the checklist_id. Subsequent modifications of this checklist run or it's steps is only possible if you are listed as one of the users on the run.

my_email_address = 'john.smith@foo.bar'
my_user = Manifestly::Entity::User.list.find { |it| it.email == my_email_address }

data = {title: 'Test Workflow for checklist run', external_id: 'mno345', steps: [{title: 'Step One'}]}
workflow = Manifestly::Entity::Workflow.new(data).create

data = {title: 'Test Run', checklist_id: workflow.id, users: [my_user.id]}
checklist_run = Manifestly::Entity::ChecklistRun.new(data).create

You may complete a checklist step by calling the corresponding method on the step object. Currently you must either be a participant on the run or assigned to the step in order to complete it.

my_email_address = 'john.smith@foo.bar'
my_user = Manifestly::Entity::User.list.find { |it| it.email == my_email_address }

data = {title: 'Test Workflow for checklist run step complete', external_id: 'pqr678', steps: [{title: 'Step One'}]}
workflow = Manifestly::Entity::Workflow.new(data).create

data = {title: 'Test Run step complete', checklist_id: workflow.id, users: [my_user.id]}
checklist_run = Manifestly::Entity::ChecklistRun.new(data).create

checklist_run.steps.first.assign(my_user.id)
checklist_run.steps.first.complete

Supported Ruby Versions

This library is currently supported on Ruby 2.4+.

Versioning

This library follows Semantic Versioning.

Contributing

Contributions to this library are always welcome and highly encouraged.

See Contributing for more information on how to get started.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. See Code of Conduct for more information.

License

This library is licensed under Apache 2.0. Full license text is available in LICENSE.

Support

Please report bugs at the project on Github

See Contributing for more information on how to get started.