Sha256: c63377d89e9a8acaede4c3002b2c441415ac53c792281e2a07aecdeaa20a1e9e

Contents?: true

Size: 531 Bytes

Versions: 22

Compression:

Stored size: 531 Bytes

Contents

difficulty 2
description "The text editor 'vim' creates files ending in .swp (swap files) for all files that are currently open.  We don't want them creeping into the repository.  Make this repository ignore .swp files."

setup do
  repo.init
end

solution do

  valid = false
 

  File.open(".gitignore", "r") do |file|
    while line = file.gets
      if line.chomp == "*.swp"
        valid = true
      end
    end
  end

  valid
end

hint do
  puts "You may have noticed there is a file named .gitignore in the repository"
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
githug-0.2.11 levels/ignore.rb
githug-0.2.10 levels/ignore.rb
githug-0.2.9 levels/ignore.rb
githug-0.2.8 levels/ignore.rb
githug-0.2.7 levels/ignore.rb
githug-0.2.6 levels/ignore.rb
githug-0.2.5 levels/ignore.rb
githug-0.2.4 levels/ignore.rb
githug-0.2.3 levels/ignore.rb
githug-0.2.2 levels/ignore.rb
githug-0.2.1 levels/ignore.rb
githug-0.2.0 levels/ignore.rb
githug-0.1.8 levels/ignore.rb
githug-0.1.7 levels/ignore.rb
githug-0.1.6 levels/ignore.rb
githug-0.1.5 levels/ignore.rb
githug-0.1.4 levels/ignore.rb
githug-0.1.3 levels/ignore.rb
githug-0.1.2 levels/ignore.rb
githug-0.1.1 levels/ignore.rb