Skip to content

Latest commit

 

History

History
65 lines (34 loc) · 3.45 KB

README.md

File metadata and controls

65 lines (34 loc) · 3.45 KB

Structurizr

Test CoverageMaintainability

structurizr-ruby brings the C4 model to Ruby. It piggybacks on top of Java's API for Structurizr, which is a powerful tool for incorporating C4 model into your software architecture process.

The primary goal is to enable better introspection & scripting for workspaces defined by Structurizr DSL.

Number 1 feature of this library is actually a runnable REPL which allows a flexible introspection. You can run it via structurizr-repl <workspace.json>.

As a bonus, this library provides a complete integration to build Structurizr workspace from Ruby. However, it doesn't make much sense since there's Structurizr DSL. However, it's still a bit useful if you're using DSL's scripting feature, you might find this library a bit useful.

If you've met something which doesn't have a nice Ruby DSL, you can always use Structurizr::Metal to access Java classes and methods. Please don't forget to submit issue or a pull-request which describes your use-case and the missing features.

Versioning

After entering 1.0, this library will follow Structurizr-core versioning. If the gem bundles structurizr-core 1.26.1, the gem will use version 1.26.1.

Since Structurizr does not follow SemVer, there are no guarantees that minor versions won't break anything.

At least we have version parity with Structurizr.

Installation

Install the gem:

$ jruby -S gem install structurizr

or add it to your Gemfile via CLI:

$ jruby -S bundle add structurizr

or just edit your Gemfile manually:

# Gemfile

gem 'structurizr'

Usage

Before you start, you need to require the necessary files:

require 'structurizr'

If you have a workspace.json, you can run an interactive REPL to read values from it: structurizr-repl workspace.json

Development

After checking out the repo, run make setup to install dependencies. Then, run rake test 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 jruby -S 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.

Contributing

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

Code of Conduct

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