Sha256: 7e1f82ba107f77af90a5cc4691c39a39924aaea744e5eacb432e36fa76d15dc7

Contents?: true

Size: 1.7 KB

Versions: 2

Compression:

Stored size: 1.7 KB

Contents

# Derketo - Generate Sequence Diagrams with Ruby Tracepoint & Mermaid.js

[![Build Status](https://travis-ci.org/arcadiapower/derketo.svg?branch=master)](https://travis-ci.org/arcadiapower/derketo) [![Code Climate](https://codeclimate.com/github/arcadiapower/derketo/badges/gpa.svg)](https://codeclimate.com/github/arcadiapower/derketo)

## Description

Derketo is a gem that allows you to easily generate seqeuence diagrams of your code paths by serializing a [Tracepoint](https://ruby-doc.org/core-2.5.0/TracePoint.html) object into [mermaid.js](https://mermaidjs.github.io/).

Sequence diagrams:
1.  Help you discover architectural, interface and logic problems early.
2.  Become valuable collaboration tools during design meetings because they allow you to discuss the design in concrete terms.
3.  Abstract much of the implementation detail and provide a high level view of system behavior, thus helping you with documentation.

## Preview
Here's an example sequence diagram that was generated by Derketo:

![Sequence Diagram]()
**TODO**: Add PNG of MMD output.

## Requirements

## Getting Started
    require 'derketo'

    tracer = Derketo::Tracer.new()
    tracer.trace { Mermaid.new.sing }
    serialization = Derketo::Serializers::Mermaid.new(tracer).serialize
    Derketo::Helpers.write('./tmp/test.mmd', serialization)

## Integrate with Rack/Rails

All you should have to do is define the root of your project in an ENV called `DERKETO_ROOT` and  `require 'derketo/middleware'`.

If you use Rails, just add `require 'derketo/railtie` to your `application.rb`.

## Install

    $ gem build derketo.gemspec
    $ gem install derketo-<VERSION>.gem

## Copyright

Copyright (c) 2018 Arcadia Power

See {file:LICENSE.txt} for details.

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
derketo-0.1.2 README.md
derketo-0.1.1 README.md