clc-promote 0.3.14 → 0.3.15
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 +1 -1
- data/lib/promote/utils.rb +12 -0
- data/lib/promote/versioner.rb +2 -13
- 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: 0a793b7138b94ab2d704cd1f2137b620e93aee42
|
4
|
+
data.tar.gz: 7279804825c4e04c9eabccaebe70546ecb6ad6e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ad19f5b5798327867db5586b6ec9c134e49c9abfc92e5faa4fe540017de2b0be57b25cca3026dd83d449d1477fc03a8e37806ab2ab50f5e8a47edd3f29b1742
|
7
|
+
data.tar.gz: fdc0ffa1660e9cc119bdf6966fb7c8b40f822e33cb97708fb7f196a6dfa9f7f235a3d9caab0832fcc5ab3f258a8bbc652816cbceeb9e7e2ff21cb9f84956445d
|
data/lib/promote/uploader.rb
CHANGED
data/lib/promote/utils.rb
CHANGED
@@ -6,5 +6,17 @@ module Promote
|
|
6
6
|
rest = Chef::REST.new(config.chef_server_url, config.node_name, config.client_key)
|
7
7
|
rest.get_rest("/cookbooks?num_versions=all")
|
8
8
|
end
|
9
|
+
|
10
|
+
def self.sync_berksfiles(cookbook_directory)
|
11
|
+
repo_cookbooks = Dir.glob(File.join(cookbook_directory, "*"))
|
12
|
+
repo_cookbooks.each do |cookbook|
|
13
|
+
berks_name = File.join(cookbook_directory, File.basename(cookbook), "Berksfile")
|
14
|
+
if File.exist?(berks_name)
|
15
|
+
Berkshelf.set_format :null
|
16
|
+
berksfile = Berkshelf::Berksfile.from_file(berks_name)
|
17
|
+
berksfile.install
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
9
21
|
end
|
10
22
|
end
|
data/lib/promote/versioner.rb
CHANGED
@@ -35,7 +35,7 @@ module Promote
|
|
35
35
|
|
36
36
|
def version_cookbooks
|
37
37
|
results = []
|
38
|
-
|
38
|
+
Dir.glob(File.join(config.cookbook_directory, "*")).each do |file|
|
39
39
|
cookbook = File.basename(file)
|
40
40
|
result = version_cookbook(cookbook)
|
41
41
|
if !result.nil?
|
@@ -46,14 +46,7 @@ module Promote
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def sync_berksfiles
|
49
|
-
|
50
|
-
berks_name = File.join(config.cookbook_directory, File.basename(cookbook), "Berksfile")
|
51
|
-
if File.exist?(berks_name)
|
52
|
-
Berkshelf.set_format :null
|
53
|
-
berksfile = Berkshelf::Berksfile.from_file(berks_name)
|
54
|
-
berksfile.install
|
55
|
-
end
|
56
|
-
end
|
49
|
+
Utils.sync_berksfiles(config.cookbook_directory)
|
57
50
|
end
|
58
51
|
|
59
52
|
def version_data_bag(data_bag_path)
|
@@ -124,10 +117,6 @@ module Promote
|
|
124
117
|
berksfile.list
|
125
118
|
end
|
126
119
|
|
127
|
-
def repo_cookbooks
|
128
|
-
Dir.glob(File.join(config.cookbook_directory, "*"))
|
129
|
-
end
|
130
|
-
|
131
120
|
def version_json(parent_directory, file_name, &block)
|
132
121
|
version_string = "version"
|
133
122
|
file = "#{parent_directory}/#{file_name}.json"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clc-promote
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- CenturyLink Cloud
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef
|