Sha256: 0394e8f11cc3570a5f91eb00083d594a2bf3066c59ab95504dd980985dd281dc
Contents?: true
Size: 594 Bytes
Versions: 1
Compression:
Stored size: 594 Bytes
Contents
difficulty 2 description "Notice a few files with the '.a' extension. We want git to ignore all the files except the 'lib.a' file." setup do repo.init FileUtils.touch("first.a") FileUtils.touch("second.a") FileUtils.touch("lib.a") system "git branch -m master" 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 help ignore`, read about the optional prefix to negate a pattern." end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
githug-0.5.1 | levels/include.rb |