raykit 0.0.458 → 0.0.459
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/raykit/git/repository.rb +10 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 196a78b5f6d6888a6558835adc1fce6cba8440777d4a5a53246dcde6b0877042
|
4
|
+
data.tar.gz: adb0cbaccc38c715cf987d1f00de1f14c419a46a7863b424a1acd2f8da5f9839
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|