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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +179 -99
- data/README.md +141 -46
- data/bin/asgard +10 -0
- data/lib/asgard/base/dispatch.rb +257 -31
- data/lib/asgard/base/registry.rb +7 -3
- data/lib/asgard/base.rb +140 -9
- data/lib/asgard/declarations.rb +21 -0
- data/lib/asgard/doctor/task_sections.rb +11 -3
- data/lib/asgard/doctor.rb +12 -8
- data/lib/asgard/jobs/commands.rb +152 -0
- data/lib/asgard/jobs/declaration.rb +149 -0
- data/lib/asgard/jobs/launcher.rb +109 -0
- data/lib/asgard/jobs/state.rb +190 -0
- data/lib/asgard/jobs/stopper.rb +141 -0
- data/lib/asgard/jobs.rb +25 -0
- data/lib/asgard/kernel_methods.rb +19 -14
- data/lib/asgard/leading_flag.rb +10 -0
- data/lib/asgard/pid.rb +130 -0
- data/lib/asgard/schedule/commands.rb +39 -11
- data/lib/asgard/schedule/declaration.rb +139 -12
- data/lib/asgard/schedule/job_files.rb +24 -0
- data/lib/asgard/schedule/launchd.rb +55 -18
- data/lib/asgard/schedule/systemd.rb +69 -27
- data/lib/asgard/schedule/table.rb +34 -16
- data/lib/asgard/schedule.rb +49 -9
- data/lib/asgard/shell.rb +372 -44
- data/lib/asgard/state_dir.rb +84 -0
- data/lib/asgard/tasks.rb +8 -0
- data/lib/asgard/version.rb +1 -1
- data/lib/asgard/watch/changes.rb +26 -1
- data/lib/asgard/watch/commands.rb +52 -12
- data/lib/asgard/watch/daemon.rb +334 -43
- data/lib/asgard/watch/declaration.rb +135 -40
- data/lib/asgard/watch/dispatcher.rb +61 -10
- data/lib/asgard/watch/mailbox.rb +50 -0
- data/lib/asgard/watch/reporter.rb +50 -34
- data/lib/asgard/watch/spawn.rb +41 -16
- data/lib/asgard/watch/state.rb +93 -27
- data/lib/asgard/watch/worker.rb +44 -9
- data/lib/asgard/watch.rb +4 -11
- data/lib/asgard.rb +80 -14
- metadata +167 -186
- data/.envrc +0 -6
- data/.github/workflows/deploy-github-pages.yml +0 -52
- data/.loki +0 -39
- data/.reek.yml +0 -166
- data/.rubocop.yml +0 -163
- data/Archspec.rb +0 -24
- data/CLAUDE.md +0 -139
- data/COMMITS.md +0 -196
- data/bin/console +0 -11
- data/bin/setup +0 -8
- data/doc_tasks.loki +0 -21
- data/docs/api.md +0 -368
- data/docs/assets/css/custom.css +0 -93
- data/docs/assets/images/asgard.jpg +0 -0
- data/docs/changelog.md +0 -1
- data/docs/dependencies.md +0 -313
- data/docs/environment.md +0 -129
- data/docs/examples.md +0 -194
- data/docs/getting-started.md +0 -181
- data/docs/helpers.md +0 -262
- data/docs/index.md +0 -87
- data/docs/options.md +0 -224
- data/docs/schedule.md +0 -106
- data/docs/shell.md +0 -237
- data/docs/subcommands.md +0 -181
- data/docs/task-files.md +0 -407
- data/docs/tasks.md +0 -326
- data/docs/variables.md +0 -338
- data/docs/watch.md +0 -123
- data/examples/.env +0 -4
- data/examples/.envrc +0 -3
- data/examples/.loki +0 -24
- data/examples/bad.loki +0 -63
- data/examples/concurrent.loki +0 -58
- data/examples/confirm.loki +0 -48
- data/examples/db_subcommands.loki +0 -74
- data/examples/depends_on_block/bad/.loki +0 -51
- data/examples/depends_on_block/good/.loki +0 -83
- data/examples/do.loki +0 -45
- data/examples/env_usage.loki +0 -27
- data/examples/kitchen_sink.loki +0 -210
- data/examples/server_subcommands.loki +0 -65
- data/examples/subdir/.loki +0 -12
- data/examples/subdir/import_demo.loki +0 -14
- data/examples/subdir/import_up_demo.loki +0 -18
- data/examples/watcher_examples/.envrc +0 -3
- data/examples/watcher_examples/.loki +0 -54
- data/examples/watcher_examples/README.md +0 -112
- data/examples/watcher_examples/bin/hello +0 -3
- data/examples/watcher_examples/data/records.json +0 -1
- data/examples/watcher_examples/docs/drafts/ideas.md +0 -5
- data/examples/watcher_examples/docs/index.md +0 -4
- data/examples/watcher_examples/lib/greeter.rb +0 -7
- data/gem_tasks.loki +0 -51
- data/git.loki +0 -13
- data/mkdocs.yml +0 -166
- data/quality.loki +0 -266
- data/quality_rails.loki +0 -47
- 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.
|
|
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
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
- !ruby/object:Gem::
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
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
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
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
|
-
-
|
|
95
|
-
-
|
|
96
|
-
-
|
|
97
|
-
-
|
|
98
|
-
-
|
|
99
|
-
-
|
|
100
|
-
-
|
|
101
|
-
-
|
|
102
|
-
-
|
|
103
|
-
-
|
|
104
|
-
-
|
|
105
|
-
-
|
|
106
|
-
-
|
|
107
|
-
-
|
|
108
|
-
-
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
-
-
|
|
112
|
-
-
|
|
113
|
-
-
|
|
114
|
-
-
|
|
115
|
-
-
|
|
116
|
-
-
|
|
117
|
-
-
|
|
118
|
-
-
|
|
119
|
-
-
|
|
120
|
-
-
|
|
121
|
-
-
|
|
122
|
-
-
|
|
123
|
-
-
|
|
124
|
-
-
|
|
125
|
-
-
|
|
126
|
-
-
|
|
127
|
-
-
|
|
128
|
-
-
|
|
129
|
-
-
|
|
130
|
-
-
|
|
131
|
-
-
|
|
132
|
-
-
|
|
133
|
-
-
|
|
134
|
-
-
|
|
135
|
-
-
|
|
136
|
-
-
|
|
137
|
-
-
|
|
138
|
-
-
|
|
139
|
-
-
|
|
140
|
-
-
|
|
141
|
-
|
|
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/
|
|
195
|
-
rubygems_mfa_required:
|
|
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
|
-
|
|
203
|
-
|
|
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
|
-
|
|
208
|
-
|
|
186
|
+
-
|
|
187
|
+
- ">="
|
|
188
|
+
- !ruby/object:Gem::Version
|
|
189
|
+
version: "0"
|
|
209
190
|
requirements: []
|
|
210
|
-
rubygems_version: 4.0.
|
|
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,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
|