Sha256: 80f429034b9c92ba4d46abd1e6e79d02a64ca49656d68aa0b64e3bc2421869a4

Contents?: true

Size: 489 Bytes

Versions: 10

Compression:

Stored size: 489 Bytes

Contents

require 'fileutils'
module RocketFuel
  module Fix
    class FileSanitizerFix < AbstractFix
      def run
        self.class.files_to_remove.each do |path|
          if FileTest.exist?(path)
            FileUtils.rm_rf(path)
          end
        end
      end

      class << self
        def remove_file(file)
          @files_to_remove ||= []
          @files_to_remove << file
        end

        def files_to_remove
          @files_to_remove
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rocket_fuel-0.2.0 lib/rocket_fuel/fix/file_sanitizer_fix.rb
rocket_fuel-0.1.0 lib/rocket_fuel/fix/file_sanitizer_fix.rb
rocket_fuel-0.0.8 lib/rocket_fuel/fix/file_sanitizer_fix.rb
rocket_fuel-0.0.7 lib/rocket_fuel/fix/file_sanitizer_fix.rb
rocket_fuel-0.0.6 lib/rocket_fuel/fix/file_sanitizer_fix.rb
rocket_fuel-0.0.5 lib/rocket_fuel/fix/file_sanitizer_fix.rb
rocket_fuel-0.0.4 lib/rocket_fuel/fix/file_sanitizer_fix.rb
rocket_fuel-0.0.3 lib/rocket_fuel/fix/file_sanitizer_fix.rb
rocket_fuel-0.0.2 lib/rocket_fuel/fix/file_sanitizer_fix.rb
rocket_fuel-0.0.1 lib/rocket_fuel/fix/file_sanitizer_fix.rb