module SeleniumReporter::System::Folder
Public Instance Methods
prepare()
click to toggle source
# File lib/selenium-reporter/system/folder.rb, line 7 def prepare unless exists? create! else clean! end end
Private Instance Methods
clean!()
click to toggle source
# File lib/selenium-reporter/system/folder.rb, line 40 def clean! empty! create! end
create!()
click to toggle source
# File lib/selenium-reporter/system/folder.rb, line 25 def create! FileUtils.mkdir_p(ENV['SE_OUTPUT_DIR']) FileUtils.mkdir_p(ENV['SE_OUTPUT_DIR'] + '/screenshot') FileUtils.mkdir_p(ENV['SE_OUTPUT_DIR'] + '/xml') FileUtils.mkdir_p(ENV['SE_OUTPUT_DIR'] + '/report') end
empty!()
click to toggle source
# File lib/selenium-reporter/system/folder.rb, line 36 def empty! FileUtils.rm_rf Dir.glob("#{ENV['SE_OUTPUT_DIR']}/*") end
empty?()
click to toggle source
# File lib/selenium-reporter/system/folder.rb, line 32 def empty? Dir.glob("#{ENV['SE_OUTPUT_DIR']}/*").empty? end
exist?()
click to toggle source
# File lib/selenium-reporter/system/folder.rb, line 17 def exist? File.directory?(ENV['SE_OUTPUT_DIR']) end
exists?()
click to toggle source
# File lib/selenium-reporter/system/folder.rb, line 21 def exists? !Dir.glob(ENV['SE_OUTPUT_DIR'] + '/*').empty? end