sambot 0.1.169 → 0.1.170

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: 5399d7d2f19c95f892efee8279db47cf817b8aae
4
- data.tar.gz: b65c9b7c2a66988e66a2f2c74dab12b9bf3df1f8
3
+ metadata.gz: 517170ab1dbac139fb2d75e6aa7d5e54b7673225
4
+ data.tar.gz: e2dbcbfe6158eff497b7cb90f17aa4fa36824653
5
5
  SHA512:
6
- metadata.gz: 1922c8e864bcc5aac0cb02fefab6388f5b84cdf626801ddd279eaf9bd5f8d498a7020d8c52054710873b6ec55b40b2a7338ba2d71d4c2c2dcbaedffa78fdeee1
7
- data.tar.gz: d7880d1a139dd908cbcaa3c68e90f031ea5fcc7d680471caaa1e3e2610997071bda76b5b9135345643f6dafa44721ba5688be341afe54a76e7b4d3cac6cf5287
6
+ metadata.gz: a1669e2d9fc4f9f1af642518bccb1c27841f2e391d22da7f4a3e7c12d0afef2cdad4e939a49541e5a0ecd9dc167a107c4c969216588bf1e6f0da0b13e3c4fc4b
7
+ data.tar.gz: d32f56f33ec8e8baf7aad4c8975668221bc9baef2f704aa6783a8cdfab766e7415e03f5cdf240bab243513c2e49726eb9d9fd13976de56403619614899b4ff09
@@ -55,16 +55,21 @@ module Sambot
55
55
  private
56
56
 
57
57
  def create_files(config)
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)
63
- ['recipes', 'libraries', 'resources', 'files', 'templates'].each { |target| FS.mkdir(target) }
58
+ ['.vault.yml', '.consul.yml', 'README.md'].each { |resource| FS.copy(resource) unless FS.exist?(resource) }
59
+ ['spec', 'test', 'attributes', 'local'].each { |resource| FS.mkdir(resource) unless FS.exist?(resource) }
60
+ Dir.chdir('attributes') { FileUtils.touch('default.rb') }
61
+ Dir.chdir('spec') { FS.copy('spec_helper.rb') unless FS.exist?('spec_helper.rb') }
62
+ Dir.chdir('local') do
63
+ FS.mkdir('vault') unless FS.exist?('vault')
64
+ Dir.chdir('vault') { FS.copy('vault_helper.rb') }
65
+ FS.mkdir('consul') unless FS.exist?('consul')
66
+ Dir.chdir('consul') { FS.copy('consul_helper.rb')}
67
+ end
68
+ ['recipes', 'libraries', 'resources', 'files', 'templates'].each { |target| FS.mkdir(target) unless FS.exist?(target) }
64
69
  Dir.chdir('recipes') do
65
- Template.new('recipes/install.rb.erb').write({config: config}, 'install.rb') unless FS.exist?('install.rb')
66
- Template.new('recipes/configure.rb.erb').write({config: config}, 'configure.rb') unless FS.exist?('configure.rb')
67
- Template.new('recipes/default.rb.erb').write({config: config}, 'default.rb') unless FS.exist?('default.rb')
70
+ FileUtils.touch('install.rb') unless FS.exist?('install.rb')
71
+ FileUtils.touch('configure.rb') unless FS.exist?('configure.rb')
72
+ FileUtils.touch('default.rb') unless FS.exist?('default.rb')
68
73
  end
69
74
  unless FS.exist?('.config.yml')
70
75
  Template.new('.config.yml.erb').write({config: config}, '.config.yml')
data/lib/sambot/fs.rb CHANGED
@@ -21,11 +21,10 @@ module Sambot
21
21
  end
22
22
  end
23
23
 
24
- def self.copy(resource, force = false)
25
- return if !force && !FS.exist?(resource)
24
+ def self.copy(resource)
26
25
  filename = File.expand_path(File.join(File.dirname(__FILE__), 'templates', resource))
27
26
  UI.debug("Copying #{filename} to #{resource}")
28
- FileUtils.cp_r(filename, resource)
27
+ FileUtils.cp(filename, resource)
29
28
  end
30
29
 
31
30
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sambot
4
- VERSION = '0.1.169'.freeze
4
+ VERSION = '0.1.170'.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.169
4
+ version: 0.1.170
5
5
  platform: ruby
6
6
  authors:
7
7
  - Olivier Kouame
@@ -450,7 +450,6 @@ files:
450
450
  - lib/sambot/templates/Berksfile
451
451
  - lib/sambot/templates/README.md
452
452
  - lib/sambot/templates/Vagrantfile.erb
453
- - lib/sambot/templates/attributes/default.rb
454
453
  - lib/sambot/templates/bootstrap_scripts/google/bootstrap.ps1.erb
455
454
  - lib/sambot/templates/bootstrap_scripts/google/bootstrap.sh.erb
456
455
  - lib/sambot/templates/bootstrap_scripts/local/sidecar_vault/bootstrap.ps1.erb
@@ -458,19 +457,16 @@ files:
458
457
  - lib/sambot/templates/bootstrap_scripts/local/standalone_vault/bootstrap.ps1.erb
459
458
  - lib/sambot/templates/bootstrap_scripts/local/standalone_vault/bootstrap.sh.erb
460
459
  - lib/sambot/templates/chefignore
460
+ - lib/sambot/templates/consul_helper.rb
461
461
  - lib/sambot/templates/git_hooks/pre-commit
462
462
  - lib/sambot/templates/git_hooks/pre-push
463
- - lib/sambot/templates/local/vault/helper.rb
464
463
  - lib/sambot/templates/metadata.rb.erb
465
- - lib/sambot/templates/recipes/configure.rb.erb
466
- - lib/sambot/templates/recipes/default.rb.erb
467
- - lib/sambot/templates/recipes/install.rb.erb
468
- - lib/sambot/templates/spec/spec_helper.rb
464
+ - lib/sambot/templates/spec_helper.rb
469
465
  - lib/sambot/templates/teamcity.sh.erb
470
- - lib/sambot/templates/test/default_test.rb
471
466
  - lib/sambot/templates/test_kitchen/google.yml.erb
472
467
  - lib/sambot/templates/test_kitchen/local.yml.erb
473
468
  - lib/sambot/templates/test_kitchen/rackspace.yml.erb
469
+ - lib/sambot/templates/vault_helper.rb
474
470
  - lib/sambot/templates/winrm_config
475
471
  - lib/sambot/ui.rb
476
472
  - lib/sambot/version.rb
File without changes
File without changes
File without changes
File without changes