135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
|
# File 'lib/release/gem/vcs_action.rb', line 135
def ignore(*files, &block)
if block
loop do
newDir, newFiles = @ws.new_files
res = block.call(:select_files_to_ignore, { files: newFiles, dirs: newDir } )
doneTriggered = false
sel = res.clone
if sel.include?(:done)
sel.delete_if { |e| e == :done }
doneTriggered = true
end
if not_empty?(sel)
st, rres = @ws.ignore(*sel)
if st
block.call(:files_ignored_successfully, { count: sel.length, output: rres })
else
block.call(:files_failed_to_be_ignored, { output: rres } )
end
else
block.call(:no_files_given)
end
break if doneTriggered
end
else
@ws.ignore(*files) if not_empty?(files)
end
end
|