sambot 0.1.146 → 0.1.147
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/sambot/chef/cookbook.rb +19 -1
- data/lib/sambot/templates/.config.yml.erb +28 -0
- data/lib/sambot/templates/.gitignore.sample +2 -1
- data/lib/sambot/templates/chefignore +0 -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: 26de6ed4c083c4989afda65f27467708e6fe92fe
|
4
|
+
data.tar.gz: a6780bc987ac8a89d457415c83c908dbb9a1d160
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ea585efd89f2bce87f7889e992fccda53a211dfd87ece3c934016dc86ab14c39d9abb36558e64341e962df78e728508105a84c5d0b46ad932df344f590007b1
|
7
|
+
data.tar.gz: 39cc065df93ae88a7074386bc3b6376c5c0714053a722eff51968f550c4386deb28e20ade5310c2a81c520f58962f62296a73140309e2c030ff22e162e8e3020
|
data/lib/sambot/chef/cookbook.rb
CHANGED
@@ -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
|
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.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-
|
11
|
+
date: 2017-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor-hollaback
|