lib/jets/builders/tidy.rb in jets-1.2.1 vs lib/jets/builders/tidy.rb in jets-1.3.0

- old
+ new

@@ -46,13 +46,13 @@ keep = IO.readlines(path) keep = keep.map {|i| i.strip}.reject { |i| i =~ /^#/ || i.empty? } (defaults + keep).uniq end - # folders to remove in the bundled folder regardless of the level of the folder + # folders to remove in the vendor/bundle folder regardless of the level of the folder def tidy_bundled - Dir.glob("#{@project_root}/bundled/**/*").each do |path| + Dir.glob("#{@project_root}/vendor/bundle/**/*").each do |path| next unless File.directory?(path) dir = File.basename(path) next unless always_removals.include?(dir) rm_rf(path) @@ -63,10 +63,11 @@ # Reason do not remove the cache folder generally is because some gems have # actual cache folders that they used. def remove_gem_cache ruby_minor_version = Jets::RUBY_VERSION.split('.')[0..1].join('.') + '.0' - FileUtils.rm_rf("#{@project_root}/bundled/gems/ruby/#{ruby_minor_version}/cache") + cache_path = "#{@project_root}/vendor/bundle/ruby/#{ruby_minor_version}/cache" + FileUtils.rm_rf(cache_path) end def rm_rf(path) exists = File.exist?("#{path}/.gitkeep") || File.exist?("#{path}/.keep") return if exists \ No newline at end of file