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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d2a0b5dde352e3414201c8efd959ab86a5646868e845419f915d3a5d1ecf0e7e
4
- data.tar.gz: 5d055ed03956215f9fe37b88f98e083ec31f30cbd2aaea5c653a854ca467ea52
3
+ metadata.gz: f18511759d79be4e411ee98aba40489a298b306fe69c3bca09af427f2d893401
4
+ data.tar.gz: 4260992612b4618c40b4459168f267c2e0a467c553cc4d5b056801b43c277ef5
5
5
  SHA512:
6
- metadata.gz: 40f7b6dd367ce5155196f43d3903c7540b2d319ce858213db7779d967f6340acec832b8d29fa772cad807cd8095b8c2ef165689cdf53c26435af8ac16d4f3618
7
- data.tar.gz: 37a5d4a3c5db219b8c3137f164501ff8252f323c9bc080affa1f0f62e8b721ff5a369820df950e6b35610a4ad90fd1a82f447fbbad76ba3d81f4e5c6cddac762
6
+ metadata.gz: 93b38bccb038c90ac4a446d41f4d8de624ff21a7206fee2c99210f1c0ce258f8e00558252a256ca53037841d116eda5987fbb864e026bc01dbd8041a28e41d4e
7
+ data.tar.gz: 88ed62fe4f6aef014a66768e5d3a81e002997cacd046c9a91f54470d308f33c365852fa52892c28ac0ae20cde12a166f08961232c84893ec9b7e5ef01b9982c7
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- kubs_cli (0.1.12)
4
+ kubs_cli (0.1.13)
5
5
  rake (~> 10.0)
6
6
  thor (~> 0.20)
7
7
 
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
- @fh.copy(from: local, to: remote)
27
+ copy_files(local, remote)
27
28
  end
28
29
  end
29
30
 
30
31
  def copy_files(orig_file, new_file)
31
- return @fh.copy(from: orig_file, to: new_file) unless File.directory?(new_file)
32
- return @fh.copy(from: orig_file, to: new_file) unless File.directory?(orig_file)
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
- Dir.each_child(orig_file) do |o_file|
35
- Dir.each_child(new_file) do |n_file|
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
- o_file = File.join(File.expand_path(orig_file), o_file)
39
- n_file = File.expand_path(new_file)
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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module KubsCLI
4
- VERSION = '0.1.12'
4
+ VERSION = '0.1.13'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kubs_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.12
4
+ version: 0.1.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - paramagicdev