Skip to content

Commit

Permalink
added tag level
Browse files Browse the repository at this point in the history
  • Loading branch information
dtrodrigues committed Mar 18, 2012
1 parent 374349f commit 60f8396
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
source "http://rubygems.org"

# Specify your gem's dependencies in gitscrub.gemspec
# Specify your gem's dependencies in githug.gemspec
gemspec
18 changes: 18 additions & 0 deletions levels/tag.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
difficulty 2

description "We have a git repo and we want to tag the current commit with new_tag."

setup do
repo.init
FileUtils.touch("somefile.txt")
repo.add("somefile.txt")
repo.commit_all("Added some file to the repo")
end

solution do
repo.tags.first.name == "new_tag"
end

hint do
puts "Take a look at `git tag`"
end
2 changes: 1 addition & 1 deletion lib/githug/level.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Level

LEVELS = [nil, "init", "add", "commit", "config", "clone",
"clone_to_folder", "ignore", "status", "rm", "rm_cached", "rename",
"log", "commit_ammend", "reset", "checkout_file", "remote",
"log", "tag", "commit_ammend", "reset", "checkout_file", "remote",
"remote_url", "remote_add", "diff", "blame", "branch", "checkout",
"merge", "squash", "contribute"]

Expand Down

0 comments on commit 60f8396

Please sign in to comment.