File: dont_check_whitespace_for_debian_dir.patch

package info (click to toggle)
ruby-rspec-rails 3.5.2-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,264 kB
  • ctags: 617
  • sloc: ruby: 6,627; sh: 334; makefile: 5
file content (18 lines) | stat: -rw-r--r-- 636 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Description: fix whitespace check
  - do not use git to list all the files
  - exclude files in the debian directory
Author: Cédric Boutillier <boutil@debian.org>
Last-Update: 2016-03-02
Forwarded: not-needed

--- a/spec/rspec/rails_spec.rb
+++ b/spec/rspec/rails_spec.rb
@@ -17,7 +17,7 @@
 
   it "has no malformed whitespace", :slow do
     error_messages = []
-    `git ls-files -z`.split("\x0").each do |filename|
+    Dir.glob("**/*").select { |f| !(f =~ /^debian/) && File.file?(f)}.each do |filename|
       error_messages << check_for_tab_characters(filename)
       error_messages << check_for_extra_spaces(filename)
     end