kubert 0.2.1 → 0.2.2

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: 5a48f7be48ba0ad0d984d96c6c242459b8e916be
4
- data.tar.gz: 2b394742575116b4b043499622bcbdfd48b4c307
3
+ metadata.gz: ba5247a80d25f5316ff543a473dc6d77912995a5
4
+ data.tar.gz: ca21c810af209ec97c6451f231639ce685b20f94
5
5
  SHA512:
6
- metadata.gz: 7711ecb107f07f4ec8d3bc629d828cd6ba0fd62ea36fd30ace92e36cb964f09831e0fae9a9d4e4a96ad22173efffd15dd256e559ca6adfff29be8feba9b5c6b1
7
- data.tar.gz: d74194abc1e61bca965ab9b09f44e9e6e16d2dc1930e56c7f8da4fe3141120fde04ac4b831d530cc542af66703a15fdf40f9ca8917ac3d386d035344b57b5609
6
+ metadata.gz: e13c8f147513a4211e0638f407d8b0acfcdbadd62dd2c1683dedf1b7140f3153d0f42eafaaaf8204a4a0d1d9cdbb0a83942935ca44f4e73d2d6327a8ea69d9dd
7
+ data.tar.gz: f7603b054d16181acc108c76d043c88a92d6d01559fec73280ff9cfd9ed28be48325a476812f20c22b5084c4d6118e99512aa6619ecc19ed76415323ee3d3005
@@ -26,23 +26,25 @@ module Kubert
26
26
 
27
27
  def perform
28
28
  confirm :deploy do
29
- handle_env_deploy(:config) do
30
- handle_env_deploy(:secret) do
31
- compilation.deploy_generation.to_h.each do |deployment_file, _template_hash|
32
- perform_with_status { `kubectl apply -f #{File.expand_path(deployment_file)} --record` unless excluded?(deployment_file) }
33
- end
34
- report_status(:deploy)
29
+ handle_env_deploy do
30
+ compilation.deploy_generation.to_h.each do |deployment_file, _template_hash|
31
+ perform_with_status { `kubectl apply -f #{File.expand_path(deployment_file)} --record` unless excluded?(deployment_file) }
35
32
  end
33
+ report_status(:deploy)
36
34
  end
37
35
  end
38
36
  end
39
37
 
40
- def handle_env_deploy(env)
41
- data = FileAccess.new(:config)
42
- data.write_local unless data.local?
43
- perform_with_status { `kubectl apply -f #{File.expand_path(output_dir)}/#{Kubert.public_send("#{env}_file_name")} --record` }
38
+ def handle_env_deploy
39
+ config_data = FileAccess.new(:config)
40
+ config_data.write_local unless config_data.local?
41
+ secret_data = FileAccess.new(:secret)
42
+ secret_data.write_local unless secret_data.local?
43
+ perform_with_status { `kubectl apply -f #{File.expand_path(output_dir)}/#{Kubert.config_file_name} --record` }
44
+ perform_with_status { `kubectl apply -f #{File.expand_path(output_dir)}/#{Kubert.secret_file_name} --record` }
44
45
  yield
45
- data.clean_local unless data.local?
46
+ secret_data.clean_local unless secret_data.local?
47
+ config_data.clean_local unless config_data.local?
46
48
  end
47
49
 
48
50
  def compilation
@@ -44,7 +44,7 @@ module Kubert
44
44
  end
45
45
 
46
46
  def clean_local
47
- File.delete(local_path)
47
+ File.delete(local_path) unless local?
48
48
  end
49
49
 
50
50
  private
@@ -1,3 +1,3 @@
1
1
  module Kubert
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kubert
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Glusman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-01 00:00:00.000000000 Z
11
+ date: 2017-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor