asgard 0.5.1 → 0.6.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.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +179 -99
  3. data/README.md +141 -46
  4. data/bin/asgard +10 -0
  5. data/lib/asgard/base/dispatch.rb +257 -31
  6. data/lib/asgard/base/registry.rb +7 -3
  7. data/lib/asgard/base.rb +140 -9
  8. data/lib/asgard/declarations.rb +21 -0
  9. data/lib/asgard/doctor/task_sections.rb +11 -3
  10. data/lib/asgard/doctor.rb +12 -8
  11. data/lib/asgard/jobs/commands.rb +152 -0
  12. data/lib/asgard/jobs/declaration.rb +149 -0
  13. data/lib/asgard/jobs/launcher.rb +109 -0
  14. data/lib/asgard/jobs/state.rb +190 -0
  15. data/lib/asgard/jobs/stopper.rb +141 -0
  16. data/lib/asgard/jobs.rb +25 -0
  17. data/lib/asgard/kernel_methods.rb +19 -14
  18. data/lib/asgard/leading_flag.rb +10 -0
  19. data/lib/asgard/pid.rb +130 -0
  20. data/lib/asgard/schedule/commands.rb +39 -11
  21. data/lib/asgard/schedule/declaration.rb +139 -12
  22. data/lib/asgard/schedule/job_files.rb +24 -0
  23. data/lib/asgard/schedule/launchd.rb +55 -18
  24. data/lib/asgard/schedule/systemd.rb +69 -27
  25. data/lib/asgard/schedule/table.rb +34 -16
  26. data/lib/asgard/schedule.rb +49 -9
  27. data/lib/asgard/shell.rb +372 -44
  28. data/lib/asgard/state_dir.rb +84 -0
  29. data/lib/asgard/tasks.rb +8 -0
  30. data/lib/asgard/version.rb +1 -1
  31. data/lib/asgard/watch/changes.rb +26 -1
  32. data/lib/asgard/watch/commands.rb +52 -12
  33. data/lib/asgard/watch/daemon.rb +334 -43
  34. data/lib/asgard/watch/declaration.rb +135 -40
  35. data/lib/asgard/watch/dispatcher.rb +61 -10
  36. data/lib/asgard/watch/mailbox.rb +50 -0
  37. data/lib/asgard/watch/reporter.rb +50 -34
  38. data/lib/asgard/watch/spawn.rb +41 -16
  39. data/lib/asgard/watch/state.rb +93 -27
  40. data/lib/asgard/watch/worker.rb +44 -9
  41. data/lib/asgard/watch.rb +4 -11
  42. data/lib/asgard.rb +80 -14
  43. metadata +167 -186
  44. data/.envrc +0 -6
  45. data/.github/workflows/deploy-github-pages.yml +0 -52
  46. data/.loki +0 -39
  47. data/.reek.yml +0 -166
  48. data/.rubocop.yml +0 -163
  49. data/Archspec.rb +0 -24
  50. data/CLAUDE.md +0 -139
  51. data/COMMITS.md +0 -196
  52. data/bin/console +0 -11
  53. data/bin/setup +0 -8
  54. data/doc_tasks.loki +0 -21
  55. data/docs/api.md +0 -368
  56. data/docs/assets/css/custom.css +0 -93
  57. data/docs/assets/images/asgard.jpg +0 -0
  58. data/docs/changelog.md +0 -1
  59. data/docs/dependencies.md +0 -313
  60. data/docs/environment.md +0 -129
  61. data/docs/examples.md +0 -194
  62. data/docs/getting-started.md +0 -181
  63. data/docs/helpers.md +0 -262
  64. data/docs/index.md +0 -87
  65. data/docs/options.md +0 -224
  66. data/docs/schedule.md +0 -106
  67. data/docs/shell.md +0 -237
  68. data/docs/subcommands.md +0 -181
  69. data/docs/task-files.md +0 -407
  70. data/docs/tasks.md +0 -326
  71. data/docs/variables.md +0 -338
  72. data/docs/watch.md +0 -123
  73. data/examples/.env +0 -4
  74. data/examples/.envrc +0 -3
  75. data/examples/.loki +0 -24
  76. data/examples/bad.loki +0 -63
  77. data/examples/concurrent.loki +0 -58
  78. data/examples/confirm.loki +0 -48
  79. data/examples/db_subcommands.loki +0 -74
  80. data/examples/depends_on_block/bad/.loki +0 -51
  81. data/examples/depends_on_block/good/.loki +0 -83
  82. data/examples/do.loki +0 -45
  83. data/examples/env_usage.loki +0 -27
  84. data/examples/kitchen_sink.loki +0 -210
  85. data/examples/server_subcommands.loki +0 -65
  86. data/examples/subdir/.loki +0 -12
  87. data/examples/subdir/import_demo.loki +0 -14
  88. data/examples/subdir/import_up_demo.loki +0 -18
  89. data/examples/watcher_examples/.envrc +0 -3
  90. data/examples/watcher_examples/.loki +0 -54
  91. data/examples/watcher_examples/README.md +0 -112
  92. data/examples/watcher_examples/bin/hello +0 -3
  93. data/examples/watcher_examples/data/records.json +0 -1
  94. data/examples/watcher_examples/docs/drafts/ideas.md +0 -5
  95. data/examples/watcher_examples/docs/index.md +0 -4
  96. data/examples/watcher_examples/lib/greeter.rb +0 -7
  97. data/gem_tasks.loki +0 -51
  98. data/git.loki +0 -13
  99. data/mkdocs.yml +0 -166
  100. data/quality.loki +0 -266
  101. data/quality_rails.loki +0 -47
  102. data/xyzzy.loki +0 -12
