kitchen-cabinet 2.1.0 → 2.1.1

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: 04569a208aaadc6fa866488135116aef67fd515e
4
- data.tar.gz: c53bdbdde59ef73fa8e5fbb514a38c4bbfef5626
3
+ metadata.gz: babfe7dd1b78e4ff80e697ad246bba4d055f3d13
4
+ data.tar.gz: b0d16169272b58d5ef7801a9eb165d8c11dd5153
5
5
  SHA512:
6
- metadata.gz: f80259cb8398ab949829d41a1e52e5ec7319ac54511a6e1817fa53bf0e8057cc2e61f3c1d3441a312f5cfc45f5644126afb32c242e9bc7146fe79487abf3b0e9
7
- data.tar.gz: a685428d38a2b494a6e011df82e5f2b625ae7e21e71f2563409da05418537c7d63641817a01fd49e869eb9e00b4e5d7262ba033b0aa1f53a4118a4e4ef5fa884
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.exists?(File.join(cookbook_path, 'metadata.rb'))
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
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
- s.name = "kitchen-cabinet"
3
- s.version = '2.1.0'
4
- s.date = Time.now.strftime("%Y-%m-%d")
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.exists?('/opt/chef')
23
+ if File.exist?('/opt/chef')
25
24
  ENV['GEM_HOME'] = '/opt/chef/embedded/lib/ruby/gems/1.9.1'
26
- elsif File.exists?('C:\opscode\chef\\')
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{ metadata.rb recipes/default.rb }.each do |file|
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.exists?(File.join(ENV['HOME'], '.chef', 'knife.rb'))
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, repository: 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)
@@ -1,5 +1,4 @@
1
1
  .vagrant/
2
- Berksfile.lock
3
2
  *~
4
3
  *#
5
4
  .#*
@@ -1,3 +1,3 @@
1
- site :opscode
2
1
  chef_api :config
2
+ #site: opscode
3
3
  metadata
@@ -1,7 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'berkshelf', '~> 2.0', '>= 2.0.14'
4
- gem 'chef', '~> 11.8', '>= 11.8.0'
5
4
 
6
5
  group :unit do
7
6
  gem 'foodcritic', '~> 3', '>= 3.0.0'
@@ -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.0
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-03 00:00:00.000000000 Z
11
+ date: 2014-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen