command_proposal 1.0.5 → 1.0.6
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a04686b93a2ae3d6583de7e04ea894d5a57076dec286cbb9897ccb1ae2740a10
|
4
|
+
data.tar.gz: 1fae20a33afea09026f2c4ea195370a9fcc58a0b62a27dae1da930dd6260e755
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba73213cb6457ff53adc8990eed6b2787d9fe92577b63da6538d195ed41969d77e9591c77176da00698526c63a65ae95e25f9bf6b1424a3f8601fa439b0cd6a5
|
7
|
+
data.tar.gz: 1a5c1661b379c469f6bbf47d544b66be9d91fc417adc067dcc7126db4c17279b75017a6f2245f083b5b250b2de3e93a05e54d0068aff1e86607d56f4c934fdd0
|
@@ -19,10 +19,12 @@ module CommandProposal
|
|
19
19
|
end
|
20
20
|
}
|
21
21
|
args << { host: host, port: nil } if host.present?
|
22
|
+
# args << {host: nil}
|
22
23
|
|
23
24
|
begin
|
24
|
-
|
25
|
+
engine.url_for(args.compact)
|
25
26
|
rescue NoMethodError => e
|
27
|
+
puts "\e[33m[LOGIT]#{e.inspect}\e[0m"
|
26
28
|
raise "Error generating route! Please make sure `config.action_mailer.default_url_options` are set."
|
27
29
|
end
|
28
30
|
end
|
@@ -40,24 +42,31 @@ module CommandProposal
|
|
40
42
|
end
|
41
43
|
|
42
44
|
def string_path(*args)
|
43
|
-
[
|
45
|
+
[engine.command_proposal_tasks_url + args.shift, args.to_param.presence].compact.join("?")
|
46
|
+
end
|
47
|
+
|
48
|
+
def engine
|
49
|
+
@engine ||= begin
|
50
|
+
name = `rails routes | grep command_proposal_engine`[/\w*command_proposal_engine/]
|
51
|
+
send(name)
|
52
|
+
end
|
44
53
|
end
|
45
54
|
|
46
55
|
# Runner controller doesn't map to a model, so needs special handling
|
47
56
|
def runner_path(task, iteration=nil)
|
48
57
|
if iteration.present?
|
49
|
-
|
58
|
+
engine.command_proposal_task_runner_path(task, iteration)
|
50
59
|
else
|
51
|
-
|
60
|
+
engine.command_proposal_task_runner_index_path(task)
|
52
61
|
end
|
53
62
|
end
|
54
63
|
|
55
64
|
# Runner controller doesn't map to a model, so needs special handling
|
56
65
|
def runner_url(task, iteration=nil)
|
57
66
|
if iteration.present?
|
58
|
-
|
67
|
+
engine.command_proposal_task_runner_url(task, iteration)
|
59
68
|
else
|
60
|
-
|
69
|
+
engine.command_proposal_task_runner_index_url(task)
|
61
70
|
end
|
62
71
|
end
|
63
72
|
end
|
@@ -86,7 +86,11 @@ module CommandProposal
|
|
86
86
|
check_can_command?
|
87
87
|
return unless @iteration.task.console?
|
88
88
|
|
89
|
-
|
89
|
+
if ::CommandProposal.sessions.key?("task:#{@task.id}")
|
90
|
+
@task.first_iteration.update(status: :success, completed_at: Time.current)
|
91
|
+
else
|
92
|
+
@task.first_iteration.update(status: :terminated, completed_at: Time.current)
|
93
|
+
end
|
90
94
|
::CommandProposal.sessions.delete("task:#{@task.id}")
|
91
95
|
end
|
92
96
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: command_proposal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rocco Nicholls
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|