Sha256: f951c44218d3e3517a4be9d3a901d7f1a117d14ebf7d5db5432a8043c90d9137
Contents?: true
Size: 1.02 KB
Versions: 1
Compression:
Stored size: 1.02 KB
Contents
difficulty 3 description "You added some files to your repository, but now realize that your project needs to be restructured. Make a new folder named `src` and use Git move all of the .html files into this folder." setup do repo.init FileUtils.touch("about.html") FileUtils.touch("contact.html") FileUtils.touch("index.html") repo.add("about.html") repo.add("contact.html") repo.add("index.html") system "git branch -m master" repo.commit_all("adding web content.") end solution do index = repo.status["index.html"].type == "D" && repo.status["index.html"].stage.nil? && repo.status["src/index.html"].type == "A" about = repo.status["about.html"].type == "D" && repo.status["about.html"].stage.nil? && repo.status["src/about.html"].type == "A" contact = repo.status["contact.html"].type == "D" && repo.status["contact.html"].stage.nil? && repo.status["src/contact.html"].type == "A" index && about && contact end hint do puts "You'll have to use mkdir, and `git mv`." end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
githug-0.5.1 | levels/restructure.rb |