Sha256: 673b9270f6149d232a41cf08ad66e294759d47349dc9b9a5a1d0554289f8e5e0
Contents?: true
Size: 490 Bytes
Versions: 5
Compression:
Stored size: 490 Bytes
Contents
# encoding: utf-8 require 'bad_encodings' desc "find all bad encodïngs in app" task 'find_bad_encodings' => :environment do raise ArgumentError, "Requires Ruby 1.9" unless RUBY_VERSION > '1.9' dir = RAILS_ROOT bad_lines = BadEncodings.find_in_path(dir) unless bad_lines.empty? puts 'The following bad encodings were found:' bad_lines.each do |line| puts "[%s:%d]" % [line[0].sub(dir,'RAILS_ROOT'), line[1]] end else puts 'No bad encodings found' end end
Version data entries
5 entries across 5 versions & 2 rubygems