chef-gen-flavor-base 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.md +5 -0
- data/README.md +5 -5
- data/chef-gen-flavor-base.gemspec +3 -3
- data/lib/chef_gen/flavor_base.rb +1 -1
- data/lib/chef_gen/flavor_base/copy_helpers.rb +3 -2
- data/lib/chef_gen/snippet/attributes.rb +1 -1
- data/lib/chef_gen/snippet/chef_spec.rb +1 -1
- data/lib/chef_gen/snippet/cookbook_base.rb +1 -1
- data/lib/chef_gen/snippet/example_file.rb +1 -1
- data/lib/chef_gen/snippet/example_template.rb +1 -1
- data/lib/chef_gen/snippet/guard.rb +1 -1
- data/lib/chef_gen/snippet/recipes.rb +1 -1
- data/lib/chef_gen/snippet/resource_provider.rb +1 -1
- data/lib/chef_gen/snippet/style_rubocop.rb +1 -1
- data/lib/chef_gen/snippet/test_kitchen.rb +1 -1
- data/lib/chef_gen/snippet_base.rb +3 -2
- 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: e74e421598cb4ca1570fd9028f100b5fffdd9881
|
4
|
+
data.tar.gz: 763afcf18335998f31b265edfbc6340513f796f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df01054e776bbf59627531a1205cf1f1a8f132088cc7ef3e5bddb3e3fa0b9d605abf47f5094306dd3328c3290c7d0e894f0f46c1c81e8c12007f134f3da305bb
|
7
|
+
data.tar.gz: cb16d89c75eaf524b126f1eab685d502c2489381cf625fc9608658b2bff23cf4fc0a8ead6a74bc4e4fc2c8cb47e7b8d50ff65e49382147b5914fa8d0aae313d2
|
data/History.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# Changelog for chef-gen-flavor-base
|
2
2
|
|
3
|
+
## 0.9.1
|
4
|
+
|
5
|
+
* update #static_content_path to take a flavor or snippet name arg rather than relying on the NAME constant in the class, because this fails when you have C < B < FlavorBase (B would try to copy files from a directory named for C)
|
6
|
+
* disable feature tests on CircleCI because it's failing with a bundler error that we don't see during local tests
|
7
|
+
|
3
8
|
## 0.9.0
|
4
9
|
|
5
10
|
* extracted ChefGen::FlavorBase and the snippets in the namespace ChefGen::Snippets into a seperate gem
|
data/README.md
CHANGED
@@ -157,7 +157,7 @@ directory that chef-gen-flavors will pass to ChefDK:
|
|
157
157
|
|
158
158
|
```ruby
|
159
159
|
do_add_content do
|
160
|
-
@tocopy << [File.expand_path(File.join(static_content_path(__FILE__))) + '/.']
|
160
|
+
@tocopy << [File.expand_path(File.join(static_content_path(__FILE__, 'flavor_name'))) + '/.']
|
161
161
|
end
|
162
162
|
```
|
163
163
|
|
@@ -264,7 +264,7 @@ module ChefGen
|
|
264
264
|
NAME = 'awesome_override1'
|
265
265
|
|
266
266
|
before_copy_content do
|
267
|
-
@tocopy << [File.expand_path(File.join(static_content_path(__FILE__))) + '/.']
|
267
|
+
@tocopy << [File.expand_path(File.join(static_content_path(__FILE__, 'awesome_override1'))) + '/.']
|
268
268
|
end
|
269
269
|
end
|
270
270
|
end
|
@@ -284,7 +284,7 @@ module ChefGen
|
|
284
284
|
|
285
285
|
def initialize_generate
|
286
286
|
@flavor.class.before_copy_content do
|
287
|
-
@tocopy << [File.expand_path(File.join(static_content_path(__FILE__))) + '/.']
|
287
|
+
@tocopy << [File.expand_path(File.join(static_content_path(__FILE__, 'before_copy_content'))) + '/.']
|
288
288
|
end
|
289
289
|
end
|
290
290
|
end
|
@@ -450,7 +450,7 @@ using the name.
|
|
450
450
|
|
451
451
|
```ruby
|
452
452
|
def initialize_setup
|
453
|
-
snippet_content_path = File.expand_path(File.join(static_content_path(__FILE__))) + '/.'
|
453
|
+
snippet_content_path = File.expand_path(File.join(static_content_path(__FILE__, 'snippet_name'))) + '/.'
|
454
454
|
@flavor.class.do_add_content do
|
455
455
|
tocopy << [snippet_content_path]
|
456
456
|
end
|
@@ -699,7 +699,7 @@ module ChefGen
|
|
699
699
|
NAME = 'almost_perfect'
|
700
700
|
|
701
701
|
before_copy_content do
|
702
|
-
@tocopy << [File.expand_path(File.join(static_content_path(__FILE__))) + '/.']
|
702
|
+
@tocopy << [File.expand_path(File.join(static_content_path(__FILE__, 'almost_perfect'))) + '/.']
|
703
703
|
end
|
704
704
|
end
|
705
705
|
end
|
@@ -1,14 +1,14 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: chef-gen-flavor-base 0.9.
|
2
|
+
# stub: chef-gen-flavor-base 0.9.1.20150910100832 ruby lib
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "chef-gen-flavor-base"
|
6
|
-
s.version = "0.9.
|
6
|
+
s.version = "0.9.1.20150910100832"
|
7
7
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
9
9
|
s.require_paths = ["lib"]
|
10
10
|
s.authors = ["James FitzGibbon"]
|
11
|
-
s.date = "2015-09-
|
11
|
+
s.date = "2015-09-10"
|
12
12
|
s.description = "chef-gen-flavor-base is a base class to make it easy to create 'flavors'\nfor use with\n[chef-gen-flavors](https://github.com/jf647/chef-gen-flavors).\n\nchef-gen-flavors plugs into the 'chef generate' command provided by\nChefDK to let you provide an alternate template for cookbooks and other\nchef components.\n\nThis gem simply provides a class your flavor can derive from; templates\nare provided by separate gems, which you can host privately for use\nwithin your organization or publicly for the Chef community to use.\n\nAn example flavor that demonstrates how to use this gem is distributed\nseparately:\n[chef-gen-flavor-example](https://github.com/jf647/chef-gen-flavor-example)\n\nAt present this is focused primarily on providing templates for\ngeneration of cookbooks, as this is where most organization-specific\ncustomization takes place. Support for the other artifacts that ChefDK\ncan generate may work, but is not the focus of early releases."
|
13
13
|
s.email = ["james@nadt.net"]
|
14
14
|
s.extra_rdoc_files = ["History.md", "Manifest.txt", "README.md"]
|
data/lib/chef_gen/flavor_base.rb
CHANGED
@@ -31,12 +31,13 @@ module ChefGen
|
|
31
31
|
|
32
32
|
# returns the path to static content distributed with a flavor
|
33
33
|
# @param file [String] the file to generate the path from
|
34
|
+
# @param flavor [String] the name of the flavor
|
34
35
|
# @return [String] the path the static content relative to the file
|
35
36
|
# @api private
|
36
|
-
def static_content_path(file)
|
37
|
+
def static_content_path(file, flavor)
|
37
38
|
File.expand_path(
|
38
39
|
File.join(
|
39
|
-
File.dirname(file), '..', '..', '..', 'shared', 'flavor',
|
40
|
+
File.dirname(file), '..', '..', '..', 'shared', 'flavor', flavor
|
40
41
|
)
|
41
42
|
)
|
42
43
|
end
|
@@ -14,7 +14,7 @@ module ChefGen
|
|
14
14
|
# @api private
|
15
15
|
def initialize_setup
|
16
16
|
super
|
17
|
-
snippet_content_path = File.expand_path(File.join(static_content_path(__FILE__))) + '/.'
|
17
|
+
snippet_content_path = File.expand_path(File.join(static_content_path(__FILE__, 'attributes'))) + '/.'
|
18
18
|
@flavor.class.do_add_content do
|
19
19
|
tocopy << [snippet_content_path]
|
20
20
|
end
|
@@ -14,7 +14,7 @@ module ChefGen
|
|
14
14
|
# @api private
|
15
15
|
def initialize_setup
|
16
16
|
super
|
17
|
-
snippet_content_path = File.expand_path(File.join(static_content_path(__FILE__))) + '/.'
|
17
|
+
snippet_content_path = File.expand_path(File.join(static_content_path(__FILE__, 'chef_spec'))) + '/.'
|
18
18
|
@flavor.class.do_add_content do
|
19
19
|
tocopy << [snippet_content_path]
|
20
20
|
end
|
@@ -30,7 +30,7 @@ module ChefGen
|
|
30
30
|
# @api private
|
31
31
|
def initialize_setup
|
32
32
|
super
|
33
|
-
snippet_content_path = File.expand_path(File.join(static_content_path(__FILE__))) + '/.'
|
33
|
+
snippet_content_path = File.expand_path(File.join(static_content_path(__FILE__, 'cookbook_base'))) + '/.'
|
34
34
|
@flavor.class.do_add_content do
|
35
35
|
tocopy << [snippet_content_path]
|
36
36
|
end
|
@@ -14,7 +14,7 @@ module ChefGen
|
|
14
14
|
# @api private
|
15
15
|
def initialize_setup
|
16
16
|
super
|
17
|
-
snippet_content_path = File.expand_path(File.join(static_content_path(__FILE__))) + '/.'
|
17
|
+
snippet_content_path = File.expand_path(File.join(static_content_path(__FILE__, 'example_file'))) + '/.'
|
18
18
|
@flavor.class.do_add_content do
|
19
19
|
tocopy << [snippet_content_path]
|
20
20
|
end
|
@@ -14,7 +14,7 @@ module ChefGen
|
|
14
14
|
# @api private
|
15
15
|
def initialize_setup
|
16
16
|
super
|
17
|
-
snippet_content_path = File.expand_path(File.join(static_content_path(__FILE__))) + '/.'
|
17
|
+
snippet_content_path = File.expand_path(File.join(static_content_path(__FILE__, 'example_template'))) + '/.'
|
18
18
|
@flavor.class.do_add_content do
|
19
19
|
tocopy << [snippet_content_path]
|
20
20
|
end
|
@@ -19,7 +19,7 @@ module ChefGen
|
|
19
19
|
# @api private
|
20
20
|
def initialize_setup
|
21
21
|
super
|
22
|
-
snippet_content_path = File.expand_path(File.join(static_content_path(__FILE__))) + '/.'
|
22
|
+
snippet_content_path = File.expand_path(File.join(static_content_path(__FILE__, 'guard'))) + '/.'
|
23
23
|
@flavor.class.do_add_content do
|
24
24
|
tocopy << [snippet_content_path]
|
25
25
|
end
|
@@ -14,7 +14,7 @@ module ChefGen
|
|
14
14
|
# @api private
|
15
15
|
def initialize_setup
|
16
16
|
super
|
17
|
-
snippet_content_path = File.expand_path(File.join(static_content_path(__FILE__))) + '/.'
|
17
|
+
snippet_content_path = File.expand_path(File.join(static_content_path(__FILE__, 'recipes'))) + '/.'
|
18
18
|
@flavor.class.do_add_content do
|
19
19
|
tocopy << [snippet_content_path]
|
20
20
|
end
|
@@ -14,7 +14,7 @@ module ChefGen
|
|
14
14
|
# @api private
|
15
15
|
def initialize_setup
|
16
16
|
super
|
17
|
-
snippet_content_path = File.expand_path(File.join(static_content_path(__FILE__))) + '/.'
|
17
|
+
snippet_content_path = File.expand_path(File.join(static_content_path(__FILE__, 'resource_provider'))) + '/.'
|
18
18
|
@flavor.class.do_add_content do
|
19
19
|
tocopy << [snippet_content_path]
|
20
20
|
end
|
@@ -14,7 +14,7 @@ module ChefGen
|
|
14
14
|
# @api private
|
15
15
|
def initialize_setup
|
16
16
|
super
|
17
|
-
snippet_content_path = File.expand_path(File.join(static_content_path(__FILE__))) + '/.'
|
17
|
+
snippet_content_path = File.expand_path(File.join(static_content_path(__FILE__, 'style_rubocop'))) + '/.'
|
18
18
|
@flavor.class.do_add_content do
|
19
19
|
tocopy << [snippet_content_path]
|
20
20
|
end
|
@@ -14,7 +14,7 @@ module ChefGen
|
|
14
14
|
# @api private
|
15
15
|
def initialize_setup
|
16
16
|
super
|
17
|
-
snippet_content_path = File.expand_path(File.join(static_content_path(__FILE__))) + '/.'
|
17
|
+
snippet_content_path = File.expand_path(File.join(static_content_path(__FILE__, 'test_kitchen'))) + '/.'
|
18
18
|
@flavor.class.do_add_content do
|
19
19
|
tocopy << [snippet_content_path]
|
20
20
|
end
|
@@ -33,12 +33,13 @@ module ChefGen
|
|
33
33
|
|
34
34
|
# returns the path to static content distributed with a snippet
|
35
35
|
# @param file [String] the file to generate the path from
|
36
|
+
# @param snippet [String] the name of the snippet
|
36
37
|
# @return [String] the path the static content relative to the file
|
37
38
|
# @api private
|
38
|
-
def static_content_path(file)
|
39
|
+
def static_content_path(file, snippet)
|
39
40
|
File.expand_path(
|
40
41
|
File.join(
|
41
|
-
File.dirname(file), '..', '..', '..', 'shared', 'snippet',
|
42
|
+
File.dirname(file), '..', '..', '..', 'shared', 'snippet', snippet
|
42
43
|
)
|
43
44
|
)
|
44
45
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef-gen-flavor-base
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James FitzGibbon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef-gen-flavors
|