cookbook_creator 0.0.2 → 0.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f70ff162f70eff1a36152803cc46ca952c5d966f
4
- data.tar.gz: 86bc88ba6ac05b613b49841cbc8af0ed4c5df02d
3
+ metadata.gz: 66e5138d92d0ac03392039c671d1da32d1c24bcb
4
+ data.tar.gz: 09708e4e04721354600873cd900c397d418940bd
5
5
  SHA512:
6
- metadata.gz: 8373416c2a9ac6e9d05d4ab1fd6403ac9dbd2814a7768cd00a08ffcedbabaab438eb6000542df1799ca695e4671eb124ec511b6e9db130ddf9de71183f83469e
7
- data.tar.gz: 8337b4a7c0e71c039e04d24de2f83d39e6842a8f5c5b8a1759046f0c27608c01fc999a275980bbae70cdd6b00f7ec14cc8bbef66ed9bf3712becd04c52542f9f
6
+ metadata.gz: a3f8a0e55be8be87b6b497d5d635c9fd182cb2e834a6a27dbb183b7232a06d7cbc91530fdd76c087f4768273b3dfc9c32ea4aaa1568631d7d5a5d25e0c7b3ed9
7
+ data.tar.gz: a392f6165c2af8ad965e6084200284b9d91d184119f7cc511609a70bdb6072055839e7c396d7a1c27a691964f63b504d44ef9671928d4c68f6c680ef9221f654
data/README.md ADDED
@@ -0,0 +1,77 @@
1
+ # Cookbook Creator
2
+
3
+ Cookbook Creator role is to provide lightweight mechanism of initial cookbook generation from template.
4
+
5
+ ## Installation
6
+
7
+ You can install it by using a command:
8
+ `gem install cookbook_creator`
9
+
10
+ ## Dependencies
11
+
12
+ Cookbook Creator during its installation will also install required gems:
13
+ * chef
14
+ * berkshelf
15
+ * kitchen
16
+ * json
17
+ * ohai
18
+ * rake
19
+ * rspec
20
+ * chefspec
21
+ * serverspec
22
+ * mixlib-cli
23
+ * mixlib-config
24
+ * chef-zero
25
+
26
+ ## Usage
27
+
28
+ `cookbook_create <cookbook_name> <options>`
29
+
30
+ Where:
31
+ * <cookbook_name> is obligatory
32
+ * <options> can be:
33
+ - `-c, --config <path_to_custom_config_file>`
34
+ - `-g, --generator_cookbook <path to custom cookbook template>`
35
+ - `-m, --maintainer <maintainer>`
36
+ - `-e, --maintainer_email <maintainer_email>`
37
+ - `-p, --provisioner <provisioner_to_use>` # Default is chef_zero
38
+ - `-l, --license <license_name>`
39
+ - `-P, --platform <platform>`
40
+ - `-d, --driver <driver>` # Docker is the default
41
+ - `-i, --image <image_name> # Used only if selected driver is docker`
42
+ - `-s, --supermarket_url <url>` # Custom supermarket URL. Is usefull in case we have our own private supermarket
43
+ - `-L, --lwrp` # Will be generated LWRP skeleton
44
+ - `-b, --lib` # Will be generated library skeleton
45
+
46
+ ## Config options
47
+
48
+ Config file could has following options:
49
+ - `maintainer '<maintainer>'`
50
+ - `maintainer_email '<maintainer_email>'`
51
+ - `provisioner '<provisioner>'`
52
+ - `license '<license>'`
53
+ - `platform '<platform>'`
54
+ - `driver '<driver>'`
55
+ - `supermarket_url '<supermarket_url>'`
56
+ - `lwrp '<true_or_false>'`
57
+ - `lib '<true_or_false>'`
58
+ - `generator_cookbook '<path_to_custom_templates>'`
59
+ - `image '<docker_image>'`
60
+
61
+ ## Config locations
62
+
63
+ By default Cookbook Creator will search for config file in following places:
64
+ * Under `env['COOKBOOK_CREATOR_HOME']/generator.rb` if set
65
+ * Under `Current directory/generator.rb`
66
+ * Under `Current directory/.generator/generator.rb`
67
+ * Under `$HOME/.generator/generator.rb`
68
+
69
+ ## Options merging
70
+
71
+ Options will be merged in the following order:
72
+ * Initially will be build hash with default options from CLI
73
+ * CLI options will be overwritten by the options within config file
74
+ * Config file options will be overwritten by any arguments which will be passed to the script
75
+
76
+ *WARNING:* Cookbook Creator can have some bugs.
77
+ Please report to sanicheev@tacitknowledge.com if you will find any.
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'cookbook_creator'
3
- s.version = '0.0.2'
3
+ s.version = '0.0.3'
4
4
  s.date = '2016-01-11'
5
5
  s.summary = "Everything required for cookbook generation"
6
6
  s.description = "This gem is used to generate cookbook skeleton"
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.required_ruby_version = '~> 2.2.1'
11
11
  s.bindir = 'bin'
12
12
  s.executables = [ 'cookbook_create' ]
13
- s.files = %w(test.txt) + Dir.glob("*.gemspec") +
13
+ s.files = %w(README.md) + Dir.glob("*.gemspec") +
14
14
  Dir.glob("{lib,spec}/**/*", File::FNM_DOTMATCH).reject { |f| File.directory?(f) }
15
15
  s.add_dependency "chef", "~> 12.6.0"
16
16
  s.add_dependency "bundler"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cookbook_creator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Serghei Anicheev
@@ -213,8 +213,10 @@ executables:
213
213
  extensions: []
214
214
  extra_rdoc_files: []
215
215
  files:
216
+ - README.md
216
217
  - bin/cookbook_create
217
218
  - cookbook_creator.gemspec
219
+ - lib/cookbook_creator/.config_loader.rb.swp
218
220
  - lib/cookbook_creator/cli.rb
219
221
  - lib/cookbook_creator/config.rb
220
222
  - lib/cookbook_creator/config_loader.rb
@@ -324,7 +326,6 @@ files:
324
326
  - lib/skeletons/code_generator/templates/default/resource.rb.erb
325
327
  - lib/skeletons/code_generator/templates/default/serverspec_default_spec.rb.erb
326
328
  - lib/skeletons/code_generator/templates/default/template.erb
327
- - test.txt
328
329
  homepage: http://rubygems.org/gems/cookbook_creator
329
330
  licenses:
330
331
  - Free License
data/test.txt DELETED
File without changes