trackler 2.2.1.99 → 2.2.1.100
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/trackler/version.rb +1 -1
- data/problem-specifications/exercises/clock/canonical-data.json +303 -204
- data/problem-specifications/exercises/complex-numbers/canonical-data.json +104 -44
- data/problem-specifications/exercises/matrix/canonical-data.json +78 -0
- data/problem-specifications/exercises/word-count/canonical-data.json +12 -12
- data/tracks/bash/config.json +128 -110
- data/tracks/c/exercises/word-count/test/test_word_count.c +2 -2
- data/tracks/dart/CONTRIBUTING.md +2 -2
- data/tracks/dart/docs/EXERCISE_README_INSERT.md +0 -1
- data/tracks/dart/docs/INSTALLATION.md +17 -11
- data/tracks/fsharp/exercises/acronym/AcronymTest.fs +3 -7
- data/tracks/fsharp/exercises/anagram/AnagramTest.fs +1 -21
- data/tracks/fsharp/exercises/book-store/BookStoreTest.fs +1 -1
- data/tracks/fsharp/exercises/complex-numbers/ComplexNumbersTest.fs +25 -25
- data/tracks/fsharp/exercises/custom-set/CustomSetTest.fs +1 -1
- data/tracks/fsharp/exercises/food-chain/FoodChainTest.fs +1 -1
- data/tracks/fsharp/exercises/gigasecond/GigasecondTest.fs +1 -1
- data/tracks/fsharp/exercises/hamming/HammingTest.fs +1 -1
- data/tracks/fsharp/exercises/hello-world/HelloWorldTest.fs +1 -1
- data/tracks/fsharp/exercises/largest-series-product/LargestSeriesProductTest.fs +1 -1
- data/tracks/fsharp/exercises/leap/LeapTest.fs +1 -1
- data/tracks/fsharp/exercises/markdown/MarkdownTest.fs +19 -19
- data/tracks/fsharp/exercises/minesweeper/MinesweeperTest.fs +27 -27
- data/tracks/fsharp/exercises/nth-prime/NthPrimeTest.fs +1 -1
- data/tracks/fsharp/exercises/nucleotide-count/NucleotideCountTest.fs +1 -1
- data/tracks/fsharp/exercises/pangram/PangramTest.fs +1 -1
- data/tracks/fsharp/exercises/pascals-triangle/PascalsTriangleTest.fs +1 -1
- data/tracks/fsharp/exercises/perfect-numbers/PerfectNumbersTest.fs +1 -1
- data/tracks/fsharp/exercises/phone-number/PhoneNumberTest.fs +11 -3
- data/tracks/fsharp/exercises/pig-latin/PigLatinTest.fs +1 -1
- data/tracks/fsharp/exercises/protein-translation/Example.fs +2 -2
- data/tracks/fsharp/exercises/protein-translation/ProteinTranslation.fs +1 -1
- data/tracks/fsharp/exercises/protein-translation/ProteinTranslationTest.fs +94 -60
- data/tracks/fsharp/exercises/react/ReactTest.fs +1 -1
- data/tracks/fsharp/exercises/rna-transcription/RnaTranscriptionTest.fs +1 -1
- data/tracks/fsharp/exercises/roman-numerals/RomanNumeralsTest.fs +1 -1
- data/tracks/fsharp/exercises/rotational-cipher/RotationalCipherTest.fs +1 -1
- data/tracks/fsharp/exercises/say/Example.fs +1 -1
- data/tracks/fsharp/exercises/say/SayTest.fs +21 -24
- data/tracks/fsharp/exercises/scrabble-score/ScrabbleScoreTest.fs +1 -1
- data/tracks/fsharp/exercises/secret-handshake/Example.fs +2 -2
- data/tracks/fsharp/exercises/secret-handshake/SecretHandshake.fs +1 -1
- data/tracks/fsharp/exercises/secret-handshake/SecretHandshakeTest.fs +39 -22
- data/tracks/fsharp/exercises/sieve/Example.fs +1 -1
- data/tracks/fsharp/exercises/sieve/Sieve.fs +1 -1
- data/tracks/fsharp/exercises/sieve/SieveTest.fs +19 -21
- data/tracks/fsharp/exercises/spiral-matrix/SpiralMatrixTest.fs +1 -1
- data/tracks/fsharp/exercises/sum-of-multiples/Example.fs +1 -1
- data/tracks/fsharp/exercises/sum-of-multiples/SumOfMultiples.fs +1 -1
- data/tracks/fsharp/exercises/sum-of-multiples/SumOfMultiplesTest.fs +44 -14
- data/tracks/fsharp/exercises/twelve-days/TwelveDaysTest.fs +1 -1
- data/tracks/fsharp/exercises/two-fer/Example.fs +1 -1
- data/tracks/fsharp/exercises/two-fer/TwoFer.fs +1 -1
- data/tracks/fsharp/exercises/two-fer/TwoFerTest.fs +4 -4
- data/tracks/fsharp/exercises/word-count/Example.fs +2 -2
- data/tracks/fsharp/exercises/word-count/WordCount.fs +2 -2
- data/tracks/fsharp/exercises/word-count/WordCountTest.fs +80 -100
- data/tracks/fsharp/exercises/wordy/Example.fs +2 -3
- data/tracks/fsharp/exercises/wordy/Wordy.fs +1 -1
- data/tracks/fsharp/exercises/wordy/WordyTest.fs +51 -49
- data/tracks/fsharp/exercises/zebra-puzzle/Example.fs +4 -4
- data/tracks/fsharp/exercises/zebra-puzzle/ZebraPuzzleTest.fs +7 -8
- data/tracks/fsharp/generators/Common.fs +3 -1
- data/tracks/fsharp/generators/Exercise.fs +12 -1
- data/tracks/fsharp/generators/Generators.fs +89 -42
- data/tracks/fsharp/generators/Generators.fsproj +1 -0
- data/tracks/fsharp/generators/Options.fs +14 -7
- data/tracks/fsharp/generators/Program.fs +3 -0
- data/tracks/fsharp/generators/Rendering.fs +0 -1
- data/tracks/fsharp/generators/Track.fs +26 -0
- data/tracks/go/exercises/custom-set/.meta/gen.go +16 -14
- data/tracks/go/exercises/custom-set/cases_test.go +2 -2
- data/tracks/java/exercises/food-chain/.meta/version +1 -0
- data/tracks/java/exercises/sieve/.meta/version +1 -0
- data/tracks/java/exercises/sieve/src/test/java/SieveTest.java +17 -0
- data/tracks/java/exercises/twelve-days/.meta/version +1 -0
- data/tracks/java/exercises/twelve-days/src/test/java/TwelveDaysTest.java +15 -3
- data/tracks/java/exercises/two-fer/.meta/version +1 -0
- data/tracks/java/exercises/two-fer/src/test/java/TwoferTest.java +0 -9
- data/tracks/ocaml/config/exercise_readme.go.tmpl +38 -4
- data/tracks/ocaml/exercises/acronym/README.md +0 -2
- data/tracks/ocaml/exercises/all-your-base/README.md +1 -3
- data/tracks/ocaml/exercises/anagram/README.md +0 -1
- data/tracks/ocaml/exercises/atbash-cipher/README.md +2 -2
- data/tracks/ocaml/exercises/beer-song/README.md +2 -3
- data/tracks/ocaml/exercises/binary-search/README.md +0 -1
- data/tracks/ocaml/exercises/bob/README.md +2 -1
- data/tracks/ocaml/exercises/bowling/README.md +20 -7
- data/tracks/ocaml/exercises/bracket-push/README.md +0 -1
- data/tracks/ocaml/exercises/change/README.md +1 -2
- data/tracks/ocaml/exercises/connect/README.md +1 -3
- data/tracks/ocaml/exercises/custom-set/README.md +0 -2
- data/tracks/ocaml/exercises/difference-of-squares/README.md +0 -1
- data/tracks/ocaml/exercises/dominoes/README.md +3 -5
- data/tracks/ocaml/exercises/etl/README.md +3 -2
- data/tracks/ocaml/exercises/forth/README.md +0 -2
- data/tracks/ocaml/exercises/grade-school/README.md +0 -1
- data/tracks/ocaml/exercises/hamming/README.md +0 -1
- data/tracks/ocaml/exercises/hangman/README.md +0 -2
- data/tracks/ocaml/exercises/hello-world/README.md +0 -1
- data/tracks/ocaml/exercises/hexadecimal/README.md +0 -1
- data/tracks/ocaml/exercises/leap/README.md +1 -2
- data/tracks/ocaml/exercises/list-ops/README.md +0 -2
- data/tracks/ocaml/exercises/luhn/README.md +7 -8
- data/tracks/ocaml/exercises/meetup/README.md +16 -14
- data/tracks/ocaml/exercises/minesweeper/README.md +0 -2
- data/tracks/ocaml/exercises/nucleotide-count/README.md +8 -23
- data/tracks/ocaml/exercises/palindrome-products/README.md +0 -1
- data/tracks/ocaml/exercises/pangram/README.md +1 -2
- data/tracks/ocaml/exercises/phone-number/README.md +4 -4
- data/tracks/ocaml/exercises/prime-factors/README.md +0 -1
- data/tracks/ocaml/exercises/raindrops/README.md +0 -1
- data/tracks/ocaml/exercises/react/README.md +0 -2
- data/tracks/ocaml/{docs/EXERCISE_README_INSERT.md → exercises/rectangles/README.md} +67 -0
- data/tracks/ocaml/exercises/rna-transcription/README.md +1 -2
- data/tracks/ocaml/exercises/robot-name/README.md +0 -1
- data/tracks/ocaml/exercises/roman-numerals/README.md +1 -2
- data/tracks/ocaml/exercises/run-length-encoding/README.md +4 -5
- data/tracks/ocaml/exercises/say/README.md +0 -1
- data/tracks/ocaml/exercises/space-age/README.md +1 -2
- data/tracks/ocaml/exercises/triangle/README.md +8 -6
- data/tracks/ocaml/exercises/word-count/README.md +1 -3
- data/tracks/ocaml/exercises/zipper/README.md +1 -3
- data/tracks/perl6/.travis.yml +1 -1
- data/tracks/perl6/bin/README.md +1 -2
- data/tracks/perl6/bin/exercise-gen.pl6 +18 -18
- data/tracks/perl6/config.json +1 -0
- data/tracks/perl6/exercises/accumulate/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/accumulate/{Example.pm6 → .meta/solutions/Accumulate.pm6} +0 -0
- data/tracks/perl6/exercises/acronym/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/acronym/{Example.pm6 → .meta/solutions/Acronym.pm6} +0 -0
- data/tracks/perl6/exercises/all-your-base/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/all-your-base/{Example.pm6 → .meta/solutions/AllYourBase.pm6} +0 -0
- data/tracks/perl6/exercises/allergies/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/allergies/{Example.pm6 → .meta/solutions/Allergies.pm6} +0 -0
- data/tracks/perl6/exercises/anagram/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/anagram/{Example.pm6 → .meta/solutions/Anagram.pm6} +0 -0
- data/tracks/perl6/exercises/atbash-cipher/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/atbash-cipher/{Example.pm6 → .meta/solutions/AtbashCipher.pm6} +0 -0
- data/tracks/perl6/exercises/binary/{Example.pm6 → .meta/solutions/Trinary.pm6} +0 -0
- data/tracks/perl6/exercises/bob/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/bob/{Example.pm6 → .meta/solutions/Bob.pm6} +0 -0
- data/tracks/perl6/exercises/clock/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/clock/{Example.pm6 → .meta/solutions/Clock.pm6} +0 -0
- data/tracks/perl6/exercises/etl/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/etl/{Example.pm6 → .meta/solutions/ETL.pm6} +0 -0
- data/tracks/perl6/exercises/flatten-array/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/flatten-array/{Example.pm6 → .meta/solutions/FlattenArray.pm6} +0 -0
- data/tracks/perl6/exercises/grade-school/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/grade-school/{Example.pm6 → .meta/solutions/GradeSchool.pm6} +0 -0
- data/tracks/perl6/exercises/grains/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/grains/{Example.pm6 → .meta/solutions/Grains.pm6} +0 -0
- data/tracks/perl6/exercises/hamming/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/hamming/{Example.pm6 → .meta/solutions/Hamming.pm6} +0 -0
- data/tracks/perl6/exercises/hello-world/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/hello-world/{Example.pm6 → .meta/solutions/HelloWorld.pm6} +0 -0
- data/tracks/perl6/exercises/leap/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/leap/{Example.pm6 → .meta/solutions/Leap.pm6} +0 -0
- data/tracks/perl6/exercises/linked-list/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/linked-list/{Example.pm6 → .meta/solutions/LinkedList.pm6} +0 -0
- data/tracks/perl6/exercises/luhn/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/luhn/{Example.pm6 → .meta/solutions/Luhn.pm6} +0 -0
- data/tracks/perl6/exercises/meetup/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/meetup/{Example.pm6 → .meta/solutions/Meetup.pm6} +0 -0
- data/tracks/perl6/exercises/nucleotide-count/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/nucleotide-count/{Example.pm6 → .meta/solutions/NucleotideCount.pm6} +0 -0
- data/tracks/perl6/exercises/pangram/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/pangram/{Example.pm6 → .meta/solutions/Pangram.pm6} +0 -0
- data/tracks/perl6/exercises/phone-number/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/phone-number/{Example.pm6 → .meta/solutions/Phone.pm6} +0 -0
- data/tracks/perl6/exercises/raindrops/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/raindrops/{Example.pm6 → .meta/solutions/Raindrops.pm6} +0 -0
- data/tracks/perl6/exercises/rna-transcription/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/rna-transcription/{Example.pm6 → .meta/solutions/RNA.pm6} +0 -0
- data/tracks/perl6/exercises/robot-name/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/robot-name/{Example.pm6 → .meta/solutions/Robot.pm6} +0 -0
- data/tracks/perl6/exercises/roman-numerals/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/roman-numerals/{Example.pm6 → .meta/solutions/RomanNumerals.pm6} +0 -0
- data/tracks/perl6/exercises/scrabble-score/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/scrabble-score/{Example.pm6 → .meta/solutions/Scrabble.pm6} +0 -0
- data/tracks/perl6/exercises/space-age/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/space-age/{Example.pm6 → .meta/solutions/SpaceAge.pm6} +0 -0
- data/tracks/perl6/exercises/trinary/{Example.pm6 → .meta/solutions/Trinary.pm6} +0 -0
- data/tracks/perl6/exercises/two-fer/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/two-fer/{Example.pm6 → .meta/solutions/TwoFer.pm6} +0 -0
- data/tracks/perl6/exercises/word-count/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/word-count/{Example.pm6 → .meta/solutions/WordCount.pm6} +0 -0
- data/tracks/perl6/exercises/wordy/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/wordy/{Example.pm6 → .meta/solutions/Wordy.pm6} +0 -0
- data/tracks/perl6/t/generated-tests.t +2 -2
- data/tracks/python/config.json +12 -0
- data/tracks/python/exercises/bowling/.gitignore +0 -0
- data/tracks/python/exercises/bowling/bowling.py +11 -0
- data/tracks/python/exercises/bowling/bowling_test.py +193 -0
- data/tracks/python/exercises/bowling/example.py +149 -0
- data/tracks/python/exercises/say/say_test.py +1 -1
- data/tracks/ruby/README.md +121 -97
- data/tracks/ruby/config/exercise_readme.go.tmpl +23 -4
- data/tracks/ruby/exercises/accumulate/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/ruby/exercises/accumulate/README.md +3 -5
- data/tracks/ruby/exercises/acronym/README.md +3 -6
- data/tracks/ruby/exercises/all-your-base/README.md +4 -7
- data/tracks/ruby/exercises/allergies/README.md +3 -6
- data/tracks/ruby/exercises/alphametics/README.md +5 -8
- data/tracks/ruby/exercises/anagram/README.md +3 -5
- data/tracks/ruby/exercises/atbash-cipher/README.md +5 -6
- data/tracks/ruby/exercises/beer-song/README.md +5 -7
- data/tracks/ruby/exercises/binary-search-tree/README.md +3 -5
- data/tracks/ruby/exercises/binary-search/README.md +3 -5
- data/tracks/ruby/exercises/binary/README.md +5 -5
- data/tracks/ruby/exercises/bob/README.md +3 -5
- data/tracks/ruby/exercises/book-store/README.md +3 -5
- data/tracks/ruby/exercises/bowling/README.md +23 -11
- data/tracks/ruby/exercises/bracket-push/README.md +3 -5
- data/tracks/ruby/exercises/change/README.md +3 -5
- data/tracks/ruby/exercises/circular-buffer/README.md +16 -11
- data/tracks/ruby/exercises/clock/README.md +3 -5
- data/tracks/ruby/exercises/collatz-conjecture/README.md +4 -6
- data/tracks/ruby/exercises/complex-numbers/README.md +6 -8
- data/tracks/ruby/exercises/connect/README.md +4 -7
- data/tracks/ruby/exercises/crypto-square/README.md +3 -5
- data/tracks/ruby/exercises/custom-set/README.md +3 -6
- data/tracks/ruby/exercises/diamond/README.md +9 -11
- data/tracks/ruby/exercises/difference-of-squares/README.md +3 -5
- data/tracks/ruby/exercises/dominoes/README.md +6 -9
- data/tracks/ruby/exercises/etl/README.md +6 -6
- data/tracks/ruby/exercises/flatten-array/README.md +5 -8
- data/tracks/ruby/exercises/food-chain/README.md +4 -6
- data/tracks/ruby/exercises/gigasecond/README.md +3 -5
- data/tracks/ruby/exercises/grade-school/README.md +3 -6
- data/tracks/ruby/exercises/grains/README.md +3 -6
- data/tracks/ruby/exercises/hamming/README.md +3 -5
- data/tracks/ruby/exercises/hello-world/README.md +1 -3
- data/tracks/ruby/exercises/hexadecimal/README.md +3 -5
- data/tracks/ruby/exercises/house/README.md +5 -8
- data/tracks/ruby/exercises/isbn-verifier/README.md +4 -6
- data/tracks/ruby/exercises/isogram/README.md +5 -6
- data/tracks/ruby/exercises/kindergarten-garden/README.md +16 -18
- data/tracks/ruby/exercises/largest-series-product/README.md +3 -5
- data/tracks/ruby/exercises/leap/README.md +4 -6
- data/tracks/ruby/exercises/linked-list/README.md +13 -15
- data/tracks/ruby/exercises/list-ops/README.md +3 -6
- data/tracks/ruby/exercises/luhn/README.md +10 -12
- data/tracks/ruby/exercises/matrix/README.md +9 -9
- data/tracks/ruby/exercises/meetup/README.md +19 -18
- data/tracks/ruby/exercises/minesweeper/README.md +3 -6
- data/tracks/ruby/exercises/nth-prime/README.md +3 -5
- data/tracks/ruby/exercises/nucleotide-count/README.md +11 -27
- data/tracks/ruby/exercises/ocr-numbers/README.md +9 -11
- data/tracks/ruby/exercises/octal/README.md +9 -7
- data/tracks/ruby/exercises/palindrome-products/README.md +8 -17
- data/tracks/ruby/exercises/pangram/README.md +4 -6
- data/tracks/ruby/exercises/pascals-triangle/README.md +5 -7
- data/tracks/ruby/exercises/perfect-numbers/README.md +5 -7
- data/tracks/ruby/exercises/phone-number/README.md +7 -8
- data/tracks/ruby/exercises/pig-latin/README.md +3 -5
- data/tracks/ruby/exercises/point-mutations/README.md +3 -5
- data/tracks/ruby/exercises/poker/README.md +3 -5
- data/tracks/ruby/exercises/prime-factors/README.md +3 -5
- data/tracks/ruby/exercises/protein-translation/README.md +7 -10
- data/tracks/ruby/exercises/proverb/README.md +17 -14
- data/tracks/ruby/exercises/pythagorean-triplet/README.md +6 -8
- data/tracks/ruby/exercises/queen-attack/README.md +4 -6
- data/tracks/ruby/exercises/rail-fence-cipher/README.md +15 -12
- data/tracks/ruby/exercises/raindrops/README.md +3 -5
- data/tracks/ruby/exercises/rna-transcription/README.md +4 -6
- data/tracks/ruby/exercises/robot-name/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/ruby/exercises/robot-name/README.md +3 -5
- data/tracks/ruby/exercises/robot-simulator/README.md +3 -5
- data/tracks/ruby/exercises/roman-numerals/README.md +4 -6
- data/tracks/ruby/exercises/rotational-cipher/README.md +3 -5
- data/tracks/ruby/exercises/run-length-encoding/README.md +7 -9
- data/tracks/ruby/exercises/saddle-points/README.md +5 -7
- data/tracks/ruby/exercises/say/README.md +3 -5
- data/tracks/ruby/exercises/scale-generator/README.md +3 -7
- data/tracks/ruby/exercises/scrabble-score/README.md +6 -6
- data/tracks/ruby/exercises/secret-handshake/README.md +4 -6
- data/tracks/ruby/exercises/series/README.md +3 -5
- data/tracks/ruby/exercises/sieve/README.md +3 -5
- data/tracks/ruby/exercises/simple-cipher/README.md +7 -11
- data/tracks/ruby/exercises/simple-linked-list/README.md +3 -5
- data/tracks/ruby/exercises/space-age/README.md +4 -6
- data/tracks/ruby/exercises/strain/README.md +3 -5
- data/tracks/ruby/exercises/sum-of-multiples/README.md +6 -11
- data/tracks/ruby/exercises/tournament/README.md +8 -11
- data/tracks/ruby/exercises/transpose/README.md +10 -12
- data/tracks/ruby/exercises/triangle/README.md +12 -11
- data/tracks/ruby/exercises/trinary/README.md +4 -6
- data/tracks/ruby/exercises/twelve-days/README.md +4 -6
- data/tracks/ruby/exercises/two-bucket/README.md +13 -15
- data/tracks/ruby/exercises/two-fer/README.md +13 -39
- data/tracks/ruby/exercises/word-count/README.md +4 -7
- data/tracks/ruby/exercises/wordy/README.md +3 -10
- metadata +77 -68
- data/tracks/ruby/docs/EXERCISE_README_INSERT.md +0 -24
@@ -20,15 +20,13 @@ If you would like color output, you can `require 'minitest/pride'` in
|
|
20
20
|
the test file, or note the alternative instruction, below, for running
|
21
21
|
the test file.
|
22
22
|
|
23
|
-
|
24
|
-
directory. For example, if the test suite is called
|
25
|
-
`hello_world_test.rb`, you can run the following command:
|
23
|
+
Run the tests from the exercise directory using the following command:
|
26
24
|
|
27
|
-
ruby
|
25
|
+
ruby clock_test.rb
|
28
26
|
|
29
27
|
To include color from the command line:
|
30
28
|
|
31
|
-
ruby -r minitest/pride
|
29
|
+
ruby -r minitest/pride clock_test.rb
|
32
30
|
|
33
31
|
|
34
32
|
## Source
|
@@ -10,6 +10,7 @@ always reach 1 eventually.
|
|
10
10
|
Given a number n, return the number of steps required to reach 1.
|
11
11
|
|
12
12
|
## Examples
|
13
|
+
|
13
14
|
Starting with n = 12, the steps would be as follows:
|
14
15
|
|
15
16
|
0. 12
|
@@ -25,7 +26,6 @@ Starting with n = 12, the steps would be as follows:
|
|
25
26
|
|
26
27
|
Resulting in 9 steps. So for input n = 12, the return value would be 9.
|
27
28
|
|
28
|
-
|
29
29
|
* * * *
|
30
30
|
|
31
31
|
For installation and learning resources, refer to the
|
@@ -40,15 +40,13 @@ If you would like color output, you can `require 'minitest/pride'` in
|
|
40
40
|
the test file, or note the alternative instruction, below, for running
|
41
41
|
the test file.
|
42
42
|
|
43
|
-
|
44
|
-
directory. For example, if the test suite is called
|
45
|
-
`hello_world_test.rb`, you can run the following command:
|
43
|
+
Run the tests from the exercise directory using the following command:
|
46
44
|
|
47
|
-
ruby
|
45
|
+
ruby collatz_conjecture_test.rb
|
48
46
|
|
49
47
|
To include color from the command line:
|
50
48
|
|
51
|
-
ruby -r minitest/pride
|
49
|
+
ruby -r minitest/pride collatz_conjecture_test.rb
|
52
50
|
|
53
51
|
|
54
52
|
## Source
|
@@ -1,12 +1,12 @@
|
|
1
1
|
# Complex Numbers
|
2
2
|
|
3
|
-
A complex number is a number in the form `
|
3
|
+
A complex number is a number in the form `a + b * i` where `a` and `b` are real and `i` satisfies `i^2 = -1`.
|
4
4
|
|
5
5
|
`a` is called the real part and `b` is called the imaginary part of `z`.
|
6
6
|
The conjugate of the number `a + b * i` is the number `a - b * i`.
|
7
7
|
The absolute value of a complex number `z = a + b * i` is a real number `|z| = sqrt(a^2 + b^2)`. The square of the absolute value `|z|^2` is the result of multiplication of `z` by its complex conjugate.
|
8
8
|
|
9
|
-
The sum
|
9
|
+
The sum/difference of two complex numbers involves adding/subtracting their real and imaginary parts separately:
|
10
10
|
`(a + i * b) + (c + i * d) = (a + c) + (b + d) * i`,
|
11
11
|
`(a + i * b) - (c + i * d) = (a - c) + (b - d) * i`.
|
12
12
|
|
@@ -45,15 +45,14 @@ If you would like color output, you can `require 'minitest/pride'` in
|
|
45
45
|
the test file, or note the alternative instruction, below, for running
|
46
46
|
the test file.
|
47
47
|
|
48
|
-
|
49
|
-
directory. For example, if the test suite is called
|
50
|
-
`hello_world_test.rb`, you can run the following command:
|
48
|
+
Run the tests from the exercise directory using the following command:
|
51
49
|
|
52
|
-
ruby
|
50
|
+
ruby complex_numbers_test.rb
|
53
51
|
|
54
52
|
To include color from the command line:
|
55
53
|
|
56
|
-
ruby -r minitest/pride
|
54
|
+
ruby -r minitest/pride complex_numbers_test.rb
|
55
|
+
|
57
56
|
|
58
57
|
## Source
|
59
58
|
|
@@ -61,4 +60,3 @@ Wikipedia [https://en.wikipedia.org/wiki/Complex_number](https://en.wikipedia.or
|
|
61
60
|
|
62
61
|
## Submitting Incomplete Solutions
|
63
62
|
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
64
|
-
|
@@ -18,7 +18,7 @@ computes the winner (or lack thereof). Note that all games need not be "fair".
|
|
18
18
|
The boards look like this (with spaces added for readability, which won't be in
|
19
19
|
the representation passed to your code):
|
20
20
|
|
21
|
-
```
|
21
|
+
```text
|
22
22
|
. O . X .
|
23
23
|
. X X O .
|
24
24
|
O O O X .
|
@@ -44,16 +44,13 @@ If you would like color output, you can `require 'minitest/pride'` in
|
|
44
44
|
the test file, or note the alternative instruction, below, for running
|
45
45
|
the test file.
|
46
46
|
|
47
|
-
|
48
|
-
directory. For example, if the test suite is called
|
49
|
-
`hello_world_test.rb`, you can run the following command:
|
47
|
+
Run the tests from the exercise directory using the following command:
|
50
48
|
|
51
|
-
ruby
|
49
|
+
ruby connect_test.rb
|
52
50
|
|
53
51
|
To include color from the command line:
|
54
52
|
|
55
|
-
ruby -r minitest/pride
|
56
|
-
|
53
|
+
ruby -r minitest/pride connect_test.rb
|
57
54
|
|
58
55
|
|
59
56
|
## Submitting Incomplete Solutions
|
@@ -83,15 +83,13 @@ If you would like color output, you can `require 'minitest/pride'` in
|
|
83
83
|
the test file, or note the alternative instruction, below, for running
|
84
84
|
the test file.
|
85
85
|
|
86
|
-
|
87
|
-
directory. For example, if the test suite is called
|
88
|
-
`hello_world_test.rb`, you can run the following command:
|
86
|
+
Run the tests from the exercise directory using the following command:
|
89
87
|
|
90
|
-
ruby
|
88
|
+
ruby crypto_square_test.rb
|
91
89
|
|
92
90
|
To include color from the command line:
|
93
91
|
|
94
|
-
ruby -r minitest/pride
|
92
|
+
ruby -r minitest/pride crypto_square_test.rb
|
95
93
|
|
96
94
|
|
97
95
|
## Source
|
@@ -21,16 +21,13 @@ If you would like color output, you can `require 'minitest/pride'` in
|
|
21
21
|
the test file, or note the alternative instruction, below, for running
|
22
22
|
the test file.
|
23
23
|
|
24
|
-
|
25
|
-
directory. For example, if the test suite is called
|
26
|
-
`hello_world_test.rb`, you can run the following command:
|
24
|
+
Run the tests from the exercise directory using the following command:
|
27
25
|
|
28
|
-
ruby
|
26
|
+
ruby custom_set_test.rb
|
29
27
|
|
30
28
|
To include color from the command line:
|
31
29
|
|
32
|
-
ruby -r minitest/pride
|
33
|
-
|
30
|
+
ruby -r minitest/pride custom_set_test.rb
|
34
31
|
|
35
32
|
|
36
33
|
## Submitting Incomplete Solutions
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# Diamond
|
2
2
|
|
3
|
-
The diamond kata takes as its input a letter, and outputs it in a diamond
|
4
|
-
shape. Given a letter, it prints a diamond starting with 'A', with the
|
3
|
+
The diamond kata takes as its input a letter, and outputs it in a diamond
|
4
|
+
shape. Given a letter, it prints a diamond starting with 'A', with the
|
5
5
|
supplied letter at the widest point.
|
6
6
|
|
7
7
|
## Requirements
|
@@ -15,7 +15,7 @@ supplied letter at the widest point.
|
|
15
15
|
* The diamond has a square shape (width equals height).
|
16
16
|
* The letters form a diamond shape.
|
17
17
|
* The top half has the letters in ascending order.
|
18
|
-
* The bottom half has the letters in descending order.
|
18
|
+
* The bottom half has the letters in descending order.
|
19
19
|
* The four corners (containing the spaces) are triangles.
|
20
20
|
|
21
21
|
## Examples
|
@@ -24,13 +24,13 @@ In the following examples, spaces are indicated by `·` characters.
|
|
24
24
|
|
25
25
|
Diamond for letter 'A':
|
26
26
|
|
27
|
-
```
|
27
|
+
```text
|
28
28
|
A
|
29
29
|
```
|
30
30
|
|
31
31
|
Diamond for letter 'C':
|
32
32
|
|
33
|
-
```
|
33
|
+
```text
|
34
34
|
··A··
|
35
35
|
·B·B·
|
36
36
|
C···C
|
@@ -40,7 +40,7 @@ C···C
|
|
40
40
|
|
41
41
|
Diamond for letter 'E':
|
42
42
|
|
43
|
-
```
|
43
|
+
```text
|
44
44
|
····A····
|
45
45
|
···B·B···
|
46
46
|
··C···C··
|
@@ -66,15 +66,13 @@ If you would like color output, you can `require 'minitest/pride'` in
|
|
66
66
|
the test file, or note the alternative instruction, below, for running
|
67
67
|
the test file.
|
68
68
|
|
69
|
-
|
70
|
-
directory. For example, if the test suite is called
|
71
|
-
`hello_world_test.rb`, you can run the following command:
|
69
|
+
Run the tests from the exercise directory using the following command:
|
72
70
|
|
73
|
-
ruby
|
71
|
+
ruby diamond_test.rb
|
74
72
|
|
75
73
|
To include color from the command line:
|
76
74
|
|
77
|
-
ruby -r minitest/pride
|
75
|
+
ruby -r minitest/pride diamond_test.rb
|
78
76
|
|
79
77
|
|
80
78
|
## Source
|
@@ -26,15 +26,13 @@ If you would like color output, you can `require 'minitest/pride'` in
|
|
26
26
|
the test file, or note the alternative instruction, below, for running
|
27
27
|
the test file.
|
28
28
|
|
29
|
-
|
30
|
-
directory. For example, if the test suite is called
|
31
|
-
`hello_world_test.rb`, you can run the following command:
|
29
|
+
Run the tests from the exercise directory using the following command:
|
32
30
|
|
33
|
-
ruby
|
31
|
+
ruby difference_of_squares_test.rb
|
34
32
|
|
35
33
|
To include color from the command line:
|
36
34
|
|
37
|
-
ruby -r minitest/pride
|
35
|
+
ruby -r minitest/pride difference_of_squares_test.rb
|
38
36
|
|
39
37
|
|
40
38
|
## Source
|
@@ -7,10 +7,10 @@ correct domino chain (the dots on one half of a stone match the dots on the
|
|
7
7
|
neighbouring half of an adjacent stone) and that dots on the halfs of the stones
|
8
8
|
which don't have a neighbour (the first and last stone) match each other.
|
9
9
|
|
10
|
-
For example given the stones `
|
11
|
-
like `
|
10
|
+
For example given the stones `[2|1]`, `[2|3]` and `[1|3]` you should compute something
|
11
|
+
like `[1|2] [2|3] [3|1]` or `[3|2] [2|1] [1|3]` or `[1|3] [3|2] [2|1]` etc, where the first and last numbers are the same.
|
12
12
|
|
13
|
-
For stones
|
13
|
+
For stones `[1|2]`, `[4|1]` and `[2|3]` the resulting chain is not valid: `[4|1] [1|2] [2|3]`'s first and last numbers are not the same. 4 != 3
|
14
14
|
|
15
15
|
Some test cases may use duplicate stones in a chain solution, assume that multiple Domino sets are being used.
|
16
16
|
|
@@ -28,16 +28,13 @@ If you would like color output, you can `require 'minitest/pride'` in
|
|
28
28
|
the test file, or note the alternative instruction, below, for running
|
29
29
|
the test file.
|
30
30
|
|
31
|
-
|
32
|
-
directory. For example, if the test suite is called
|
33
|
-
`hello_world_test.rb`, you can run the following command:
|
31
|
+
Run the tests from the exercise directory using the following command:
|
34
32
|
|
35
|
-
ruby
|
33
|
+
ruby dominoes_test.rb
|
36
34
|
|
37
35
|
To include color from the command line:
|
38
36
|
|
39
|
-
ruby -r minitest/pride
|
40
|
-
|
37
|
+
ruby -r minitest/pride dominoes_test.rb
|
41
38
|
|
42
39
|
|
43
40
|
## Submitting Incomplete Solutions
|
@@ -1,8 +1,9 @@
|
|
1
|
-
#
|
1
|
+
# ETL
|
2
2
|
|
3
3
|
We are going to do the `Transform` step of an Extract-Transform-Load.
|
4
4
|
|
5
5
|
### ETL
|
6
|
+
|
6
7
|
Extract-Transform-Load (ETL) is a fancy way of saying, "We have some crufty, legacy data over in this system, and now we need it in this shiny new system over here, so
|
7
8
|
we're going to migrate this."
|
8
9
|
|
@@ -11,6 +12,7 @@ once." That's then typically followed by much forehead slapping and
|
|
11
12
|
moaning about how stupid we could possibly be.)
|
12
13
|
|
13
14
|
### The goal
|
15
|
+
|
14
16
|
We're going to extract some scrabble scores from a legacy system.
|
15
17
|
|
16
18
|
The old system stored a list of letters per score:
|
@@ -58,15 +60,13 @@ If you would like color output, you can `require 'minitest/pride'` in
|
|
58
60
|
the test file, or note the alternative instruction, below, for running
|
59
61
|
the test file.
|
60
62
|
|
61
|
-
|
62
|
-
directory. For example, if the test suite is called
|
63
|
-
`hello_world_test.rb`, you can run the following command:
|
63
|
+
Run the tests from the exercise directory using the following command:
|
64
64
|
|
65
|
-
ruby
|
65
|
+
ruby etl_test.rb
|
66
66
|
|
67
67
|
To include color from the command line:
|
68
68
|
|
69
|
-
ruby -r minitest/pride
|
69
|
+
ruby -r minitest/pride etl_test.rb
|
70
70
|
|
71
71
|
|
72
72
|
## Source
|
@@ -3,14 +3,13 @@
|
|
3
3
|
Take a nested list and return a single flattened list with all values except nil/null.
|
4
4
|
|
5
5
|
The challenge is to write a function that accepts an arbitrarily-deep nested list-like structure and returns a flattened structure without any nil/null values.
|
6
|
-
|
6
|
+
|
7
7
|
For Example
|
8
8
|
|
9
|
-
input: [1,[2,3,
|
9
|
+
input: [1,[2,3,null,4],[null],5]
|
10
10
|
|
11
11
|
output: [1,2,3,4,5]
|
12
12
|
|
13
|
-
|
14
13
|
* * * *
|
15
14
|
|
16
15
|
For installation and learning resources, refer to the
|
@@ -25,15 +24,13 @@ If you would like color output, you can `require 'minitest/pride'` in
|
|
25
24
|
the test file, or note the alternative instruction, below, for running
|
26
25
|
the test file.
|
27
26
|
|
28
|
-
|
29
|
-
directory. For example, if the test suite is called
|
30
|
-
`hello_world_test.rb`, you can run the following command:
|
27
|
+
Run the tests from the exercise directory using the following command:
|
31
28
|
|
32
|
-
ruby
|
29
|
+
ruby flatten_array_test.rb
|
33
30
|
|
34
31
|
To include color from the command line:
|
35
32
|
|
36
|
-
ruby -r minitest/pride
|
33
|
+
ruby -r minitest/pride flatten_array_test.rb
|
37
34
|
|
38
35
|
|
39
36
|
## Source
|
@@ -10,7 +10,7 @@ This is a [cumulative song](http://en.wikipedia.org/wiki/Cumulative_song) of unk
|
|
10
10
|
|
11
11
|
This is one of many common variants.
|
12
12
|
|
13
|
-
```
|
13
|
+
```text
|
14
14
|
I know an old lady who swallowed a fly.
|
15
15
|
I don't know why she swallowed the fly. Perhaps she'll die.
|
16
16
|
|
@@ -77,15 +77,13 @@ If you would like color output, you can `require 'minitest/pride'` in
|
|
77
77
|
the test file, or note the alternative instruction, below, for running
|
78
78
|
the test file.
|
79
79
|
|
80
|
-
|
81
|
-
directory. For example, if the test suite is called
|
82
|
-
`hello_world_test.rb`, you can run the following command:
|
80
|
+
Run the tests from the exercise directory using the following command:
|
83
81
|
|
84
|
-
ruby
|
82
|
+
ruby food_chain_test.rb
|
85
83
|
|
86
84
|
To include color from the command line:
|
87
85
|
|
88
|
-
ruby -r minitest/pride
|
86
|
+
ruby -r minitest/pride food_chain_test.rb
|
89
87
|
|
90
88
|
|
91
89
|
## Source
|
@@ -18,15 +18,13 @@ If you would like color output, you can `require 'minitest/pride'` in
|
|
18
18
|
the test file, or note the alternative instruction, below, for running
|
19
19
|
the test file.
|
20
20
|
|
21
|
-
|
22
|
-
directory. For example, if the test suite is called
|
23
|
-
`hello_world_test.rb`, you can run the following command:
|
21
|
+
Run the tests from the exercise directory using the following command:
|
24
22
|
|
25
|
-
ruby
|
23
|
+
ruby gigasecond_test.rb
|
26
24
|
|
27
25
|
To include color from the command line:
|
28
26
|
|
29
|
-
ruby -r minitest/pride
|
27
|
+
ruby -r minitest/pride gigasecond_test.rb
|
30
28
|
|
31
29
|
|
32
30
|
## Source
|
@@ -21,7 +21,6 @@ In the end, you should be able to:
|
|
21
21
|
Note that all our students only have one name. (It's a small town, what
|
22
22
|
do you want?)
|
23
23
|
|
24
|
-
|
25
24
|
## For bonus points
|
26
25
|
|
27
26
|
Did you get the tests passing and the code clean? If you want to, these
|
@@ -49,15 +48,13 @@ If you would like color output, you can `require 'minitest/pride'` in
|
|
49
48
|
the test file, or note the alternative instruction, below, for running
|
50
49
|
the test file.
|
51
50
|
|
52
|
-
|
53
|
-
directory. For example, if the test suite is called
|
54
|
-
`hello_world_test.rb`, you can run the following command:
|
51
|
+
Run the tests from the exercise directory using the following command:
|
55
52
|
|
56
|
-
ruby
|
53
|
+
ruby grade_school_test.rb
|
57
54
|
|
58
55
|
To include color from the command line:
|
59
56
|
|
60
|
-
ruby -r minitest/pride
|
57
|
+
ruby -r minitest/pride grade_school_test.rb
|
61
58
|
|
62
59
|
|
63
60
|
## Source
|
@@ -15,7 +15,6 @@ Write code that shows:
|
|
15
15
|
- how many grains were on each square, and
|
16
16
|
- the total number of grains
|
17
17
|
|
18
|
-
|
19
18
|
## For bonus points
|
20
19
|
|
21
20
|
Did you get the tests passing and the code clean? If you want to, these
|
@@ -41,15 +40,13 @@ If you would like color output, you can `require 'minitest/pride'` in
|
|
41
40
|
the test file, or note the alternative instruction, below, for running
|
42
41
|
the test file.
|
43
42
|
|
44
|
-
|
45
|
-
directory. For example, if the test suite is called
|
46
|
-
`hello_world_test.rb`, you can run the following command:
|
43
|
+
Run the tests from the exercise directory using the following command:
|
47
44
|
|
48
|
-
ruby
|
45
|
+
ruby grains_test.rb
|
49
46
|
|
50
47
|
To include color from the command line:
|
51
48
|
|
52
|
-
ruby -r minitest/pride
|
49
|
+
ruby -r minitest/pride grains_test.rb
|
53
50
|
|
54
51
|
|
55
52
|
## Source
|