githug 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +5 -5
  2. data/.travis.yml +7 -7
  3. data/Dockerfile +59 -0
  4. data/README.md +42 -2
  5. data/githug.gemspec +1 -2
  6. data/levels/add.rb +3 -2
  7. data/levels/bisect.rb +2 -1
  8. data/levels/blame.rb +3 -2
  9. data/levels/branch.rb +2 -1
  10. data/levels/branch_at.rb +3 -2
  11. data/levels/checkout.rb +2 -1
  12. data/levels/checkout_file.rb +2 -1
  13. data/levels/checkout_tag.rb +2 -0
  14. data/levels/checkout_tag_over_branch.rb +1 -0
  15. data/levels/cherry-pick.rb +4 -3
  16. data/levels/clone_to_folder.rb +1 -1
  17. data/levels/commit.rb +1 -0
  18. data/levels/commit_amend.rb +2 -1
  19. data/levels/commit_in_future.rb +2 -1
  20. data/levels/config.rb +2 -2
  21. data/levels/conflict.rb +1 -0
  22. data/levels/contribute.rb +1 -1
  23. data/levels/delete_branch.rb +3 -2
  24. data/levels/diff.rb +3 -2
  25. data/levels/fetch.rb +13 -13
  26. data/levels/find_old_branch.rb +2 -1
  27. data/levels/grep.rb +1 -0
  28. data/levels/ignore.rb +2 -1
  29. data/levels/include.rb +3 -2
  30. data/levels/init.rb +1 -1
  31. data/levels/log.rb +3 -2
  32. data/levels/merge.rb +4 -3
  33. data/levels/merge_squash.rb +1 -0
  34. data/levels/number_of_files_committed.rb +10 -9
  35. data/levels/pull.rb +1 -0
  36. data/levels/push.rb +3 -1
  37. data/levels/push_branch.rb +12 -11
  38. data/levels/push_tags.rb +2 -1
  39. data/levels/rebase.rb +1 -0
  40. data/levels/rebase_onto.rb +1 -0
  41. data/levels/remote.rb +3 -2
  42. data/levels/remote_add.rb +1 -0
  43. data/levels/remote_url.rb +2 -1
  44. data/levels/rename.rb +1 -0
  45. data/levels/rename_commit.rb +2 -1
  46. data/levels/reorder.rb +1 -0
  47. data/levels/repack.rb +1 -0
  48. data/levels/reset.rb +2 -1
  49. data/levels/reset_soft.rb +1 -0
  50. data/levels/restore.rb +3 -2
  51. data/levels/restructure.rb +3 -1
  52. data/levels/revert.rb +2 -2
  53. data/levels/rm.rb +6 -3
  54. data/levels/rm_cached.rb +3 -2
  55. data/levels/squash.rb +2 -1
  56. data/levels/stage_lines.rb +2 -1
  57. data/levels/stash.rb +2 -1
  58. data/levels/status.rb +2 -1
  59. data/levels/submodule.rb +10 -9
  60. data/levels/tag.rb +1 -0
  61. data/lib/githug/cli.rb +3 -3
  62. data/lib/githug/version.rb +1 -1
  63. data/lib/githug.rb +1 -0
  64. metadata +5 -4
@@ -1,37 +1,38 @@
1
1
  difficulty 1
2
- description "There are some files in this repository, how many of the files will be committed?"
2
+ description "There are some files in this repository; how many of them are staged for a commit?"
3
3
 
4
4
  setup do
5
5
  repo.init
6
6
 
7
- #Modified files
7
+ # Modified files
8
8
  %w{rubyfile4.rb rubyfile5.rb}.each do |file|
9
9
  FileUtils.touch(file)
10
10
  repo.add(file)
11
+ system "git branch -m master"
11
12
  end
12
13
  repo.commit_all "Commit"
13
14
 
14
- #Staged file
15
+ # Staged file
15
16
  File.open("rubyfile4.rb", 'w') { |f| f << "#Changes" }
