File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ ENV["REDIS_BRANCH"] ||= "unstable"
4
4
5
5
REDIS_DIR = File . expand_path ( File . join ( ".." , "test" ) , __FILE__ )
6
6
REDIS_CNF = File . join ( REDIS_DIR , "test.conf" )
7
+ REDIS_CNF_TEMPLATE = File . join ( REDIS_DIR , "test.conf.erb" )
7
8
REDIS_PID = File . join ( REDIS_DIR , "db" , "redis.pid" )
8
9
REDIS_LOG = File . join ( REDIS_DIR , "db" , "redis.log" )
9
10
REDIS_SOCKET = File . join ( REDIS_DIR , "db" , "redis.sock" )
@@ -65,13 +66,15 @@ file BINARY do
65
66
SH
66
67
end
67
68
68
- file REDIS_CNF do
69
+ file REDIS_CNF => [ REDIS_CNF_TEMPLATE , __FILE__ ] do | t |
69
70
require 'erb'
70
- template_path = "#{ REDIS_CNF } .erb"
71
- template = File . read ( "#{ REDIS_CNF } .erb" )
71
+
72
+ erb = t . prerequisites [ 0 ]
73
+ template = File . read ( erb )
74
+
72
75
File . open ( REDIS_CNF , 'w' ) do |file |
73
76
file . puts "\# This file was auto-generated at #{ Time . now } " ,
74
- "\# from (#{ " #{ REDIS_CNF } . erb" } )" ,
77
+ "\# from (#{ erb } )" ,
75
78
"\# "
76
79
conf = ERB . new ( template ) . result
77
80
file << conf
You can’t perform that action at this time.
0 commit comments