Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jeremyf/job_grapher
A naive graph generator for ActiveJob's declared and called across projects.
https://github.com/jeremyf/job_grapher
Last synced: 28 days ago
JSON representation
A naive graph generator for ActiveJob's declared and called across projects.
- Host: GitHub
- URL: https://github.com/jeremyf/job_grapher
- Owner: jeremyf
- License: other
- Created: 2022-10-22T01:24:38.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-10T02:34:09.000Z (about 2 years ago)
- Last Synced: 2024-11-18T12:38:32.375Z (about 1 month ago)
- Language: Ruby
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# JobGrapher
While looking through multiple gems and applications, I needed a little tool to help me.
This gem outputs a [PlantUML](https://plantuml.com) diagram of class/location's that perform a job. The parser and logic were built while exploring [Samvera](https://samvera.org)'s ActiveJob implementations.
This gem requires [Ripgrep](https://github.com/BurntSushi/ripgrep).
## General Notes
While this is specific to application jobs, it would not take much to generalize this for class/module references. In other words show the relationships between constants.
## Installation
Install the gem and add to the application's Gemfile by executing:
$ bundle add job_grapher
If bundler is not being used to manage dependencies, install the gem by executing:
$ gem install job_grapher
## Usage
This gem came about as a thought experiment. Here's the command line:
```shell
job_grapher ~/path/to/repo ~/path/to/other-repo
```### From Ruby
At present, the command-line only allows you to specify directories. However, you can call the underlying Ruby class and provide additional parameters.
```ruby
require "job_grapher"JobGrapher.plantuml_for(
dirs: [
"~/git/hyrax",
"~/git/bulkrax",
"~/git/hyku",
"~/git/newspaper_works/"
],
filter: ->(job) do
job.include?("Permission") || job.include?("Ingest")
end
)
```## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/jeremyf/job_grapher.