Sha256: 8ea5b2df3aa816bd3117afa83ce718b42bdc4ede0b460932f5d4b0c2eb9b1ba4

Contents?: true

Size: 265 Bytes

Versions: 4

Compression:

Stored size: 265 Bytes

Contents

module Git
  module Conform
    class FileNotEmptyChecker < FileChecker

      @file_exclusion_patterns << '*/.gitkeep'
      # .gitkeep is (by convention) an empty file

      def conforms?
        super && !File.size?(@filename).nil?
      end

    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
git-conform-1.3.0 lib/git/conform/checkers/file_not_empty_checker.rb
git-conform-1.2.1 lib/git/conform/checkers/file_not_empty_checker.rb
git-conform-1.1.0 lib/git/conform/checkers/file_not_empty_checker.rb
git-conform-1.0.0 lib/git/conform/checkers/file_not_empty_checker.rb