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: 17ecbdf7cc8a7a59ae9454dc63226bc799d8b1e6
4
- data.tar.gz: de917b0ac0899172edb3f4ef04ceceb467f39574
3
+ metadata.gz: 4b21ff76c72d3eb3267ef752214c3ddc7918ed08
4
+ data.tar.gz: 3bd368068712c2290dd2be995f034f4793e99e86
5
5
  SHA512:
6
- metadata.gz: feab4427f9e635d6462a85793379e59119d1993b9970a6479f12f369412e98ab0ac1a4c1c5d7ae112269d89152852495c76e60ce58c217ae8f78a414626fb162
7
- data.tar.gz: 1b6da04813e2b102727e78ba07dcf612029edfbfbd404aa418aa15056a2dea4a189c97906aa86f74611de988978ca70c3678dd2b4f8daf2ac72cef5444050633
6
+ metadata.gz: 4c740e79c89a84a4cb421cd7f7796590d98661c8af761daa2e2946b8846a1ac9809c7138b9c2fb44f67bec42423f3a0fccf03931c4d52434d6e98b3dc8167ada
7
+ data.tar.gz: cb3b0aa4c1931520e433248f27d69d27fdcae80ce0cc5672e060084941394fec598ce749e4149941a779889b8ee32366e47639eeb358d6780a0357a9f8cbd696
@@ -1,4 +1,5 @@
1
1
  # coding: utf-8
2
+
2
3
  lib = File.expand_path("../lib", __FILE__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
5
  require "chef/zero/scheduled/task/version"
@@ -2,7 +2,7 @@ module Chef
2
2
  module Zero
3
3
  module Scheduled
4
4
  module Task
5
- VERSION = "0.0.7"
5
+ VERSION = "0.0.8"
6
6
  end
7
7
  end
8
8
  end
@@ -38,16 +38,33 @@ module Kitchen
38
38
  end
39
39
 
40
40
  def prepare_command
41
- wrap_shell_code('$env:temp = "$env:temp"')
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
- info("Creating the scheduled task.")
46
- wrap_shell_code(setup_scheduled_task_command)
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
- wrap_shell_code(run_scheduled_task_command)
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.7
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-10-12 00:00:00.000000000 Z
11
+ date: 2015-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen