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.
Files changed (296) hide show
  1. checksums.yaml +4 -4
  2. data/lib/trackler/version.rb +1 -1
  3. data/problem-specifications/exercises/clock/canonical-data.json +303 -204
  4. data/problem-specifications/exercises/complex-numbers/canonical-data.json +104 -44
  5. data/problem-specifications/exercises/matrix/canonical-data.json +78 -0
  6. data/problem-specifications/exercises/word-count/canonical-data.json +12 -12
  7. data/tracks/bash/config.json +128 -110
  8. data/tracks/c/exercises/word-count/test/test_word_count.c +2 -2
  9. data/tracks/dart/CONTRIBUTING.md +2 -2
  10. data/tracks/dart/docs/EXERCISE_README_INSERT.md +0 -1
  11. data/tracks/dart/docs/INSTALLATION.md +17 -11
  12. data/tracks/fsharp/exercises/acronym/AcronymTest.fs +3 -7
  13. data/tracks/fsharp/exercises/anagram/AnagramTest.fs +1 -21
  14. data/tracks/fsharp/exercises/book-store/BookStoreTest.fs +1 -1
  15. data/tracks/fsharp/exercises/complex-numbers/ComplexNumbersTest.fs +25 -25
  16. data/tracks/fsharp/exercises/custom-set/CustomSetTest.fs +1 -1
  17. data/tracks/fsharp/exercises/food-chain/FoodChainTest.fs +1 -1
  18. data/tracks/fsharp/exercises/gigasecond/GigasecondTest.fs +1 -1
  19. data/tracks/fsharp/exercises/hamming/HammingTest.fs +1 -1
  20. data/tracks/fsharp/exercises/hello-world/HelloWorldTest.fs +1 -1
  21. data/tracks/fsharp/exercises/largest-series-product/LargestSeriesProductTest.fs +1 -1
  22. data/tracks/fsharp/exercises/leap/LeapTest.fs +1 -1
  23. data/tracks/fsharp/exercises/markdown/MarkdownTest.fs +19 -19
  24. data/tracks/fsharp/exercises/minesweeper/MinesweeperTest.fs +27 -27
  25. data/tracks/fsharp/exercises/nth-prime/NthPrimeTest.fs +1 -1
  26. data/tracks/fsharp/exercises/nucleotide-count/NucleotideCountTest.fs +1 -1
  27. data/tracks/fsharp/exercises/pangram/PangramTest.fs +1 -1
  28. data/tracks/fsharp/exercises/pascals-triangle/PascalsTriangleTest.fs +1 -1
  29. data/tracks/fsharp/exercises/perfect-numbers/PerfectNumbersTest.fs +1 -1
  30. data/tracks/fsharp/exercises/phone-number/PhoneNumberTest.fs +11 -3
  31. data/tracks/fsharp/exercises/pig-latin/PigLatinTest.fs +1 -1
  32. data/tracks/fsharp/exercises/protein-translation/Example.fs +2 -2
  33. data/tracks/fsharp/exercises/protein-translation/ProteinTranslation.fs +1 -1
  34. data/tracks/fsharp/exercises/protein-translation/ProteinTranslationTest.fs +94 -60
  35. data/tracks/fsharp/exercises/react/ReactTest.fs +1 -1
  36. data/tracks/fsharp/exercises/rna-transcription/RnaTranscriptionTest.fs +1 -1
  37. data/tracks/fsharp/exercises/roman-numerals/RomanNumeralsTest.fs +1 -1
  38. data/tracks/fsharp/exercises/rotational-cipher/RotationalCipherTest.fs +1 -1
  39. data/tracks/fsharp/exercises/say/Example.fs +1 -1
  40. data/tracks/fsharp/exercises/say/SayTest.fs +21 -24
  41. data/tracks/fsharp/exercises/scrabble-score/ScrabbleScoreTest.fs +1 -1
  42. data/tracks/fsharp/exercises/secret-handshake/Example.fs +2 -2
  43. data/tracks/fsharp/exercises/secret-handshake/SecretHandshake.fs +1 -1
  44. data/tracks/fsharp/exercises/secret-handshake/SecretHandshakeTest.fs +39 -22
  45. data/tracks/fsharp/exercises/sieve/Example.fs +1 -1
  46. data/tracks/fsharp/exercises/sieve/Sieve.fs +1 -1
  47. data/tracks/fsharp/exercises/sieve/SieveTest.fs +19 -21
  48. data/tracks/fsharp/exercises/spiral-matrix/SpiralMatrixTest.fs +1 -1
  49. data/tracks/fsharp/exercises/sum-of-multiples/Example.fs +1 -1
  50. data/tracks/fsharp/exercises/sum-of-multiples/SumOfMultiples.fs +1 -1
  51. data/tracks/fsharp/exercises/sum-of-multiples/SumOfMultiplesTest.fs +44 -14
  52. data/tracks/fsharp/exercises/twelve-days/TwelveDaysTest.fs +1 -1
  53. data/tracks/fsharp/exercises/two-fer/Example.fs +1 -1
  54. data/tracks/fsharp/exercises/two-fer/TwoFer.fs +1 -1
  55. data/tracks/fsharp/exercises/two-fer/TwoFerTest.fs +4 -4
  56. data/tracks/fsharp/exercises/word-count/Example.fs +2 -2
  57. data/tracks/fsharp/exercises/word-count/WordCount.fs +2 -2
  58. data/tracks/fsharp/exercises/word-count/WordCountTest.fs +80 -100
  59. data/tracks/fsharp/exercises/wordy/Example.fs +2 -3
  60. data/tracks/fsharp/exercises/wordy/Wordy.fs +1 -1
  61. data/tracks/fsharp/exercises/wordy/WordyTest.fs +51 -49
  62. data/tracks/fsharp/exercises/zebra-puzzle/Example.fs +4 -4
  63. data/tracks/fsharp/exercises/zebra-puzzle/ZebraPuzzleTest.fs +7 -8
  64. data/tracks/fsharp/generators/Common.fs +3 -1
  65. data/tracks/fsharp/generators/Exercise.fs +12 -1
  66. data/tracks/fsharp/generators/Generators.fs +89 -42
  67. data/tracks/fsharp/generators/Generators.fsproj +1 -0
  68. data/tracks/fsharp/generators/Options.fs +14 -7
  69. data/tracks/fsharp/generators/Program.fs +3 -0
  70. data/tracks/fsharp/generators/Rendering.fs +0 -1
  71. data/tracks/fsharp/generators/Track.fs +26 -0
  72. data/tracks/go/exercises/custom-set/.meta/gen.go +16 -14
  73. data/tracks/go/exercises/custom-set/cases_test.go +2 -2
  74. data/tracks/java/exercises/food-chain/.meta/version +1 -0
  75. data/tracks/java/exercises/sieve/.meta/version +1 -0
  76. data/tracks/java/exercises/sieve/src/test/java/SieveTest.java +17 -0
  77. data/tracks/java/exercises/twelve-days/.meta/version +1 -0
  78. data/tracks/java/exercises/twelve-days/src/test/java/TwelveDaysTest.java +15 -3
  79. data/tracks/java/exercises/two-fer/.meta/version +1 -0
  80. data/tracks/java/exercises/two-fer/src/test/java/TwoferTest.java +0 -9
  81. data/tracks/ocaml/config/exercise_readme.go.tmpl +38 -4
  82. data/tracks/ocaml/exercises/acronym/README.md +0 -2
  83. data/tracks/ocaml/exercises/all-your-base/README.md +1 -3
  84. data/tracks/ocaml/exercises/anagram/README.md +0 -1
  85. data/tracks/ocaml/exercises/atbash-cipher/README.md +2 -2
  86. data/tracks/ocaml/exercises/beer-song/README.md +2 -3
  87. data/tracks/ocaml/exercises/binary-search/README.md +0 -1
  88. data/tracks/ocaml/exercises/bob/README.md +2 -1
  89. data/tracks/ocaml/exercises/bowling/README.md +20 -7
  90. data/tracks/ocaml/exercises/bracket-push/README.md +0 -1
  91. data/tracks/ocaml/exercises/change/README.md +1 -2
  92. data/tracks/ocaml/exercises/connect/README.md +1 -3
  93. data/tracks/ocaml/exercises/custom-set/README.md +0 -2
  94. data/tracks/ocaml/exercises/difference-of-squares/README.md +0 -1
  95. data/tracks/ocaml/exercises/dominoes/README.md +3 -5
  96. data/tracks/ocaml/exercises/etl/README.md +3 -2
  97. data/tracks/ocaml/exercises/forth/README.md +0 -2
  98. data/tracks/ocaml/exercises/grade-school/README.md +0 -1
  99. data/tracks/ocaml/exercises/hamming/README.md +0 -1
  100. data/tracks/ocaml/exercises/hangman/README.md +0 -2
  101. data/tracks/ocaml/exercises/hello-world/README.md +0 -1
  102. data/tracks/ocaml/exercises/hexadecimal/README.md +0 -1
  103. data/tracks/ocaml/exercises/leap/README.md +1 -2
  104. data/tracks/ocaml/exercises/list-ops/README.md +0 -2
  105. data/tracks/ocaml/exercises/luhn/README.md +7 -8
  106. data/tracks/ocaml/exercises/meetup/README.md +16 -14
  107. data/tracks/ocaml/exercises/minesweeper/README.md +0 -2
  108. data/tracks/ocaml/exercises/nucleotide-count/README.md +8 -23
  109. data/tracks/ocaml/exercises/palindrome-products/README.md +0 -1
  110. data/tracks/ocaml/exercises/pangram/README.md +1 -2
  111. data/tracks/ocaml/exercises/phone-number/README.md +4 -4
  112. data/tracks/ocaml/exercises/prime-factors/README.md +0 -1
  113. data/tracks/ocaml/exercises/raindrops/README.md +0 -1
  114. data/tracks/ocaml/exercises/react/README.md +0 -2
  115. data/tracks/ocaml/{docs/EXERCISE_README_INSERT.md → exercises/rectangles/README.md} +67 -0
  116. data/tracks/ocaml/exercises/rna-transcription/README.md +1 -2
  117. data/tracks/ocaml/exercises/robot-name/README.md +0 -1
  118. data/tracks/ocaml/exercises/roman-numerals/README.md +1 -2
  119. data/tracks/ocaml/exercises/run-length-encoding/README.md +4 -5
  120. data/tracks/ocaml/exercises/say/README.md +0 -1
  121. data/tracks/ocaml/exercises/space-age/README.md +1 -2
  122. data/tracks/ocaml/exercises/triangle/README.md +8 -6
  123. data/tracks/ocaml/exercises/word-count/README.md +1 -3
  124. data/tracks/ocaml/exercises/zipper/README.md +1 -3
  125. data/tracks/perl6/.travis.yml +1 -1
  126. data/tracks/perl6/bin/README.md +1 -2
  127. data/tracks/perl6/bin/exercise-gen.pl6 +18 -18
  128. data/tracks/perl6/config.json +1 -0
  129. data/tracks/perl6/exercises/accumulate/{example.yaml → .meta/exercise-data.yaml} +0 -0
  130. data/tracks/perl6/exercises/accumulate/{Example.pm6 → .meta/solutions/Accumulate.pm6} +0 -0
  131. data/tracks/perl6/exercises/acronym/{example.yaml → .meta/exercise-data.yaml} +0 -0
  132. data/tracks/perl6/exercises/acronym/{Example.pm6 → .meta/solutions/Acronym.pm6} +0 -0
  133. data/tracks/perl6/exercises/all-your-base/{example.yaml → .meta/exercise-data.yaml} +0 -0
  134. data/tracks/perl6/exercises/all-your-base/{Example.pm6 → .meta/solutions/AllYourBase.pm6} +0 -0
  135. data/tracks/perl6/exercises/allergies/{example.yaml → .meta/exercise-data.yaml} +0 -0
  136. data/tracks/perl6/exercises/allergies/{Example.pm6 → .meta/solutions/Allergies.pm6} +0 -0
  137. data/tracks/perl6/exercises/anagram/{example.yaml → .meta/exercise-data.yaml} +0 -0
  138. data/tracks/perl6/exercises/anagram/{Example.pm6 → .meta/solutions/Anagram.pm6} +0 -0
  139. data/tracks/perl6/exercises/atbash-cipher/{example.yaml → .meta/exercise-data.yaml} +0 -0
  140. data/tracks/perl6/exercises/atbash-cipher/{Example.pm6 → .meta/solutions/AtbashCipher.pm6} +0 -0
  141. data/tracks/perl6/exercises/binary/{Example.pm6 → .meta/solutions/Trinary.pm6} +0 -0
  142. data/tracks/perl6/exercises/bob/{example.yaml → .meta/exercise-data.yaml} +0 -0
  143. data/tracks/perl6/exercises/bob/{Example.pm6 → .meta/solutions/Bob.pm6} +0 -0
  144. data/tracks/perl6/exercises/clock/{example.yaml → .meta/exercise-data.yaml} +0 -0
  145. data/tracks/perl6/exercises/clock/{Example.pm6 → .meta/solutions/Clock.pm6} +0 -0
  146. data/tracks/perl6/exercises/etl/{example.yaml → .meta/exercise-data.yaml} +0 -0
  147. data/tracks/perl6/exercises/etl/{Example.pm6 → .meta/solutions/ETL.pm6} +0 -0
  148. data/tracks/perl6/exercises/flatten-array/{example.yaml → .meta/exercise-data.yaml} +0 -0
  149. data/tracks/perl6/exercises/flatten-array/{Example.pm6 → .meta/solutions/FlattenArray.pm6} +0 -0
  150. data/tracks/perl6/exercises/grade-school/{example.yaml → .meta/exercise-data.yaml} +0 -0
  151. data/tracks/perl6/exercises/grade-school/{Example.pm6 → .meta/solutions/GradeSchool.pm6} +0 -0
  152. data/tracks/perl6/exercises/grains/{example.yaml → .meta/exercise-data.yaml} +0 -0
  153. data/tracks/perl6/exercises/grains/{Example.pm6 → .meta/solutions/Grains.pm6} +0 -0
  154. data/tracks/perl6/exercises/hamming/{example.yaml → .meta/exercise-data.yaml} +0 -0
  155. data/tracks/perl6/exercises/hamming/{Example.pm6 → .meta/solutions/Hamming.pm6} +0 -0
  156. data/tracks/perl6/exercises/hello-world/{example.yaml → .meta/exercise-data.yaml} +0 -0
  157. data/tracks/perl6/exercises/hello-world/{Example.pm6 → .meta/solutions/HelloWorld.pm6} +0 -0
  158. data/tracks/perl6/exercises/leap/{example.yaml → .meta/exercise-data.yaml} +0 -0
  159. data/tracks/perl6/exercises/leap/{Example.pm6 → .meta/solutions/Leap.pm6} +0 -0
  160. data/tracks/perl6/exercises/linked-list/{example.yaml → .meta/exercise-data.yaml} +0 -0
  161. data/tracks/perl6/exercises/linked-list/{Example.pm6 → .meta/solutions/LinkedList.pm6} +0 -0
  162. data/tracks/perl6/exercises/luhn/{example.yaml → .meta/exercise-data.yaml} +0 -0
  163. data/tracks/perl6/exercises/luhn/{Example.pm6 → .meta/solutions/Luhn.pm6} +0 -0
  164. data/tracks/perl6/exercises/meetup/{example.yaml → .meta/exercise-data.yaml} +0 -0
  165. data/tracks/perl6/exercises/meetup/{Example.pm6 → .meta/solutions/Meetup.pm6} +0 -0
  166. data/tracks/perl6/exercises/nucleotide-count/{example.yaml → .meta/exercise-data.yaml} +0 -0
  167. data/tracks/perl6/exercises/nucleotide-count/{Example.pm6 → .meta/solutions/NucleotideCount.pm6} +0 -0
  168. data/tracks/perl6/exercises/pangram/{example.yaml → .meta/exercise-data.yaml} +0 -0
  169. data/tracks/perl6/exercises/pangram/{Example.pm6 → .meta/solutions/Pangram.pm6} +0 -0
  170. data/tracks/perl6/exercises/phone-number/{example.yaml → .meta/exercise-data.yaml} +0 -0
  171. data/tracks/perl6/exercises/phone-number/{Example.pm6 → .meta/solutions/Phone.pm6} +0 -0
  172. data/tracks/perl6/exercises/raindrops/{example.yaml → .meta/exercise-data.yaml} +0 -0
  173. data/tracks/perl6/exercises/raindrops/{Example.pm6 → .meta/solutions/Raindrops.pm6} +0 -0
  174. data/tracks/perl6/exercises/rna-transcription/{example.yaml → .meta/exercise-data.yaml} +0 -0
  175. data/tracks/perl6/exercises/rna-transcription/{Example.pm6 → .meta/solutions/RNA.pm6} +0 -0
  176. data/tracks/perl6/exercises/robot-name/{example.yaml → .meta/exercise-data.yaml} +0 -0
  177. data/tracks/perl6/exercises/robot-name/{Example.pm6 → .meta/solutions/Robot.pm6} +0 -0
  178. data/tracks/perl6/exercises/roman-numerals/{example.yaml → .meta/exercise-data.yaml} +0 -0
  179. data/tracks/perl6/exercises/roman-numerals/{Example.pm6 → .meta/solutions/RomanNumerals.pm6} +0 -0
  180. data/tracks/perl6/exercises/scrabble-score/{example.yaml → .meta/exercise-data.yaml} +0 -0
  181. data/tracks/perl6/exercises/scrabble-score/{Example.pm6 → .meta/solutions/Scrabble.pm6} +0 -0
  182. data/tracks/perl6/exercises/space-age/{example.yaml → .meta/exercise-data.yaml} +0 -0
  183. data/tracks/perl6/exercises/space-age/{Example.pm6 → .meta/solutions/SpaceAge.pm6} +0 -0
  184. data/tracks/perl6/exercises/trinary/{Example.pm6 → .meta/solutions/Trinary.pm6} +0 -0
  185. data/tracks/perl6/exercises/two-fer/{example.yaml → .meta/exercise-data.yaml} +0 -0
  186. data/tracks/perl6/exercises/two-fer/{Example.pm6 → .meta/solutions/TwoFer.pm6} +0 -0
  187. data/tracks/perl6/exercises/word-count/{example.yaml → .meta/exercise-data.yaml} +0 -0
  188. data/tracks/perl6/exercises/word-count/{Example.pm6 → .meta/solutions/WordCount.pm6} +0 -0
  189. data/tracks/perl6/exercises/wordy/{example.yaml → .meta/exercise-data.yaml} +0 -0
  190. data/tracks/perl6/exercises/wordy/{Example.pm6 → .meta/solutions/Wordy.pm6} +0 -0
  191. data/tracks/perl6/t/generated-tests.t +2 -2
  192. data/tracks/python/config.json +12 -0
  193. data/tracks/python/exercises/bowling/.gitignore +0 -0
  194. data/tracks/python/exercises/bowling/bowling.py +11 -0
  195. data/tracks/python/exercises/bowling/bowling_test.py +193 -0
  196. data/tracks/python/exercises/bowling/example.py +149 -0
  197. data/tracks/python/exercises/say/say_test.py +1 -1
  198. data/tracks/ruby/README.md +121 -97
  199. data/tracks/ruby/config/exercise_readme.go.tmpl +23 -4
  200. data/tracks/ruby/exercises/accumulate/{HINTS.md → .meta/hints.md} +0 -0
  201. data/tracks/ruby/exercises/accumulate/README.md +3 -5
  202. data/tracks/ruby/exercises/acronym/README.md +3 -6
  203. data/tracks/ruby/exercises/all-your-base/README.md +4 -7
  204. data/tracks/ruby/exercises/allergies/README.md +3 -6
  205. data/tracks/ruby/exercises/alphametics/README.md +5 -8
  206. data/tracks/ruby/exercises/anagram/README.md +3 -5
  207. data/tracks/ruby/exercises/atbash-cipher/README.md +5 -6
  208. data/tracks/ruby/exercises/beer-song/README.md +5 -7
  209. data/tracks/ruby/exercises/binary-search-tree/README.md +3 -5
  210. data/tracks/ruby/exercises/binary-search/README.md +3 -5
  211. data/tracks/ruby/exercises/binary/README.md +5 -5
  212. data/tracks/ruby/exercises/bob/README.md +3 -5
  213. data/tracks/ruby/exercises/book-store/README.md +3 -5
  214. data/tracks/ruby/exercises/bowling/README.md +23 -11
  215. data/tracks/ruby/exercises/bracket-push/README.md +3 -5
  216. data/tracks/ruby/exercises/change/README.md +3 -5
  217. data/tracks/ruby/exercises/circular-buffer/README.md +16 -11
  218. data/tracks/ruby/exercises/clock/README.md +3 -5
  219. data/tracks/ruby/exercises/collatz-conjecture/README.md +4 -6
  220. data/tracks/ruby/exercises/complex-numbers/README.md +6 -8
  221. data/tracks/ruby/exercises/connect/README.md +4 -7
  222. data/tracks/ruby/exercises/crypto-square/README.md +3 -5
  223. data/tracks/ruby/exercises/custom-set/README.md +3 -6
  224. data/tracks/ruby/exercises/diamond/README.md +9 -11
  225. data/tracks/ruby/exercises/difference-of-squares/README.md +3 -5
  226. data/tracks/ruby/exercises/dominoes/README.md +6 -9
  227. data/tracks/ruby/exercises/etl/README.md +6 -6
  228. data/tracks/ruby/exercises/flatten-array/README.md +5 -8
  229. data/tracks/ruby/exercises/food-chain/README.md +4 -6
  230. data/tracks/ruby/exercises/gigasecond/README.md +3 -5
  231. data/tracks/ruby/exercises/grade-school/README.md +3 -6
  232. data/tracks/ruby/exercises/grains/README.md +3 -6
  233. data/tracks/ruby/exercises/hamming/README.md +3 -5
  234. data/tracks/ruby/exercises/hello-world/README.md +1 -3
  235. data/tracks/ruby/exercises/hexadecimal/README.md +3 -5
  236. data/tracks/ruby/exercises/house/README.md +5 -8
  237. data/tracks/ruby/exercises/isbn-verifier/README.md +4 -6
  238. data/tracks/ruby/exercises/isogram/README.md +5 -6
  239. data/tracks/ruby/exercises/kindergarten-garden/README.md +16 -18
  240. data/tracks/ruby/exercises/largest-series-product/README.md +3 -5
  241. data/tracks/ruby/exercises/leap/README.md +4 -6
  242. data/tracks/ruby/exercises/linked-list/README.md +13 -15
  243. data/tracks/ruby/exercises/list-ops/README.md +3 -6
  244. data/tracks/ruby/exercises/luhn/README.md +10 -12
  245. data/tracks/ruby/exercises/matrix/README.md +9 -9
  246. data/tracks/ruby/exercises/meetup/README.md +19 -18
  247. data/tracks/ruby/exercises/minesweeper/README.md +3 -6
  248. data/tracks/ruby/exercises/nth-prime/README.md +3 -5
  249. data/tracks/ruby/exercises/nucleotide-count/README.md +11 -27
  250. data/tracks/ruby/exercises/ocr-numbers/README.md +9 -11
  251. data/tracks/ruby/exercises/octal/README.md +9 -7
  252. data/tracks/ruby/exercises/palindrome-products/README.md +8 -17
  253. data/tracks/ruby/exercises/pangram/README.md +4 -6
  254. data/tracks/ruby/exercises/pascals-triangle/README.md +5 -7
  255. data/tracks/ruby/exercises/perfect-numbers/README.md +5 -7
  256. data/tracks/ruby/exercises/phone-number/README.md +7 -8
  257. data/tracks/ruby/exercises/pig-latin/README.md +3 -5
  258. data/tracks/ruby/exercises/point-mutations/README.md +3 -5
  259. data/tracks/ruby/exercises/poker/README.md +3 -5
  260. data/tracks/ruby/exercises/prime-factors/README.md +3 -5
  261. data/tracks/ruby/exercises/protein-translation/README.md +7 -10
  262. data/tracks/ruby/exercises/proverb/README.md +17 -14
  263. data/tracks/ruby/exercises/pythagorean-triplet/README.md +6 -8
  264. data/tracks/ruby/exercises/queen-attack/README.md +4 -6
  265. data/tracks/ruby/exercises/rail-fence-cipher/README.md +15 -12
  266. data/tracks/ruby/exercises/raindrops/README.md +3 -5
  267. data/tracks/ruby/exercises/rna-transcription/README.md +4 -6
  268. data/tracks/ruby/exercises/robot-name/{HINTS.md → .meta/hints.md} +0 -0
  269. data/tracks/ruby/exercises/robot-name/README.md +3 -5
  270. data/tracks/ruby/exercises/robot-simulator/README.md +3 -5
  271. data/tracks/ruby/exercises/roman-numerals/README.md +4 -6
  272. data/tracks/ruby/exercises/rotational-cipher/README.md +3 -5
  273. data/tracks/ruby/exercises/run-length-encoding/README.md +7 -9
  274. data/tracks/ruby/exercises/saddle-points/README.md +5 -7
  275. data/tracks/ruby/exercises/say/README.md +3 -5
  276. data/tracks/ruby/exercises/scale-generator/README.md +3 -7
  277. data/tracks/ruby/exercises/scrabble-score/README.md +6 -6
  278. data/tracks/ruby/exercises/secret-handshake/README.md +4 -6
  279. data/tracks/ruby/exercises/series/README.md +3 -5
  280. data/tracks/ruby/exercises/sieve/README.md +3 -5
  281. data/tracks/ruby/exercises/simple-cipher/README.md +7 -11
  282. data/tracks/ruby/exercises/simple-linked-list/README.md +3 -5
  283. data/tracks/ruby/exercises/space-age/README.md +4 -6
  284. data/tracks/ruby/exercises/strain/README.md +3 -5
  285. data/tracks/ruby/exercises/sum-of-multiples/README.md +6 -11
  286. data/tracks/ruby/exercises/tournament/README.md +8 -11
  287. data/tracks/ruby/exercises/transpose/README.md +10 -12
  288. data/tracks/ruby/exercises/triangle/README.md +12 -11
  289. data/tracks/ruby/exercises/trinary/README.md +4 -6
  290. data/tracks/ruby/exercises/twelve-days/README.md +4 -6
  291. data/tracks/ruby/exercises/two-bucket/README.md +13 -15
  292. data/tracks/ruby/exercises/two-fer/README.md +13 -39
  293. data/tracks/ruby/exercises/word-count/README.md +4 -7
  294. data/tracks/ruby/exercises/wordy/README.md +3 -10
  295. metadata +77 -68
  296. data/tracks/ruby/docs/EXERCISE_README_INSERT.md +0 -24
@@ -1,4 +1,4 @@
1
- // This file was auto-generated based on version 1.0.1 of the canonical data.
1
+ // This file was auto-generated based on version 1.1.0 of the canonical data.
2
2
 
3
3
  module PerfectNumbersTest
4
4
 
@@ -1,4 +1,4 @@
1
- // This file was auto-generated based on version 1.2.0 of the canonical data.
1
+ // This file was auto-generated based on version 1.4.0 of the canonical data.
2
2
 
3
3
  module PhoneNumberTest
4
4
 
@@ -48,10 +48,18 @@ let ``Invalid with punctuations`` () =
48
48
  clean "123-@:!-7890" |> should equal None
49
49
 
50
50
  [<Fact(Skip = "Remove to run test")>]
51
- let ``Invalid if area code does not start with 2-9`` () =
51
+ let ``Invalid if area code starts with 0`` () =
52
+ clean "(023) 456-7890" |> should equal None
53
+
54
+ [<Fact(Skip = "Remove to run test")>]
55
+ let ``Invalid if area code starts with 1`` () =
52
56
  clean "(123) 456-7890" |> should equal None
53
57
 
54
58
  [<Fact(Skip = "Remove to run test")>]
55
- let ``Invalid if exchange code does not start with 2-9`` () =
59
+ let ``Invalid if exchange code starts with 0`` () =
56
60
  clean "(223) 056-7890" |> should equal None
57
61
 
62
+ [<Fact(Skip = "Remove to run test")>]
63
+ let ``Invalid if exchange code starts with 1`` () =
64
+ clean "(223) 156-7890" |> should equal None
65
+
@@ -1,4 +1,4 @@
1
- // This file was auto-generated based on version 1.1.0 of the canonical data.
1
+ // This file was auto-generated based on version 1.2.0 of the canonical data.
2
2
 
3
3
  module PigLatinTest
4
4
 
@@ -23,8 +23,8 @@ let codonToProtein =
23
23
  | "UGA" -> "STOP"
24
24
  | _ -> failwith "Invalid codon"
25
25
 
26
- let translate (input: string) =
27
- input
26
+ let proteins (rna: string) =
27
+ rna
28
28
  |> Seq.chunkBySize 3
29
29
  |> Seq.map (String >> codonToProtein)
30
30
  |> Seq.takeWhile (fun str -> str <> "STOP")
@@ -1,3 +1,3 @@
1
1
  module ProteinTranslation
2
2
 
3
- let translate input = failwith "You need to implement this function."
3
+ let proteins rna = failwith "You need to implement this function."
@@ -1,67 +1,101 @@
1
- // This file was created manually and its version is 1.0.0.
1
+ // This file was auto-generated based on version 1.0.1 of the canonical data.
2
2
 
3
3
  module ProteinTranslationTest
4
4
 
5
- open Xunit
6
5
  open FsUnit.Xunit
7
- open System
6
+ open Xunit
8
7
 
9
8
  open ProteinTranslation
10
9
 
11
- [<Theory(Skip = "Remove to run test")>]
12
- [<InlineData("AUG")>]
13
- let ``Identifies Methionine codons`` (codon) =
14
- translate codon |> should equal ["Methionine"]
15
-
16
- [<Theory(Skip = "Remove to run test")>]
17
- [<InlineData("UUU")>]
18
- [<InlineData("UUC")>]
19
- let ``Identifies Phenylalanine codons`` (codon) =
20
- translate codon |> should equal ["Phenylalanine"]
21
-
22
- [<Theory(Skip = "Remove to run test")>]
23
- [<InlineData("UUA")>]
24
- [<InlineData("UUG")>]
25
- let ``Identifies Leucine codons`` (codon) =
26
- translate codon |> should equal ["Leucine"]
27
-
28
- [<Theory(Skip = "Remove to run test")>]
29
- [<InlineData("UCU")>]
30
- [<InlineData("UCC")>]
31
- [<InlineData("UCA")>]
32
- [<InlineData("UCG")>]
33
- let ``Identifies Serine codons`` (codon) =
34
- translate codon |> should equal ["Serine"]
35
-
36
- [<Theory(Skip = "Remove to run test")>]
37
- [<InlineData("UAU")>]
38
- [<InlineData("UAC")>]
39
- let ``Identifies Tyrosine codons`` (codon) =
40
- translate codon |> should equal ["Tyrosine"]
41
-
42
- [<Theory(Skip = "Remove to run test")>]
43
- [<InlineData("UGU")>]
44
- [<InlineData("UGC")>]
45
- let ``Identifies Cysteine codons`` (codon) =
46
- translate codon |> should equal ["Cysteine"]
47
-
48
- [<Theory(Skip = "Remove to run test")>]
49
- [<InlineData("UGG")>]
50
- let ``Identifies Tryptophan codons`` (codon) =
51
- translate codon |> should equal ["Tryptophan"]
52
-
53
- [<Fact(Skip = "Remove to run test")>]
54
- let ``Translates rna strand into correct protein`` () =
55
- translate "AUGUUUUGG" |> should equal ["Methionine"; "Phenylalanine"; "Tryptophan"]
56
-
57
- [<Fact(Skip = "Remove to run test")>]
58
- let ``Stops translation if stop codon present`` () =
59
- translate "AUGUUUUAA" |> should equal ["Methionine"; "Phenylalanine"]
60
-
61
- [<Fact(Skip = "Remove to run test")>]
62
- let ``Stops translation of longer strand`` () =
63
- translate "UGGUGUUAUUAAUGGUUU'" |> should equal ["Tryptophan"; "Cysteine"; "Tyrosine"]
64
-
65
- [<Fact(Skip = "Remove to run test")>]
66
- let ``Throws for invalid codons`` () =
67
- (fun () -> translate "CARROT'" |> List.ofSeq |> ignore) |> should throw typeof<Exception>
10
+ [<Fact>]
11
+ let ``Methionine RNA sequence`` () =
12
+ proteins "AUG" |> should equal ["Methionine"]
13
+
14
+ [<Fact(Skip = "Remove to run test")>]
15
+ let ``Phenylalanine RNA sequence 1`` () =
16
+ proteins "UUU" |> should equal ["Phenylalanine"]
17
+
18
+ [<Fact(Skip = "Remove to run test")>]
19
+ let ``Phenylalanine RNA sequence 2`` () =
20
+ proteins "UUC" |> should equal ["Phenylalanine"]
21
+
22
+ [<Fact(Skip = "Remove to run test")>]
23
+ let ``Leucine RNA sequence 1`` () =
24
+ proteins "UUA" |> should equal ["Leucine"]
25
+
26
+ [<Fact(Skip = "Remove to run test")>]
27
+ let ``Leucine RNA sequence 2`` () =
28
+ proteins "UUG" |> should equal ["Leucine"]
29
+
30
+ [<Fact(Skip = "Remove to run test")>]
31
+ let ``Serine RNA sequence 1`` () =
32
+ proteins "UCU" |> should equal ["Serine"]
33
+
34
+ [<Fact(Skip = "Remove to run test")>]
35
+ let ``Serine RNA sequence 2`` () =
36
+ proteins "UCC" |> should equal ["Serine"]
37
+
38
+ [<Fact(Skip = "Remove to run test")>]
39
+ let ``Serine RNA sequence 3`` () =
40
+ proteins "UCA" |> should equal ["Serine"]
41
+
42
+ [<Fact(Skip = "Remove to run test")>]
43
+ let ``Serine RNA sequence 4`` () =
44
+ proteins "UCG" |> should equal ["Serine"]
45
+
46
+ [<Fact(Skip = "Remove to run test")>]
47
+ let ``Tyrosine RNA sequence 1`` () =
48
+ proteins "UAU" |> should equal ["Tyrosine"]
49
+
50
+ [<Fact(Skip = "Remove to run test")>]
51
+ let ``Tyrosine RNA sequence 2`` () =
52
+ proteins "UAC" |> should equal ["Tyrosine"]
53
+
54
+ [<Fact(Skip = "Remove to run test")>]
55
+ let ``Cysteine RNA sequence 1`` () =
56
+ proteins "UGU" |> should equal ["Cysteine"]
57
+
58
+ [<Fact(Skip = "Remove to run test")>]
59
+ let ``Cysteine RNA sequence 2`` () =
60
+ proteins "UGC" |> should equal ["Cysteine"]
61
+
62
+ [<Fact(Skip = "Remove to run test")>]
63
+ let ``Tryptophan RNA sequence`` () =
64
+ proteins "UGG" |> should equal ["Tryptophan"]
65
+
66
+ [<Fact(Skip = "Remove to run test")>]
67
+ let ``STOP codon RNA sequence 1`` () =
68
+ proteins "UAA" |> should be Empty
69
+
70
+ [<Fact(Skip = "Remove to run test")>]
71
+ let ``STOP codon RNA sequence 2`` () =
72
+ proteins "UAG" |> should be Empty
73
+
74
+ [<Fact(Skip = "Remove to run test")>]
75
+ let ``STOP codon RNA sequence 3`` () =
76
+ proteins "UGA" |> should be Empty
77
+
78
+ [<Fact(Skip = "Remove to run test")>]
79
+ let ``Translate RNA strand into correct protein list`` () =
80
+ proteins "AUGUUUUGG" |> should equal ["Methionine"; "Phenylalanine"; "Tryptophan"]
81
+
82
+ [<Fact(Skip = "Remove to run test")>]
83
+ let ``Translation stops if STOP codon at beginning of sequence`` () =
84
+ proteins "UAGUGG" |> should be Empty
85
+
86
+ [<Fact(Skip = "Remove to run test")>]
87
+ let ``Translation stops if STOP codon at end of two-codon sequence`` () =
88
+ proteins "UGGUAG" |> should equal ["Tryptophan"]
89
+
90
+ [<Fact(Skip = "Remove to run test")>]
91
+ let ``Translation stops if STOP codon at end of three-codon sequence`` () =
92
+ proteins "AUGUUUUAA" |> should equal ["Methionine"; "Phenylalanine"]
93
+
94
+ [<Fact(Skip = "Remove to run test")>]
95
+ let ``Translation stops if STOP codon in middle of three-codon sequence`` () =
96
+ proteins "UGGUAGUGG" |> should equal ["Tryptophan"]
97
+
98
+ [<Fact(Skip = "Remove to run test")>]
99
+ let ``Translation stops if STOP codon in middle of six-codon sequence`` () =
100
+ proteins "UGGUGUUAUUAAUGGUUU" |> should equal ["Tryptophan"; "Cysteine"; "Tyrosine"]
101
+
@@ -1,4 +1,4 @@
1
- // This file was auto-generated based on version 1.0.0 of the canonical data.
1
+ // This file was auto-generated based on version 1.1.0 of the canonical data.
2
2
 
3
3
  module ReactTest
4
4
 
@@ -1,4 +1,4 @@
1
- // This file was auto-generated based on version 1.1.0 of the canonical data.
1
+ // This file was auto-generated based on version 1.2.0 of the canonical data.
2
2
 
3
3
  module RnaTranscriptionTest
4
4
 
@@ -1,4 +1,4 @@
1
- // This file was auto-generated based on version 1.0.0 of the canonical data.
1
+ // This file was auto-generated based on version 1.1.0 of the canonical data.
2
2
 
3
3
  module RomanNumeralsTest
4
4
 
@@ -1,4 +1,4 @@
1
- // This file was auto-generated based on version 1.1.0 of the canonical data.
1
+ // This file was auto-generated based on version 1.2.0 of the canonical data.
2
2
 
3
3
  module RotationalCipherTest
4
4
 
@@ -68,7 +68,7 @@ let parts n =
68
68
  let (thousandsCount, remainder) = quotRem millionsRemainder 1000L
69
69
  (billionsCount, millionsCount, thousandsCount, remainder)
70
70
 
71
- let inEnglish n =
71
+ let say n =
72
72
  match n with
73
73
  | _ when n < 0L || n>= 1000000000000L -> None
74
74
  | 0L -> Some "zero"
@@ -1,72 +1,69 @@
1
- // This file was created manually and its version is 1.0.0.
1
+ // This file was auto-generated based on version 1.1.0 of the canonical data.
2
2
 
