File tree Expand file tree Collapse file tree 5 files changed +7
-7
lines changed
spec/thinking_sphinx/commands Expand file tree Collapse file tree 5 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 7
7
Dir [ "#{ index . path } .*" ] . each { |path | FileUtils . rm path }
8
8
end
9
9
10
- FileUtils . rm_r ( binlog_path ) if File . exist? ( binlog_path )
10
+ FileUtils . rm_rf ( binlog_path ) if File . exist? ( binlog_path )
11
11
end
12
12
13
13
private
Original file line number Diff line number Diff line change 7
7
Dir [ "#{ index . path } .*" ] . each { |path | FileUtils . rm path }
8
8
end
9
9
10
- FileUtils . rm_r Dir [ "#{ configuration . indices_location } /ts-*.tmp" ]
10
+ FileUtils . rm_rf Dir [ "#{ configuration . indices_location } /ts-*.tmp" ]
11
11
end
12
12
13
13
private
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ def self.clear
42
42
config . indices_location ,
43
43
config . searchd . binlog_path
44
44
] . each do |path |
45
- FileUtils . rm_r ( path ) if File . exist? ( path )
45
+ FileUtils . rm_rf ( path ) if File . exist? ( path )
46
46
end
47
47
end
48
48
Original file line number Diff line number Diff line change 17
17
allow ( Dir ) . to receive ( :[] ) . with ( '/path/to/my/index/parts.*' ) .
18
18
and_return ( [ 'parts.a' , 'parts.b' ] )
19
19
20
- allow ( FileUtils ) . to receive_messages :rm_r => true ,
20
+ allow ( FileUtils ) . to receive_messages :rm_rf => true ,
21
21
:rm => true
22
22
allow ( File ) . to receive_messages :exist? => true
23
23
end
30
30
end
31
31
32
32
it "removes the directory for the binlog files" do
33
- expect ( FileUtils ) . to receive ( :rm_r ) . with ( '/path/to/binlog' )
33
+ expect ( FileUtils ) . to receive ( :rm_rf ) . with ( '/path/to/binlog' )
34
34
35
35
command . call
36
36
end
Original file line number Diff line number Diff line change 24
24
allow ( Dir ) . to receive ( :[] ) . with ( '/path/to/indices/ts-*.tmp' ) .
25
25
and_return ( [ '/path/to/indices/ts-foo.tmp' ] )
26
26
27
- allow ( FileUtils ) . to receive_messages :rm_r => true , :rm => true
27
+ allow ( FileUtils ) . to receive_messages :rm_rf => true , :rm => true
28
28
allow ( File ) . to receive_messages :exist? => true
29
29
end
30
30
45
45
end
46
46
47
47
it "removes any indexing guard files" do
48
- expect ( FileUtils ) . to receive ( :rm_r ) . with ( [ "/path/to/indices/ts-foo.tmp" ] )
48
+ expect ( FileUtils ) . to receive ( :rm_rf ) . with ( [ "/path/to/indices/ts-foo.tmp" ] )
49
49
50
50
command . call
51
51
end
You can’t perform that action at this time.
0 commit comments