consul_kv_backup 0.0.2 → 0.0.3

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
  SHA256:
3
- metadata.gz: 9e2faf40012dd1c4ff2cc2c4d07468d1cfec5c0888d3c3e8df17ffbb64ca48ac
4
- data.tar.gz: 4403cf574540e08900d45977a762c03a45397d05036f1e0f2671f6cc1d6a812d
3
+ metadata.gz: 8db4adaecf71940f17617a508c335ab757d71a62d780e167944b9896cd29a570
4
+ data.tar.gz: 4551771c7d174615dd1be665af4506f1e4f469b1359a4082117ad111fd074e9e
5
5
  SHA512:
6
- metadata.gz: acafce04ab67130c0044693c1ccef9a15d9f7d7c301ee15c9642dfda01361f0f540e3f3ddf65b57c9521998df527db037d932708587902fecf8a248383ecddad
7
- data.tar.gz: c63d520ed52ba21a3738148723968817fbb09147039860bf9f04ff07490ef5a922ac44b6366712e359055ed2693a64633cca4dcbabfd09f09433d8ff61b2036a
6
+ metadata.gz: 1608a901e991355934c1053f3bcfbccebe4174feb5bbfafe1a4b9cd10175e0189fe867a4ffe075d0c05ffef26c9f1b58e16f9affa6a723c8823fbc53f0407f8c
7
+ data.tar.gz: de275deb73f2f2600b379e096c472d34b969b64e9fc1dcc90894db634d3d8aaa4abb2a9eb48dc4047895f3d08f4c25ca0596c31413d81a5c746c62abcf28e856
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
@@ -27,7 +27,7 @@ module ConsulKvBackup
27
27
  git_add(path, value)
28
28
  end
29
29
 
30
- # git_push if @git['push']
30
+ git_push if @git_push
31
31
  end
32
32
 
33
33
  private
@@ -51,6 +51,7 @@ module ConsulKvBackup
51
51
  if exist
52
52
  FlazmRubyHelpers::Os.exec("git reset --hard HEAD")
53
53
  FlazmRubyHelpers::Os.exec("git checkout #{branch}")
54
+ FlazmRubyHelpers::Os.exec("git pull origin #{branch}")
54
55
  else
55
56
  FlazmRubyHelpers::Os.exec("git fetch")
56
57
  FlazmRubyHelpers::Os.exec("git branch #{branch} master")
@@ -66,6 +67,7 @@ module ConsulKvBackup
66
67
  end
67
68
 
68
69
  def git_add(path, value)
70
+ FileUtils.mkdir_p(File.dirname(@git_root_dir))
69
71
  file = File.open(path, 'w')
70
72
  file.write(value)
71
73
  file.close
@@ -90,6 +92,7 @@ module ConsulKvBackup
90
92
  def defaults
91
93
  {
92
94
  git_root_dir: '/tmp/consul_backup',
95
+ git_push: false,
93
96
  git_config: {}
94
97
  }
95
98
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: consul_kv_backup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Fortman
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-06-18 00:00:00.000000000 Z
11
+ date: 2019-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler