Sha256: 579c459213fffc3b96ca8ab1b65b4472f35f68c25ddd2fc2ce2528047a27d5b5
Contents?: true
Size: 555 Bytes
Versions: 9
Compression:
Stored size: 555 Bytes
Contents
difficulty 2 description "Notice a few files with the '.a' extension. We want git to ignore all but the 'lib.a' file." setup do repo.init FileUtils.touch("first.a") FileUtils.touch("second.a") FileUtils.touch("lib.a") file = File.open(".git/config", "w") do |file| file.puts "[core]\nexcludesfile=" end end solution do entries = File.readlines('.gitignore').map(&:chomp) entries.include? '*.a' and entries.include? '!lib.a' end hint do puts "Using `git gitignore --help`, read about the optional prefix to negate a pattern." end
Version data entries
9 entries across 9 versions & 2 rubygems