job_grapher 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/examples/samvera-jobs.rb +13 -0
- data/lib/job_grapher/version.rb +1 -1
- data/lib/job_grapher.rb +2 -2
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6357289c3f28234ca3453a796c02b33abb37bd6c0a7abb7ae071bcb6c060f77d
|
4
|
+
data.tar.gz: d8e120f7f236a48a8d3b4e5d90be5e33dd02aa930ae706e0adba1c60474d3052
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1f9d423794b67469dc63f783e5228ded6b9f21256b415b27fbdf58c3a8c8c1225189b3ceda325473b4926a4dc070ed3bc52ac4a3c6a921cafb421d2db3f454f
|
7
|
+
data.tar.gz: 21fd8634eaeffb1baa45190cfc341f5c8e94d5a34e3715fd58e2dcc6da74d1ad77c8baa4aa52abbdf4aafdd483e5e3bd18fbf74214695a184c7db2b362f42fec
|
data/README.md
CHANGED
@@ -6,6 +6,10 @@ This gem outputs a [PlantUML](https://plantuml.com) diagram of class/location's
|
|
6
6
|
|
7
7
|
This gem requires [Ripgrep](https://github.com/BurntSushi/ripgrep).
|
8
8
|
|
9
|
+
## General Notes
|
10
|
+
|
11
|
+
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.
|
12
|
+
|
9
13
|
## Installation
|
10
14
|
|
11
15
|
Install the gem and add to the application's Gemfile by executing:
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require_relative "../lib/job_grapher"
|
2
|
+
|
3
|
+
JobGrapher.plantuml_for(
|
4
|
+
dirs: [
|
5
|
+
"~/git/hyrax",
|
6
|
+
"~/git/bulkrax",
|
7
|
+
"~/git/hyku",
|
8
|
+
"~/git/newspaper_works/"
|
9
|
+
],
|
10
|
+
# filter: ->(job) do
|
11
|
+
# job.include?("Permission") || job.include?("Ingest")
|
12
|
+
# end
|
13
|
+
)
|
data/lib/job_grapher/version.rb
CHANGED
data/lib/job_grapher.rb
CHANGED
@@ -138,7 +138,7 @@ module JobGrapher
|
|
138
138
|
|
139
139
|
class PerformInformation
|
140
140
|
def self.each_from(dir)
|
141
|
-
command = %(rg "^ *[^#]*Job\\.perform" #{dir} -g '!spec/' -n)
|
141
|
+
command = %(rg "^ *[^#]*Job\\.(perform|_*send_*|public_send)" #{dir} -g '!spec/' -n)
|
142
142
|
`#{command}`.split("\n").each do |line|
|
143
143
|
parser = Parser.new(line)
|
144
144
|
info = new(
|
@@ -160,7 +160,7 @@ module JobGrapher
|
|
160
160
|
|
161
161
|
class Parser
|
162
162
|
LINE_REGEXP = %r{(?<path>[^:]*):(?<line_number>[^:]*):(?<content>.*)}
|
163
|
-
JOB_REGEXP = %r{(?<job>[\w:]+Job)\.perform}
|
163
|
+
JOB_REGEXP = %r{(?<job>[\w:]+Job)\.(perform|_*send_*|public_send)}
|
164
164
|
def initialize(grep_result_line)
|
165
165
|
@grep_result_line = grep_result_line
|
166
166
|
match = LINE_REGEXP.match(grep_result_line)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: job_grapher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Friesen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A naive graph generator for ActiveJob's declared and called across projects.
|
14
14
|
email:
|
@@ -22,6 +22,7 @@ files:
|
|
22
22
|
- LICENSE
|
23
23
|
- README.md
|
24
24
|
- Rakefile
|
25
|
+
- examples/samvera-jobs.rb
|
25
26
|
- exe/job_grapher
|
26
27
|
- job_grapher.gemspec
|
27
28
|
- lib/job_grapher.rb
|