kitchen-chocolatey 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: f245fb5b5e63fbf5376578db78ba026a8c9cc372c581b1517f16aa4b670abf82
4
+ data.tar.gz: e58a65e509f52727c9aa0e420444de80e20b77aec907d6d7cf186919b568bfa3
5
+ SHA512:
6
+ metadata.gz: bdd573752c1dcff19d1ce82714f653a946dde0fbd2e246c3770cea43d06640752c7f1a02290f542897fc6e6e8e1e04b40590fbc8b0a2eb08142dd8601d74f51c
7
+ data.tar.gz: f36ec6b7e026760745050c5176d987533b343e0e503ffe97b9729b69b255d3b146cb80b0c04b7bf400f188a3f0dafb1afec2eeb6c07d0abc0639ec09338670cd
data/README.md ADDED
@@ -0,0 +1,6 @@
1
+ [![Gem Version](https://badge.fury.io/rb/kitchen-dsc.svg)](http://badge.fury.io/rb/kitchen-dsc)
2
+
3
+ # kitchen-chocolatey
4
+ A Test Kitchen Provisioner for Chocolatey
5
+
6
+
@@ -0,0 +1,41 @@
1
+ # encoding: utf-8
2
+
3
+ $LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
4
+ require "kitchen-chocolatey/version"
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = "kitchen-chocolatey"
8
+ s.version = Kitchen::Chocolatey::VERSION
9
+ s.authors = ["Steven Murawski"]
10
+ s.email = ["steven.murawski@gmail.com"]
11
+ s.homepage = "https://github.com/smurawski/kitchen-chocolatey"
12
+ s.summary = "Chocolatey provisioner for test-kitchen"
13
+ candidates = Dir.glob("lib/**/*") + ["README.md", "kitchen-chocolatey.gemspec"]
14
+ s.files = candidates.sort
15
+ s.platform = Gem::Platform::RUBY
16
+ s.require_paths = ["lib"]
17
+ s.rubyforge_project = "[none]"
18
+ s.license = "Apache 2"
19
+ s.description = <<-EOF
20
+ == DESCRIPTION:
21
+
22
+ Chocolatey Provisioner for Test Kitchen
23
+
24
+ == FEATURES:
25
+
26
+ TBD
27
+
28
+ EOF
29
+ s.add_dependency "test-kitchen", ">= 1.9"
30
+
31
+ s.add_development_dependency "countloc", "~> 0.4"
32
+ s.add_development_dependency "rake"
33
+ s.add_development_dependency "rspec", "~> 3.2"
34
+ s.add_development_dependency "simplecov", "~> 0.9"
35
+ s.add_development_dependency "minitest", "~> 5.3"
36
+ s.add_development_dependency "yard", "~> 0.8"
37
+ s.add_development_dependency "pry"
38
+ s.add_development_dependency "pry-stack_explorer"
39
+ s.add_development_dependency "pry-byebug"
40
+ s.add_development_dependency "rb-readline"
41
+ end
@@ -0,0 +1,69 @@
1
+ # -*- encoding: utf-8 -*-
2
+ #
3
+ # Author:: Steven Murawski (<steven.murawski@gmail.com>)
4
+ #
5
+ # Copyright (C) 2014 Steven Murawski
6
+ #
7
+ # Licensed under the Apache 2 License.
8
+ # See LICENSE for more details
9
+
10
+ require "fileutils"
11
+ require "pathname"
12
+ require "kitchen/provisioner/base"
13
+ require "kitchen/util"
14
+
15
+ module Kitchen
16
+ module Provisioner
17
+ class Chocolateey < Base
18
+ kitchen_provisioner_api_version 2
19
+
20
+ attr_accessor :tmp_dir
21
+
22
+ default_config :packages_path, ''
23
+ default_config :name, ''
24
+
25
+ def install_command
26
+ install_chocolatey = <<-EOH
27
+
28
+ iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
29
+ EOH
30
+
31
+ wrap_powershell_code(install_chocolatey)
32
+ end
33
+
34
+ def init_command
35
+ end
36
+
37
+ def create_sandbox
38
+ super
39
+ info("Staging Chocolatey Packages for copy to the SUT")
40
+
41
+ return unless config[:packages_path]
42
+
43
+ info("Preparing packages")
44
+ debug("Using packages from #{config[:packages_path]}")
45
+
46
+ tmpdata_dir = File.join(sandbox_path, "packages")
47
+ FileUtils.mkdir_p(tmpdata_dir)
48
+ FileUtils.cp_r(Util.list_directory(config[:package_path]), tmpdata_dir)
49
+ end
50
+
51
+ def prepare_command
52
+
53
+ end
54
+
55
+ def run_command
56
+ scripts = <<-EOH
57
+ choco install packageName -dv -s #{config[:root_path]}/packages
58
+ EOH
59
+ wrap_powershell_code(scripts)
60
+ end
61
+
62
+ private
63
+
64
+ def wrap_powershell_code(code)
65
+ wrap_shell_code(["$ProgressPreference = 'SilentlyContinue';", code].join("\n"))
66
+ end
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,7 @@
1
+ # encoding: utf-8
2
+
3
+ module Kitchen
4
+ module Chocolatey
5
+ VERSION = '0.1.0'.freeze
6
+ end
7
+ end
metadata ADDED
@@ -0,0 +1,210 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: kitchen-chocolatey
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Steven Murawski
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2018-10-08 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: test-kitchen
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '1.9'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '1.9'
27
+ - !ruby/object:Gem::Dependency
28
+ name: countloc
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '0.4'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '0.4'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '3.2'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '3.2'
69
+ - !ruby/object:Gem::Dependency
70
+ name: simplecov
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '0.9'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '0.9'
83
+ - !ruby/object:Gem::Dependency
84
+ name: minitest
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '5.3'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '5.3'
97
+ - !ruby/object:Gem::Dependency
98
+ name: yard
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '0.8'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '0.8'
111
+ - !ruby/object:Gem::Dependency
112
+ name: pry
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: pry-stack_explorer
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: pry-byebug
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: rb-readline
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ description: |+
168
+ == DESCRIPTION:
169
+
170
+ Chocolatey Provisioner for Test Kitchen
171
+
172
+ == FEATURES:
173
+
174
+ TBD
175
+
176
+ email:
177
+ - steven.murawski@gmail.com
178
+ executables: []
179
+ extensions: []
180
+ extra_rdoc_files: []
181
+ files:
182
+ - README.md
183
+ - kitchen-chocolatey.gemspec
184
+ - lib/kitchen-chocolatey/version.rb
185
+ - lib/kitchen/provisioner/chocolatey.rb
186
+ homepage: https://github.com/smurawski/kitchen-chocolatey
187
+ licenses:
188
+ - Apache 2
189
+ metadata: {}
190
+ post_install_message:
191
+ rdoc_options: []
192
+ require_paths:
193
+ - lib
194
+ required_ruby_version: !ruby/object:Gem::Requirement
195
+ requirements:
196
+ - - ">="
197
+ - !ruby/object:Gem::Version
198
+ version: '0'
199
+ required_rubygems_version: !ruby/object:Gem::Requirement
200
+ requirements:
201
+ - - ">="
202
+ - !ruby/object:Gem::Version
203
+ version: '0'
204
+ requirements: []
205
+ rubyforge_project: "[none]"
206
+ rubygems_version: 2.7.6
207
+ signing_key:
208
+ specification_version: 4
209
+ summary: Chocolatey provisioner for test-kitchen
210
+ test_files: []