Dagger
can manage a
directed acyclic graph of
key trees, inspired by the ideas behind PalletJack.
The DAG is stored in a regular posix file system hierarchy, where directories are vertices with a forest of key trees from the contained files. Edges are formed from the directory structure, and symlinks.
Edge direction (default top->down & target->source) is selectable, but key tree inheritence is always top->down & target->source.
spec/fixture/graph
├── vertex1
│ ├── a.yaml # a.b = 2
│ └── c.yaml # c = 3
└── vertex2
├── b.yaml # b = 2
└── parent -> ../vertex1 # a.b = 2, c = 3
See the changelog for recent changes.
Add this line to your application's Gemfile:
gem 'ruby-dagger'
And then execute:
$ bundle
Or install it yourself as:
$ gem install ruby-dagger
$ bin/console
g=Dagger.load('spec/fixture/graph')
=> #<Dagger::Graph: 3 vertices, 3 edges>
g['/vertex1']['a.b']
=> 2
g['/vertex2']['a.b']
=> 2
g['/vertex2'].local['a.b']
=> nil
After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
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 bundle exec rake install
.
Bug reports and pull requests are welcome on GitHub at https://github.com/notCalle/ruby_dagger. Pull requests should be rebased to HEAD of master
before submitting, and all commits must be signed with valid GPG key. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the RubyDagger project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.