{"id":19552304,"url":"https://github.com/simonewebdesign/koans","last_synced_at":"2025-11-20T02:02:07.350Z","repository":{"id":12039421,"uuid":"14624798","full_name":"simonewebdesign/koans","owner":"simonewebdesign","description":"The Path to Enlightenment","archived":false,"fork":false,"pushed_at":"2013-12-29T20:18:25.000Z","size":256,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-26T07:18:16.112Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://rubykoans.com/","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simonewebdesign.png","metadata":{"files":{"readme":"README.rdoc","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-22T17:41:05.000Z","updated_at":"2013-12-29T20:18:26.000Z","dependencies_parsed_at":"2022-09-03T14:31:11.302Z","dependency_job_id":null,"html_url":"https://github.com/simonewebdesign/koans","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/simonewebdesign/koans","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonewebdesign%2Fkoans","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonewebdesign%2Fkoans/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonewebdesign%2Fkoans/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonewebdesign%2Fkoans/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonewebdesign","download_url":"https://codeload.github.com/simonewebdesign/koans/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonewebdesign%2Fkoans/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285359022,"owners_count":27158216,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-20T02:00:05.334Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T04:17:31.695Z","updated_at":"2025-11-20T02:02:07.303Z","avatar_url":"https://github.com/simonewebdesign.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Neo Ruby Koans\n\nThe Ruby Koans walk you along the path to enlightenment in order to learn Ruby.\nThe goal is to learn the Ruby language, syntax, structure, and some common\nfunctions and libraries. We also teach you culture by basing the koans on tests.\nTesting is not just something we pay lip service to, but something we\nlive.  Testing is essential in your quest to learn and do great things in Ruby.\n\n== The Structure\n\nThe koans are broken out into areas by file, hashes are covered in +about_hashes.rb+,\nmodules are introduced in +about_modules.rb+, \u003cem\u003eetc\u003c/em\u003e.  They are presented in\norder in the +path_to_enlightenment.rb+ file.\n\nEach koan builds up your knowledge of Ruby and builds upon itself. It will stop at\nthe first place you need to correct.\n\nSome koans simply need to have the correct answer substituted for an incorrect one.\nSome, however, require you to supply your own answer.  If you see the method +__+ (a\ndouble underscore) listed, it is a hint to you to supply your own code in order to\nmake it work correctly.\n\n== Installing Ruby\n\nIf you do not have Ruby setup, please visit http://ruby-lang.org/en/downloads/ for\noperating specific instructions.  In order to run the koans you need +ruby+ and\n+rake+ installed. To check your installations simply type:\n\n*nix platforms from any terminal window:\n\n   [~] $ ruby --version\n   [~] $ rake --version\n\nWindows from the command prompt (+cmd.exe+)\n\n   c:\\ruby --version\n   c:\\rake --version\n\nIf you don't have +rake+ installed, just run \u003ccode\u003egem install rake\u003c/code\u003e\n\nAny response for Ruby with a version number greater than 1.8 is fine (should be\naround 1.8.6 or more). Any version of +rake+ will do.\n\n== Generating the Koans\n\nA fresh checkout will not include the koans, you will need to generate\nthem.\n\n    [ruby_koans] $ rake gen                       # generates the koans directory\n\nIf you need to regenerate the koans, thus wiping your current `koans`,\n\n    [ruby_koans] $ rake regen                     # regenerates the koans directory, wiping the original\n\n== The Path To Enlightenment\n\nYou can run the tests through +rake+ or by calling the file itself (+rake+ is the\nrecommended way to run them as we might build more functionality into this task).\n\n*nix platforms, from the +ruby_koans+ directory\n\n    [ruby_koans] $ rake                           # runs the default target :walk_the_path\n    [ruby_koans] $ ruby path_to_enlightenment.rb  # simply call the file directly\n\nWindows is the same thing\n\n    c:\\ruby_koans\\rake                             # runs the default target :walk_the_path\n    c:\\ruby_koans\\ruby path_to_enlightenment.rb    # simply call the file directly\n\n=== Red, Green, Refactor\n\nIn test-driven development the mantra has always been \u003cem\u003ered, green, refactor\u003c/em\u003e.\nWrite a failing test and run it (\u003cem\u003ered\u003c/em\u003e), make the test pass (\u003cem\u003egreen\u003c/em\u003e),\nthen look at the code and consider if you can make it any better (\u003cem\u003erefactor\u003c/em\u003e).\n\nWhile walking the path to Ruby enlightenment you will need to run the koan and\nsee it fail (\u003cem\u003ered\u003c/em\u003e), make the test pass (\u003cem\u003egreen\u003c/em\u003e), then take a moment\nand reflect upon the test to see what it is teaching you and improve the code to\nbetter communicate its intent (\u003cem\u003erefactor\u003c/em\u003e).\n\nThe very first time you run the koans you will see the following output:\n\n    [ ruby_koans ] $ rake\n    (in /Users/person/dev/ruby_koans)\n    /usr/bin/ruby1.8 path_to_enlightenment.rb\n\n    AboutAsserts#test_assert_truth has damaged your karma.\n\n    The Master says:\n    You have not yet reached enlightenment.\n\n    The answers you seek...\n    \u003cfalse\u003e is not true.\n\n    Please meditate on the following code:\n    ./about_asserts.rb:10:in `test_assert_truth'\n    path_to_enlightenment.rb:38:in `each_with_index'\n    path_to_enlightenment.rb:38\n\n    mountains are merely mountains\n    your path thus far [X_________________________________________________] 0/280\n\nYou have come to your first stage. Notice it is telling you where to look for\nthe first solution:\n\n    Please meditate on the following code:\n    ./about_asserts.rb:10:in `test_assert_truth'\n    path_to_enlightenment.rb:38:in `each_with_index'\n    path_to_enlightenment.rb:38\n\nOpen the +about_asserts.rb+ file and look at the first test:\n\n    # We shall contemplate truth by testing reality, via asserts.\n    def test_assert_truth\n      assert false                # This should be true\n    end\n\nChange the +false+ to +true+ and re-run the test.  After you are\ndone, think about what you are learning.  In this case, ignore everything except\nthe method name (+test_assert_truth+) and the parts inside the method (everything\nbefore the +end+).\n\nIn this case the goal is for you to see that if you pass a value to the +assert+\nmethod, it will either ensure it is +true+ and continue on, or fail if\nthe statement is +false+.\n\n=== Running the Koans automatically\n\n\u003cem\u003eThis section is optional.\u003c/em\u003e\n\nNormally the path to enlightenment looks like this:\n\n    cd ruby_koans\n    rake\n    # edit\n    rake\n    # edit\n    rake\n    # etc\n\nIf you prefer, you can keep the koans running in the background so that after you\nmake a change in your editor, the koans will immediately run again. This will\nhopefully keep your focus on learning Ruby instead of on the command line.\n\nInstall the Ruby gem (library) called +watchr+ and then ask it to\n\"watch\" the koans for changes:\n\n    cd ruby_koans\n    rake\n    # decide to run rake automatically from now on as you edit\n    gem install watchr\n    watchr ./koans/koans.watchr\n\n== Inspiration\n\nA special thanks to Mike Clark and Ara Howard for inspiring this\nproject.  Mike Clark wrote an excellent blog post about learning Ruby\nthrough unit testing. This sparked an idea that has taken a bit to\nsolidify, that of bringing new rubyists into the community through\ntesting. Ara Howard then gave us the idea for the Koans in his ruby\nquiz entry on Meta Koans (a must for any rubyist wanting to improve\ntheir skills).  Also, \"The Little Lisper\" taught us all the value of\nthe short questions/simple answers style of learning.\n\nMike Clark's post ::  http://www.clarkware.com/cgi/blosxom/2005/03/18\nMeta Koans        ::  http://rubyquiz.com/quiz67.html\nThe Little Lisper ::  http://www.amazon.com/Little-LISPer-Third-Daniel-Friedman/dp/0023397632\n\n== Other Resources\n\nThe Ruby Language               ::  http://ruby-lang.org\nTry Ruby in your browser        ::  http://tryruby.org\n\nDave Thomas' introduction to Ruby Programming Ruby (the Pick Axe) ::  http://pragprog.com/titles/ruby/programming-ruby\n\nBrian Marick's fantastic guide for beginners Everyday Scripting with Ruby    ::  http://pragprog.com/titles/bmsft/everyday-scripting-with-ruby\n\n= Other stuff\n\nAuthor         :: Jim Weirich \u003cjim@neo.org\u003e\nAuthor         :: Joe O'Brien \u003cjoe@objo.com\u003e\nIssue Tracker  :: http://www.pivotaltracker.com/projects/48111\nRequires       :: Ruby 1.8.x or later and Rake (any recent version)\n\n= License\n\nhttp://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png\n\nRubyKoans is released under a Creative Commons,\nAttribution-NonCommercial-ShareAlike, Version 3.0\n(http://creativecommons.org/licenses/by-nc-sa/3.0/) License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonewebdesign%2Fkoans","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonewebdesign%2Fkoans","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonewebdesign%2Fkoans/lists"}