chef-berksfile-env 1.1.0 → 1.2.0
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/VERSION +1 -1
- data/lib/chef-berksfile-env.rb +11 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 070c1b8a22b6612cb8ada77a0868077aa1d00050
|
4
|
+
data.tar.gz: 197a42fddeaf1d02aae7b27b52c339e13963117a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3303d521c677a82de03d883cadc13bfff47700aafa6df814f3e13cc23d9694d9bc9cabda805e5704e0b6c1c2a5702a000f476e23d7293c97e015f597a91d6c98
|
7
|
+
data.tar.gz: 5cdf0b882024deba1f6063d58fc36a7f9db8cf318ee85293496013950fd7bbb2452e64b2dbeab1c361895da52f618dd4a8f8bdcafdb0520ac59862122476a8b6
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.2.0
|
data/lib/chef-berksfile-env.rb
CHANGED
@@ -6,6 +6,17 @@ require 'pathname'
|
|
6
6
|
class Chef
|
7
7
|
class Environment
|
8
8
|
|
9
|
+
# @param path path to lock file
|
10
|
+
# @raise Berkshelf::LockfileNotFound exception
|
11
|
+
def load_berksfile_lock(path=nil)
|
12
|
+
lockfile = ::Berkshelf::Lockfile.from_file(path)
|
13
|
+
raise ::Berkshelf::LockfileNotFound, "Berks lock file is not present: #{path}" unless lockfile.present?
|
14
|
+
|
15
|
+
lockfile.locks.each_pair do |_, dependency|
|
16
|
+
cookbook dependency.name, "= #{dependency.locked_version.to_s}"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
9
20
|
def load_berksfile(path=nil)
|
10
21
|
raise "You must define the environment name before doing load_berksfile" if path.nil? && name.empty?
|
11
22
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef-berksfile-env
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bryan Baugher
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: berkshelf
|
@@ -158,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
158
158
|
version: '0'
|
159
159
|
requirements: []
|
160
160
|
rubyforge_project:
|
161
|
-
rubygems_version: 2.
|
161
|
+
rubygems_version: 2.4.4
|
162
162
|
signing_key:
|
163
163
|
specification_version: 4
|
164
164
|
summary: A Chef plugin to lock down your Chef Environment with a Berksfile
|