metadata CHANGED
@@ -1,213 +1,194 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asgard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
- - Dewayne VanHoozer
7
+ - Dewayne VanHoozer
8
8
  bindir: bin
9
9
  cert_chain: []
10
10
  date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
- - !ruby/object:Gem::Dependency
13
- name: thor
14
- requirement: !ruby/object:Gem::Requirement
15
- requirements:
16
- - - "~>"
17
- - !ruby/object:Gem::Version
18
- version: '1.0'
19
- type: :runtime
20
- prerelease: false
21
- version_requirements: !ruby/object:Gem::Requirement
22
- requirements:
23
- - - "~>"
24
- - !ruby/object:Gem::Version
25
- version: '1.0'
26
- - !ruby/object:Gem::Dependency
27
- name: dotenv
28
- requirement: !ruby/object:Gem::Requirement
29
- requirements:
30
- - - "~>"
31
- - !ruby/object:Gem::Version
32
- version: '3.0'
33
- type: :runtime
34
- prerelease: false
35
- version_requirements: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - "~>"
38
- - !ruby/object:Gem::Version
39
- version: '3.0'
40
- - !ruby/object:Gem::Dependency
41
- name: tty-table
42
- requirement: !ruby/object:Gem::Requirement
43
- requirements:
44
- - - "~>"
45
- - !ruby/object:Gem::Version
46
- version: '0.12'
47
- type: :runtime
48
- prerelease: false
49
- version_requirements: !ruby/object:Gem::Requirement
50
- requirements:
51
- - - "~>"
52
- - !ruby/object:Gem::Version
53
- version: '0.12'
54
- - !ruby/object:Gem::Dependency
55
- name: ractor_queue
56
- requirement: !ruby/object:Gem::Requirement
57
- requirements:
58
- - - "~>"
59
- - !ruby/object:Gem::Version
60
- version: '0.2'
61
- type: :runtime
62
- prerelease: false
63
- version_requirements: !ruby/object:Gem::Requirement
64
- requirements:
65
- - - "~>"
66
- - !ruby/object:Gem::Version
67
- version: '0.2'
68
- - !ruby/object:Gem::Dependency
69
- name: listen
70
- requirement: !ruby/object:Gem::Requirement
71
- requirements:
72
- - - "~>"
73
- - !ruby/object:Gem::Version
74
- version: '3.9'
75
- type: :runtime
76
- prerelease: false
77
- version_requirements: !ruby/object:Gem::Requirement
78
- requirements:
79
- - - "~>"
80
- - !ruby/object:Gem::Version
81
- version: '3.9'
12
+ - !ruby/object:Gem::Dependency
13
+ name: thor
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ -
17
+ - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: "1.5"
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ -
25
+ - ~>
26
+ - !ruby/object:Gem::Version
27
+ version: "1.5"
28
+ - !ruby/object:Gem::Dependency
29
+ name: dotenv
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ -
33
+ - ~>
34
+ - !ruby/object:Gem::Version
35
+ version: "3.2"
36
+ type: :runtime
37
+ prerelease: false
38
+ version_requirements: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ -
41
+ - ~>
42
+ - !ruby/object:Gem::Version
43
+ version: "3.2"
44
+ - !ruby/object:Gem::Dependency
45
+ name: tty-table
46
+ requirement: !ruby/object:Gem::Requirement
47
+ requirements:
48
+ -
49
+ - ~>
50
+ - !ruby/object:Gem::Version
51
+ version: "0.12"
52
+ type: :runtime
53
+ prerelease: false
54
+ version_requirements: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ -
57
+ - ~>
58
+ - !ruby/object:Gem::Version
59
+ version: "0.12"
60
+ - !ruby/object:Gem::Dependency
61
+ name: ractor_queue
62
+ requirement: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ -
65
+ - ~>
66
+ - !ruby/object:Gem::Version
67
+ version: "0.2"
68
+ type: :runtime
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ -
73
+ - ~>
74
+ - !ruby/object:Gem::Version
75
+ version: "0.2"
76
+ - !ruby/object:Gem::Dependency
77
+ name: listen
78
+ requirement: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ -
81
+ - ~>
82
+ - !ruby/object:Gem::Version
83
+ version: "3.10"
84
+ type: :runtime
85
+ prerelease: false
86
+ version_requirements: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ -
89
+ - ~>
90
+ - !ruby/object:Gem::Version
91
+ version: "3.10"
92
+ - !ruby/object:Gem::Dependency
93
+ name: tsort
94
+ requirement: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ -
97
+ - ~>
98
+ - !ruby/object:Gem::Version
99
+ version: "0.2"
100
+ type: :runtime
101
+ prerelease: false
102
+ version_requirements: !ruby/object:Gem::Requirement
103
+ requirements:
104
+ -
105
+ - ~>
106
+ - !ruby/object:Gem::Version
107
+ version: "0.2"
82
108
  description: |
83
- A powerful Ruby-based task runner for any kind of project with task dependency tracking
84
- and concurrent execution of designated tasks. Uses Thor for its rich CLI options, var
85
- declarations, dotenv, sh/shebang helpers, importable task files, and scheduled
86
- execution of tasks via launchd (macOS) or systemd timers (Linux).
109
+ A powerful Ruby-based task runner for any kind of project with task dependency tracking
110
+ and concurrent execution of designated tasks. Uses Thor for its rich CLI options, with
111
+ dotenv, sh/shebang helpers, importable task files, scheduled execution of tasks via
112
+ launchd (macOS) or systemd timers (Linux), a file watcher and background jobs.
87
113
  email:
88
- - dewayne@vanhoozer.me
114
+ - dewayne@vanhoozer.me
89
115
  executables:
90
- - asgard
116
+ - asgard
91
117
  extensions: []
92
118
  extra_rdoc_files: []
93
119
  files:
94
- - ".envrc"
95
- - ".github/workflows/deploy-github-pages.yml"
96
- - ".loki"
97
- - ".reek.yml"
98
- - ".rubocop.yml"
99
- - Archspec.rb
100
- - CHANGELOG.md
101
- - CLAUDE.md
102
- - COMMITS.md
103
- - LICENSE.txt
104
- - README.md
105
- - bin/asgard
106
- - bin/console
107
- - bin/setup
108
- - doc_tasks.loki
109
- - docs/api.md
110
- - docs/assets/css/custom.css
111
- - docs/assets/images/asgard.jpg
112
- - docs/changelog.md
113
- - docs/dependencies.md
114
- - docs/environment.md
115
- - docs/examples.md
116
- - docs/getting-started.md
117
- - docs/helpers.md
118
- - docs/index.md
119
- - docs/options.md
120
- - docs/schedule.md
121
- - docs/shell.md
122
- - docs/subcommands.md
123
- - docs/task-files.md
124
- - docs/tasks.md
125
- - docs/variables.md
126
- - docs/watch.md
127
- - examples/.env
128
- - examples/.envrc
129
- - examples/.loki
130
- - examples/bad.loki
131
- - examples/concurrent.loki
132
- - examples/confirm.loki
133
- - examples/db_subcommands.loki
134
- - examples/depends_on_block/bad/.loki
135
- - examples/depends_on_block/good/.loki
136
- - examples/do.loki
137
- - examples/env_usage.loki
138
- - examples/kitchen_sink.loki
139
- - examples/server_subcommands.loki
140
- - examples/subdir/.loki
141
- - examples/subdir/import_demo.loki
142
- - examples/subdir/import_up_demo.loki
143
- - examples/watcher_examples/.envrc
144
- - examples/watcher_examples/.loki
145
- - examples/watcher_examples/README.md
146
- - examples/watcher_examples/bin/hello
147
- - examples/watcher_examples/data/records.json
148
- - examples/watcher_examples/docs/drafts/ideas.md
149
- - examples/watcher_examples/docs/index.md
150
- - examples/watcher_examples/lib/greeter.rb
151
- - gem_tasks.loki
152
- - git.loki
153
- - lib/asgard.rb
154
- - lib/asgard/base.rb
155
- - lib/asgard/base/dependency_graph.rb
156
- - lib/asgard/base/dispatch.rb
157
- - lib/asgard/base/registry.rb
158
- - lib/asgard/base/task_dsl.rb
159
- - lib/asgard/doctor.rb
160
- - lib/asgard/doctor/report.rb
161
- - lib/asgard/doctor/task_sections.rb
162
- - lib/asgard/errors.rb
163
- - lib/asgard/kernel_methods.rb
164
- - lib/asgard/schedule.rb
165
- - lib/asgard/schedule/commands.rb
166
- - lib/asgard/schedule/declaration.rb
167
- - lib/asgard/schedule/launchd.rb
168
- - lib/asgard/schedule/systemd.rb
169
- - lib/asgard/schedule/table.rb
170
- - lib/asgard/shell.rb
171
- - lib/asgard/tasks.rb
172
- - lib/asgard/version.rb
173
- - lib/asgard/watch.rb
174
- - lib/asgard/watch/changes.rb
175
- - lib/asgard/watch/commands.rb
176
- - lib/asgard/watch/daemon.rb
177
- - lib/asgard/watch/declaration.rb
178
- - lib/asgard/watch/dispatcher.rb
179
- - lib/asgard/watch/reporter.rb
180
- - lib/asgard/watch/spawn.rb
181
- - lib/asgard/watch/state.rb
182
- - lib/asgard/watch/worker.rb
183
- - mkdocs.yml
184
- - quality.loki
185
- - quality_rails.loki
186
- - sig/asgard.rbs
187
- - xyzzy.loki
188
- homepage: https://github.com/madbomber/asgard
120
+ - CHANGELOG.md
121
+ - LICENSE.txt
122
+ - README.md
123
+ - bin/asgard
124
+ - lib/asgard.rb
125
+ - lib/asgard/base.rb
126
+ - lib/asgard/base/dependency_graph.rb
127
+ - lib/asgard/base/dispatch.rb
128
+ - lib/asgard/base/registry.rb
129
+ - lib/asgard/base/task_dsl.rb
130
+ - lib/asgard/declarations.rb
131
+ - lib/asgard/doctor.rb
132
+ - lib/asgard/doctor/report.rb
133
+ - lib/asgard/doctor/task_sections.rb
134
+ - lib/asgard/errors.rb
135
+ - lib/asgard/jobs.rb
136
+ - lib/asgard/jobs/commands.rb
137
+ - lib/asgard/jobs/declaration.rb
138
+ - lib/asgard/jobs/launcher.rb
139
+ - lib/asgard/jobs/state.rb
140
+ - lib/asgard/jobs/stopper.rb
141
+ - lib/asgard/kernel_methods.rb
142
+ - lib/asgard/leading_flag.rb
143
+ - lib/asgard/pid.rb
144
+ - lib/asgard/schedule.rb
145
+ - lib/asgard/schedule/commands.rb
146
+ - lib/asgard/schedule/declaration.rb
147
+ - lib/asgard/schedule/job_files.rb
148
+ - lib/asgard/schedule/launchd.rb
149
+ - lib/asgard/schedule/systemd.rb
150
+ - lib/asgard/schedule/table.rb
151
+ - lib/asgard/shell.rb
152
+ - lib/asgard/state_dir.rb
153
+ - lib/asgard/tasks.rb
154
+ - lib/asgard/version.rb
155
+ - lib/asgard/watch.rb
156
+ - lib/asgard/watch/changes.rb
157
+ - lib/asgard/watch/commands.rb
158
+ - lib/asgard/watch/daemon.rb
159
+ - lib/asgard/watch/declaration.rb
160
+ - lib/asgard/watch/dispatcher.rb
161
+ - lib/asgard/watch/mailbox.rb
162
+ - lib/asgard/watch/reporter.rb
163
+ - lib/asgard/watch/spawn.rb
164
+ - lib/asgard/watch/state.rb
165
+ - lib/asgard/watch/worker.rb
166
+ - sig/asgard.rbs
167
+ homepage: "https://github.com/madbomber/asgard"
189
168
  licenses:
190
- - MIT
169
+ - MIT
191
170
  metadata:
192
- homepage_uri: https://github.com/madbomber/asgard
193
- source_code_uri: https://github.com/madbomber/asgard
194
- changelog_uri: https://github.com/madbomber/asgard/blob/master/CHANGELOG.md
195
- rubygems_mfa_required: 'true'
171
+ homepage_uri: "https://github.com/madbomber/asgard"
172
+ source_code_uri: "https://github.com/madbomber/asgard"
173
+ changelog_uri: "https://github.com/madbomber/asgard/blob/main/CHANGELOG.md"
174
+ rubygems_mfa_required: "true"
196
175
  rdoc_options: []
197
176
  require_paths:
198
- - lib
177
+ - lib
199
178
  required_ruby_version: !ruby/object:Gem::Requirement
200
179
  requirements:
201
- - - ">="
202
- - !ruby/object:Gem::Version
203
- version: 3.2.0
180
+ -
181
+ - ">="
182
+ - !ruby/object:Gem::Version
183
+ version: 4.0.0
204
184
  required_rubygems_version: !ruby/object:Gem::Requirement
205
185
  requirements:
206
- - - ">="
207
- - !ruby/object:Gem::Version
208
- version: '0'
186
+ -
187
+ - ">="
188
+ - !ruby/object:Gem::Version
189
+ version: "0"
209
190
  requirements: []
210
- rubygems_version: 4.0.23
191
+ rubygems_version: 4.1.0.beta3
211
192
  specification_version: 4
212
193
  summary: A powerful Ruby-based task runner
213
194
  test_files: []
data/.envrc DELETED
@@ -1,6 +0,0 @@
1
- # asgard/.envrc
2
-
3
- source_up
4
-
5
- export RR=`pwd`
6
- PATH_add $RR/bin
@@ -1,52 +0,0 @@
1
- name: Deploy Documentation to GitHub Pages
2
- on:
3
- push:
4
- branches:
5
- - main
6
- - develop
7
- paths:
8
- - "docs/**"
9
- - "mkdocs.yml"
10
- - ".github/workflows/deploy-github-pages.yml"
11
- workflow_dispatch:
12
-
13
- permissions:
14
- contents: write
15
- pages: write
16
- id-token: write
17
-
18
- jobs:
19
- deploy:
20
- runs-on: ubuntu-latest
21
- steps:
22
- - name: Checkout code
23
- uses: actions/checkout@v4
24
- with:
25
- fetch-depth: 0
26
-
27
- - name: Setup Python
28
- uses: actions/setup-python@v5
29
- with:
30
- python-version: 3.x
31
-
32
- - name: Install dependencies
33
- run: |
34
- pip install mkdocs
35
- pip install mkdocs-material
36
- pip install mkdocs-macros-plugin
37
- pip install mike
38
-
39
- - name: Configure Git
40
- run: |
41
- git config --local user.email "action@github.com"
42
- git config --local user.name "GitHub Action"
43
-
44
- - name: Build MkDocs site
45
- run: mkdocs build
46
-
47
- - name: Deploy to GitHub Pages
48
- uses: peaceiris/actions-gh-pages@v4
49
- with:
50
- github_token: ${{ secrets.GITHUB_TOKEN }}
51
- publish_dir: ./site
52
- keep_files: true
data/.loki DELETED
@@ -1,39 +0,0 @@
1
- # frozen_string_literal: true
2
- # Asgard gem's own task file.
3
- # Task is pre-defined by the gem — just reopen it to add tasks.
4
-
5
- import "quality.loki"
6
- # asgard runs as a separate process outside the app it's checking, so
7
- # `defined?(Rails)` never sees the app's Rails constant. RAILS_ROOT — set in
8
- # a Rails repo's own .envrc (`export RAILS_ROOT=$RR`, after RR is defined)
9
- # — is the signal instead.
10
- import "quality_rails.loki" if ENV["RAILS_ROOT"]
11
-
12
- import "gem_tasks.loki"
13
- import "git.loki"
14
- import "doc_tasks.loki"
15
-
16
- import "xyzzy.loki" # An example for the --doctor flag
17
-
18
- class Tasks
19
- @@project ||= "asgard".freeze
20
- @@project_desc ||= "CLI-task runner"
21
-
22
- # Dogfood: `asgard watcher start` reruns the tests whenever a Ruby file changes.
23
- watch :test_check, paths: %w[lib test], only: /\.rb\z/
24
-
25
- desc "xyzzy"
26
- def xyzzy = puts "everything in Ruby metaprogramming is magic"
27
-
28
- helper(:project_version) do
29
- @@project_version ||= File.read("lib/#{@@project}/version.rb").match(/VERSION\s*=\s*"([^"]+)"/)[1].freeze
30
- end
31
-
32
- default_task :quality
33
-
34
- header <<~HEAD
35
- Project: #{@@project} (v#{project_version}) - #{@@project_desc}
36
- Root Dir: #{loki_up.parent}
37
- Default task: #{default_task}
38
- HEAD
39
- end
data/.reek.yml DELETED
@@ -1,166 +0,0 @@
1
- ---
2
- detectors:
3
-
4
- # Disabled: conflicts with project no-comment coding style.
5
- IrresponsibleModule:
6
- enabled: false
7
-
8
- # Disabled: bang methods without non-bang counterparts are common in internal APIs.
9
- MissingSafeMethod:
10
- enabled: false
11
-
12
- # Disabled: explicit nil checks are idiomatic Ruby (nil? / unless nil, etc.).
13
- NilCheck:
14
- enabled: false
15
-
16
- # Disabled: method size/complexity is already covered by Flog (the primary
17
- # complexity gate) and RuboCop's Metrics/MethodLength.
18
- TooManyStatements:
19
- enabled: false
20
-
21
- # Default is 4 — Doctor legitimately tracks several pieces of diagnostic state.
22
- TooManyInstanceVariables:
23
- max_instance_variables: 6
24
- exclude:
25
- - Asgard::Watch::Daemon # wires reporter, dispatcher, listeners, inbox and the stop flag for one run
26
-
27
- # Accept standard Ruby short-name conventions for limited-scope variables.
28
- UncommunicativeVariableName:
29
- accept:
30
- - _ # intentionally ignored
31
- - d # dep / dir / data
32
- - e # rescue => e
33
- - f # file / finding
34
- - h # hash
35
- - i # index
36
- - k # key
37
- - p # path
38
- - t # task / thread
39
-
40
- # Reviewed and accepted as false positives / intentional design, per method
41
- # (generated with `reek --todo` and hand-curated — see project review notes).
42
- # Unlike a count-based baseline, this is precise: it grandfathers exactly
43
- # these smells at exactly these methods, so a genuinely new smell at a new
44
- # or existing method still fails the gate even if it doesn't change the
45
- # file's total warning count.
46
- Attribute:
47
- exclude:
48
- - Asgard::Doctor::ImportTracer#doctor # needs to stay settable/resettable per doctor run
49
- - Asgard::Schedule#runner # test seam: tests swap in a recording runner, nil restores RUNNER
50
-
51
- BooleanParameter:
52
- exclude:
53
- - Asgard::Base#help # must match Thor's positional super signature exactly
54
- - Asgard::Shell#sh # silent: is the real public API contract
55
- - Asgard::Shell#shebang # same
56
-
57
- ControlParameter:
58
- exclude:
59
- - Asgard::Shell#sh
60
- - Asgard::Shell#shebang
61
- - Asgard::Schedule#entry_name # as: is the user's explicit override of the derived name
62
- - Asgard::Watch#normalize # same: as: overrides the task name as the entry name
63
-
64
- DuplicateMethodCall:
65
- exclude:
66
- - Asgard::Base::Dispatch#acquire_run_token # done.include?(target): check, then poll-until-true
67
- - Asgard::Base::Dispatch#run_dep_group # errors.size: two branches of one guard
68
- - Asgard::Doctor::Report#print_report # puts divider: intentional top+bottom rule
69
- - Asgard::Doctor::Report#summary_line # errors.zero?: sequential guard clauses
70
- - Asgard::Doctor#load_chain # Base.subclasses: before/after snapshot diff
71
- - Kernel#import_up # "not found" warned from two independent branches
72
- - Asgard#self.run! # Base.subclasses snapshot diff; e.message in separate rescues
73
- - Asgard::Base#tree # say "\n": intentional blank line before and after the tree
74
- - Asgard::Schedule::Launchd#unload # loaded?(name): check, then poll until bootout finishes
75
-
76
- FeatureEnvy:
77
- exclude:
78
- - Asgard::Base::Dispatch#acquire_run_token
79
- - Asgard::Base::Dispatch#run_dep_group
80
- - Asgard::Base::Dispatch#signal_done
81
- - Asgard::Base::Registry#inherited # inherited(subclass) configuring subclass is the whole point
82
- - Asgard::Base::DependencyGraph#_normalize_pending_deps # small transform of its own argument
83
- - Asgard::Base::DependencyGraph#_call_dep_proc # rescue => e; e.class/e.message is inherent
84
- - Asgard::Base::DependencyGraph#_validate_dep_stage! # pure shape check of its own argument
85
- - Asgard::Base::DependencyGraph#_validate_dep_leaf! # pure shape check of its own argument
86
- - Asgard::Doctor::TaskSections#class_task_file_map
87
- - Asgard::Doctor::TaskSections#relative_path
88
- - Asgard::Doctor::TaskSections#task_status
89
- - Asgard::Shell#shebang # Tempfile.create(&block) idiom
90
-
91
- ManualDispatch:
92
- exclude:
93
- - Asgard::Base::DependencyGraph#_normalize_pending_deps # respond_to?(:call) distinguishes a Proc from an Array/Symbol — no polymorphic alternative over Ruby's own built-in types
94
- - Asgard::Base::DependencyGraph#_resolve_lazy_deps! # same check
95
- - Asgard::Schedule#seconds # duck-types ActiveSupport::Duration (in_seconds) without depending on it
96
-
97
- InstanceVariableAssumption:
98
- exclude:
99
- - Asgard::Base # class-level DSL state built up across method_added/inherited, not object init
100
- - Asgard::Doctor # multi-phase report builder; @ivars set across report_markers/load_chain/etc in `run`
101
-
102
- NestedIterators:
103
- exclude:
104
- - Asgard::Base::DependencyGraph#_build_dep_graph
105
- - Asgard::Base::DependencyGraph#_check_dep_arities!
106
- - Asgard::Base::TaskDSL#no_negate # inner block defines a method, isn't really iteration
107
- - Asgard::Doctor::Report#print_task_sections
108
- - Asgard::Doctor::TaskSections#class_task_file_map
109
- - Asgard::Doctor::TaskSections#override_count
110
- - Asgard::Schedule::Commands#preview # specs x files per spec
111
- - Asgard::Schedule::Launchd#self.calendar_intervals # times x weekdays
112
-
113
- UtilityFunction:
114
- exclude:
115
- - Asgard::Base::DependencyGraph#_build_dep_graph # genuinely pure, but tightly coupled to this graph model
116
- - Asgard::Base::Dispatch#dep_results # thread-local by design, not self — that's the whole point
117
- - Asgard::Base::Dispatch#with_dep_results # same: stashes results on Thread.current, not self
118
- - Asgard::Shell#shell_argv # extracted pure on purpose so it's testable without invoking system/exec
119
- - Asgard::Schedule::DSL#schedule # class-level DSL delegating to the Schedule registry
120
- - Asgard::Watch::DSL#watch # same, for the Watch registry
121
- - Asgard::Schedule::Commands#schedules # Thor no_commands helpers: reads of the registry / CWD shared by the subcommands
122
- - Asgard::Schedule::Commands#schedule_root
123
- - Asgard::Schedule::Commands#schedule_summary
124
- - Asgard::Watch::Commands#watches # same: the Watch registry read by every subcommand
125
-
126
- # Asgard::Schedule: the backends implement a fixed API (see
127
- # lib/asgard/schedule/declaration.rb) plus pure, separately tested helpers,
128
- # and the keyword parameters below mirror launchd/systemd job fields and the
129
- # `schedule` DSL's own keywords.
130
- DataClump:
131
- exclude:
132
- - Asgard::Schedule # at:/on: and task/args are the declaration's vocabulary
133
- - Asgard::Watch::Spawn # spec + context are the two inputs of every spawn function
134
-
135
- LongParameterList:
136
- exclude:
137
- - Asgard::Schedule#normalize # the `schedule` DSL keywords
138
- - Asgard::Watch#normalize # the `watch` DSL keywords
139
- - Asgard::Schedule#describe
140
- - Asgard::Schedule#program_arguments
141
- - Asgard::Schedule::Table#self.draw # rows plus the title, io and headers the caller chooses
142
- - Asgard::Schedule::Launchd#self.plist # one keyword per plist field
143
- - Asgard::Schedule::Systemd#self.service_unit # one keyword per unit field
144
- - Asgard::Schedule::Systemd#self.timer_unit
145
- - Asgard::Schedule::Systemd#initialize # injectable home/runner/env/user for tests
146
- - Asgard::Watch::Dispatcher#initialize # injectable worker starter and clock for tests
147
- - Asgard::Watch::Daemon#initialize # injectable listen/exec/out for tests
148
-
149
- RepeatedConditional:
150
- exclude:
151
- - Asgard::Schedule::Launchd # loaded?(name) guards distinct launchctl transitions
152
-
153
- TooManyMethods:
154
- exclude:
155
- - Asgard::Schedule::Commands # one method per subcommand plus its helpers
156
- - Asgard::Watch::Commands # same
157
- - Asgard::Schedule::Launchd # backend API + pure helpers
158
- - Asgard::Schedule::Systemd
159
- - Asgard::Watch::State # one reader/writer pair per file it keeps
160
-
161
-
162
- exclude_paths:
163
- - test
164
- - docs
165
- - coverage
166
- - pkg