lace 0.4.1 → 0.4.2

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OTg2ZTcyYWQ2YjgxYzNiZGJmNzY5NmI0ZjBjOTU4MTZlOTQ0N2VmNQ==
4
+ NjU0MjljMzhjN2E4ZDY4NWNmZWM0ZGUyMTcyODQ0Y2JiOTdjYmM2ZQ==
5
5
  data.tar.gz: !binary |-
6
- ZDNlNTI0ZjAzZjNjNTJjZTVmMTAyY2IzYzU1ZjM1NGIzYjI5OGExMA==
6
+ M2E4ZWZjOTQ0ZDJhNTEyZDFlZmM3NjAzNmM2ZDRkZGU5ZjMyOTdhZA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NTc1NDk0YTZjYTY3YjRjMjRiM2M1MTkxZGZkMTRmZGMyMDVjMzdmOTFiNWU2
10
- MzIzNWZkODNmMzE4NzI1MjZmYThhODYwNTFkZmMzYTZiM2NmYWUyZWEyNmIy
11
- ZjE0ODNlMzg0YTVkYjQyMTk0M2RjMmQxNWY0Zjk5MzNkNTNkNjg=
9
+ Y2RkYjNjMDJmMmU4ZTFiZmJhNzhhYWUxZDRmYjkyM2NlZTZhMjUyMGZiM2U4
10
+ OWI5MWE0NmQ3NGZkZDJjNjNmMDgzYmUzNmVlNGQ2MzBhYmFjMTAwNGVlOGZi
11
+ MTNhZGY4ZTY1ZTQyMGEwN2VkZmFiNGI1ZmE1MjYyMWE0NGVlNjQ=
12
12
  data.tar.gz: !binary |-
13
- MzNmNWRlYzVlMjNkZDA1NjczYmU4ZDQ0YjAzZjUyZTU4NTQ5MmU2MGRmNGI0
14
- NGJiMDI5ZDQ4NTE2ZTI1YWI3OWNjNTY4MTJhZjQ2YTJlOTMyNjllMDAyOTc1
15
- YTc3Mjk5MGIyOGFjNTMzOWMxNTM5NTkxMzVjMTMyMmZlZGZhMzI=
13
+ NjNjZWQ2MzRiZGY0ZGI5ZDk3N2QyOTBmZWIxNTIzMGI4ZmY2M2Q2ODA4YTRm
14
+ ODEyYTFjYmZhNzFjYjQ0YmYzMmM1ZjRhY2NmNTRmZjQ0YjNlYjc4YzExNTYz
15
+ ODBiZDYxMTMzMTk4ZWNmNDIxZGQ0OTBiYjgwNDFhMjRiMzQ3ODg=
@@ -26,9 +26,21 @@ class PackageFacts
26
26
 
27
27
  def config_files
28
28
  if has_config_files?
29
- @facts["config_files"].flatten.map do |file|
29
+ paths = @facts["config_files"].flatten.map do |file|
30
30
  Pathname.glob(@package_path + file)
31
31
  end.flatten
32
+ ppaths = paths
33
+ ppaths.each do |path|
34
+ if path.file? and paths.include?(path.dirname)
35
+ paths.delete_if {|p| p == path.dirname}
36
+ end
37
+ if path.directory?
38
+ if !(paths & path.children).empty?
39
+ paths.delete_if {|p| p == path}
40
+ end
41
+ end
42
+ end
43
+ paths
32
44
  else [] end
33
45
  end
34
46
 
@@ -82,7 +82,7 @@ class Package
82
82
  # if ends in erb -> generate it
83
83
  src = file
84
84
  dest = src.as_dotfile(home_dir, @path)
85
- if src.exist? && dest.exist? && dest.directory? && ARGV.force?
85
+ if dest.exist? && dest.directory? && ARGV.force?
86
86
  FileUtils.mv dest, dest.as_backup
87
87
  end
88
88
  link_file_or_directory src, dest
@@ -94,5 +94,4 @@ class Package
94
94
  end
95
95
  FileUtils.ln_s src, dest, :force => ARGV.force?
96
96
  end
97
-
98
97
  end
@@ -1,3 +1,3 @@
1
1
  module Lace
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lace
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kai Richard Koenig
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-18 00:00:00.000000000 Z
11
+ date: 2015-06-19 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Lace lets you manage your dotfiles when using them on multiple machines
14
14
  email: kai@kairichardkoenig.de