https://github.com/notcalle/ruby-dagger
https://github.com/notcalle/ruby-dagger
dag json key-trees yaml
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/notcalle/ruby-dagger
- Owner: notCalle
- License: mit
- Created: 2018-01-17T16:35:44.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2023-07-10T09:22:44.000Z (almost 2 years ago)
- Last Synced: 2025-03-05T13:42:00.037Z (3 months ago)
- Topics: dag, json, key-trees, yaml
- Language: Ruby
- Size: 227 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
[](https://badge.fury.io/rb/ruby-dagger)
[](https://codeclimate.com/github/notCalle/ruby-dagger/maintainability)
[](https://codecov.io/gh/notCalle/ruby-dagger)
[](https://github.com/notCalle/ruby-dagger/actions/workflows/ruby.yml)# Dagger
`Dagger` can manage a
[directed acyclic graph](https://github.com/notcalle/tangle) of
[key trees](https://github.com/notcalle/keytree), inspired by the ideas behind [PalletJack](https://github.com/saab-simc-admin/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](CHANGELOG.md) for recent changes.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'ruby-dagger'
```And then execute:
$ bundle
Or install it yourself as:
$ gem install ruby-dagger
## Usage
$ bin/console
```ruby
g=Dagger.load('spec/fixture/graph')
=> #
g['/vertex1']['a.b']
=> 2
g['/vertex2']['a.b']
=> 2
g['/vertex2'].local['a.b']
=> nil
```## Development
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`.
## Contributing
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](http://contributor-covenant.org) code of conduct.
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
## Code of Conduct
Everyone interacting in the RubyDagger project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/notCalle/ruby_dagger/blob/master/CODE_OF_CONDUCT.md).