sambot 0.1.146 → 0.1.147

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: e8f2ec262f4ed7ffd2912db88012f7fbb52d0f7e
4
- data.tar.gz: c1cffa26f5b08936fd2cde757a83ef7dd01bd0c8
3
+ metadata.gz: 26de6ed4c083c4989afda65f27467708e6fe92fe
4
+ data.tar.gz: a6780bc987ac8a89d457415c83c908dbb9a1d160
5
5
  SHA512:
6
- metadata.gz: 3669d2c5e66fd52764966575d53ba86c55c9d0742df0fbe84469b7daf2d402e4c3b7f9e17862288596173ab0ac55a3a12cd3a086cfcca60ed47b2dc73aca1933
7
- data.tar.gz: 202dd3ebc057c8ba1db00af7af85f71c1d010fd7f6d8a906d917adca1322f00a891512d68c4099cf5aa14946ca0f4168f7a6a050ee1ff9e399a750f633e5a1e2
6
+ metadata.gz: 8ea585efd89f2bce87f7889e992fccda53a211dfd87ece3c934016dc86ab14c39d9abb36558e64341e962df78e728508105a84c5d0b46ad932df344f590007b1
7
+ data.tar.gz: 39cc065df93ae88a7074386bc3b6376c5c0714053a722eff51968f550c4386deb28e20ade5310c2a81c520f58962f62296a73140309e2c030ff22e162e8e3020
@@ -51,7 +51,25 @@ module Sambot
51
51
  def generate(config)
52
52
  Git.init(config[:name])
53
53
  Dir.chdir(config[:name]) do
54
- ['test', 'spec', 'recipes'].each {|target| FileUtils.mkdir(target) }
54
+ ['test', 'spec', 'recipes', 'attributes'].each {|target| FileUtils.mkdir(target) }
55
+ Dir.chdir('attributes') do
56
+ FileUtils.touch('default.rb')
57
+ end
58
+ Dir.chdir('recipes') do
59
+ FileUtils.touch('install.rb')
60
+ FileUtils.touch('configure.rb')
61
+ FileUtils.touch('default.rb')
62
+ end
63
+ Dir.chdir('test') do
64
+ FileUtils.touch('default_test.rb')
65
+ end
66
+ Dir.chdir('spec') do
67
+ File.write('spec_helper.rb', <<-EOT)
68
+ require 'chefspec'
69
+ require 'chefspec/berkshelf'
70
+ EOT
71
+ FileUtils.touch('default_spec.rb')
72
+ end
55
73
  FileUtils.touch('README.md')
56
74
  Template.new('.config.yml.erb').write(config, '.config.yml')
57
75
  UI.debug("./.config.yml has been added to the cookbook.")
@@ -1,15 +1,43 @@
1
+ # The name of the role or wrapper cookbook. Should be of the form as-role-xxx if a role cookbook
2
+ # and as-xxx if a wrapper cookbook.
1
3
  name: <%= @name %>
4
+ # The cookbook version. It will be added to the metadata.rb and needs to be incremented whenenver
5
+ # a new cookbook version needs to be pushed to the Chef Server.
2
6
  version: 0.0.1
7
+ # The different platforms on which this cookbook can run. This dictates the contents of the .kitchen files
8
+ # and which files are generated for the cookbook. The values can be 'centos', 'windows' or both.
3
9
  platforms:
4
10
  <% @platforms.each do |platform| %>
5
11
  - <%= platform %>
6
12
  <% end %>
13
+ # An array of gems to be added to the metadata.rb file.
14
+ gems:
15
+ # The identifier used when generating instance names. Not yet implemented but in future, if the
16
+ # identifier is OCTPS for example, a typical instance name would be OCTPS03-W8.
7
17
  identifier: <%= @identifier %>
18
+ # The description o fthe cookbook that will go into the metadata.rb.
8
19
  description: <%= @description %>
20
+ # The test suites that will be added to the .kitchen files.
9
21
  suites:
10
22
  - name: default
23
+ # The runlist for a specific suite can either be the same across all environments i.e. cloud or local or can
24
+ # be customized for each.
25
+ # When customizing, you can do the following:
26
+ # run_list:
27
+ # local:
28
+ # - recipe[aaa]
29
+ # - recipe[bbb]
30
+ # dev:
31
+ # - recipe[aaa]
32
+ # The structure above will run recipes aaa and bbb when running Test-Kitchen locally, and recipe aaa when
33
+ # running Test-Kitchen in DEV environments i.e. GCP or Rackspace.
11
34
  run_list:
12
35
  - recipe[<%= @name %>::default]
36
+ # Custom attributes for the test. The following structure will be automatically added in the generated
37
+ # Test-Kitchen files:
38
+ # attributes:
39
+ # cloud_platform: LOCAL or GCP or RACKSPACE, depending on the .kitchen.yml file
40
+ attributes:
13
41
  verifier:
14
42
  inspec_tests:
15
43
  - name: <%= @name %>-profile
@@ -33,4 +33,5 @@ chefignore
33
33
  teamcity.sh
34
34
  winrm_config
35
35
  Vagrantfile.erb
36
- bootstrap.sh
36
+ *bootstrap.sh
37
+ .DS_Store
@@ -109,4 +109,3 @@ knife.rb
109
109
  teamcity.sh
110
110
  id_rsa
111
111
  id_rsa.pub
112
- recipes/test_setup.rb
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sambot
4
- VERSION = '0.1.146'.freeze
4
+ VERSION = '0.1.147'.freeze
5
5
  end
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.146
4
+ version: 0.1.147
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-06 00:00:00.000000000 Z
11
+ date: 2017-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor-hollaback