sambot 0.1.167 → 0.1.168

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: 565f07f14e49fd9cd9f3143e44b77711e9d5c9b0
4
- data.tar.gz: 0e2a85e057cdf65c104d8465bdcd414635852710
3
+ metadata.gz: 2dc79c816e4e644b829ff187cafa9e9c9ee67216
4
+ data.tar.gz: 5ea749a5c78155c1e28098dae9bd6a27628d48a7
5
5
  SHA512:
6
- metadata.gz: a6148810fe5a730f548ded369bcc79e2bf6998c0225fef828d6b593ef400b8b41b7bef112edee9fc1ea8cc6bccb924dad1ceeb00dd913924ae7304c6303e0953
7
- data.tar.gz: a4e336525cf92a5e53edff3beb3872a9b3083eba5687a09860b87480d3a7d66b2c13155f8e6fc5f70c207c6bf68ec895ffdc59595df236a45bd70bcc2df79a76
6
+ metadata.gz: b3487a874e155702112ef987d98fb4056daec228b3c5cd9cb9c67cf6f741f3bd6002ab16b3b1f262ca7035eeff7941ed9812e85c17536f028ae823894fa6388a
7
+ data.tar.gz: 1914e268627e4d65285b387c15910599702f2fdbc72d88a0e1af546804672e3381bab36e8ebcbc9fd7bff0a45888cef94016ca85b2ae897d1e64eb119b5626ca
@@ -56,6 +56,10 @@ module Sambot
56
56
 
57
57
  def create_files(config)
58
58
  ['spec', 'test', 'attributes', '.vault.yml', '.consul.yml', 'local', 'README.md'].each { |resource| FS.copy(resource) }
59
+ #FS.mkdir('local/vault') unless FS.exist?('local/vault')
60
+ #FS.mkdir('local/consul') unless FS.exist?('local/consul')
61
+ #FS.copy('local/vault/helper.rb', true)
62
+ #FS.copy('local/consul/helper.rb', true)
59
63
  ['recipes', 'libraries', 'resources', 'files', 'templates'].each { |target| FS.mkdir(target) }
60
64
  Dir.chdir('recipes') do
61
65
  Template.new('recipes/install.rb.erb').write({config: config}, 'install.rb') unless FS.exist?('install.rb')
@@ -37,6 +37,10 @@ module Sambot
37
37
  def add_platform_identifier(value, platform)
38
38
  value['suites'].each do |suite|
39
39
  suite['run_list'] = handle_customized_runlists(suite, platform)
40
+ # Changes to <platform> below to keep compatibility with existing cookbooks
41
+ platform = 'LOCAL' if platform == 'local'
42
+ platform = 'GCP' if platform == 'google'
43
+ platform = 'RACKSPACE' if platform = 'rackspace'
40
44
  suite['attributes'] = suite['attributes'] || {}
41
45
  suite['attributes']['cloud_platform'] = platform
42
46
  suite['attributes']['vault'] = suite['attributes']['vault'] || {}
data/lib/sambot/fs.rb CHANGED
@@ -21,12 +21,11 @@ module Sambot
21
21
  end
22
22
  end
23
23
 
24
- def self.copy(resource)
25
- unless FS.exist?(resource)
26
- filename = File.expand_path(File.join(File.dirname(__FILE__), 'templates', resource))
27
- UI.debug("Copying #{filename} to #{resource}")
28
- FileUtils.cp_r(filename, resource)
29
- end
24
+ def self.copy(resource, force = false)
25
+ return if !force && !FS.exist?(resource)
26
+ filename = File.expand_path(File.join(File.dirname(__FILE__), 'templates', resource))
27
+ UI.debug("Copying #{filename} to #{resource}")
28
+ FileUtils.cp_r(filename, resource)
30
29
  end
31
30
 
32
31
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sambot
4
- VERSION = '0.1.167'.freeze
4
+ VERSION = '0.1.168'.freeze
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sambot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.167
4
+ version: 0.1.168
5
5
  platform: ruby
6
6
  authors:
7
7
  - Olivier Kouame