From 29555548d9680def7a6b8c8e8d2e1c2bd28bc1ca Mon Sep 17 00:00:00 2001 From: duianto Date: Wed, 13 Feb 2019 11:01:47 +0100 Subject: [PATCH 01/14] Lvl branch: branch name underscore to dash test_code -> test-code --- levels/branch.rb | 4 ++-- spec/githug_spec.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/levels/branch.rb b/levels/branch.rb index 7d20fa3d..7c0f082c 100644 --- a/levels/branch.rb +++ b/levels/branch.rb @@ -1,5 +1,5 @@ difficulty 1 -description "You want to work on a piece of code that has the potential to break things, create the branch test_code." +description "You want to work on a piece of code that has the potential to break things, create the branch test-code." setup do repo.init @@ -9,7 +9,7 @@ end solution do - repo.branches.map(&:name).include?("test_code") + repo.branches.map(&:name).include?("test-code") end hint do diff --git a/spec/githug_spec.rb b/spec/githug_spec.rb index 988892b9..a14b47c9 100644 --- a/spec/githug_spec.rb +++ b/spec/githug_spec.rb @@ -186,7 +186,7 @@ def skip_level end it "solves the branch level" do - `git branch test_code` + `git branch test-code` `githug`.should be_solved end From 902fefe98eff87d090a2336d065f50c1576c45d8 Mon Sep 17 00:00:00 2001 From: duianto Date: Wed, 13 Feb 2019 11:10:15 +0100 Subject: [PATCH 02/14] Lvl branch_at: branch name underscore to dash test_branch -> test-branch --- levels/branch_at.rb | 6 +++--- spec/githug_spec.rb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/levels/branch_at.rb b/levels/branch_at.rb index ae6dc69e..61f5d4dc 100644 --- a/levels/branch_at.rb +++ b/levels/branch_at.rb @@ -1,5 +1,5 @@ difficulty 3 -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." +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." setup do repo.init @@ -15,8 +15,8 @@ end solution do - return false unless repo.branches.map(&:name).include?("test_branch") - repo.commits("test_branch").each { |commit| return false if commit.message == "Updating file1 again" } + return false unless repo.branches.map(&:name).include?("test-branch") + repo.commits("test-branch").each { |commit| return false if commit.message == "Updating file1 again" } true end diff --git a/spec/githug_spec.rb b/spec/githug_spec.rb index a14b47c9..33e07196 100644 --- a/spec/githug_spec.rb +++ b/spec/githug_spec.rb @@ -207,7 +207,7 @@ def skip_level it "solves the branch_at level" do commit = `git log HEAD~1 --pretty=short | head -1 | cut -d " " -f 2` - `git branch test_branch #{commit}` + `git branch test-branch #{commit}` `githug`.should be_solved end From 73bc22670251379f149d4fa39c0fdae507117a67 Mon Sep 17 00:00:00 2001 From: duianto Date: Wed, 13 Feb 2019 11:13:09 +0100 Subject: [PATCH 03/14] Lvl checkout: branch name underscore to dash my_branch -> my-branch --- levels/checkout.rb | 4 ++-- spec/githug_spec.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/levels/checkout.rb b/levels/checkout.rb index 27ae815b..f9e1e0f6 100644 --- a/levels/checkout.rb +++ b/levels/checkout.rb @@ -1,5 +1,5 @@ difficulty 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." +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." setup do repo.init @@ -9,7 +9,7 @@ end solution do - return false unless repo.head.name == "my_branch" + return false unless repo.head.name == "my-branch" true end diff --git a/spec/githug_spec.rb b/spec/githug_spec.rb index 33e07196..8df6f2cf 100644 --- a/spec/githug_spec.rb +++ b/spec/githug_spec.rb @@ -191,7 +191,7 @@ def skip_level end it "solves the checkout level" do - `git checkout -b my_branch` + `git checkout -b my-branch` `githug`.should be_solved end From 4b9194311b100486b77a36235e908e251a266099 Mon Sep 17 00:00:00 2001 From: duianto Date: Wed, 13 Feb 2019 12:24:32 +0100 Subject: [PATCH 04/14] Lvl clone_to_folder: repo name underscore to dash my_cloned_repo -> my-cloned-repo --- levels/clone_to_folder.rb | 4 ++-- spec/githug_spec.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/levels/clone_to_folder.rb b/levels/clone_to_folder.rb index 55358fcf..5d5083cb 100644 --- a/levels/clone_to_folder.rb +++ b/levels/clone_to_folder.rb @@ -1,8 +1,8 @@ difficulty 1 -description "Clone the repository at https://github.com/Gazler/cloneme to `my_cloned_repo`." +description "Clone the repository at https://github.com/Gazler/cloneme to `my-cloned-repo`." solution do - repo("my_cloned_repo").commit("157b2b61f29ab9df45f31c7cd9cb5d8ff06ecde4") + repo("my-cloned-repo").commit("157b2b61f29ab9df45f31c7cd9cb5d8ff06ecde4") end hint do diff --git a/spec/githug_spec.rb b/spec/githug_spec.rb index 8df6f2cf..9191ba7f 100644 --- a/spec/githug_spec.rb +++ b/spec/githug_spec.rb @@ -60,7 +60,7 @@ def skip_level end it "solves the clone_to_folder level" do - `git clone https://github.com/Gazler/cloneme my_cloned_repo` + `git clone https://github.com/Gazler/cloneme my-cloned-repo` `githug`.should be_solved end From dba240f70f90f92c0947c1547e89e1707c0b25b4 Mon Sep 17 00:00:00 2001 From: duianto Date: Wed, 13 Feb 2019 12:32:44 +0100 Subject: [PATCH 05/14] Lvl conflict: branch name use dash mybranch -> my-branch --- levels/conflict.rb | 2 +- levels/conflict/.githug/logs/refs/heads/{mybranch => my-branch} | 0 levels/conflict/.githug/refs/heads/{mybranch => my-branch} | 0 3 files changed, 1 insertion(+), 1 deletion(-) rename levels/conflict/.githug/logs/refs/heads/{mybranch => my-branch} (100%) rename levels/conflict/.githug/refs/heads/{mybranch => my-branch} (100%) diff --git a/levels/conflict.rb b/levels/conflict.rb index 7c0ac0d4..6b66fbad 100644 --- a/levels/conflict.rb +++ b/levels/conflict.rb @@ -1,5 +1,5 @@ difficulty 4 -description "You need to merge mybranch into the current branch (master). But there may be some incorrect changes in mybranch which may cause conflicts. Solve any merge-conflicts you come across and finish the merge." +description "You need to merge my-branch into the current branch (master). But there may be some incorrect changes in my-branch which may cause conflicts. Solve any merge-conflicts you come across and finish the merge." setup do init_from_level diff --git a/levels/conflict/.githug/logs/refs/heads/mybranch b/levels/conflict/.githug/logs/refs/heads/my-branch similarity index 100% rename from levels/conflict/.githug/logs/refs/heads/mybranch rename to levels/conflict/.githug/logs/refs/heads/my-branch diff --git a/levels/conflict/.githug/refs/heads/mybranch b/levels/conflict/.githug/refs/heads/my-branch similarity index 100% rename from levels/conflict/.githug/refs/heads/mybranch rename to levels/conflict/.githug/refs/heads/my-branch From 8ac2d0ea98f2ba95f67a2b1c800a0acc52c541e7 Mon Sep 17 00:00:00 2001 From: duianto Date: Wed, 13 Feb 2019 11:29:51 +0100 Subject: [PATCH 06/14] Lvl delete_branch: branch name underscore to dash delete_me -> delete-me --- levels/delete_branch.rb | 6 +++--- .../.githug/logs/refs/heads/{delete_me => delete-me} | 0 .../.githug/refs/heads/{delete_me => delete-me} | 0 spec/githug_spec.rb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename levels/delete_branch/.githug/logs/refs/heads/{delete_me => delete-me} (100%) rename levels/delete_branch/.githug/refs/heads/{delete_me => delete-me} (100%) diff --git a/levels/delete_branch.rb b/levels/delete_branch.rb index 8f579adc..d1d05e12 100644 --- a/levels/delete_branch.rb +++ b/levels/delete_branch.rb @@ -1,15 +1,15 @@ difficulty 2 -description "You have created too many branches for your project. There is an old branch in your repo called 'delete_me', you should delete it." +description "You have created too many branches for your project. There is an old branch in your repo called 'delete-me', you should delete it." setup do init_from_level end solution do - return true unless repo.branches.map(&:name).include?('delete_me') + return true unless repo.branches.map(&:name).include?('delete-me') end hint do puts "Running 'git --help branch' will give you a list of branch commands." -end \ No newline at end of file +end diff --git a/levels/delete_branch/.githug/logs/refs/heads/delete_me b/levels/delete_branch/.githug/logs/refs/heads/delete-me similarity index 100% rename from levels/delete_branch/.githug/logs/refs/heads/delete_me rename to levels/delete_branch/.githug/logs/refs/heads/delete-me diff --git a/levels/delete_branch/.githug/refs/heads/delete_me b/levels/delete_branch/.githug/refs/heads/delete-me similarity index 100% rename from levels/delete_branch/.githug/refs/heads/delete_me rename to levels/delete_branch/.githug/refs/heads/delete-me diff --git a/spec/githug_spec.rb b/spec/githug_spec.rb index 9191ba7f..7afdffdd 100644 --- a/spec/githug_spec.rb +++ b/spec/githug_spec.rb @@ -212,7 +212,7 @@ def skip_level end it "solves the delete_branch level" do - `git branch -d delete_me` + `git branch -d delete-me` `githug`.should be_solved end From 4fdd69c3e6981121ad197bba556ab101b51f2d2e Mon Sep 17 00:00:00 2001 From: duianto Date: Wed, 13 Feb 2019 11:39:36 +0100 Subject: [PATCH 07/14] Lvl fetch: branch name underscore to dash new_branch -> new-branch --- levels/fetch.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/levels/fetch.rb b/levels/fetch.rb index 76e999e2..bced99b5 100644 --- a/levels/fetch.rb +++ b/levels/fetch.rb @@ -32,7 +32,7 @@ Dir.chdir tmpdir # create a new branch in the remote repo - `git checkout -b new_branch --quiet` + `git checkout -b new-branch --quiet` # adds a file into the new branch. Should not be pulled into the local FileUtils.touch "file1" From 0b8945f46cedede629a323d376463bc29507cbe3 Mon Sep 17 00:00:00 2001 From: duianto Date: Wed, 13 Feb 2019 12:47:01 +0100 Subject: [PATCH 08/14] Lvl found_old_branch: branch names underscore to dash blowup_sun_for_ransom -> blowup-sun-for-ransom cure_common_cold -> cure-common-cold kill_the_batman -> kill-the-batman solve_world_hunger -> solve-world-hunger --- levels/find_old_branch.rb | 2 +- .../refs/heads/{blowup_sun_for_ransom => blowup-sun-for-ransom} | 0 .../logs/refs/heads/{cure_common_cold => cure-common-cold} | 0 .../logs/refs/heads/{kill_the_batman => kill-the-batman} | 0 .../logs/refs/heads/{solve_world_hunger => solve-world-hunger} | 0 .../refs/heads/{blowup_sun_for_ransom => blowup-sun-for-ransom} | 0 .../.githug/refs/heads/{cure_common_cold => cure-common-cold} | 0 .../.githug/refs/heads/{kill_the_batman => kill-the-batman} | 0 .../refs/heads/{solve_world_hunger => solve-world-hunger} | 0 spec/githug_spec.rb | 2 +- 10 files changed, 2 insertions(+), 2 deletions(-) rename levels/find_old_branch/.githug/logs/refs/heads/{blowup_sun_for_ransom => blowup-sun-for-ransom} (100%) rename levels/find_old_branch/.githug/logs/refs/heads/{cure_common_cold => cure-common-cold} (100%) rename levels/find_old_branch/.githug/logs/refs/heads/{kill_the_batman => kill-the-batman} (100%) rename levels/find_old_branch/.githug/logs/refs/heads/{solve_world_hunger => solve-world-hunger} (100%) rename levels/find_old_branch/.githug/refs/heads/{blowup_sun_for_ransom => blowup-sun-for-ransom} (100%) rename levels/find_old_branch/.githug/refs/heads/{cure_common_cold => cure-common-cold} (100%) rename levels/find_old_branch/.githug/refs/heads/{kill_the_batman => kill-the-batman} (100%) rename levels/find_old_branch/.githug/refs/heads/{solve_world_hunger => solve-world-hunger} (100%) diff --git a/levels/find_old_branch.rb b/levels/find_old_branch.rb index b107df5c..dc98008a 100644 --- a/levels/find_old_branch.rb +++ b/levels/find_old_branch.rb @@ -6,7 +6,7 @@ end solution do - return false unless repo.head.name == "solve_world_hunger" + return false unless repo.head.name == "solve-world-hunger" true end diff --git a/levels/find_old_branch/.githug/logs/refs/heads/blowup_sun_for_ransom b/levels/find_old_branch/.githug/logs/refs/heads/blowup-sun-for-ransom similarity index 100% rename from levels/find_old_branch/.githug/logs/refs/heads/blowup_sun_for_ransom rename to levels/find_old_branch/.githug/logs/refs/heads/blowup-sun-for-ransom diff --git a/levels/find_old_branch/.githug/logs/refs/heads/cure_common_cold b/levels/find_old_branch/.githug/logs/refs/heads/cure-common-cold similarity index 100% rename from levels/find_old_branch/.githug/logs/refs/heads/cure_common_cold rename to levels/find_old_branch/.githug/logs/refs/heads/cure-common-cold diff --git a/levels/find_old_branch/.githug/logs/refs/heads/kill_the_batman b/levels/find_old_branch/.githug/logs/refs/heads/kill-the-batman similarity index 100% rename from levels/find_old_branch/.githug/logs/refs/heads/kill_the_batman rename to levels/find_old_branch/.githug/logs/refs/heads/kill-the-batman diff --git a/levels/find_old_branch/.githug/logs/refs/heads/solve_world_hunger b/levels/find_old_branch/.githug/logs/refs/heads/solve-world-hunger similarity index 100% rename from levels/find_old_branch/.githug/logs/refs/heads/solve_world_hunger rename to levels/find_old_branch/.githug/logs/refs/heads/solve-world-hunger diff --git a/levels/find_old_branch/.githug/refs/heads/blowup_sun_for_ransom b/levels/find_old_branch/.githug/refs/heads/blowup-sun-for-ransom similarity index 100% rename from levels/find_old_branch/.githug/refs/heads/blowup_sun_for_ransom rename to levels/find_old_branch/.githug/refs/heads/blowup-sun-for-ransom diff --git a/levels/find_old_branch/.githug/refs/heads/cure_common_cold b/levels/find_old_branch/.githug/refs/heads/cure-common-cold similarity index 100% rename from levels/find_old_branch/.githug/refs/heads/cure_common_cold rename to levels/find_old_branch/.githug/refs/heads/cure-common-cold diff --git a/levels/find_old_branch/.githug/refs/heads/kill_the_batman b/levels/find_old_branch/.githug/refs/heads/kill-the-batman similarity index 100% rename from levels/find_old_branch/.githug/refs/heads/kill_the_batman rename to levels/find_old_branch/.githug/refs/heads/kill-the-batman diff --git a/levels/find_old_branch/.githug/refs/heads/solve_world_hunger b/levels/find_old_branch/.githug/refs/heads/solve-world-hunger similarity index 100% rename from levels/find_old_branch/.githug/refs/heads/solve_world_hunger rename to levels/find_old_branch/.githug/refs/heads/solve-world-hunger diff --git a/spec/githug_spec.rb b/spec/githug_spec.rb index 7afdffdd..302dea2e 100644 --- a/spec/githug_spec.rb +++ b/spec/githug_spec.rb @@ -285,7 +285,7 @@ def skip_level end it "solves the find_old_branch level" do - `git checkout solve_world_hunger` + `git checkout solve-world-hunger` `githug`.should be_solved end From b5fb201b6ebc8be4ae98a4481feb6b4e50e49c5c Mon Sep 17 00:00:00 2001 From: duianto Date: Wed, 13 Feb 2019 14:17:29 +0100 Subject: [PATCH 09/14] Lvl push_branch: branch names underscore to dash other_branch -> other-branch test_branch -> test-branch --- levels/push_branch.rb | 16 ++++++++-------- spec/githug_spec.rb | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/levels/push_branch.rb b/levels/push_branch.rb index 7f0a0a91..934ea985 100644 --- a/levels/push_branch.rb +++ b/levels/push_branch.rb @@ -1,5 +1,5 @@ difficulty 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" +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" setup do @@ -24,18 +24,18 @@ repo.commit_all "If this commit gets pushed to repo, then you have lost the level :( " #This branch should not be pushed to to the remote repository - `git checkout -b other_branch --quiet` + `git checkout -b other-branch --quiet` # add another file FileUtils.touch "file3" repo.add "file3" repo.commit_all "If this commit gets pushed to repo, then you have lost the level :( " - `git checkout -b test_branch --quiet` + `git checkout -b test-branch --quiet` #This file should get pushed if the level is successful FileUtils.touch "file4" repo.add "file4" - repo.commit_all "committed change on test_branch" + repo.commit_all "committed change on test-branch" # remote repo Dir.chdir tmpdir @@ -64,19 +64,19 @@ # counts the number of commits in the remote master branch' remote_master_commits = repo.commits('origin/master').count - remote_test_branch_commits = repo.commits('origin/test_branch').count #if returns 0 indicates that the remote test_branch doesn't exist + remote_test_branch_commits = repo.commits('origin/test-branch').count #if returns 0 indicates that the remote test-branch doesn't exist - #Level will be successful if the remote master branch remains at 1 commit, the remote test_branch exits and the number of remote branches + #Level will be successful if the remote master branch remains at 1 commit, the remote test-branch exits and the number of remote branches if remote_master_commits == 1 and remote_test_branch_commits > 0 and num_remote_branches == 2 result = true #User pushed up too many branches, level failed elsif num_remote_branches > 2 - puts "*** It looks like you pushed up too many branches. You need to make sure only 'test_branch' gets pushed. Please try again! ***" + puts "*** It looks like you pushed up too many branches. You need to make sure only 'test-branch' gets pushed. Please try again! ***" #User pushed up the master banch, level failed elsif remote_master_commits > 1 - puts "*** It looks like you pushed up new master branch changes. You need to make sure only 'test_branch' gets pushed. Please try again! ***" + puts "*** It looks like you pushed up new master branch changes. You need to make sure only 'test-branch' gets pushed. Please try again! ***" end result diff --git a/spec/githug_spec.rb b/spec/githug_spec.rb index 302dea2e..a75bca75 100644 --- a/spec/githug_spec.rb +++ b/spec/githug_spec.rb @@ -217,7 +217,7 @@ def skip_level end it "solves the push_branch level" do - `git push origin test_branch` + `git push origin test-branch` `githug`.should be_solved end From a27a4e651ce6b6020568f4444e70e45f302d8128 Mon Sep 17 00:00:00 2001 From: duianto Date: Wed, 13 Feb 2019 14:20:29 +0100 Subject: [PATCH 10/14] Lvl push_tags: tag name underscore to dash tag_to_be_pushed -> tag-to-be-pushed --- levels/push_tags.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/levels/push_tags.rb b/levels/push_tags.rb index ca0cdf9d..c59006fa 100644 --- a/levels/push_tags.rb +++ b/levels/push_tags.rb @@ -13,7 +13,7 @@ FileUtils.touch "file1" repo.add "file1" repo.commit_all "First commit" - repo.git.tag({'f' => true}, "tag_to_be_pushed") + repo.git.tag({'f' => true}, "tag-to-be-pushed") FileUtils.touch "file2" repo.add "file2" @@ -35,7 +35,7 @@ # delete tags from remote Dir.chdir tmpdir - repo.git.tag({'d' => true}, "tag_to_be_pushed") + repo.git.tag({'d' => true}, "tag-to-be-pushed") # change back to local repo Dir.chdir cwd @@ -52,7 +52,7 @@ # see if we have the correct tag in the remote remote_tags.each do |t| - solved=true if t.include?("refs/tags/tag_to_be_pushed") + solved=true if t.include?("refs/tags/tag-to-be-pushed") end solved From 2c150e69b84fe33edbf9b151f4beb9be1ddf37cc Mon Sep 17 00:00:00 2001 From: duianto Date: Wed, 13 Feb 2019 14:23:35 +0100 Subject: [PATCH 11/14] Lvl rebase_onto: branch name underscore to dash wrong_branch -> wrong-branch --- levels/rebase_onto.rb | 6 +++--- spec/githug_spec.rb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/levels/rebase_onto.rb b/levels/rebase_onto.rb index e5043ef2..fefa8584 100644 --- a/levels/rebase_onto.rb +++ b/levels/rebase_onto.rb @@ -1,8 +1,8 @@ difficulty 2 -description "You have created your branch from `wrong_branch` and already made some commits, \ +description "You have created your branch from `wrong-branch` and already made some commits, \ and you realise that you needed to create your branch from `master`. \ -Rebase your commits onto `master` branch so that you don't have `wrong_branch` commits." +Rebase your commits onto `master` branch so that you don't have `wrong-branch` commits." setup do readme_file = "README.md" @@ -14,7 +14,7 @@ repo.add(authors_file) repo.commit_all("Create authors file") - repo.git.native :checkout, { "b" => true }, "wrong_branch" + repo.git.native :checkout, { "b" => true }, "wrong-branch" File.open(authors_file, "w") { |f| f << "None\n" } repo.add(authors_file) repo.commit_all("Wrong changes") diff --git a/spec/githug_spec.rb b/spec/githug_spec.rb index a75bca75..4c4a6a22 100644 --- a/spec/githug_spec.rb +++ b/spec/githug_spec.rb @@ -239,7 +239,7 @@ def skip_level it "solves the rebase_onto level" do `git checkout readme-update` - `git rebase --onto master wrong_branch readme-update` + `git rebase --onto master wrong-branch readme-update` `githug`.should be_solved end From 53f58b481baa35fdb90bbc8084cefbcde2f15a7b Mon Sep 17 00:00:00 2001 From: duianto Date: Wed, 13 Feb 2019 14:24:56 +0100 Subject: [PATCH 12/14] Lvl remote: repo name underscore to dash my_remote_repo -> my-remote-repo --- levels/remote.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/levels/remote.rb b/levels/remote.rb index 51568607..72ec9489 100644 --- a/levels/remote.rb +++ b/levels/remote.rb @@ -4,11 +4,11 @@ setup do repo.init - repo.remote_add("my_remote_repo", "https://github.com/Gazler/githug") + repo.remote_add("my-remote-repo", "https://github.com/Gazler/githug") end solution do - "my_remote_repo" == request("What is the name of the remote repository?") + "my-remote-repo" == request("What is the name of the remote repository?") end hint do From 78f8bd053f257e6fe34af8fa11c8c7bcf45117bf Mon Sep 17 00:00:00 2001 From: duianto Date: Wed, 13 Feb 2019 14:58:47 +0100 Subject: [PATCH 13/14] Lvl remote_url: repo names underscore to dash my_remote_repo -> my-remote-repo remote_location -> remote-location --- levels/remote_url.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/levels/remote_url.rb b/levels/remote_url.rb index dc15367b..f2233408 100644 --- a/levels/remote_url.rb +++ b/levels/remote_url.rb @@ -1,11 +1,11 @@ difficulty 2 -description "The remote repositories have a url associated to them. Please enter the url of remote_location." +description "The remote repositories have a url associated to them. Please enter the url of remote-location." setup do repo.init - repo.remote_add("my_remote_repo", "https://github.com/Gazler/githug") - repo.remote_add("remote_location", "https://github.com/githug/not_a_repo") + repo.remote_add("my-remote-repo", "https://github.com/Gazler/githug") + repo.remote_add("remote-location", "https://github.com/githug/not_a_repo") end solution do From 09213a422d8b31c7994820c538d58cee1ca5b615 Mon Sep 17 00:00:00 2001 From: duianto Date: Wed, 13 Feb 2019 15:24:34 +0100 Subject: [PATCH 14/14] Lvl tag: tag name underscore to dash new_tag -> new-tag --- levels/tag.rb | 4 ++-- spec/githug_spec.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/levels/tag.rb b/levels/tag.rb index ad614a16..43bed4e2 100644 --- a/levels/tag.rb +++ b/levels/tag.rb @@ -1,6 +1,6 @@ difficulty 2 -description "We have a git repo and we want to tag the current commit with `new_tag`." +description "We have a git repo and we want to tag the current commit with `new-tag`." setup do repo.init @@ -10,7 +10,7 @@ end solution do - repo.tags.first.name == "new_tag" + repo.tags.first.name == "new-tag" end hint do diff --git a/spec/githug_spec.rb b/spec/githug_spec.rb index 4c4a6a22..b6a74005 100644 --- a/spec/githug_spec.rb +++ b/spec/githug_spec.rb @@ -115,7 +115,7 @@ def skip_level end it "solves the tag level" do - `git tag new_tag` + `git tag new-tag` `githug`.should be_solved end