kubs_cli 0.1.12 → 0.1.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/kubs_cli/pull.rb +12 -9
- data/lib/kubs_cli/version.rb +1 -1
- 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: f18511759d79be4e411ee98aba40489a298b306fe69c3bca09af427f2d893401
|
4
|
+
data.tar.gz: 4260992612b4618c40b4459168f267c2e0a467c553cc4d5b056801b43c277ef5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93b38bccb038c90ac4a446d41f4d8de624ff21a7206fee2c99210f1c0ce258f8e00558252a256ca53037841d116eda5987fbb864e026bc01dbd8041a28e41d4e
|
7
|
+
data.tar.gz: 88ed62fe4f6aef014a66768e5d3a81e002997cacd046c9a91f54470d308f33c365852fa52892c28ac0ae20cde12a166f08961232c84893ec9b7e5ef01b9982c7
|
data/Gemfile.lock
CHANGED
data/lib/kubs_cli/pull.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
require 'rake'
|
2
3
|
|
3
4
|
module KubsCLI
|
4
5
|
# Used to pull items into your config-files repo
|
@@ -23,23 +24,25 @@ module KubsCLI
|
|
23
24
|
local_dir = @config.local_dir
|
24
25
|
|
25
26
|
shared_dotfiles(dotfiles, local_dir) do |remote, local|
|
26
|
-
|
27
|
+
copy_files(local, remote)
|
27
28
|
end
|
28
29
|
end
|
29
30
|
|
30
31
|
def copy_files(orig_file, new_file)
|
31
|
-
|
32
|
-
|
32
|
+
if File.directory?(new_file) || File.directory?(new_file)
|
33
|
+
Dir.each_child(orig_file) do |o_file|
|
34
|
+
Dir.each_child(new_file) do |n_file|
|
35
|
+
next unless o_file == n_file
|
33
36
|
|
34
|
-
|
35
|
-
|
36
|
-
next unless o_file == n_file
|
37
|
+
o_file = File.join(File.expand_path(orig_file), o_file)
|
38
|
+
n_file = File.expand_path(new_file)
|
37
39
|
|
38
|
-
|
39
|
-
|
40
|
+
Rake.cp_r(o_file, n_file)
|
41
|
+
end
|
40
42
|
|
41
|
-
@fh.copy(from: o_file, to: n_file)
|
42
43
|
end
|
44
|
+
else
|
45
|
+
Rake.cp(orig_file, new_file)
|
43
46
|
end
|
44
47
|
end
|
45
48
|
|
data/lib/kubs_cli/version.rb
CHANGED