16
17
  repo.add("rubyfile4.rb")
17
18
 
18
- #Not staged file
19
+ # Not staged file
19
20
  File.open("rubyfile5.rb", 'w') { |f| f << "#Changes" }
20
21
 
21
- #Changes to be committed
22
+ # Changes to be committed
22
23
  %w{rubyfile1.rb}.each do |file|
23
24
  FileUtils.touch(file)
24
25
  repo.add(file)
25
- end
26
+ end
26
27
 
27
- #Untrached files
28
+ # Untracked files
28
29
  %w{rubyfile6.rb rubyfile7.rb}.each do |file|
29
30
  FileUtils.touch(file)
30
31
  end
31
32
  end
32
33
 
33
34
  solution do
34
- numberOfFilesThereWillBeCommit = request("How many changes are going to be committed?")
35
+ numberOfFilesThereWillBeCommit = request("How many files are going to be committed?")
35
36
 
36
37
  isInteger = !!(numberOfFilesThereWillBeCommit =~ /^[-+]?[0-9]+$/)
37
38
 
@@ -47,5 +48,5 @@ solution do
47
48
  end
48
49
 
49
50
  hint do
50
- puts "You are looking for a command to identify the status of the repository."
51
+ puts "You are looking for a command to identify the status of the repository (resembles a Linux command)."
51
52
  end
data/levels/pull.rb CHANGED
@@ -5,6 +5,7 @@ description "You need to pull changes from your origin repository."
5
5
  setup do
6
6
  repo.init
7
7
  repo.remote_add("origin", "https://github.com/pull-this/thing-to-pull")
8
+ system "git branch -m master"
8
9
  end
9
10
 
10
11
  solution do
data/levels/push.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  difficulty 3
2
2
  description "Your local master branch has diverged from " +
3
- "the remote origin/master branch. Rebase your commit onto " +
3
+ "the remote origin/master branch. Rebase your branch onto " +
4
4
  "origin/master and push it to remote."
5
5
 
6
6
  setup do
@@ -28,6 +28,7 @@ setup do
28
28
  FileUtils.touch "file3"
29
29
  repo.add "file3"
30
30
  repo.commit_all "Third commit"
31
+ system "git branch -m master"
31
32
 
32
33
  # remote repo
33
34
  Dir.chdir tmpdir
@@ -39,6 +40,7 @@ setup do
39
40
  FileUtils.touch "file4"
40
41
  repo.add "file4"
41
42
  repo.commit_all "Fourth commit"
43
+ system "git branch -m master" # tentative addition
42
44
 
43
45
  # change back to original repo to set up a remote
44
46
  Dir.chdir cwd
@@ -1,5 +1,5 @@
1
1
  difficulty 2
2
- description "You've made some changes to a local branch and want to share it, but aren't yet ready to merge it with the 'master' branch. Push only 'test_branch' to the remote repository"
2
+ description "You've made some changes to a local branch and want to share it, but aren't yet ready to merge it with the 'master' branch. Push only 'test_branch' to the remote repository"
3
3
 
4
4
  setup do
5
5
 
@@ -14,16 +14,17 @@ setup do
14
14
  FileUtils.touch "file1"
15
15
  repo.add "file1"
16
16
  repo.commit_all "committed changes on master"
17
+ system "git branch -m master"
17
18
 
18
19
  # copy the repo to remote
19
20
  FileUtils.cp_r ".", tmpdir
20
21
 
21
- # add another file. If successful this file won't be pushed to the remote repository
22
+ # add another file. If successful this file won't be pushed to the remote repository
22
23
  FileUtils.touch "file2"
23
24
  repo.add "file2"
24
25
  repo.commit_all "If this commit gets pushed to repo, then you have lost the level :( "
25
26
 
26
- #This branch should not be pushed to to the remote repository
27
+ # This branch should not be pushed to to the remote repository
27
28
  `git checkout -b other_branch --quiet`
