canzea 0.1.94 → 0.1.95

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ebe871ecae40921d76c120ff51782e2b9c6a8a9e
4
- data.tar.gz: c42f42cefc3dbf5ca0d2c83d77b504b37626d4ba
3
+ metadata.gz: d3812f8ffd6aeddc8229c7d73434451e97a75a20
4
+ data.tar.gz: f6260bc409bfa791781e7a35b78b087a659c3892
5
5
  SHA512:
6
- metadata.gz: 4239e363aed9c71cffab3a1011e909cff0d49c850fc5254410ad91a15debcae47273a48ad2a5357b68a89b0995f36a9594592ac32bd222dd98066736cccfb8b2
7
- data.tar.gz: 999f1c5e04ccbcffc96b9bbb002c14c6b4c49dd39efd118183d3d7c8a95aebdb08e75cfce35f40ce86f24065301c33279769762c50f6c6418b749777cf452f9f
6
+ metadata.gz: f1184da26a65d96dd6aa731947c37ce31208d3f3b485331856ce2b5a727a3e77dde6e5b955566dee22813de393a04dcf3d3fe7b992fb40d5ac1950a990925ed7
7
+ data.tar.gz: 2e8df01ea273776ddaf33c30abc05f5e6fee9f844c9fab9e7989afc2d866f22c971f16c29bfc45d5becda607cee7c1dc7ef6a16008c3977ee4b93bbf4797798f
data/lib/canzea/config.rb CHANGED
@@ -17,7 +17,8 @@ module Canzea
17
17
  :consul_tls_cert_file => "/etc/consul.d/ssl/consul.cert",
18
18
  :consul_tls_key_file => "/etc/consul.d/ssl/consul.key",
19
19
  :vault_tls_cert_file => "/etc/consul.d/ssl/vault.cert",
20
- :vault_tls_key_file => "/etc/consul.d/ssl/vault.key"
20
+ :vault_tls_key_file => "/etc/consul.d/ssl/vault.key",
21
+ :track_changes_in_git => false
21
22
  }
22
23
  @valid_config_keys = @config.keys
23
24
 
@@ -1,3 +1,3 @@
1
1
  module Canzea
2
- VERSION = "0.1.94"
2
+ VERSION = "0.1.95"
3
3
  end
@@ -18,9 +18,11 @@ class ConfigGitCommit
18
18
  FileUtils.cp sourcePath, dest
19
19
 
20
20
  puts "Recording in repo the default file first: #{sourcePath}"
21
- # g = Git.init(gitRoot)
22
- # g.add(:all=>true)
23
- # g.commit("Original default #{sourcePath}")
21
+ if (Canzea::config[:track_changes_in_git])
22
+ g = Git.init(gitRoot)
23
+ g.add(:all=>true)
24
+ g.commit("Original default #{sourcePath}")
25
+ end
24
26
  end
25
27
 
26
28
  if template
@@ -32,11 +34,13 @@ class ConfigGitCommit
32
34
  FileUtils.mkdir_p Pathname.new(dest).dirname
33
35
  FileUtils.cp sourcePath, dest
34
36
 
35
- # g = Git.init(gitRoot)
36
- # g.add(:all=>true)
37
- # puts g.status.changed.size() + g.status.added.size()
38
- # if (g.status.changed.size() > 0 or g.status.added.size() > 0)
39
- # g.commit("Config update #{sourcePath}")
40
- # end
37
+ if (Canzea::config[:track_changes_in_git])
38
+ g = Git.init(gitRoot)
39
+ g.add(:all=>true)
40
+ puts g.status.changed.size() + g.status.added.size()
41
+ if (g.status.changed.size() > 0 or g.status.added.size() > 0)
42
+ g.commit("Config update #{sourcePath}")
43
+ end
44
+ end
41
45
  end
42
46
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: canzea
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.94
4
+ version: 0.1.95
5
5
  platform: ruby
6
6
  authors:
7
7
  - Canzea Technologies