clc-promote 0.3.8 → 0.3.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/promote/uploader.rb +5 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53189a9d1d3940b6f9ae5cb414084c862e4bfd25
|
4
|
+
data.tar.gz: ac55bf61a617b28262963a3fe3383dc681545f49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44b3aa90fb9a9288dab45ccf778cbeeb7f3428372bd73595d47310c8d7a9943937591bbe43893dd155b9f5663aad432ccd610077bfbf0b58b79f8d328e6d14b7
|
7
|
+
data.tar.gz: 830ec9fc49efd1130c9c5828590bc28ad83f83797a33eb1b6881836cd21c89e8bab863869dac08d265c1acb462fdb4d24036396ae8961e5e5e9cfc689fbda8d8
|
data/lib/promote/uploader.rb
CHANGED
@@ -67,9 +67,12 @@ module Promote
|
|
67
67
|
def cookbooks_copied?(dir, server_cookbooks, environment_cookbooks)
|
68
68
|
metadata = Chef::Cookbook::Metadata.new
|
69
69
|
metadata_file = File.join(dir, "metadata.rb")
|
70
|
-
|
70
|
+
if File.exist?(metadata_file)
|
71
|
+
metadata.from_file(metadata_file)
|
72
|
+
else
|
73
|
+
metadata.from_json(File.read(File.join(dir, "metadata.json")))
|
74
|
+
end
|
71
75
|
|
72
|
-
metadata.from_file(metadata_file)
|
73
76
|
if !server_cookbooks.has_key?(metadata.name) || (server_cookbooks[metadata.name]["versions"].select {|v| v['version'] == metadata.version}).empty?
|
74
77
|
if environment_cookbooks.has_key?(metadata.name) && environment_cookbooks[metadata.name] == metadata.version
|
75
78
|
FileUtils.copy_entry(dir, File.join(config.temp_directory, metadata.name))
|