3
3
  module SayTest
4
4
 
5
- open Xunit
6
5
  open FsUnit.Xunit
6
+ open Xunit
7
7
 
8
8
  open Say
9
9
 
10
10
  [<Fact>]
11
11
  let ``Zero`` () =
12
- inEnglish 0L |> should equal <| Some "zero"
12
+ say 0L |> should equal (Some "zero")
13
13
 
14
14
  [<Fact(Skip = "Remove to run test")>]
15
15
  let ``One`` () =
16
- inEnglish 1L |> should equal <| Some "one"
16
+ say 1L |> should equal (Some "one")
17
17
 
18
18
  [<Fact(Skip = "Remove to run test")>]
19
19
  let ``Fourteen`` () =
20
- inEnglish 14L |> should equal <| Some "fourteen"
20
+ say 14L |> should equal (Some "fourteen")
21
21
 
22
22
  [<Fact(Skip = "Remove to run test")>]
23
23
  let ``Twenty`` () =
24
- inEnglish 20L |> should equal <| Some "twenty"
24
+ say 20L |> should equal (Some "twenty")
25
25
 
26
26
  [<Fact(Skip = "Remove to run test")>]
27
27
  let ``Twenty-two`` () =
28
- inEnglish 22L |> should equal <| Some "twenty-two"
28
+ say 22L |> should equal (Some "twenty-two")
29
29
 
30
30
  [<Fact(Skip = "Remove to run test")>]
31
31
  let ``One hundred`` () =
32
- inEnglish 100L |> should equal <| Some "one hundred"
32
+ say 100L |> should equal (Some "one hundred")
33
33
 
34
34
  [<Fact(Skip = "Remove to run test")>]
35
35
  let ``One hundred twenty-three`` () =
36
- inEnglish 123L |> should equal <| Some "one hundred twenty-three"
36
+ say 123L |> should equal (Some "one hundred twenty-three")
37
37
 
38
38
  [<Fact(Skip = "Remove to run test")>]
39
39
  let ``One thousand`` () =
40
- inEnglish 1000L |> should equal <| Some "one thousand"
40
+ say 1000L |> should equal (Some "one thousand")
41
41
 
42
42
  [<Fact(Skip = "Remove to run test")>]
43
43
  let ``One thousand two hundred thirty-four`` () =
44
- inEnglish 1234L |> should equal <| Some "one thousand two hundred thirty-four"
44
+ say 1234L |> should equal (Some "one thousand two hundred thirty-four")
45
45
 
46
46
  [<Fact(Skip = "Remove to run test")>]
47
47
  let ``One million`` () =
48
- inEnglish 1000000L |> should equal <| Some "one million"
49
-
50
- [<Fact(Skip = "Remove to run test")>]
51
- let ``One million two`` () =
52
- inEnglish 1000002L |> should equal <| Some "one million two"
48
+ say 1000000L |> should equal (Some "one million")
53
49
 
54
50
  [<Fact(Skip = "Remove to run test")>]
55
51
  let ``One million two thousand three hundred forty-five`` () =
56
- inEnglish 1002345L |> should equal <| Some "one million two thousand three hundred forty-five"
52
+ say 1002345L |> should equal (Some "one million two thousand three hundred forty-five")
57
53
 
58
54
  [<Fact(Skip = "Remove to run test")>]
59
55
  let ``One billion`` () =
60
- inEnglish 1000000000L |> should equal <| Some "one billion"
56
+ say 1000000000L |> should equal (Some "one billion")
61
57
 
62
58
  [<Fact(Skip = "Remove to run test")>]
63
59
  let ``A big number`` () =
64
- inEnglish 987654321123L |> should equal <| Some "nine hundred eighty-seven billion six hundred fifty-four million three hundred twenty-one thousand one hundred twenty-three"
65
-
60
+ say 987654321123L |> should equal (Some "nine hundred eighty-seven billion six hundred fifty-four million three hundred twenty-one thousand one hundred twenty-three")
61
+
66
62
  [<Fact(Skip = "Remove to run test")>]
67
- let ``Lower bound`` () =
68
- inEnglish -1L |> should equal None
63
+ let ``Numbers below zero are out of range`` () =
64
+ say -1L |> should equal None
69
65
 
70
66
  [<Fact(Skip = "Remove to run test")>]
71
- let ``Upper bound`` () =
72
- inEnglish 1000000000000L |> should equal None
67
+ let ``Numbers above 999,999,999,999 are out of range`` () =
68
+ say 1000000000000L |> should equal None
69
+
@@ -1,4 +1,4 @@
1
- // This file was auto-generated based on version 1.0.0 of the canonical data.
1
+ // This file was auto-generated based on version 1.1.0 of the canonical data.
2
2
 
3
3
  module ScrabbleScoreTest
4
4
 
@@ -1,6 +1,6 @@
1
1
  module SecretHandshake
2
2
 
3
- let commands =
3
+ let commandsMapping =
4
4
  [(1 <<< 0, (fun acc -> acc @ ["wink"]));
5
5
  (1 <<< 1, (fun acc -> acc @ ["double blink"]));
6
6
  (1 <<< 2, (fun acc -> acc @ ["close your eyes"]));
@@ -11,4 +11,4 @@ let applyCommand number acc (mask, apply) =
11
11
  if number &&& mask <> 0 then apply acc
12
12
  else acc
13
13
 
14
- let handshake number = commands |> List.fold (applyCommand number) []
14
+ let commands number = commandsMapping |> List.fold (applyCommand number) []
@@ -1,3 +1,3 @@
1
1
  module SecretHandshake
2
2
 
3
- let handshake number = failwith "You need to implement this function."
3
+ let commands number = failwith "You need to implement this function."
@@ -1,36 +1,53 @@
1
- // This file was created manually and its version is 1.0.0.
1
+ // This file was auto-generated based on version 1.2.0 of the canonical data.
2
2
 
3
3
  module SecretHandshakeTest
4
4
 
5
- open Xunit
6
5
  open FsUnit.Xunit
6
+ open Xunit
7
7
 
8
8
  open SecretHandshake
9
9
 
10
10
  [<Fact>]
11
- let ``Test 1 handshake to wink`` () =
12
- handshake 1 |> should equal ["wink"]
13
-
11
+ let ``Wink for 1`` () =
12
+ commands 1 |> should equal ["wink"]
13
+
14
14
  [<Fact(Skip = "Remove to run test")>]
15
- let ``Test 10 handshake to double blink`` () =
16
- handshake 2 |> should equal ["double blink"]
17
-
15
+ let ``Double blink for 10`` () =
16
+ commands 2 |> should equal ["double blink"]
17
+
18
18
  [<Fact(Skip = "Remove to run test")>]
19
- let ``Test 100 handshake to close your eyes`` () =
20
- handshake 4 |> should equal ["close your eyes"]
21
-
19
+ let ``Close your eyes for 100`` () =
20
+ commands 4 |> should equal ["close your eyes"]
21
+
22
22
  [<Fact(Skip = "Remove to run test")>]
23
- let ``Test 1000 handshake to close your eyes`` () =
24
- handshake 8 |> should equal ["jump"]
25
-
23
+ let ``Jump for 1000`` () =
24
+ commands 8 |> should equal ["jump"]
25
+
26
26
  [<Fact(Skip = "Remove to run test")>]
27
- let ``Test handshake 11 to wink and double blink`` () =
28
- handshake 3 |> should equal ["wink"; "double blink"]
29
-
27
+ let ``Combine two actions`` () =
28
+ commands 3 |> should equal ["wink"; "double blink"]
29
+
30
30
  [<Fact(Skip = "Remove to run test")>]
31
- let ``Test handshake 10011 to double blink and wink`` () =
32
- handshake 19 |> should equal ["double blink"; "wink"]
33
-
31
+ let ``Reverse two actions`` () =
32
+ commands 19 |> should equal ["double blink"; "wink"]
33
+
34
34
  [<Fact(Skip = "Remove to run test")>]
35
- let ``Test handshake 11111 to all commands reversed`` () =
36
- handshake 31 |> should equal ["jump"; "close your eyes"; "double blink"; "wink"]
35
+ let ``Reversing one action gives the same action`` () =
36
+ commands 24 |> should equal ["jump"]
37
+
38
+ [<Fact(Skip = "Remove to run test")>]
39
+ let ``Reversing no actions still gives no actions`` () =
40
+ commands 16 |> should be Empty
41
+
42
+ [<Fact(Skip = "Remove to run test")>]
43
+ let ``All possible actions`` () =
44
+ commands 15 |> should equal ["wink"; "double blink"; "close your eyes"; "jump"]
45
+
46
+ [<Fact(Skip = "Remove to run test")>]
47
+ let ``Reverse all possible actions`` () =
48
+ commands 31 |> should equal ["jump"; "close your eyes"; "double blink"; "wink"]
49
+
50
+ [<Fact(Skip = "Remove to run test")>]
51
+ let ``Do nothing for zero`` () =
52
+ commands 0 |> should be Empty
53
+