sambot 0.1.130 → 0.1.131
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sambot/chef/cookbook.rb +1 -1
- data/lib/sambot/chef/generator.rb +14 -1
- data/lib/sambot/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de423259030fee9c9401e242a3c386b2274cba44
|
4
|
+
data.tar.gz: dd369f17c622c893738e54bbd80db09bb5f143fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1fa889e9fca672d6cbdb6539b8e0b90f418a0392185e0b59870ddc5a15aafc070996636d9a1d736b282c0f58850908a199d89c0c637f78f3303eff16aa4e8edd
|
7
|
+
data.tar.gz: abb70a788ba8cb96fe5ac1706f92e5c0dd6eb122d28099eb5c057aeb20aa2d76f32b4577fddb039d3e8ebb65626f7fb9bc3f5414c3abaae45e54b5c8dbdc6207
|
data/lib/sambot/chef/cookbook.rb
CHANGED
@@ -32,7 +32,7 @@ module Sambot
|
|
32
32
|
class << self
|
33
33
|
|
34
34
|
def build(config)
|
35
|
-
Generator.from_templates(config
|
35
|
+
Generator.from_templates(config, ESSENTIAL_FILES, GENERATED_FILES)
|
36
36
|
Kitchen.setup(config)
|
37
37
|
Metadata.generate(config)
|
38
38
|
Hooks.copy()
|
@@ -4,15 +4,28 @@ module Sambot
|
|
4
4
|
module Chef
|
5
5
|
class Generator
|
6
6
|
|
7
|
-
def self.from_templates(
|
7
|
+
def self.from_templates(config, cookbook_essentials, cookbook_generated_files)
|
8
|
+
platforms = config['platforms']
|
8
9
|
cookbook_essentials.each { |path| exists!(path) } if cookbook_essentials
|
9
10
|
cookbook_generated_files.each do |template_name, opts|
|
10
11
|
generate_from_template(template_name.to_s, opts, platforms)
|
11
12
|
end
|
13
|
+
override_bootstrap_mechanism(config['bootstrap']) if config['bootstrap']
|
12
14
|
end
|
13
15
|
|
14
16
|
private
|
15
17
|
|
18
|
+
def self.override_bootstrap_mechanism(config)
|
19
|
+
if config['centos']
|
20
|
+
raise ApplicationError, "The file #{config['centos']} does not exist" unless File.exist?(config['centos'])
|
21
|
+
FileUtils.mv(config['centos'], 'bootstrap.sh')
|
22
|
+
end
|
23
|
+
if config['windows']
|
24
|
+
raise ApplicationError, "The file #{config['centos']} does not exist" unless File.exist?(config['windows'])
|
25
|
+
FileUtils.mv(config['windows'], 'bootstrap.ps1')
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
16
29
|
def self.exists!(path)
|
17
30
|
return if File.exist?(path) || Dir.exist?(path)
|
18
31
|
raise ApplicationError, "The file or directory #{path} was not found in the current directory."
|
data/lib/sambot/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sambot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.131
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Olivier Kouame
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor-hollaback
|