raykit 0.0.458 → 0.0.459

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/raykit/git/repository.rb +10 -0
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8de8aa9b11054c55becea490652c8345a9342cb9a48a452fa1353b725ef57050
4
- data.tar.gz: d5c536e247f85aafed2615135b1e2bc5e352f3cf440ed326844b089f0a013589
3
+ metadata.gz: 196a78b5f6d6888a6558835adc1fce6cba8440777d4a5a53246dcde6b0877042
4
+ data.tar.gz: adb0cbaccc38c715cf987d1f00de1f14c419a46a7863b424a1acd2f8da5f9839
5
5
  SHA512:
6
- metadata.gz: 416b311f241cb79d5b7c5b52474755273f1936bae427c40f00902a948c082cb747c2729214f909bbe3054ad2a5012de712099b28deb98ed142737f8b0bc33db1
7
- data.tar.gz: 95ebfd56443c95bef1a7198f690e45c605fe346e7d9419062aae755e78b609e7e44a7d86859ac29324d41810091caa7eae227d2d4b0226e3aa65abefb27af7b2
6
+ metadata.gz: 1015a2e2be7dc81b8c923b88ae9a04ad507a51d5fc89cd2bf3cd8fd5029408563da8c28a93f5a69bd747861118ba11af8eff370c284f055e5dd7bdeb6441a948
7
+ data.tar.gz: 6eeccf4bb3b966d3f31d292e7dc03d968845e7332f3eed06144edece4fa8e126a57a198d7ecd56c4a95ee071bf5481eaf56964db6578a858f058d6690840bcec
@@ -229,6 +229,16 @@ module Raykit
229
229
  FileUtils.rm_rf(make_dir) if (cmd.exitstatus == 0)
230
230
  cmd
231
231
  end
232
+
233
+ def self.backup(url, backup_dir)
234
+ if (Dir.exist?(backup_dir))
235
+ Dir.chdir(backup_dir) do
236
+ run("git pull")
237
+ end
238
+ else
239
+ run("git clone #{url} \"#{backup_dir}\"")
240
+ end
241
+ end
232
242
  end
233
243
  end
234
244
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: raykit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.458
4
+ version: 0.0.459
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lou Parslow