kitchen-cabinet 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/bin/cabinet +1 -1
- data/kitchen-cabinet.gemspec +4 -4
- data/lib/kitchen-cabinet/cabinet.rb +5 -6
- data/lib/kitchen-cabinet/templates/.gitignore.eruby +0 -1
- data/lib/kitchen-cabinet/templates/Berksfile.eruby +1 -1
- data/lib/kitchen-cabinet/templates/Gemfile.eruby +0 -1
- data/lib/kitchen-cabinet/templates/Thorfile.eruby +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: babfe7dd1b78e4ff80e697ad246bba4d055f3d13
|
4
|
+
data.tar.gz: b0d16169272b58d5ef7801a9eb165d8c11dd5153
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a88ae74c7de007219983a798f24beef4a1ea35097a09bd1a902c17f6b1193cb01a9d41a079c2911c8d982349e200e84e26ebaad9344bfae0dd09eca02c820327
|
7
|
+
data.tar.gz: 2fa52eedfe8c53e5c46cd83f0042d673b79bbf7d2a23df0f1b708bd02380dec418a2cf872d4ce857e3cac6244a8053f0d95357081d79a43faefcc32819517fda
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## v2.1.1
|
2
|
+
* Fixed issue where git would create the contents of .git/ in the main cookbook folder.
|
3
|
+
* Modified Berksfile so that site: opscode is commented out. This should make issues with new cookbook versions accidentally being inserted into your chef server much less common.
|
4
|
+
* Now your Berksfile.lock files will be committed - we discovered there can be some dependency issues same as with the Gemfile.lock, which we also allow to be comited.
|
5
|
+
* thor-scmversion is configured to bump patch version unless otherwise specified in your commit.
|
6
|
+
|
1
7
|
## v2.1.0
|
2
8
|
* Updated dependencies
|
3
9
|
* Made the Gemfile a bit less restricive by locking minor version and allowing patch updates.
|
data/bin/cabinet
CHANGED
@@ -58,7 +58,7 @@ else
|
|
58
58
|
end
|
59
59
|
|
60
60
|
if options[:update]
|
61
|
-
if File.
|
61
|
+
if File.exist?(File.join(cookbook_path, 'metadata.rb'))
|
62
62
|
require 'kitchen-cabinet/update'
|
63
63
|
Update.update_cookbook(cookbook_name, options, cookbook_path)
|
64
64
|
exit
|
data/kitchen-cabinet.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
|
-
s.name =
|
3
|
-
s.version = '2.1.
|
4
|
-
s.date = Time.now.strftime(
|
2
|
+
s.name = 'kitchen-cabinet'
|
3
|
+
s.version = '2.1.1'
|
4
|
+
s.date = Time.now.strftime('%Y-%m-%d')
|
5
5
|
s.homepage = 'https://github.com/onehealth/kitchen-cabinet'
|
6
6
|
s.summary = 'Initializes a chef cookbook repo with relevant tools'
|
7
7
|
s.description = <<EOF
|
@@ -18,7 +18,7 @@ EOF
|
|
18
18
|
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
19
19
|
s.files = `git ls-files`.split($/)
|
20
20
|
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
21
|
-
|
21
|
+
|
22
22
|
s.add_runtime_dependency 'test-kitchen', '~> 1.1', '>= 1.1.1'
|
23
23
|
s.add_runtime_dependency 'bundler', '~> 1.5', '>= 1.5.1'
|
24
24
|
s.add_runtime_dependency 'berkshelf', '~> 2.0', '>= 2.0.12'
|
@@ -1,6 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# Encoding: utf-8
|
3
|
-
|
4
3
|
# Cabinet helps create and maintain cookbooks
|
5
4
|
# complete with an opinionated testing suite.
|
6
5
|
class Cabinet
|
@@ -21,9 +20,9 @@ class Cabinet
|
|
21
20
|
end
|
22
21
|
|
23
22
|
def self.chef_check
|
24
|
-
if File.
|
23
|
+
if File.exist?('/opt/chef')
|
25
24
|
ENV['GEM_HOME'] = '/opt/chef/embedded/lib/ruby/gems/1.9.1'
|
26
|
-
elsif File.
|
25
|
+
elsif File.exist?('C:\opscode\chef\\')
|
27
26
|
ENV['GEM_HOME'] = 'C:\opscode\chef\embedded\lib\ruby\gems\1.9.1'
|
28
27
|
elsif Gem::Specification.find_by_name('chef')
|
29
28
|
ENV['GEM_HOME']
|
@@ -35,7 +34,7 @@ class Cabinet
|
|
35
34
|
end
|
36
35
|
|
37
36
|
def self.chef_rewrite(cookbook_path)
|
38
|
-
%w
|
37
|
+
%w(metadata.rb recipes/default.rb).each do |file|
|
39
38
|
puts "\tRewriting #{file}"
|
40
39
|
contents = "\# Encoding: utf-8\n#{File.read(File.join(cookbook_path, file))}"
|
41
40
|
File.open(File.join(cookbook_path, file), 'w') { |f| f.write(contents) }
|
@@ -54,7 +53,7 @@ class Cabinet
|
|
54
53
|
create_cookbook = Chef::Knife::CookbookCreate.new
|
55
54
|
create_cookbook.name_args = [cookbook_name]
|
56
55
|
create_cookbook.config[:cookbook_path] = options[:path]
|
57
|
-
if File.
|
56
|
+
if File.exist?(File.join(ENV['HOME'], '.chef', 'knife.rb'))
|
58
57
|
require 'chef'
|
59
58
|
Chef::Config.from_file(File.join(ENV['HOME'], '.chef', 'knife.rb'))
|
60
59
|
end
|
@@ -69,7 +68,7 @@ class Cabinet
|
|
69
68
|
tool = 'git'
|
70
69
|
puts "* Initializing #{tool}"
|
71
70
|
require 'git'
|
72
|
-
Git.init(cookbook_path,
|
71
|
+
Git.init(cookbook_path, git_dir: "#{cookbook_path}/.git")
|
73
72
|
end
|
74
73
|
|
75
74
|
def self.init_berkshelf(cookbook_name, options, cookbook_path)
|
@@ -25,7 +25,7 @@ class Ci < Thor
|
|
25
25
|
desc 'publish', 'Task for CI that publishes cookbook.'
|
26
26
|
def publish
|
27
27
|
require 'thor/rake_compat'
|
28
|
-
`thor version:bump patch`
|
28
|
+
`thor version:bump auto -d patch`
|
29
29
|
`ssh-agent bash -c 'ssh-add /var/lib/jenkins/.ssh/jenkinsbuild_rsa; git push --tags'`
|
30
30
|
`berks upload`
|
31
31
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kitchen-cabinet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Taylor Price
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-kitchen
|