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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8e9170633de8bee495d02b19c331d06aebea58c9
4
- data.tar.gz: ab36653932ac5788cd400f208dd9019fbc39eae5
3
+ metadata.gz: 0a793b7138b94ab2d704cd1f2137b620e93aee42
4
+ data.tar.gz: 7279804825c4e04c9eabccaebe70546ecb6ad6e3
5
5
  SHA512:
6
- metadata.gz: df4a77c53b5de91ce1c939c732c4e7a58e879151ac17e2f89940dfb08c153c483e0a85efbaff25edcaaf0a5cdd896abb3fe5c4f7c1074807c743232fd6788fab
7
- data.tar.gz: 5ecff0a01f8c50a8a293dc02b9185428a001da4af3efc94597682bec0cf2f6bc890299b7e63d935612ec042fa78193705c37169fb81485abcb4d71d3b5b262d8
6
+ metadata.gz: 5ad19f5b5798327867db5586b6ec9c134e49c9abfc92e5faa4fe540017de2b0be57b25cca3026dd83d449d1477fc03a8e37806ab2ab50f5e8a47edd3f29b1742
7
+ data.tar.gz: fdc0ffa1660e9cc119bdf6966fb7c8b40f822e33cb97708fb7f196a6dfa9f7f235a3d9caab0832fcc5ab3f258a8bbc652816cbceeb9e7e2ff21cb9f84956445d
@@ -60,7 +60,7 @@ module Promote
60
60
  end
61
61
 
62
62
  def upload_environments
63
- upload_file("/environments/**/*.json")
63
+ upload_file("/environments/*.json")
64
64
  end
65
65
 
66
66
  def upload_data_bags
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
@@ -35,7 +35,7 @@ module Promote
35
35
 
36
36
  def version_cookbooks
37
37
  results = []
38
- repo_cookbooks.each do |file|
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
- repo_cookbooks.each do |cookbook|
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.14
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-10-31 00:00:00.000000000 Z
11
+ date: 2014-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef