Project

talis

0.0
No commit activity in last 3 years
No release in over 3 years
Ruby client to utilise Talis primitive services
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.11
>= 0
>= 0
~> 10.0
~> 3.0
~> 0.39.0
~> 1.24.2

Runtime

= 0.13.7
= 1.5.4
= 1.11.2
= 2.3.8
 Project Readme

Talis Ruby Client

Build Status Dependency Status

A ruby gem that provides interactions with Talis primitives.

Ubuntu Prerequisites

sudo apt-get install libgmp-dev

Installation

Add this line to your application's Gemfile:

gem 'talis', github: talis/talis_rb

And then execute:

$ bundle

Or install it yourself as:

$ gem install talis

Usage

Security Configuration

Many client operations require an OAuth token. In order to carry out these operations, configure the OAuth client:

require 'talis/authentication'

Talis::Authentication.client_id = 'client_id'
Talis::Authentication.client_secret = 'client_secret'

See the code for each class for specific usage:

  • lib/talis/authentication/login.rb For server-side login workflow.
  • lib/talis/authentication/token.rb For OAuth token generation and validation.
  • lib/talis/hierarchy/node.rb For managing hierarchies.
  • lib/talis/hierarchy/asset.rb For managing hierarchy assets.
  • lib/talis/user.rb For managing Talis users.
  • lib/talis/bibliography/work.rb For querying works.
  • lib/talis/analytics.rb For sending analytical data.

Development

After checking out the repo, run bin/setup to install dependencies.

Create a .env file in the project root and configure the following variables:

PERSONA_TEST_HOST=http://persona
PERSONA_OAUTH_CLIENT=<client ID>
PERSONA_OAUTH_SECRET=<client secret>
BLUEPRINT_TEST_HOST=http://blueprint
ECHO_TEST_HOST=http://echo

METATRON_TEST_HOST=<Metatron host>
METATRON_BASE_PATH=<set this to /env_name/2 if not using production>
METATRON_OAUTH_HOST=<Persona host the Metatron host uses>
METATRON_OAUTH_CLIENT=<client ID associated with oauth host above>
METATRON_OAUTH_SECRET=<client secret associated with oauth host above>
TEST_USER_GUID=<The GUID of the Talis test user (test.tn@talis.com)>

Adjust the values according to the primitives you want to test against (local or remote). If testing locally then make sure the host names are in /etc/hosts.

Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

This project enforces style and lint rules via Rubocop. Run rake rubocop to check for violations.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.