Sha256: 1027b19f94c80114c570942e2d6c675c5df30972fcf1009d3f6617392c98f2bb
Contents?: true
Size: 1.02 KB
Versions: 5
Compression:
Stored size: 1.02 KB
Contents
# -*- encoding : utf-8 -*- 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 using 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") 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
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
mygithug-0.5.6 | levels/restructure.rb |
mygithug-0.5.5 | levels/restructure.rb |
mygithug-0.5.4 | levels/restructure.rb |
mygithug-0.5.3 | levels/restructure.rb |
mygithug-0.5.2 | levels/restructure.rb |