job_grapher 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cd41d58ef6c11f7e0b6c1989b75434a0e9bc410010350608619e413c4aa3999c
4
- data.tar.gz: 8e7456d73ccf71b53b8861d4ea6e2d9e40614c42db13b59c0476448be1c0b14a
3
+ metadata.gz: 6357289c3f28234ca3453a796c02b33abb37bd6c0a7abb7ae071bcb6c060f77d
4
+ data.tar.gz: d8e120f7f236a48a8d3b4e5d90be5e33dd02aa930ae706e0adba1c60474d3052
5
5
  SHA512:
6
- metadata.gz: 7277bedcf1fdc757958dbe4eb311e2c5a95f81b45960dbbe50be52262381ad2a6e51385df445f5c7f2332a3dfa39b57bc77c2b5cb216b3b2dca04f93a30fe377
7
- data.tar.gz: 399aae0f3e25ce96fed12fa6d1ca2b75aaa9fde7dd9c8dfed9ad9105326141560837fd26783a895fe5e3559c8948808aacf05648f4e9637723b79fe0a6a721c6
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
+ )
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JobGrapher
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
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.1.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-10-22 00:00:00.000000000 Z
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