chef-zero-scheduled-task 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b21ff76c72d3eb3267ef752214c3ddc7918ed08
|
4
|
+
data.tar.gz: 3bd368068712c2290dd2be995f034f4793e99e86
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c740e79c89a84a4cb421cd7f7796590d98661c8af761daa2e2946b8846a1ac9809c7138b9c2fb44f67bec42423f3a0fccf03931c4d52434d6e98b3dc8167ada
|
7
|
+
data.tar.gz: cb3b0aa4c1931520e433248f27d69d27fdcae80ce0cc5672e060084941394fec598ce749e4149941a779889b8ee32366e47639eeb358d6780a0357a9f8cbd696
|
@@ -38,16 +38,33 @@ module Kitchen
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def prepare_command
|
41
|
-
|
41
|
+
if windows_os?
|
42
|
+
debug("Serializing $env:temp")
|
43
|
+
wrap_shell_code(<<-EOH
|
44
|
+
"`$env:temp = '$env:temp'" |
|
45
|
+
out-file $env:temp/kitchen/env.ps1
|
46
|
+
EOH
|
47
|
+
)
|
48
|
+
else
|
49
|
+
super
|
50
|
+
end
|
42
51
|
end
|
43
52
|
|
44
53
|
def init_command
|
45
|
-
|
46
|
-
|
54
|
+
if windows_os?
|
55
|
+
info("Creating the scheduled task.")
|
56
|
+
wrap_shell_code(setup_scheduled_task_command)
|
57
|
+
else
|
58
|
+
super
|
59
|
+
end
|
47
60
|
end
|
48
61
|
|
49
62
|
def run_command
|
50
|
-
|
63
|
+
if windows_os?
|
64
|
+
wrap_shell_code(run_scheduled_task_command)
|
65
|
+
else
|
66
|
+
super
|
67
|
+
end
|
51
68
|
end
|
52
69
|
|
53
70
|
# private
|
@@ -104,7 +121,7 @@ module Kitchen
|
|
104
121
|
def new_scheduled_task_command
|
105
122
|
"schtasks /create /tn 'chef-tk' " \
|
106
123
|
"/ru '#{task_username}' /rp '#{task_password}' " \
|
107
|
-
"/sc daily /st 00:00 /f "
|
124
|
+
"/sc daily /st 00:00 /rl HIGHEST /f "
|
108
125
|
end
|
109
126
|
|
110
127
|
def new_scheduled_task_command_line_ps
|
@@ -126,6 +143,7 @@ module Kitchen
|
|
126
143
|
|
127
144
|
def scheduled_task_command_script
|
128
145
|
<<-EOH
|
146
|
+
. $psscriptroot/env.ps1;
|
129
147
|
start-sleep -seconds 5;
|
130
148
|
$npipeClient = new-object System.IO.Pipes.NamedPipeClientStream(
|
131
149
|
$env:ComputerName, 'task', [System.IO.Pipes.PipeDirection]::Out);
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef-zero-scheduled-task
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Murawski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-kitchen
|