knife-windows 0.5.1 → 0.5.2
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.
@@ -22,11 +22,11 @@ mkdir C:\chef
|
|
22
22
|
<%= win_wget %>
|
23
23
|
)
|
24
24
|
|
25
|
-
cscript /nologo C:\chef\wget.vbs http://files.rubyforge.vm.bytemark.co.uk/rubyinstaller/rubyinstaller-1.8.7-p334.exe
|
25
|
+
cscript /nologo C:\chef\wget.vbs /url:http://files.rubyforge.vm.bytemark.co.uk/rubyinstaller/rubyinstaller-1.8.7-p334.exe /path:%TEMP%\rubyinstaller.exe
|
26
26
|
%TEMP%\rubyinstaller.exe /verysilent /dir="C:\ruby" /tasks="assocfiles,modpath"
|
27
27
|
|
28
28
|
@rem Install the Ruby Dev Kit so we compile us some native gems
|
29
|
-
cscript /nologo C:\chef\wget.vbs http://cloud.github.com/downloads/oneclick/rubyinstaller/DevKit-tdm-32-4.5.1-20101214-1400-sfx.exe
|
29
|
+
cscript /nologo C:\chef\wget.vbs /url:http://cloud.github.com/downloads/oneclick/rubyinstaller/DevKit-tdm-32-4.5.1-20101214-1400-sfx.exe /path:%TEMP%\rubydevkit.exe
|
30
30
|
mkdir C:\DevKit
|
31
31
|
copy %TEMP%\rubydevkit.exe C:\DevKit
|
32
32
|
cmd.exe /C C:\DevKit\rubydevkit.exe -y
|
@@ -37,23 +37,22 @@ class Chef
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def validation_key
|
40
|
-
|
41
|
-
val_key << 'echo.'
|
40
|
+
escape_and_echo(super)
|
42
41
|
end
|
43
42
|
|
44
43
|
def config_content
|
45
44
|
client_rb = <<-CONFIG
|
46
45
|
log_level :info
|
47
46
|
log_location STDOUT
|
47
|
+
|
48
48
|
chef_server_url "#{@chef_config[:chef_server_url]}"
|
49
49
|
validation_client_name "#{@chef_config[:validation_client_name]}"
|
50
|
-
|
51
50
|
client_key "c:/chef/client.pem"
|
52
51
|
validation_key "c:/chef/validation.pem"
|
53
|
-
|
52
|
+
|
54
53
|
file_cache_path "c:/chef/cache"
|
55
54
|
file_backup_path "c:/chef/backup"
|
56
|
-
cache_options (
|
55
|
+
cache_options ({:path => "c:/chef/cache/checksums", :skip_expires => true})
|
57
56
|
|
58
57
|
CONFIG
|
59
58
|
if @config[:chef_node_name]
|
@@ -74,10 +73,14 @@ CONFIG
|
|
74
73
|
|
75
74
|
def win_wget
|
76
75
|
win_wget = <<-WGET
|
77
|
-
|
78
|
-
|
79
|
-
Set objXMLHTTP = CreateObject("MSXML2.
|
80
|
-
|
76
|
+
url = WScript.Arguments.Named("url")
|
77
|
+
path = WScript.Arguments.Named("path")
|
78
|
+
Set objXMLHTTP = CreateObject("MSXML2.ServerXMLHTTP")
|
79
|
+
'proxy is optional
|
80
|
+
On Error Resume Next
|
81
|
+
objXMLHTTP.setProxy 2, WScript.Arguments.Named("proxy")
|
82
|
+
On Error Goto 0
|
83
|
+
objXMLHTTP.open "GET", url, false
|
81
84
|
objXMLHTTP.send()
|
82
85
|
If objXMLHTTP.Status = 200 Then
|
83
86
|
Set objADOStream = CreateObject("ADODB.Stream")
|
@@ -86,9 +89,9 @@ objADOStream.Type = 1
|
|
86
89
|
objADOStream.Write objXMLHTTP.ResponseBody
|
87
90
|
objADOStream.Position = 0
|
88
91
|
Set objFSO = Createobject("Scripting.FileSystemObject")
|
89
|
-
If objFSO.Fileexists(
|
92
|
+
If objFSO.Fileexists(path) Then objFSO.DeleteFile path
|
90
93
|
Set objFSO = Nothing
|
91
|
-
objADOStream.SaveToFile
|
94
|
+
objADOStream.SaveToFile path
|
92
95
|
objADOStream.Close
|
93
96
|
Set objADOStream = Nothing
|
94
97
|
End if
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: knife-windows
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.5.
|
5
|
+
version: 0.5.2
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Seth Chisamore
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-
|
13
|
+
date: 2011-05-02 00:00:00 -04:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|