local_pac 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/local_pac.rb +0 -2
- data/lib/local_pac/actions/create_file.rb +2 -1
- data/lib/local_pac/initializer.rb +1 -1
- data/lib/local_pac/version.rb +1 -1
- data/spec/initializer_spec.rb +2 -2
- metadata +1 -1
data/lib/local_pac.rb
CHANGED
@@ -21,7 +21,8 @@ module LocalPac
|
|
21
21
|
if need_to_run? || options[:force] == true
|
22
22
|
LocalPac.ui_logger.warn "Creating file \"#{destination}\"."
|
23
23
|
|
24
|
-
|
24
|
+
file = template(name, destination, data)
|
25
|
+
FileUtils.chmod('+x', file) if options[:executable] == true
|
25
26
|
else
|
26
27
|
LocalPac.ui_logger.warn "File \"#{destination}\" already exists. Do not create it again!."
|
27
28
|
end
|
data/lib/local_pac/version.rb
CHANGED
data/spec/initializer_spec.rb
CHANGED
@@ -14,8 +14,8 @@ describe Initializer do
|
|
14
14
|
EOS
|
15
15
|
config_file = create_file('config.yaml', config_string)
|
16
16
|
|
17
|
-
config = LocalPac::Config.new(
|
18
|
-
initializer = Initializer.new(config)
|
17
|
+
config = LocalPac::Config.new(config_file)
|
18
|
+
initializer = Initializer.new({}, config)
|
19
19
|
silence(:stderr) do
|
20
20
|
initializer.run
|
21
21
|
end
|