File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -37,9 +37,8 @@ file 'spec/configuration.yml' => 'spec/configuration.yml.example' do |task|
37
37
src_path = File . expand_path ( "../../#{ task . prerequisites . first } " , __FILE__ )
38
38
dst_path = File . expand_path ( "../../#{ task . name } " , __FILE__ )
39
39
40
- dst_file = File . open ( dst_path , 'w' )
41
- File . open ( src_path ) do |f |
42
- f . each_line do |line |
40
+ File . open ( dst_path , 'w' ) do |dst_file |
41
+ File . open ( src_path ) . each_line do |line |
43
42
dst_file . write line . gsub ( /LOCALUSERNAME/ , ENV [ 'USER' ] )
44
43
end
45
44
end
@@ -50,9 +49,8 @@ file 'spec/my.cnf' => 'spec/my.cnf.example' do |task|
50
49
src_path = File . expand_path ( "../../#{ task . prerequisites . first } " , __FILE__ )
51
50
dst_path = File . expand_path ( "../../#{ task . name } " , __FILE__ )
52
51
53
- dst_file = File . open ( dst_path , 'w' )
54
- File . open ( src_path ) do |f |
55
- f . each_line do |line |
52
+ File . open ( dst_path , 'w' ) do |dst_file |
53
+ File . open ( src_path ) . each_line do |line |
56
54
dst_file . write line . gsub ( /LOCALUSERNAME/ , ENV [ 'USER' ] )
57
55
end
58
56
end
You can’t perform that action at this time.
0 commit comments