githug 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/levels/add.rb +3 -3
- data/levels/bisect.rb +2 -2
- data/levels/blame.rb +2 -2
- data/levels/branch.rb +2 -2
- data/levels/branch_at.rb +2 -2
- data/levels/checkout.rb +2 -2
- data/levels/checkout_tag.rb +2 -2
- data/levels/checkout_tag_over_branch.rb +2 -2
- data/levels/cherry-pick.rb +2 -2
- data/levels/clone.rb +2 -2
- data/levels/clone_to_folder.rb +2 -2
- data/levels/commit.rb +1 -1
- data/levels/commit_amend.rb +1 -1
- data/levels/config.rb +8 -3
- data/levels/conflict.rb +4 -4
- data/levels/conflict/.githug/COMMIT_EDITMSG +13 -2
- data/levels/conflict/.githug/index +0 -0
- data/levels/conflict/.githug/logs/HEAD +6 -0
- data/levels/conflict/.githug/logs/refs/heads/master +2 -0
- data/levels/conflict/.githug/logs/refs/heads/mybranch +2 -0
- data/levels/conflict/.githug/objects/1d/b9aa5013e47f1482ec90323d926171a99c28af +0 -0
- data/levels/conflict/.githug/objects/30/cc28e66966109bb5bfbe96d6c817c367d2050a +0 -0
- data/levels/conflict/.githug/objects/3c/b65bef44ae724ddf9e89640e7e2754dea1a47f +0 -0
- data/levels/conflict/.githug/objects/3d/7aec017559be2b61cab850dafdcb2b6212f1c3 +1 -0
- data/levels/conflict/.githug/objects/55/ad5af2a93afa778971e3d04faf20f6c368b6ba +0 -0
- data/levels/conflict/.githug/objects/bd/c7bec8acae9b3eabf0a15b223a48211b7a89a1 +2 -0
- data/levels/conflict/.githug/objects/c7/97f979cf24ba148bf10d5e26f5d7402dd5f2e1 +0 -0
- data/levels/conflict/.githug/objects/da/ae380200ed6eeaafd926177018e8ff3009b988 +0 -0
- data/levels/conflict/.githug/refs/heads/master +1 -1
- data/levels/conflict/.githug/refs/heads/mybranch +1 -1
- data/levels/conflict/poem.txt +1 -1
- data/levels/diff.rb +1 -1
- data/levels/find_old_branch.rb +1 -1
- data/levels/ignore.rb +2 -2
- data/levels/init.rb +2 -2
- data/levels/merge.rb +2 -2
- data/levels/merge_squash.rb +1 -1
- data/levels/push.rb +1 -1
- data/levels/push_tags.rb +1 -1
- data/levels/remote.rb +1 -1
- data/levels/remote_add.rb +2 -2
- data/levels/remote_url.rb +2 -2
- data/levels/rename.rb +2 -2
- data/levels/rename_commit.rb +1 -1
- data/levels/reorder.rb +2 -2
- data/levels/repack.rb +2 -2
- data/levels/reset.rb +2 -2
- data/levels/reset_soft.rb +1 -1
- data/levels/squash.rb +2 -2
- data/levels/stage_lines.rb +1 -1
- data/levels/stash.rb +2 -2
- data/levels/tag.rb +2 -2
- data/lib/githug/game.rb +3 -3
- data/lib/githug/level.rb +1 -1
- data/lib/githug/version.rb +1 -1
- data/spec/githug/game_spec.rb +3 -3
- data/spec/githug_spec.rb +1 -1
- metadata +11 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5dce13542ce027da803b93c704387da3fcfb830f
|
4
|
+
data.tar.gz: 7d30594b86429ca28b6f8198d48a7877eb5f0fa2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3623c1b9027ff1b5fcf49f378d76d6e44b945965596c24bc51b20ed9f55736be7f12b497862ddf590ec7c7658e4488eb804df28cf0f3d2e5fa02de92fb77731e
|
7
|
+
data.tar.gz: 1f3e59721590922b63eb375eb8c37ebce41a1c9f1e4ea7f9e0143f1cab7bc982b60a9de77f397eaec61d49ee6210cd9e97eff4d9fb53e76acd424c9c8301ffee
|
data/levels/add.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
difficulty 1
|
2
|
-
description "There is a file in your folder called README
|
3
|
-
Note: You start each level with a new repo. Don't look for files from the previous one"
|
2
|
+
description "There is a file in your folder called `README`, you should add it to your staging area
|
3
|
+
Note: You start each level with a new repo. Don't look for files from the previous one."
|
4
4
|
|
5
5
|
setup do
|
6
6
|
repo.init
|
@@ -14,5 +14,5 @@ solution do
|
|
14
14
|
end
|
15
15
|
|
16
16
|
hint do
|
17
|
-
puts "You can type `git` in your shell to get a list of available git commands"
|
17
|
+
puts "You can type `git` in your shell to get a list of available git commands."
|
18
18
|
end
|
data/levels/bisect.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
difficulty 3
|
2
|
-
description "A bug was introduced somewhere along the way. You know that running
|
2
|
+
description "A bug was introduced somewhere along the way. You know that running `ruby prog.rb 5` should output 15. You can also run `make test`. What are the first 7 chars of the hash of the commit that introduced the bug."
|
3
3
|
|
4
4
|
setup do
|
5
5
|
init_from_level
|
@@ -11,5 +11,5 @@ solution do
|
|
11
11
|
end
|
12
12
|
|
13
13
|
hint do
|
14
|
-
puts ["The fastest way to find the bug is with bisect.", "Don't forget to start bisect first, identify a good or bad commit, then run git bisect run make test
|
14
|
+
puts ["The fastest way to find the bug is with bisect.", "Don't forget to start bisect first, identify a good or bad commit, then run `git bisect run make test`."]
|
15
15
|
end
|
data/levels/blame.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
difficulty 2
|
2
|
-
description "Someone has put a password inside the file
|
2
|
+
description "Someone has put a password inside the file `config.rb` find out who it was."
|
3
3
|
|
4
4
|
setup do
|
5
5
|
init_from_level
|
@@ -11,5 +11,5 @@ solution do
|
|
11
11
|
end
|
12
12
|
|
13
13
|
hint do
|
14
|
-
puts "You want to research the `git blame` command"
|
14
|
+
puts "You want to research the `git blame` command."
|
15
15
|
end
|
data/levels/branch.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
difficulty 1
|
2
|
-
description "You want to work on a piece of code that has the potential to break things, create the branch test_code"
|
2
|
+
description "You want to work on a piece of code that has the potential to break things, create the branch test_code."
|
3
3
|
|
4
4
|
setup do
|
5
5
|
repo.init
|
@@ -13,6 +13,6 @@ solution do
|
|
13
13
|
end
|
14
14
|
|
15
15
|
hint do
|
16
|
-
puts "git branch is what you want to investigate"
|
16
|
+
puts "`git branch` is what you want to investigate."
|
17
17
|
end
|
18
18
|
|
data/levels/branch_at.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
difficulty 3
|
2
|
-
description "You forgot to branch at the previous commit and made a commit on top of it. Create branch
|
2
|
+
description "You forgot to branch at the previous commit and made a commit on top of it. Create branch test_branch at the commit before the last."
|
3
3
|
|
4
4
|
setup do
|
5
5
|
repo.init
|
@@ -21,5 +21,5 @@ solution do
|
|
21
21
|
end
|
22
22
|
|
23
23
|
hint do
|
24
|
-
puts "Just like creating a branch, but you have to pass an extra argument"
|
24
|
+
puts "Just like creating a branch, but you have to pass an extra argument."
|
25
25
|
end
|
data/levels/checkout.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
difficulty 2
|
2
|
-
description "Create and switch to a new branch called
|
2
|
+
description "Create and switch to a new branch called my_branch. You will need to create a branch like you did in the previous level."
|
3
3
|
|
4
4
|
setup do
|
5
5
|
repo.init
|
@@ -14,5 +14,5 @@ solution do
|
|
14
14
|
end
|
15
15
|
|
16
16
|
hint do
|
17
|
-
puts "Try looking up `git checkout` and `git branch
|
17
|
+
puts "Try looking up `git checkout` and `git branch`."
|
18
18
|
end
|
data/levels/checkout_tag.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
difficulty 2
|
2
2
|
|
3
|
-
description "You need to fix a bug in the version 1.2 of your app. Checkout the tag v1.2"
|
3
|
+
description "You need to fix a bug in the version 1.2 of your app. Checkout the tag `v1.2`."
|
4
4
|
|
5
5
|
setup do
|
6
6
|
repo.init
|
@@ -35,5 +35,5 @@ solution do
|
|
35
35
|
end
|
36
36
|
|
37
37
|
hint do
|
38
|
-
puts "There's no big difference between checking out a branch and checking out a tag"
|
38
|
+
puts "There's no big difference between checking out a branch and checking out a tag."
|
39
39
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
difficulty 2
|
2
2
|
|
3
|
-
description "You need to fix a bug in the version 1.2 of your app. Checkout the tag v1.2 (Note: There is also a branch named v1.2)"
|
3
|
+
description "You need to fix a bug in the version 1.2 of your app. Checkout the tag `v1.2` (Note: There is also a branch named `v1.2`)."
|
4
4
|
|
5
5
|
setup do
|
6
6
|
repo.init
|
@@ -42,5 +42,5 @@ solution do
|
|
42
42
|
end
|
43
43
|
|
44
44
|
hint do
|
45
|
-
puts "You should think about specifying you're after the tag named v1.2 (think tags
|
45
|
+
puts "You should think about specifying you're after the tag named `v1.2` (think `tags/`)."
|
46
46
|
end
|
data/levels/cherry-pick.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
difficulty 3
|
2
|
-
description "Your new feature isn't worth the time and you're going to delete it. But it has one commit that fills in README file, and you want this commit to be on the master as well"
|
2
|
+
description "Your new feature isn't worth the time and you're going to delete it. But it has one commit that fills in `README` file, and you want this commit to be on the master as well."
|
3
3
|
|
4
4
|
setup do
|
5
5
|
init_from_level
|
@@ -13,5 +13,5 @@ solution do
|
|
13
13
|
end
|
14
14
|
|
15
15
|
hint do
|
16
|
-
puts "Sneak a peek at the `cherry-pick` command"
|
16
|
+
puts "Sneak a peek at the `cherry-pick` command."
|
17
17
|
end
|
data/levels/clone.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
difficulty 1
|
2
|
-
description "Clone the repository at https://github.com/Gazler/cloneme"
|
2
|
+
description "Clone the repository at https://github.com/Gazler/cloneme."
|
3
3
|
|
4
4
|
solution do
|
5
5
|
repo("cloneme").commit("157b2b61f29ab9df45f31c7cd9cb5d8ff06ecde4")
|
6
6
|
end
|
7
7
|
|
8
8
|
hint do
|
9
|
-
puts "You should have a look at this site: https://github.com/Gazler/cloneme"
|
9
|
+
puts "You should have a look at this site: https://github.com/Gazler/cloneme."
|
10
10
|
end
|
data/levels/clone_to_folder.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
difficulty 1
|
2
|
-
description "Clone the repository at https://github.com/Gazler/cloneme to
|
2
|
+
description "Clone the repository at https://github.com/Gazler/cloneme to `my_cloned_repo`."
|
3
3
|
|
4
4
|
solution do
|
5
5
|
repo("my_cloned_repo").commit("157b2b61f29ab9df45f31c7cd9cb5d8ff06ecde4")
|
6
6
|
end
|
7
7
|
|
8
8
|
hint do
|
9
|
-
puts "This is like the last level, git clone has an optional argument."
|
9
|
+
puts "This is like the last level, `git clone` has an optional argument."
|
10
10
|
end
|
data/levels/commit.rb
CHANGED
data/levels/commit_amend.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
difficulty 2
|
2
|
-
description "The README file has been committed, but it looks like the file `forgotten_file.rb` was missing from the commit. Add the file and amend your previous commit to include it."
|
2
|
+
description "The `README` file has been committed, but it looks like the file `forgotten_file.rb` was missing from the commit. Add the file and amend your previous commit to include it."
|
3
3
|
|
4
4
|
setup do
|
5
5
|
repo.init
|
data/levels/config.rb
CHANGED
@@ -1,18 +1,23 @@
|
|
1
1
|
difficulty 1
|
2
|
-
description "Set up your git name and email, this is important so that your commits can be identified"
|
2
|
+
description "Set up your git name and email, this is important so that your commits can be identified."
|
3
3
|
|
4
4
|
setup do
|
5
5
|
repo.init
|
6
6
|
end
|
7
7
|
|
8
8
|
solution do
|
9
|
-
|
10
9
|
valid = false
|
11
10
|
|
12
11
|
name = request("What is your name?")
|
13
12
|
email = request("What is your email?")
|
14
13
|
config_name = repo.config["user.name"]
|
15
14
|
config_email = repo.config["user.email"]
|
15
|
+
|
16
|
+
if name.respond_to?(:force_encoding)
|
17
|
+
config_name = config_name.force_encoding("UTF-8")
|
18
|
+
config_email = config_email.force_encoding("UTF-8")
|
19
|
+
end
|
20
|
+
|
16
21
|
if name == config_name && email == config_email
|
17
22
|
valid = true
|
18
23
|
end
|
@@ -24,5 +29,5 @@ solution do
|
|
24
29
|
end
|
25
30
|
|
26
31
|
hint do
|
27
|
-
puts "These settings are config settings. You should run `git help config` if you are stuck"
|
32
|
+
puts "These settings are config settings. You should run `git help config` if you are stuck."
|
28
33
|
end
|
data/levels/conflict.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
difficulty 4
|
2
|
-
description "You need to merge the current branch (master) with
|
2
|
+
description "You need to merge the current branch (master) with mybranch. But there may be some incorrect changes in mybranch which may cause conflicts. Solve any merge-conflicts you come across and finish the merge."
|
3
3
|
|
4
4
|
setup do
|
5
5
|
init_from_level
|
@@ -12,12 +12,12 @@ solution do
|
|
12
12
|
solved = false unless repo.commits("master")[0].parents.length == 2
|
13
13
|
|
14
14
|
txt = `cat poem.txt`
|
15
|
-
solved = false if txt =~ /[
|
16
|
-
solved = false unless txt =~ /
|
15
|
+
solved = false if txt =~ /[<>=|]/
|
16
|
+
solved = false unless txt =~ /Sat on a wall/
|
17
17
|
|
18
18
|
solved
|
19
19
|
end
|
20
20
|
|
21
21
|
hint do
|
22
|
-
puts ["First you have to do a merge. Then resolve any conflicts and finish the merge", "Take a look at the sections on merge conflicts in 'git merge'.", "Remove the unnecessary lines in poem.txt."]
|
22
|
+
puts ["First you have to do a merge. Then resolve any conflicts and finish the merge", "Take a look at the sections on merge conflicts in 'git merge'.", "Remove the unnecessary lines in `poem.txt`, so only the correct poem remains."]
|
23
23
|
end
|
@@ -1,3 +1,14 @@
|
|
1
|
-
|
1
|
+
Updated the poem
|
2
2
|
|
3
|
-
|
3
|
+
# Please enter the commit message for your changes. Lines starting
|
4
|
+
# with '#' will be ignored, and an empty message aborts the commit.
|
5
|
+
#
|
6
|
+
# Author: Thameera Senanayaka <thameera123@gmail.com>
|
7
|
+
# Committer: Alex <snooz@localhost.localdomain>
|
8
|
+
#
|
9
|
+
# On branch master
|
10
|
+
# Changes to be committed:
|
11
|
+
# (use "git reset HEAD^1 <file>..." to unstage)
|
12
|
+
#
|
13
|
+
# modified: poem.txt
|
14
|
+
#
|
Binary file
|
@@ -4,3 +4,9 @@
|
|
4
4
|
306868e3258be1f35ae43db71e3a6d7edf42ffe7 50a127cb066eb903a6fa59d71802c10cb442fb3b Thameera Senanayaka <thameera123@gmail.com> 1352041213 +0530 commit: Added lines
|
5
5
|
50a127cb066eb903a6fa59d71802c10cb442fb3b 75179304f4fab00613f08a9412b6cb0965bfa564 Thameera Senanayaka <thameera123@gmail.com> 1352041234 +0530 commit: Added comment
|
6
6
|
75179304f4fab00613f08a9412b6cb0965bfa564 40e20a455ac2731ad25c297b03aa543d7eedf6ab Thameera Senanayaka <thameera123@gmail.com> 1352041240 +0530 checkout: moving from mybranch to master
|
7
|
+
40e20a455ac2731ad25c297b03aa543d7eedf6ab 75179304f4fab00613f08a9412b6cb0965bfa564 Alex <snooz@localhost.localdomain> 1382868220 -0700 checkout: moving from master to mybranch
|
8
|
+
75179304f4fab00613f08a9412b6cb0965bfa564 bdc7bec8acae9b3eabf0a15b223a48211b7a89a1 Alex <snooz@localhost.localdomain> 1382868333 -0700 commit: Changed the poem
|
9
|
+
bdc7bec8acae9b3eabf0a15b223a48211b7a89a1 3d7aec017559be2b61cab850dafdcb2b6212f1c3 Alex <snooz@localhost.localdomain> 1382868450 -0700 commit (amend): Changed the poem
|
10
|
+
3d7aec017559be2b61cab850dafdcb2b6212f1c3 40e20a455ac2731ad25c297b03aa543d7eedf6ab Alex <snooz@localhost.localdomain> 1382868483 -0700 checkout: moving from mybranch to master
|
11
|
+
40e20a455ac2731ad25c297b03aa543d7eedf6ab 30cc28e66966109bb5bfbe96d6c817c367d2050a Alex <snooz@localhost.localdomain> 1382868518 -0700 commit: Updated the poem
|
12
|
+
30cc28e66966109bb5bfbe96d6c817c367d2050a c797f979cf24ba148bf10d5e26f5d7402dd5f2e1 Alex <snooz@localhost.localdomain> 1382868533 -0700 commit (amend): Updated the poem
|
@@ -1,2 +1,4 @@
|
|
1
1
|
0000000000000000000000000000000000000000 306868e3258be1f35ae43db71e3a6d7edf42ffe7 Thameera Senanayaka <thameera123@gmail.com> 1352041121 +0530 commit (initial): Initial commit
|
2
2
|
306868e3258be1f35ae43db71e3a6d7edf42ffe7 40e20a455ac2731ad25c297b03aa543d7eedf6ab Thameera Senanayaka <thameera123@gmail.com> 1352041153 +0530 commit: Added two lines
|
3
|
+
40e20a455ac2731ad25c297b03aa543d7eedf6ab 30cc28e66966109bb5bfbe96d6c817c367d2050a Alex <snooz@localhost.localdomain> 1382868518 -0700 commit: Updated the poem
|
4
|
+
30cc28e66966109bb5bfbe96d6c817c367d2050a c797f979cf24ba148bf10d5e26f5d7402dd5f2e1 Alex <snooz@localhost.localdomain> 1382868533 -0700 commit (amend): Updated the poem
|
@@ -1,3 +1,5 @@
|
|
1
1
|
0000000000000000000000000000000000000000 306868e3258be1f35ae43db71e3a6d7edf42ffe7 Thameera Senanayaka <thameera123@gmail.com> 1352041133 +0530 branch: Created from master
|
2
2
|
306868e3258be1f35ae43db71e3a6d7edf42ffe7 50a127cb066eb903a6fa59d71802c10cb442fb3b Thameera Senanayaka <thameera123@gmail.com> 1352041213 +0530 commit: Added lines
|
3
3
|
50a127cb066eb903a6fa59d71802c10cb442fb3b 75179304f4fab00613f08a9412b6cb0965bfa564 Thameera Senanayaka <thameera123@gmail.com> 1352041234 +0530 commit: Added comment
|
4
|
+
75179304f4fab00613f08a9412b6cb0965bfa564 bdc7bec8acae9b3eabf0a15b223a48211b7a89a1 Alex <snooz@localhost.localdomain> 1382868333 -0700 commit: Changed the poem
|
5
|
+
bdc7bec8acae9b3eabf0a15b223a48211b7a89a1 3d7aec017559be2b61cab850dafdcb2b6212f1c3 Alex <snooz@localhost.localdomain> 1382868450 -0700 commit (amend): Changed the poem
|
@@ -0,0 +1 @@
|
|
1
|
+
x=�[JC1E��(�,'���8����ISz��4�:z/R��,X���Z/�QOs0C"b�Q!r��D9e�s(=��5b��{q��m�[�M6�"��:��`��v��3-�����(T��;7j�MW��|@���\��^_@j���ZkxF�(v���<�u�/8�[�?�����~�����^h��Y�a��B�� fa�u����M
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
c797f979cf24ba148bf10d5e26f5d7402dd5f2e1
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3d7aec017559be2b61cab850dafdcb2b6212f1c3
|
data/levels/conflict/poem.txt
CHANGED
data/levels/diff.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
difficulty 2
|
2
|
-
description "There have been modifications to the app.rb file since your last commit. Find out which line has changed."
|
2
|
+
description "There have been modifications to the `app.rb` file since your last commit. Find out which line has changed."
|
3
3
|
|
4
4
|
setup do
|
5
5
|
init_from_level
|
data/levels/find_old_branch.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
difficulty 4
|
2
|
-
description "You have been working on a branch but got distracted by a major issue and forgot the name of it. Switch back to that branch"
|
2
|
+
description "You have been working on a branch but got distracted by a major issue and forgot the name of it. Switch back to that branch."
|
3
3
|
|
4
4
|
setup do
|
5
5
|
init_from_level
|
data/levels/ignore.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
difficulty 2
|
2
|
-
description "The text editor 'vim' creates files ending in
|
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."
|
3
3
|
|
4
4
|
setup do
|
5
5
|
repo.init
|
@@ -26,5 +26,5 @@ solution do
|
|
26
26
|
end
|
27
27
|
|
28
28
|
hint do
|
29
|
-
puts "You may have noticed there is a file named
|
29
|
+
puts "You may have noticed there is a file named `.gitignore` in the repository."
|
30
30
|
end
|
data/levels/init.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
difficulty 1
|
2
|
-
description "A new directory, git_hug
|
2
|
+
description "A new directory, `git_hug`, has been created; initialize an empty repository in it."
|
3
3
|
|
4
4
|
solution do
|
5
5
|
repo.valid?
|
6
6
|
end
|
7
7
|
|
8
8
|
hint do
|
9
|
-
puts "You can type `git` in your shell to get a list of available git commands"
|
9
|
+
puts "You can type `git` in your shell to get a list of available git commands."
|
10
10
|
end
|
data/levels/merge.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
difficulty 2
|
2
|
-
description "We have a file in the branch 'feature'; Let's merge it to the master branch"
|
2
|
+
description "We have a file in the branch 'feature'; Let's merge it to the master branch."
|
3
3
|
|
4
4
|
setup do
|
5
5
|
init_from_level
|
@@ -10,5 +10,5 @@ solution do
|
|
10
10
|
end
|
11
11
|
|
12
12
|
hint do
|
13
|
-
puts "You want to research the `git merge` command"
|
13
|
+
puts "You want to research the `git merge` command."
|
14
14
|
end
|
data/levels/merge_squash.rb
CHANGED
data/levels/push.rb
CHANGED
data/levels/push_tags.rb
CHANGED
data/levels/remote.rb
CHANGED
data/levels/remote_add.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
difficulty 2
|
2
2
|
|
3
|
-
description "Add a remote repository called `origin` with the url
|
3
|
+
description "Add a remote repository called `origin` with the url https://github.com/githug/githug"
|
4
4
|
|
5
5
|
setup do
|
6
6
|
repo.init
|
@@ -12,5 +12,5 @@ solution do
|
|
12
12
|
end
|
13
13
|
|
14
14
|
hint do
|
15
|
-
puts "You can run `git remote --help` for the man pages"
|
15
|
+
puts "You can run `git remote --help` for the man pages."
|
16
16
|
end
|
data/levels/remote_url.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
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
|
@@ -13,5 +13,5 @@ solution do
|
|
13
13
|
end
|
14
14
|
|
15
15
|
hint do
|
16
|
-
puts "You can run `git remote --help` for the man pages"
|
16
|
+
puts "You can run `git remote --help` for the man pages."
|
17
17
|
end
|
data/levels/rename.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
difficulty 3
|
2
2
|
|
3
|
-
description "We have a file called oldfile.txt
|
3
|
+
description "We have a file called `oldfile.txt`. We want to rename it to `newfile.txt` and stage this change."
|
4
4
|
|
5
5
|
setup do
|
6
6
|
repo.init
|
@@ -14,5 +14,5 @@ solution do
|
|
14
14
|
end
|
15
15
|
|
16
16
|
hint do
|
17
|
-
puts "Take a look at `git mv
|
17
|
+
puts "Take a look at `git mv`."
|
18
18
|
end
|
data/levels/rename_commit.rb
CHANGED
data/levels/reorder.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
difficulty 4
|
2
|
-
description "You have committed several times but in the wrong order. Please reorder your commits"
|
2
|
+
description "You have committed several times but in the wrong order. Please reorder your commits."
|
3
3
|
|
4
4
|
setup do
|
5
5
|
repo.init
|
@@ -29,5 +29,5 @@ solution do
|
|
29
29
|
end
|
30
30
|
|
31
31
|
hint do
|
32
|
-
puts "Take a look the
|
32
|
+
puts "Take a look the `-i` flag of the rebase command."
|
33
33
|
end
|
data/levels/repack.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
difficulty 2
|
2
|
-
description "Optimise how your repository is packaged ensuring that redundant packs are removed"
|
2
|
+
description "Optimise how your repository is packaged ensuring that redundant packs are removed."
|
3
3
|
|
4
4
|
setup do
|
5
5
|
repo.init
|
@@ -15,5 +15,5 @@ solution do
|
|
15
15
|
end
|
16
16
|
|
17
17
|
hint do
|
18
|
-
puts "You want to research the `git repack` command"
|
18
|
+
puts "You want to research the `git repack` command."
|
19
19
|
end
|
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` 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` using the reset command (don't commit anything)."
|
3
3
|
|
4
4
|
setup do
|
5
5
|
repo.init
|
@@ -18,5 +18,5 @@ solution do
|
|
18
18
|
end
|
19
19
|
|
20
20
|
hint do
|
21
|
-
puts "You can get some useful information for git status, it will tell you the command you need to run"
|
21
|
+
puts "You can get some useful information for git status, it will tell you the command you need to run."
|
22
22
|
end
|
data/levels/reset_soft.rb
CHANGED
data/levels/squash.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
difficulty 4
|
2
|
-
description "You have committed several times but would like all those changes to be one commit"
|
2
|
+
description "You have committed several times but would like all those changes to be one commit."
|
3
3
|
|
4
4
|
setup do
|
5
5
|
repo.init
|
@@ -25,5 +25,5 @@ solution do
|
|
25
25
|
end
|
26
26
|
|
27
27
|
hint do
|
28
|
-
puts "Take a look the
|
28
|
+
puts "Take a look the `-i` flag of the rebase command."
|
29
29
|
end
|
data/levels/stage_lines.rb
CHANGED
@@ -25,5 +25,5 @@ solution do
|
|
25
25
|
end
|
26
26
|
|
27
27
|
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
|
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
29
|
end
|
data/levels/stash.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
difficulty 2
|
2
|
-
description "You've made some changes and want to work on them later. You should save them, but don't commit them"
|
2
|
+
description "You've made some changes and want to work on them later. You should save them, but don't commit them."
|
3
3
|
|
4
4
|
setup do
|
5
5
|
init_from_level
|
@@ -12,5 +12,5 @@ solution do
|
|
12
12
|
end
|
13
13
|
|
14
14
|
hint do
|
15
|
-
puts "It's like stashing. Try finding appropriate git command"
|
15
|
+
puts "It's like stashing. Try finding appropriate git command."
|
16
16
|
end
|
data/levels/tag.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
difficulty 2
|
2
2
|
|
3
|
-
description "We have a git repo and we want to tag the current commit with new_tag
|
3
|
+
description "We have a git repo and we want to tag the current commit with `new_tag`."
|
4
4
|
|
5
5
|
setup do
|
6
6
|
repo.init
|
@@ -14,5 +14,5 @@ solution do
|
|
14
14
|
end
|
15
15
|
|
16
16
|
hint do
|
17
|
-
puts "Take a look at `git tag
|
17
|
+
puts "Take a look at `git tag`."
|
18
18
|
end
|
data/lib/githug/game.rb
CHANGED
@@ -10,14 +10,14 @@ module Githug
|
|
10
10
|
def play_level
|
11
11
|
solve = true
|
12
12
|
if profile.level.nil?
|
13
|
-
UI.puts("Welcome to Githug")
|
13
|
+
UI.puts("Welcome to Githug!")
|
14
14
|
solve = false
|
15
15
|
level_bump
|
16
16
|
else
|
17
17
|
level = Level.load(profile.level)
|
18
18
|
if solve && level
|
19
19
|
if level.solve
|
20
|
-
UI.success "Congratulations, you have solved the level"
|
20
|
+
UI.success "Congratulations, you have solved the level!"
|
21
21
|
level_bump
|
22
22
|
else
|
23
23
|
UI.error "Sorry, this solution is not quite right!"
|
@@ -25,7 +25,7 @@ module Githug
|
|
25
25
|
profile.save
|
26
26
|
|
27
27
|
if (profile.current_attempts > 2 && profile.current_attempts % 3 == 0)
|
28
|
-
UI.error "Don't forget you can type `githug hint` for a hint and `githug reset` to reset the current level"
|
28
|
+
UI.error "Don't forget you can type `githug hint` for a hint and `githug reset` to reset the current level."
|
29
29
|
end
|
30
30
|
|
31
31
|
UI.puts level.full_description
|
data/lib/githug/level.rb
CHANGED
data/lib/githug/version.rb
CHANGED
data/spec/githug/game_spec.rb
CHANGED
@@ -25,7 +25,7 @@ describe Githug::Game do
|
|
25
25
|
level.should_not_receive(:solve)
|
26
26
|
profile.stub(:level).and_return(nil)
|
27
27
|
profile.should_receive(:level_bump)
|
28
|
-
Githug::UI.should_receive(:puts).with("Welcome to Githug")
|
28
|
+
Githug::UI.should_receive(:puts).with("Welcome to Githug!")
|
29
29
|
game.play_level
|
30
30
|
end
|
31
31
|
|
@@ -34,7 +34,7 @@ describe Githug::Game do
|
|
34
34
|
it "should echo congratulations if the level is solved" do
|
35
35
|
level.stub(:solve).and_return(true)
|
36
36
|
profile.should_receive(:level_bump)
|
37
|
-
Githug::UI.should_receive(:success).with("Congratulations, you have solved the level")
|
37
|
+
Githug::UI.should_receive(:success).with("Congratulations, you have solved the level!")
|
38
38
|
game.play_level
|
39
39
|
end
|
40
40
|
|
@@ -55,7 +55,7 @@ describe Githug::Game do
|
|
55
55
|
profile.stub(:current_attempts).and_return(3)
|
56
56
|
level.stub(:solve).and_return(false)
|
57
57
|
Githug::UI.should_receive(:error).with("Sorry, this solution is not quite right!")
|
58
|
-
Githug::UI.should_receive(:error).with("Don't forget you can type `githug hint` for a hint and `githug reset` to reset the current level")
|
58
|
+
Githug::UI.should_receive(:error).with("Don't forget you can type `githug hint` for a hint and `githug reset` to reset the current level.")
|
59
59
|
game.play_level
|
60
60
|
end
|
61
61
|
|
data/spec/githug_spec.rb
CHANGED
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.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gary Rennie
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -225,18 +225,26 @@ files:
|
|
225
225
|
- levels/conflict/.githug/logs/HEAD
|
226
226
|
- levels/conflict/.githug/logs/refs/heads/master
|
227
227
|
- levels/conflict/.githug/logs/refs/heads/mybranch
|
228
|
+
- levels/conflict/.githug/objects/1d/b9aa5013e47f1482ec90323d926171a99c28af
|
228
229
|
- levels/conflict/.githug/objects/25/b3f9c339430b35ae5822b2ef90e763284dc007
|
229
230
|
- levels/conflict/.githug/objects/2d/0d90051e320215f54f357e746c9838490557e7
|
230
231
|
- levels/conflict/.githug/objects/30/6868e3258be1f35ae43db71e3a6d7edf42ffe7
|
232
|
+
- levels/conflict/.githug/objects/30/cc28e66966109bb5bfbe96d6c817c367d2050a
|
231
233
|
- levels/conflict/.githug/objects/38/21e4362c5a76db1112b46b9210670cd5bab482
|
234
|
+
- levels/conflict/.githug/objects/3c/b65bef44ae724ddf9e89640e7e2754dea1a47f
|
235
|
+
- levels/conflict/.githug/objects/3d/7aec017559be2b61cab850dafdcb2b6212f1c3
|
232
236
|
- levels/conflict/.githug/objects/40/e20a455ac2731ad25c297b03aa543d7eedf6ab
|
233
237
|
- levels/conflict/.githug/objects/44/30fd3f45c832e685350417600a9862c94d20f1
|
234
238
|
- levels/conflict/.githug/objects/46/677964e679f3e727356d0860c643a12a87902b
|
235
239
|
- levels/conflict/.githug/objects/50/a127cb066eb903a6fa59d71802c10cb442fb3b
|
240
|
+
- levels/conflict/.githug/objects/55/ad5af2a93afa778971e3d04faf20f6c368b6ba
|
236
241
|
- levels/conflict/.githug/objects/6b/0c0b32bdca3af9beb831744cb755d6fdc7c7c0
|
237
242
|
- levels/conflict/.githug/objects/75/179304f4fab00613f08a9412b6cb0965bfa564
|
238
243
|
- levels/conflict/.githug/objects/7c/36daf29660ae4a2f09345427ef76f1d38f902f
|
239
244
|
- levels/conflict/.githug/objects/88/e0473c9da347c6311f5f8eca8d256bf25402b6
|
245
|
+
- levels/conflict/.githug/objects/bd/c7bec8acae9b3eabf0a15b223a48211b7a89a1
|
246
|
+
- levels/conflict/.githug/objects/c7/97f979cf24ba148bf10d5e26f5d7402dd5f2e1
|
247
|
+
- levels/conflict/.githug/objects/da/ae380200ed6eeaafd926177018e8ff3009b988
|
240
248
|
- levels/conflict/.githug/refs/heads/master
|
241
249
|
- levels/conflict/.githug/refs/heads/mybranch
|
242
250
|
- levels/conflict/poem.txt
|
@@ -415,7 +423,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
415
423
|
version: '0'
|
416
424
|
requirements: []
|
417
425
|
rubyforge_project: githug
|
418
|
-
rubygems_version: 2.0.
|
426
|
+
rubygems_version: 2.0.0
|
419
427
|
signing_key:
|
420
428
|
specification_version: 4
|
421
429
|
summary: An interactive way to learn git.
|