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
@@ -1,31 +1,29 @@
|
|
1
|
-
// This file was
|
1
|
+
// This file was auto-generated based on version 1.1.0 of the canonical data.
|
2
2
|
|
3
3
|
module SieveTest
|
4
4
|
|
5
|
-
open Xunit
|
6
5
|
open FsUnit.Xunit
|
6
|
+
open Xunit
|
7
7
|
|
8
8
|
open Sieve
|
9
9
|
|
10
10
|
[<Fact>]
|
11
|
-
let ``
|
12
|
-
|
13
|
-
|
11
|
+
let ``No primes under two`` () =
|
12
|
+
primes 1 |> should be Empty
|
13
|
+
|
14
14
|
[<Fact(Skip = "Remove to run test")>]
|
15
|
-
let ``
|
16
|
-
|
17
|
-
|
15
|
+
let ``Find first prime`` () =
|
16
|
+
primes 2 |> should equal [2]
|
17
|
+
|
18
18
|
[<Fact(Skip = "Remove to run test")>]
|
19
|
-
let ``
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
991; 997
|
31
|
-
]
|
19
|
+
let ``Find primes up to 10`` () =
|
20
|
+
primes 10 |> should equal [2; 3; 5; 7]
|
21
|
+
|
22
|
+
[<Fact(Skip = "Remove to run test")>]
|
23
|
+
let ``Limit is prime`` () =
|
24
|
+
primes 13 |> should equal [2; 3; 5; 7; 11; 13]
|
25
|
+
|
26
|
+
[<Fact(Skip = "Remove to run test")>]
|
27
|
+
let ``Find primes up to 1000`` () =
|
28
|
+
primes 1000 |> should equal [2; 3; 5; 7; 11; 13; 17; 19; 23; 29; 31; 37; 41; 43; 47; 53; 59; 61; 67; 71; 73; 79; 83; 89; 97; 101; 103; 107; 109; 113; 127; 131; 137; 139; 149; 151; 157; 163; 167; 173; 179; 181; 191; 193; 197; 199; 211; 223; 227; 229; 233; 239; 241; 251; 257; 263; 269; 271; 277; 281; 283; 293; 307; 311; 313; 317; 331; 337; 347; 349; 353; 359; 367; 373; 379; 383; 389; 397; 401; 409; 419; 421; 431; 433; 439; 443; 449; 457; 461; 463; 467; 479; 487; 491; 499; 503; 509; 521; 523; 541; 547; 557; 563; 569; 571; 577; 587; 593; 599; 601; 607; 613; 617; 619; 631; 641; 643; 647; 653; 659; 661; 673; 677; 683; 691; 701; 709; 719; 727; 733; 739; 743; 751; 757; 761; 769; 773; 787; 797; 809; 811; 821; 823; 827; 829; 839; 853; 857; 859; 863; 877; 881; 883; 887; 907; 911; 919; 929; 937; 941; 947; 953; 967; 971; 977; 983; 991; 997]
|
29
|
+
|
@@ -1,31 +1,61 @@
|
|
1
|
-
// This file was
|
1
|
+
// This file was auto-generated based on version 1.2.0 of the canonical data.
|
2
2
|
|
3
3
|
module SumOfMultiplesTest
|
4
4
|
|
5
|
-
open Xunit
|
6
5
|
open FsUnit.Xunit
|
6
|
+
open Xunit
|
7
|
+
|
7
8
|
open SumOfMultiples
|
8
9
|
|
9
10
|
[<Fact>]
|
10
|
-
let ``
|
11
|
-
|
11
|
+
let ``Multiples of 3 or 5 up to 1`` () =
|
12
|
+
sum [3; 5] 1 |> should equal 0
|
13
|
+
|
14
|
+
[<Fact(Skip = "Remove to run test")>]
|
15
|
+
let ``Multiples of 3 or 5 up to 4`` () =
|
16
|
+
sum [3; 5] 4 |> should equal 3
|
17
|
+
|
18
|
+
[<Fact(Skip = "Remove to run test")>]
|
19
|
+
let ``Multiples of 3 up to 7`` () =
|
20
|
+
sum [3] 7 |> should equal 9
|
21
|
+
|
22
|
+
[<Fact(Skip = "Remove to run test")>]
|
23
|
+
let ``Multiples of 3 or 5 up to 10`` () =
|
24
|
+
sum [3; 5] 10 |> should equal 23
|
12
25
|
|
13
26
|
[<Fact(Skip = "Remove to run test")>]
|
14
|
-
let ``
|
15
|
-
|
27
|
+
let ``Multiples of 3 or 5 up to 100`` () =
|
28
|
+
sum [3; 5] 100 |> should equal 2318
|
16
29
|
|
17
30
|
[<Fact(Skip = "Remove to run test")>]
|
18
|
-
let ``
|
19
|
-
|
31
|
+
let ``Multiples of 3 or 5 up to 1000`` () =
|
32
|
+
sum [3; 5] 1000 |> should equal 233168
|
20
33
|
|
21
34
|
[<Fact(Skip = "Remove to run test")>]
|
22
|
-
let ``
|
23
|
-
|
35
|
+
let ``Multiples of 7, 13 or 17 up to 20`` () =
|
36
|
+
sum [7; 13; 17] 20 |> should equal 51
|
24
37
|
|
25
38
|
[<Fact(Skip = "Remove to run test")>]
|
26
|
-
let ``
|
27
|
-
|
39
|
+
let ``Multiples of 4 or 6 up to 15`` () =
|
40
|
+
sum [4; 6] 15 |> should equal 30
|
28
41
|
|
29
42
|
[<Fact(Skip = "Remove to run test")>]
|
30
|
-
let ``
|
31
|
-
|
43
|
+
let ``Multiples of 5, 6 or 8 up to 150`` () =
|
44
|
+
sum [5; 6; 8] 150 |> should equal 4419
|
45
|
+
|
46
|
+
[<Fact(Skip = "Remove to run test")>]
|
47
|
+
let ``Multiples of 5 or 25 up to 51`` () =
|
48
|
+
sum [5; 25] 51 |> should equal 275
|
49
|
+
|
50
|
+
[<Fact(Skip = "Remove to run test")>]
|
51
|
+
let ``Multiples of 43 or 47 up to 10000`` () =
|
52
|
+
sum [43; 47] 10000 |> should equal 2203160
|
53
|
+
|
54
|
+
[<Fact(Skip = "Remove to run test")>]
|
55
|
+
let ``Multiples of 1 up to 100`` () =
|
56
|
+
sum [1] 100 |> should equal 4950
|
57
|
+
|
58
|
+
[<Fact(Skip = "Remove to run test")>]
|
59
|
+
let ``Multiples of an empty list up to 10000`` () =
|
60
|
+
sum [] 10000 |> should equal 0
|
61
|
+
|
@@ -1,4 +1,4 @@
|
|
1
|
-
// This file was auto-generated based on version 1.
|
1
|
+
// This file was auto-generated based on version 1.2.0 of the canonical data.
|
2
2
|
|
3
3
|
module TwoFerTest
|
4
4
|
|
@@ -9,13 +9,13 @@ open TwoFer
|
|
9
9
|
|
10
10
|
[<Fact>]
|
11
11
|
let ``No name given`` () =
|
12
|
-
|
12
|
+
twoFer None |> should equal "One for you, one for me."
|
13
13
|
|
14
14
|
[<Fact(Skip = "Remove to run test")>]
|
15
15
|
let ``A name given`` () =
|
16
|
-
|
16
|
+
twoFer (Some "Alice") |> should equal "One for Alice, one for me."
|
17
17
|
|
18
18
|
[<Fact(Skip = "Remove to run test")>]
|
19
19
|
let ``Another name given`` () =
|
20
|
-
|
20
|
+
twoFer (Some "Bob") |> should equal "One for Bob, one for me."
|
21
21
|
|
@@ -1,8 +1,8 @@
|
|
1
|
-
module
|
1
|
+
module WordCount
|
2
2
|
|
3
3
|
open System.Text.RegularExpressions
|
4
4
|
|
5
|
-
let
|
5
|
+
let countwords (phrase: string) =
|
6
6
|
Regex.Matches(phrase.ToLowerInvariant(), @"\w+('\w+)*")
|
7
7
|
|> Seq.cast<Match>
|
8
8
|
|> Seq.countBy (fun m -> m.Value)
|
@@ -1,3 +1,3 @@
|
|
1
|
-
module
|
1
|
+
module WordCount
|
2
2
|
|
3
|
-
let
|
3
|
+
let countwords phrase = failwith "You need to implement this function."
|
@@ -1,131 +1,111 @@
|
|
1
|
-
// This file was
|
1
|
+
// This file was auto-generated based on version 1.1.0 of the canonical data.
|
2
2
|
|
3
3
|
module WordCountTest
|
4
4
|
|
5
|
-
open Xunit
|
6
5
|
open FsUnit.Xunit
|
7
|
-
open
|
6
|
+
open Xunit
|
7
|
+
|
8
|
+
open WordCount
|
8
9
|
|
9
10
|
[<Fact>]
|
10
11
|
let ``Count one word`` () =
|
11
|
-
let
|
12
|
-
|
13
|
-
|
14
|
-
wordCount phrase |> should equal counts
|
12
|
+
let expected = [("word", 1)] |> Map.ofList
|
13
|
+
countwords "word" |> should equal expected
|
15
14
|
|
16
15
|
[<Fact(Skip = "Remove to run test")>]
|
17
|
-
let ``Count one of each`` () =
|
18
|
-
let
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
16
|
+
let ``Count one of each word`` () =
|
17
|
+
let expected =
|
18
|
+
[ ("one", 1);
|
19
|
+
("of", 1);
|
20
|
+
("each", 1) ]
|
21
|
+
|> Map.ofList
|
22
|
+
countwords "one of each" |> should equal expected
|
24
23
|
|
25
24
|
[<Fact(Skip = "Remove to run test")>]
|
26
|
-
let ``
|
27
|
-
let
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
25
|
+
let ``Multiple occurrences of a word`` () =
|
26
|
+
let expected =
|
27
|
+
[ ("one", 1);
|
28
|
+
("fish", 4);
|
29
|
+
("two", 1);
|
30
|
+
("red", 1);
|
31
|
+
("blue", 1) ]
|
32
|
+
|> Map.ofList
|
33
|
+
countwords "one fish two fish red fish blue fish" |> should equal expected
|
35
34
|
|
36
35
|
[<Fact(Skip = "Remove to run test")>]
|
37
|
-
let ``
|
38
|
-
let
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
("men", 1)]
|
45
|
-
|
46
|
-
wordCount phrase |> should equal counts
|
36
|
+
let ``Handles cramped lists`` () =
|
37
|
+
let expected =
|
38
|
+
[ ("one", 1);
|
39
|
+
("two", 1);
|
40
|
+
("three", 1) ]
|
41
|
+
|> Map.ofList
|
42
|
+
countwords "one,two,three" |> should equal expected
|
47
43
|
|
48
44
|
[<Fact(Skip = "Remove to run test")>]
|
49
|
-
let ``
|
50
|
-
let
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
wordCount phrase |> should equal counts
|
45
|
+
let ``Handles expanded lists`` () =
|
46
|
+
let expected =
|
47
|
+
[ ("one", 1);
|
48
|
+
("two", 1);
|
49
|
+
("three", 1) ]
|
50
|
+
|> Map.ofList
|
51
|
+
countwords "one,\ntwo,\nthree" |> should equal expected
|
58
52
|
|
59
53
|
[<Fact(Skip = "Remove to run test")>]
|
60
|
-
let ``
|
61
|
-
let
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
54
|
+
let ``Ignore punctuation`` () =
|
55
|
+
let expected =
|
56
|
+
[ ("car", 1);
|
57
|
+
("carpet", 1);
|
58
|
+
("as", 1);
|
59
|
+
("java", 1);
|
60
|
+
("javascript", 1) ]
|
61
|
+
|> Map.ofList
|
62
|
+
countwords "car: carpet as java: javascript!!&@$%^&" |> should equal expected
|
67
63
|
|
68
64
|
[<Fact(Skip = "Remove to run test")>]
|
69
65
|
let ``Include numbers`` () =
|
70
|
-
let
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
66
|
+
let expected =
|
67
|
+
[ ("testing", 2);
|
68
|
+
("1", 1);
|
69
|
+
("2", 1) ]
|
70
|
+
|> Map.ofList
|
71
|
+
countwords "testing, 1, 2 testing" |> should equal expected
|
76
72
|
|
77
73
|
[<Fact(Skip = "Remove to run test")>]
|
78
74
|
let ``Normalize case`` () =
|
79
|
-
let
|
80
|
-
|
81
|
-
|
82
|
-
|
75
|
+
let expected =
|
76
|
+
[ ("go", 3);
|
77
|
+
("stop", 2) ]
|
78
|
+
|> Map.ofList
|
79
|
+
countwords "go Go GO Stop stop" |> should equal expected
|
83
80
|
|
84
81
|
[<Fact(Skip = "Remove to run test")>]
|
85
82
|
let ``With apostrophes`` () =
|
86
|
-
let
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
83
|
+
let expected =
|
84
|
+
[ ("first", 1);
|
85
|
+
("don't", 2);
|
86
|
+
("laugh", 1);
|
87
|
+
("then", 1);
|
88
|
+
("cry", 1) ]
|
89
|
+
|> Map.ofList
|
90
|
+
countwords "First: don't laugh. Then: don't cry." |> should equal expected
|
94
91
|
|
95
92
|
[<Fact(Skip = "Remove to run test")>]
|
96
|
-
let ``With
|
97
|
-
let
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
("said", 1);
|
107
|
-
("let's", 1);
|
108
|
-
("meet", 1);
|
109
|
-
("at", 1);
|
110
|
-
("twelve", 1);
|
111
|
-
("o'clock", 1)]
|
112
|
-
|
113
|
-
wordCount phrase |> should equal counts
|
93
|
+
let ``With quotations`` () =
|
94
|
+
let expected =
|
95
|
+
[ ("joe", 1);
|
96
|
+
("can't", 1);
|
97
|
+
("tell", 1);
|
98
|
+
("between", 1);
|
99
|
+
("large", 2);
|
100
|
+
("and", 1) ]
|
101
|
+
|> Map.ofList
|
102
|
+
countwords "Joe can't tell between 'large' and large." |> should equal expected
|
114
103
|
|
115
104
|
[<Fact(Skip = "Remove to run test")>]
|
116
|
-
let ``
|
117
|
-
let
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
("face", 1);
|
123
|
-
("it", 1);
|
124
|
-
("same", 1);
|
125
|
-
("the", 1);
|
126
|
-
("time", 1);
|
127
|
-
("will", 3);
|
128
|
-
("you", 2);
|
129
|
-
("your", 1)]
|
105
|
+
let ``Multiple spaces not detected as a word`` () =
|
106
|
+
let expected =
|
107
|
+
[ ("multiple", 1);
|
108
|
+
("whitespaces", 1) ]
|
109
|
+
|> Map.ofList
|
110
|
+
countwords " multiple whitespaces" |> should equal expected
|
130
111
|
|
131
|
-
wordCount phrase |> should equal counts
|
@@ -1,12 +1,11 @@
|
|
1
1
|
module Wordy
|
2
2
|
|
3
|
-
open System
|
4
3
|
open System.Text.RegularExpressions
|
5
4
|
|
6
5
|
type Operation = int -> int
|
7
6
|
type Equation = int * (Operation list)
|
8
7
|
|
9
|
-
let equationRegex =
|
8
|
+
let equationRegex = Regex(@"(?<left>-?\d+) (?<operation>-?plus|minus|divided by|multiplied by) (?=(?<right>-?\d+))", RegexOptions.Compiled)
|
10
9
|
|
11
10
|
let regexGroupStr (group: string) (m: Match) = m.Groups.[group].Value
|
12
11
|
let regexGroupNumber (group: string) (m: Match) = regexGroupStr group m |> int
|
@@ -43,7 +42,7 @@ let parse (question: string): Equation option =
|
|
43
42
|
| m when m.Count = 0 -> None
|
44
43
|
| m -> Some (parseLeft m, parseOperations m)
|
45
44
|
|
46
|
-
let
|
45
|
+
let answer (question: string): int option =
|
47
46
|
question
|
48
47
|
|> parse
|
49
48
|
|> Option.map calculate
|