28
29
  # add another file
29
30
  FileUtils.touch "file3"
@@ -32,7 +33,7 @@ setup do
32
33
 
33
34
  `git checkout -b test_branch --quiet`
34
35
 
35
- #This file should get pushed if the level is successful
36
+ # This file should get pushed if the level is successful
36
37
  FileUtils.touch "file4"
37
38
  repo.add "file4"
38
39
  repo.commit_all "committed change on test_branch"
@@ -51,30 +52,30 @@ setup do
51
52
  `git fetch --quiet origin`
52
53
  `git branch -u origin/master master 2> /dev/null`
53
54
 
54
- `git checkout master --quiet` #return to master branch
55
+ `git checkout master --quiet` # return to master branch
55
56
  end
56
57
 
57
58
  solution do
58
59
  repo.init
59
60
  result = false
60
61
 
61
- #each branch consits of one line, `wc -l counts the number of lines in order to get the number of remote branches`
62
- #At the moment Grit doesn't support remote branch references but is on the ToDo list. This should be revisited when Grit implements the change
62
+ # each branch consists of one line, `wc -l` counts the number of lines in order to get the number of remote branches
63
+ # At the moment Grit doesn't support remote branch references but is on the ToDo list. This should be revisited when Grit implements the change
63
64
  num_remote_branches = `git branch -r`.split("\n").count
64
65
 
65
66
  # counts the number of commits in the remote master branch'
66
67
  remote_master_commits = repo.commits('origin/master').count
67
- remote_test_branch_commits = repo.commits('origin/test_branch').count #if returns 0 indicates that the remote test_branch doesn't exist
68
+ remote_test_branch_commits = repo.commits('origin/test_branch').count # if returns 0 indicates that the remote test_branch doesn't exist
68
69
 
69
- #Level will be successful if the remote master branch remains at 1 commit, the remote test_branch exits and the number of remote branches
70
+ # Level will be successful if the remote master branch remains at 1 commit, the remote test_branch and only 2 remote branches exists
70
71
  if remote_master_commits == 1 and remote_test_branch_commits > 0 and num_remote_branches == 2
71
72
  result = true
72
73
 
73
- #User pushed up too many branches, level failed
74
+ # User pushed up too many branches, level failed
74
75
  elsif num_remote_branches > 2
75
76
  puts "*** It looks like you pushed up too many branches. You need to make sure only 'test_branch' gets pushed. Please try again! ***"
76
77
 
77
- #User pushed up the master banch, level failed
78
+ # User pushed up the master branch, level failed
78
79
  elsif remote_master_commits > 1
79
80
  puts "*** It looks like you pushed up new master branch changes. You need to make sure only 'test_branch' gets pushed. Please try again! ***"
80
81
  end
data/levels/push_tags.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  difficulty 2
2
- description "There are tags in the repository that aren't pushed into remote repository. Push them now."
2
+ description "A tag in the local repository isn't pushed into remote repository. Push it now."
3
3
 
4
4
  setup do
5
5
  # remember the working directory so we can come back to it later
@@ -14,6 +14,7 @@ setup do
14
14
  repo.add "file1"
15
15
  repo.commit_all "First commit"
16
16
  repo.git.tag({'f' => true}, "tag_to_be_pushed")
17
+ system "git branch -m master"
17
18
 
18
19
  FileUtils.touch "file2"
19
20
  repo.add "file2"
data/levels/rebase.rb CHANGED
@@ -4,6 +4,7 @@ description "We are using a git rebase workflow and the feature branch is ready
4
4
 
5
5
  setup do
6
6
  init_from_level
7
+ system "git branch -m master"
7
8
  end
8
9
 
9
10
  solution do
@@ -13,6 +13,7 @@ setup do
13
13
  File.open(authors_file, "w") { |f| f << "https://github.com/janis-vitols\n" }
14
14
  repo.add(authors_file)
15
15
  repo.commit_all("Create authors file")
16
+ system "git branch -m master"
16
17
 
17
18
  repo.git.native :checkout, { "b" => true }, "wrong_branch"
18
19
  File.open(authors_file, "w") { |f| f << "None\n" }
data/levels/remote.rb CHANGED
@@ -1,10 +1,11 @@
1
1
  difficulty 2
2
2
 
3
- description "This project has a remote repository. Identify it."
3
+ description "This project has a remote repository. Identify it."
4
4
 
5
5
  setup do
6
6
  repo.init
7
7
  repo.remote_add("my_remote_repo", "https://github.com/Gazler/githug")
8
+ system "git branch -m master"
8
9
  end
9
10
 
10
11
  solution do
@@ -12,5 +13,5 @@ solution do
12
13
  end
13
14
 
14
15
  hint do
15
- puts "You are looking for a remote. You can run `git` for a list of commands."
16
+ puts "You are looking for a remote. You can run `git` for a list of commands."
16
17
  end
data/levels/remote_add.rb CHANGED
@@ -4,6 +4,7 @@ description "Add a remote repository called `origin` with the url https://github
4
4
 
5
5
  setup do
6
6
  repo.init
7
+ system "git branch -m master"
7
8
  end
8
9
 
9
10
  solution do
data/levels/remote_url.rb CHANGED
@@ -1,11 +1,12 @@
1
1
  difficulty 2
2
2
 
3
- description "The remote repositories have a url associated to them. Please enter the url of remote_location."
3
+ description "The remote repositories have a url associated to them. Please enter the url of remote_location."
4
4
 
5
5
  setup do
6
6
  repo.init
7
7
  repo.remote_add("my_remote_repo", "https://github.com/Gazler/githug")
8
8
  repo.remote_add("remote_location", "https://github.com/githug/not_a_repo")
9
+ system "git branch -m master"
9
10
  end
10
11
 
11
12
  solution do
data/levels/rename.rb CHANGED
@@ -7,6 +7,7 @@ setup do
7
7
  FileUtils.touch("oldfile.txt")
8
8
  repo.add("oldfile.txt")
9
9
  repo.commit_all("Commited oldfile.txt")
10
+ system "git branch -m master"
10
11
  end
11
12
 
12
13
  solution do
@@ -6,6 +6,7 @@ setup do
6
6
  FileUtils.touch "README"
7
7
  repo.add "README"
8
8
  repo.commit_all "Initial commit"
9
+ system "git branch -m master"
9
10
 
10
11
  FileUtils.touch "file1"
11
12
  repo.add "file1"
@@ -17,7 +18,7 @@ setup do
17
18
  end
18
19
 
19
20
  solution do
20
- repo.commits[1].message == "First commit"
21
+ repo.commits.first.parents[0].message == "First commit"
21
22
  end
22
23
 
23
24
  hint do
data/levels/reorder.rb CHANGED
@@ -7,6 +7,7 @@ setup do
7
7
  FileUtils.touch "README"
8
8
  repo.add "README"
9
9
  repo.commit_all "Initial Setup"
10
+ system "git branch -m master"
10
11
 
11
12
  FileUtils.touch "file1"
12
13
  repo.add "file1"
data/levels/repack.rb CHANGED
@@ -6,6 +6,7 @@ setup do
6
6
  FileUtils.touch("foo")
7
7
  repo.add("foo")
8
8
  repo.commit_all("Added foo")
9
+ system "git branch -m master"
9
10
  end
10
11
 
11
12
  solution do
data/levels/reset.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  difficulty 2
2
- description "There are two files to be committed. The goal was to add each file as a separate commit, however both were added by accident. Unstage the file `to_commit_second.rb` using the reset command (don't commit anything)."
2
+ description "There are two files to be committed. The goal was to add each file as a separate commit, however both were added by accident. Unstage the file `to_commit_second.rb` using the reset command (don't commit anything)."
3
3
 
4
4
  setup do
5
5
  repo.init
@@ -9,6 +9,7 @@ setup do
9
9
  FileUtils.touch("to_commit_first.rb")
10
10
  FileUtils.touch("to_commit_second.rb")
11
11
  repo.add(".")
12
+ system "git branch -m master"
12
13
  end
13
14
 
14
15
  solution do
data/levels/reset_soft.rb CHANGED
@@ -9,6 +9,7 @@ setup do
9
9
  FileUtils.touch("newfile.rb")
10
10
  repo.add("newfile.rb")
11
11
  repo.commit_all("Premature commit")
12
+ system "git branch -m master"
12
13
  end
13
14
 
14
15
  solution do
data/levels/restore.rb CHANGED
@@ -1,11 +1,12 @@
1
1
  difficulty 4
2
- description "You decided to delete your latest commit by running `git reset --hard HEAD^`. (Not a smart thing to do.) You then change your mind, and want that commit back. Restore the deleted commit."
2
+ description "You decided to delete your latest commit by running `git reset --hard HEAD^` (not a smart thing to do). Now you changed your mind and want that commit back. Restore the deleted commit."
3
3
 
4
4
  setup do
5
5
  repo.init
6
6
  FileUtils.touch 'file1'
7
7
  repo.add 'file1'
8
8
  repo.commit_all 'Initial commit'
9
+ system "git branch -m master"
9
10
 
10
11
  FileUtils.touch 'file2'
11
12
  repo.add 'file2'
@@ -24,5 +25,5 @@ solution do
24
25
  end
25
26
 
26
27
  hint do
27
- puts "The commit is still floating around somewhere. Have you checked out `git reflog`?"
28
+ puts "The commit is still floating around somewhere. Have you checked out `git reflog`?"
28
29
  end
@@ -1,6 +1,6 @@
1
1
  difficulty 3
2
2
 
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."
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."
4
4
 
5
5
  setup do
6
6
  repo.init
@@ -13,6 +13,8 @@ setup do
13
13
  repo.add("contact.html")
14
14
  repo.add("index.html")
15
15
 
16
+ system "git branch -m master"
17
+
16
18
  repo.commit_all("adding web content.")
17
19
  end
18
20
 
data/levels/revert.rb CHANGED
@@ -1,6 +1,5 @@
1
1
  difficulty 4
2
- description "You have committed several times but want to undo the middle commit.
3
- All commits have been pushed, so you can't change existing history."
2
+ description "You have committed several times but want to undo the middle commit. All commits have been pushed, so you can't change existing history."
4
3
 
5
4
  setup do
6
5
  repo.init
@@ -8,6 +7,7 @@ setup do
8
7
  FileUtils.touch "file1"
9
8
  repo.add "file1"
10
9
  repo.commit_all "First commit"
10
+ system "git branch -m master"
11
11
 
12
12
  FileUtils.touch "file3"
13
13
  repo.add "file3"
data/levels/rm.rb CHANGED
@@ -1,11 +1,12 @@
1
1
  difficulty 2
2
2
 
3
- description "A file has been removed from the working tree, however the file was not removed from the repository. Find out what this file was and remove it."
3
+ description "A file has been removed from the working tree, but not from the repository. Identify this file and remove it."
4
4
 
5
5
  setup do
6
6
  repo.init
7
7
  file = File.new("deleteme.rb", "w")
8
- file.close
8
+ file.close
9
+ system "git branch -m master"
9
10
  repo.add("deleteme.rb")
10
11
  repo.commit_all("Added a temp file")
11
12
  File.delete("deleteme.rb")
@@ -16,5 +17,7 @@ solution do
16
17
  end
17
18
 
18
19
  hint do
19
- puts "You may need to use more than one command to complete this. You have checked your staging area in a previous level. Don't forget to run `git` for a list of commands."
20
+ puts ["You may need to use more than one command to complete this.",
21
+ "You have checked your staging area in a previous level.",
22
+ "Don't forget to run `git` for a list of commands."]
20
23
  end
data/levels/rm_cached.rb CHANGED
@@ -1,10 +1,11 @@
1
1
  difficulty 2
2
2
 
3
- description "A file has accidentally been added to your staging area, find out which file and remove it from the staging area. *NOTE* Do not remove the file from the file system, only from git."
3
+ description "A file has accidentally been added to your staging area. Identify and remove it from the staging area. *NOTE* Do not remove the file from the file system, only from git."
4
4
 
5
5
  setup do
6
6
  repo.init
7
7
  FileUtils.touch("deleteme.rb")
8
+ system "git branch -m master"
8
9
  repo.add(".gitignore")
9
10
  repo.add("deleteme.rb")
10
11
  end
@@ -14,5 +15,5 @@ solution do
14
15
  end
15
16
 
16
17
  hint do
17
- puts "You may need to use more than one command to complete this. You have checked your staging area in a previous level. Don't forget to run `git` for a list of commands."
18
+ puts "You may need to use more than one command to complete this. You have checked your staging area in a previous level. Don't forget to run `git` for a list of commands."
18
19
  end
data/levels/squash.rb CHANGED
@@ -6,6 +6,7 @@ setup do
6
6
  FileUtils.touch(".hidden")
7
7
  repo.add(".hidden")
8
8
  repo.commit_all("Initial Commit")
9
+ system "git branch -m master"
9
10
  FileUtils.touch("README")
10
11
  repo.add("README")
11
12
  repo.commit_all("Adding README")
@@ -25,5 +26,5 @@ solution do
25
26
  end
26
27
 
27
28
  hint do
28
- puts "Take a look the `-i` flag of the rebase command."
29
+ puts "Take a look at the `-i` flag of the rebase command."
29
30
  end
@@ -7,6 +7,7 @@ setup do
7
7
  File.open("feature.rb", "w") do |file|
8
8
  file.puts("this is the class of my feature")
9
9
  end
10
+ system "git branch -m master"
10
11
 
11
12
  repo.add("feature.rb")
12
13
  repo.commit_all("Added initial feature file")
@@ -25,5 +26,5 @@ solution do
25
26
  end
26
27
 
27
28
  hint do
28
- puts "You might want to try to manipulate the hunks of the diff to choose which lines of the diff get staged. Read about the flags which can be passed to the `add` command; `man git-add`."
29
+ puts "You might want to try to manipulate the hunks of the diff to choose which lines of the diff get staged. Read about the flags which can be passed to the `add` command; `git --help add`."
29
30
  end
data/levels/stash.rb CHANGED
@@ -3,6 +3,7 @@ description "You've made some changes and want to work on them later. You should
3
3
 
4
4
  setup do
5
5
  init_from_level
6
+ system "git branch -m master"
6
7
  end
7
8
 
8
9
  solution do
@@ -12,5 +13,5 @@ solution do
12
13
  end
13
14
 
14
15
  hint do
15
- puts "It's like stashing. Try finding appropriate git command."
16
+ puts "It's like stashing. Try finding an appropriate git command."
16
17
  end
data/levels/status.rb CHANGED
@@ -1,10 +1,11 @@
1
1
  difficulty 1
2
- description "There are some files in this repository, one of the files is untracked, which file is it?"
2
+ description "Among the files in this repository, which of them is untracked?"
3
3
 
4
4
  setup do
5
5
  repo.init
6
6
  %w{config.rb README setup.rb deploy.rb Guardfile}.each do |file|
7
7
  FileUtils.touch(file)
8
+ system "git branch -m master"
8
9
  repo.add(file)
9
10
  end
10
11
  FileUtils.touch("database.yml")
data/levels/submodule.rb CHANGED
@@ -1,20 +1,21 @@
1
1
  difficulty 2
2
- description "You want to include the files from the following repo: `https://github.com/jackmaney/githug-include-me` into a the folder `./githug-include-me`. Do this without manually cloning the repo or copying the files from the repo into this repo."
2
+ description "You want to include the files from the following repo: `https://github.com/jackmaney/githug-include-me` into the folder `./githug-include-me`. Do this without manually cloning the repo or copying the files from the repo into this repo."
3
3
 
4
4
  setup do
5
- repo.init
5
+ repo.init
6
+ system "git branch -m master"
6
7
  end
7
8
 
8
9
  solution do
9
- return false if not File.directory?("./githug-include-me")
10
- return false if not File.exist?("./githug-include-me/README.md")
11
- return false if not File.exist?("./githug-include-me/.git")
12
- return false if File.directory?("./githug-include-me/.git")
13
- return false if not File.exist?(".gitmodules")
10
+ return false if not File.directory?("./githug-include-me")
11
+ return false if not File.exist?("./githug-include-me/README.md")
12
+ return false if not File.exist?("./githug-include-me/.git")
13
+ return false if File.directory?("./githug-include-me/.git")
14
+ return false if not File.exist?(".gitmodules")
14
15
 
15
- return true
16
+ return true
16
17
  end
17
18
 
18
19
  hint do
19
- puts "Take a look at `git submodule`."
20
+ puts "Take a look at `git submodule`."
20
21
  end
data/levels/tag.rb CHANGED
@@ -7,6 +7,7 @@ setup do
7
7
  FileUtils.touch("somefile.txt")
8
8
  repo.add("somefile.txt")
9
9
  repo.commit_all("Added some file to the repo")
10
+ system "git branch -m master"
10
11
  end
11
12
 
12
13
  solution do
data/lib/githug/cli.rb CHANGED
@@ -32,15 +32,15 @@ module Githug
32
32
  end
33
33
  end
34
34
 
35
- desc :reset, "Reset the current level"
35
+ desc :reset, "Reset the current level or select specific level"
36
36
  long_desc <<-LONGDESC
37
37
  `githug reset` will reset the current level. You can optionally specify a
38
38
  LEVEL parameter which will reset the game to a specific level. For
39
39
  example:
40
40
 
41
- > $ githug reset merge_squash # or $ githug reset 45
41
+ > $ githug reset merge_squash # or $ githug reset 47
42
42
 
43
- Will reset githug to level '#45: merge_squash'
43
+ Will reset githug to level '#47: merge_squash'
44
44
  LONGDESC
45
45
  def reset(path = nil)
46
46
  level = load_level(path)
@@ -1,3 +1,3 @@
1
1
  module Githug
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
data/lib/githug.rb CHANGED
@@ -13,3 +13,4 @@ require 'githug/repository'
13
13
 
14
14
  Githug::UI.in_stream = STDIN
15
15
  Githug::UI.out_stream = STDOUT
16
+ STDIN.sync = true
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: githug
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gary Rennie
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-13 00:00:00.000000000 Z
11
+ date: 2024-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -68,7 +68,7 @@ dependencies:
68
68
  version: '11'
69
69
  description: An interactive way to learn git.
70
70
  email:
71
- - webmaster@gazler.com
71
+ - gazler@gmail.com
72
72
  executables:
73
73
  - githug
74
74
  extensions: []
@@ -77,6 +77,7 @@ files:
77
77
  - ".gitignore"
78
78
  - ".rspec"
79
79
  - ".travis.yml"
80
+ - Dockerfile
80
81
  - Gemfile
81
82
  - LICENCE.txt
82
83
  - README.md
@@ -505,7 +506,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
505
506
  version: '0'
506
507
  requirements: []
507
508
  rubyforge_project: githug
508
- rubygems_version: 2.1.11
509
+ rubygems_version: 2.7.6
509
510
  signing_key:
510
511
  specification_version: 4
511
512
  summary: An interactive way to learn git.