lace 0.3.2 → 0.3.3
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 +5 -13
- data/lib/cmd/validate.rb +1 -1
- data/lib/lace/exceptions.rb +6 -0
- data/lib/lace/package.rb +12 -3
- data/lib/lace/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
|
|
5
|
-
data.tar.gz: !binary |-
|
|
6
|
-
NGNjODYwMzAyY2Q0Y2QyNzllZGY2YWFmMDFiNmM1NTIyZTY4ODdkZg==
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: bc158e1d6fcfc6821a0d1b777e978a912b6fb975
|
|
4
|
+
data.tar.gz: e00ee505a2bfc0536ef2fb04ea8feac8cef5ea0b
|
|
7
5
|
SHA512:
|
|
8
|
-
metadata.gz:
|
|
9
|
-
|
|
10
|
-
NmNiYWJmZDBlMzIxMDU2ZGE1YjU2ZWM5NmNiMzc3Njk0MzdlZWNlZTk2YmM0
|
|
11
|
-
YTA4MjdmOWE2YjA3ZTg2OWVhYmQwYmUxMjEwNmZhN2YzNGQ4MTM=
|
|
12
|
-
data.tar.gz: !binary |-
|
|
13
|
-
NzIzM2E0OTc3YjA2M2I2NjRjZTcwZmM2MDVkMDY5ZGRmZGViMWRlNmFiZTFj
|
|
14
|
-
NzM4YmZmMWU4MGZmMzI1YzFiZjRkYmNjYWZjNGY5YmEyMjgzYjkwNzVjMWRh
|
|
15
|
-
ZDgwZDVkZDEyYTAwOTlkNDVlNmRlNGRmNDMyNzkzNzA2ODg4NTg=
|
|
6
|
+
metadata.gz: 62d67ba5996037f32838dba6ae25a3134499f1413defd3b3c4b6b2392c67fd16c823b9413aeda4bc1719983fec0fd3f29ae8bb77a5a52e294e9db37cffba5314
|
|
7
|
+
data.tar.gz: 24c58a76a3db779ebdc3fa5f31f9b65908b258d86a248b2341037bf94da847f8475c837f80c27a0492d8265b9981811ef53365d8b6cc9cb702e356040a0885e4
|
data/lib/cmd/validate.rb
CHANGED
data/lib/lace/exceptions.rb
CHANGED
|
@@ -58,6 +58,12 @@ class PackageFlavorDoesNotExist < FlavorError
|
|
|
58
58
|
end
|
|
59
59
|
end
|
|
60
60
|
|
|
61
|
+
class ManifestErbError < RuntimeError
|
|
62
|
+
def initialize fact, exception
|
|
63
|
+
super "#{exception.to_s}\nin #{fact.facts_file}"
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
|
|
61
67
|
|
|
62
68
|
FlavorArgumentMsg = <<-EOS
|
|
63
69
|
Sorry, this command needs a flavor argument you can choose from the following:
|
data/lib/lace/package.rb
CHANGED
|
@@ -67,6 +67,11 @@ end
|
|
|
67
67
|
|
|
68
68
|
class Facts
|
|
69
69
|
attr_reader :facts_file
|
|
70
|
+
|
|
71
|
+
def inspect
|
|
72
|
+
"#<Facts:#{@package_path}>"
|
|
73
|
+
end
|
|
74
|
+
|
|
70
75
|
def initialize package_path
|
|
71
76
|
@package_path = Pathname.new(package_path)
|
|
72
77
|
@facts_file = @package_path/".lace.yml"
|
|
@@ -107,7 +112,7 @@ class Facts
|
|
|
107
112
|
|
|
108
113
|
def flavors
|
|
109
114
|
if @_facts && @_facts.key?("flavors")
|
|
110
|
-
@_facts["flavors"].keys
|
|
115
|
+
@_facts["flavors"].keys.sort
|
|
111
116
|
else
|
|
112
117
|
[]
|
|
113
118
|
end
|
|
@@ -133,7 +138,11 @@ class Facts
|
|
|
133
138
|
|
|
134
139
|
protected
|
|
135
140
|
def facts_file_to_hash
|
|
136
|
-
|
|
141
|
+
begin
|
|
142
|
+
rendered_lace = ERB.new(@facts_file.read, nil, '-').result(binding)
|
|
143
|
+
rescue Exception => e
|
|
144
|
+
raise ManifestErbError.new(self, e)
|
|
145
|
+
end
|
|
137
146
|
value = YAML.load rendered_lace
|
|
138
147
|
if value.is_a?(String) && value == "---"
|
|
139
148
|
return Hash.new
|
|
@@ -214,7 +223,7 @@ class Package
|
|
|
214
223
|
home_dir = ENV["HOME"]
|
|
215
224
|
files.each do |file|
|
|
216
225
|
# if ends in erb -> generate it
|
|
217
|
-
FileUtils.ln_s file, Pathname.new(file).as_dotfile(home_dir), force
|
|
226
|
+
FileUtils.ln_s file, Pathname.new(file).as_dotfile(home_dir), :force => ARGV.force?
|
|
218
227
|
end
|
|
219
228
|
end
|
|
220
229
|
end
|
data/lib/lace/version.rb
CHANGED
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.3.
|
|
4
|
+
version: 0.3.3
|
|
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: 2014-01-
|
|
11
|
+
date: 2014-01-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: This is a simple/unfinished tool which i use to manage my dotfiles on
|
|
14
14
|
all the different machines
|
|
@@ -18,7 +18,6 @@ executables:
|
|
|
18
18
|
extensions: []
|
|
19
19
|
extra_rdoc_files: []
|
|
20
20
|
files:
|
|
21
|
-
- bin/lace
|
|
22
21
|
- lib/cmd/activate.rb
|
|
23
22
|
- lib/cmd/deactivate.rb
|
|
24
23
|
- lib/cmd/fetch.rb
|
|
@@ -36,6 +35,7 @@ files:
|
|
|
36
35
|
- lib/lace/package.rb
|
|
37
36
|
- lib/lace/utils.rb
|
|
38
37
|
- lib/lace/version.rb
|
|
38
|
+
- bin/lace
|
|
39
39
|
homepage: https://github.com/kairichard/lace
|
|
40
40
|
licenses:
|
|
41
41
|
- MIT
|
|
@@ -46,17 +46,17 @@ require_paths:
|
|
|
46
46
|
- lib
|
|
47
47
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
48
48
|
requirements:
|
|
49
|
-
- -
|
|
49
|
+
- - '>='
|
|
50
50
|
- !ruby/object:Gem::Version
|
|
51
51
|
version: 1.8.6
|
|
52
52
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
53
53
|
requirements:
|
|
54
|
-
- -
|
|
54
|
+
- - '>='
|
|
55
55
|
- !ruby/object:Gem::Version
|
|
56
56
|
version: '0'
|
|
57
57
|
requirements: []
|
|
58
58
|
rubyforge_project:
|
|
59
|
-
rubygems_version: 2.
|
|
59
|
+
rubygems_version: 2.0.14
|
|
60
60
|
signing_key:
|
|
61
61
|
specification_version: 4
|
|
62
62
|
summary: Manage your .dotfiles
|