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,6 +1,6 @@
1
1
  {
2
2
  "exercise": "complex-numbers",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "comments": [
5
5
  " The canonical data assumes mathematically correct real ",
6
6
  " numbers. The testsuites should consider rounding errors ",
@@ -18,19 +18,25 @@
18
18
  {
19
19
  "description": "Real part of a purely real number",
20
20
  "property": "real",
21
- "input": [1, 0],
21
+ "input": {
22
+ "z": [1, 0]
23
+ },
22
24
  "expected": 1
23
25
  },
24
26
  {
25
27
  "description": "Real part of a purely imaginary number",
26
28
  "property": "real",
27
- "input": [0, 1],
29
+ "input": {
30
+ "z": [0, 1]
31
+ },
28
32
  "expected": 0
29
33
  },
30
34
  {
31
35
  "description": "Real part of a number with real and imaginary part",
32
36
  "property": "real",
33
- "input": [1, 2],
37
+ "input": {
38
+ "z": [1, 2]
39
+ },
34
40
  "expected": 1
35
41
  }
36
42
  ]
@@ -41,19 +47,25 @@
41
47
  {
42
48
  "description": "Imaginary part of a purely real number",
43
49
  "property": "imaginary",
44
- "input": [1, 0],
50
+ "input": {
51
+ "z": [1, 0]
52
+ },
45
53
  "expected": 0
46
54
  },
47
55
  {
48
56
  "description": "Imaginary part of a purely imaginary number",
49
57
  "property": "imaginary",
50
- "input": [0, 1],
58
+ "input": {
59
+ "z": [0, 1]
60
+ },
51
61
  "expected": 1
52
62
  },
53
63
  {
54
64
  "description": "Imaginary part of a number with real and imaginary part",
55
65
  "property": "imaginary",
56
- "input": [1, 2],
66
+ "input": {
67
+ "z": [1, 2]
68
+ },
57
69
  "expected": 2
58
70
  }
59
71
  ]
@@ -61,8 +73,10 @@
61
73
  {
62
74
  "description": "Imaginary unit",
63
75
  "property": "mul",
64
- "z1": [0, 1],
65
- "z2": [0, 1],
76
+ "input": {
77
+ "z1": [0, 1],
78
+ "z2": [0, 1]
79
+ },
66
80
  "expected": [-1, 0]
67
81
  },
68
82
  {
@@ -74,22 +88,28 @@
74
88
  {
75
89
  "description": "Add purely real numbers",
76
90
  "property": "add",
77
- "z1": [1, 0],
78
- "z2": [2, 0],
91
+ "input": {
92
+ "z1": [1, 0],
93
+ "z2": [2, 0]
94
+ },
79
95
  "expected": [3, 0]
80
96
  },
81
97
  {
82
98
  "description": "Add purely imaginary numbers",
83
99
  "property": "add",
84
- "z1": [0, 1],
85
- "z2": [0, 2],
100
+ "input": {
101
+ "z1": [0, 1],
102
+ "z2": [0, 2]
103
+ },
86
104
  "expected": [0, 3]
87
105
  },
88
106
  {
89
107
  "description": "Add numbers with real and imaginary part",
90
108
  "property": "add",
91
- "z1": [1, 2],
92
- "z2": [3, 4],
109
+ "input": {
110
+ "z1": [1, 2],
111
+ "z2": [3, 4]
112
+ },
93
113
  "expected": [4, 6]
94
114
  }
95
115
  ]
@@ -100,22 +120,28 @@
100
120
  {
101
121
  "description": "Subtract purely real numbers",
102
122
  "property": "sub",
103
- "z1": [1, 0],
104
- "z2": [2, 0],
123
+ "input": {
124
+ "z1": [1, 0],
125
+ "z2": [2, 0]
126
+ },
105
127
  "expected": [-1, 0]
106
128
  },
107
129
  {
108
130
  "description": "Subtract purely imaginary numbers",
109
131
  "property": "sub",
110
- "z1": [0, 1],
111
- "z2": [0, 2],
132
+ "input": {
133
+ "z1": [0, 1],
134
+ "z2": [0, 2]
135
+ },
112
136
  "expected": [0, -1]
113
137
  },
114
138
  {
115
139
  "description": "Subtract numbers with real and imaginary part",
116
140
  "property": "sub",
117
- "z1": [1, 2],
118
- "z2": [3, 4],
141
+ "input": {
142
+ "z1": [1, 2],
143
+ "z2": [3, 4]
144
+ },
119
145
  "expected": [-2, -2]
120
146
  }
121
147
  ]
@@ -126,22 +152,28 @@
126
152
  {
127
153
  "description": "Multiply purely real numbers",
128
154
  "property": "mul",
129
- "z1": [1, 0],
130
- "z2": [2, 0],
155
+ "input": {
156
+ "z1": [1, 0],
157
+ "z2": [2, 0]
158
+ },
131
159
  "expected": [2, 0]
132
160
  },
133
161
  {
134
162
  "description": "Multiply purely imaginary numbers",
135
163
  "property": "mul",
136
- "z1": [0, 1],
137
- "z2": [0, 2],
164
+ "input": {
165
+ "z1": [0, 1],
166
+ "z2": [0, 2]
167
+ },
138
168
  "expected": [-2, 0]
139
169
  },
140
170
  {
141
171
  "description": "Multiply numbers with real and imaginary part",
142
172
  "property": "mul",
143
- "z1": [1, 2],
144
- "z2": [3, 4],
173
+ "input": {
174
+ "z1": [1, 2],
175
+ "z2": [3, 4]
176
+ },
145
177
  "expected": [-5, 10]
146
178
  }
147
179
  ]
@@ -152,22 +184,28 @@
152
184
  {
153
185
  "description": "Divide purely real numbers",
154
186
  "property": "div",
155
- "z1": [1, 0],
156
- "z2": [2, 0],
187
+ "input": {
188
+ "z1": [1, 0],
189
+ "z2": [2, 0]
190
+ },
157
191
  "expected": [0.5, 0]
158
192
  },
159
193
  {
160
194
  "description": "Divide purely imaginary numbers",
161
195
  "property": "div",
162
- "z1": [0, 1],
163
- "z2": [0, 2],
196
+ "input": {
197
+ "z1": [0, 1],
198
+ "z2": [0, 2]
199
+ },
164
200
  "expected": [0.5, 0]
165
201
  },
166
202
  {
167
203
  "description": "Divide numbers with real and imaginary part",
168
204
  "property": "div",
169
- "z1": [1, 2],
170
- "z2": [3, 4],
205
+ "input": {
206
+ "z1": [1, 2],
207
+ "z2": [3, 4]
208
+ },
171
209
  "expected": [0.44, 0.08]
172
210
  }
173
211
  ]
@@ -180,31 +218,41 @@
180
218
  {
181
219
  "description": "Absolute value of a positive purely real number",
182
220
  "property": "abs",
183
- "input": [5, 0],
221
+ "input": {
222
+ "z": [5, 0]
223
+ },
184
224
  "expected": 5
185
225
  },
186
226
  {
187
227
  "description": "Absolute value of a negative purely real number",
188
228
  "property": "abs",
189
- "input": [-5, 0],
229
+ "input": {
230
+ "z": [-5, 0]
231
+ },
190
232
  "expected": 5
191
233
  },
192
234
  {
193
235
  "description": "Absolute value of a purely imaginary number with positive imaginary part",
194
236
  "property": "abs",
195
- "input": [0, 5],
237
+ "input": {
238
+ "z": [0, 5]
239
+ },
196
240
  "expected": 5
197
241
  },
198
242
  {
199
243
  "description": "Absolute value of a purely imaginary number with negative imaginary part",
200
244
  "property": "abs",
201
- "input": [0, -5],
245
+ "input": {
246
+ "z": [0, -5]
247
+ },
202
248
  "expected": 5
203
249
  },
204
250
  {
205
251
  "description": "Absolute value of a number with real and imaginary part",
206
252
  "property": "abs",
207
- "input": [3, 4],
253
+ "input": {
254
+ "z": [3, 4]
255
+ },
208
256
  "expected": 5
209
257
  }
210
258
  ]
@@ -215,19 +263,25 @@
215
263
  {
216
264
  "description": "Conjugate a purely real number",
217
265
  "property": "conjugate",
218
- "input": [5, 0],
266
+ "input": {
267
+ "z": [5, 0]
268
+ },
219
269
  "expected": [5, 0]
220
270
  },
221
271
  {
222
272
  "description": "Conjugate a purely imaginary number",
223
273
  "property": "conjugate",
224
- "input": [0, 5],
274
+ "input": {
275
+ "z": [0, 5]
276
+ },
225
277
  "expected": [0, -5]
226
278
  },
227
279
  {
228
280
  "description": "Conjugate a number with real and imaginary part",
229
281
  "property": "conjugate",
230
- "input": [1, 1],
282
+ "input": {
283
+ "z": [1, 1]
284
+ },
231
285
  "expected": [1, -1]
232
286
  }
233
287
  ]
@@ -249,19 +303,25 @@
249
303
  {
250
304
  "description": "Euler's identity/formula",
251
305
  "property": "exp",
252
- "input": [0, "pi"],
306
+ "input": {
307
+ "z": [0, "pi"]
308
+ },
253
309
  "expected": [-1, 0]
254
310
  },
255
311
  {
256
312
  "description": "Exponential of 0",
257
313
  "property": "exp",
258
- "input": [0, 0],
314
+ "input": {
315
+ "z": [0, 0]
316
+ },
259
317
  "expected": [1, 0]
260
318
  },
261
319
  {
262
320
  "description": "Exponential of a purely real number",
263
321
  "property": "exp",
264
- "input": [1, 0],
322
+ "input": {
323
+ "z": [1, 0]
324
+ },
265
325
  "expected": ["e", 0]
266
326
  }
267
327
  ]
@@ -0,0 +1,78 @@
1
+ {
2
+ "exercise": "matrix",
3
+ "version": "1.0.0",
4
+ "cases": [
5
+ {
6
+ "description": "extract row from one number matrix",
7
+ "property": "row",
8
+ "input": {
9
+ "string": "1",
10
+ "index": 0
11
+ },
12
+ "expected": [1]
13
+ },
14
+ {
15
+ "description": "can extract row",
16
+ "property": "row",
17
+ "input": {
18
+ "string": "1 2\n3 4",
19
+ "index": 1
20
+ },
21
+ "expected": [3, 4]
22
+ },
23
+ {
24
+ "description": "extract row where numbers have different widths",
25
+ "property": "row",
26
+ "input": {
27
+ "string": "1 2\n10 20",
28
+ "index": 1
29
+ },
30
+ "expected": [10, 20]
31
+ },
32
+ {
33
+ "description": "can extract row from non-square matrix",
34
+ "property": "row",
35
+ "input": {
36
+ "string": "1 2 3\n4 5 6\n7 8 9\n8 7 6",
37
+ "index": 2
38
+ },
39
+ "expected": [7, 8, 9]
40
+ },
41
+ {
42
+ "description": "extract column from one number matrix",
43
+ "property": "column",
44
+ "input": {
45
+ "string": "1",
46
+ "index": 0
47
+ },
48
+ "expected": [1]
49
+ },
50
+ {
51
+ "description": "can extract column",
52
+ "property": "column",
53
+ "input": {
54
+ "string": "1 2 3\n4 5 6\n7 8 9",
55
+ "index": 2
56
+ },
57
+ "expected": [3, 6, 9]
58
+ },
59
+ {
60
+ "description": "can extract column from non-square matrix",
61
+ "property": "column",
62
+ "input": {
63
+ "string": "1 2 3\n4 5 6\n7 8 9\n8 7 6",
64
+ "index": 2
65
+ },
66
+ "expected": [3, 6, 9, 6]
67
+ },
68
+ {
69
+ "description": "extract column where numbers have different widths",
70
+ "property": "column",
71
+ "input": {
72
+ "string": "89 1903 3\n18 3 1\n9 4 800",
73
+ "index": 1
74
+ },
75
+ "expected": [1903, 3, 4]
76
+ }
77
+ ]
78
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "exercise": "word-count",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "comments": [
5
5
  "For each word in the input, count the number of times it appears in the",
6
6
  "entire sentence."
@@ -8,7 +8,7 @@
8
8
  "cases": [
9
9
  {
10
10
  "description": "count one word",
11
- "property": "countwords",
11
+ "property": "countWords",
12
12
  "input": {
13
13
  "sentence": "word"
14
14
  },
@@ -18,7 +18,7 @@
18
18
  },
19
19
  {
20
20
  "description": "count one of each word",
21
- "property": "countwords",
21
+ "property": "countWords",
22
22
  "input": {
23
23
  "sentence": "one of each"
24
24
  },
@@ -30,7 +30,7 @@
30
30
  },
31
31
  {
32
32
  "description": "multiple occurrences of a word",
33
- "property": "countwords",
33
+ "property": "countWords",
34
34
  "input": {
35
35
  "sentence": "one fish two fish red fish blue fish"
36
36
  },
@@ -44,7 +44,7 @@
44
44
  },
45
45
  {
46
46
  "description": "handles cramped lists",
47
- "property": "countwords",
47
+ "property": "countWords",
48
48
  "input": {
49
49
  "sentence": "one,two,three"
50
50
  },
@@ -56,7 +56,7 @@
56
56
  },
57
57
  {
58
58
  "description": "handles expanded lists",
59
- "property": "countwords",
59
+ "property": "countWords",
60
60
  "input": {
61
61
  "sentence": "one,\ntwo,\nthree"
62
62
  },
@@ -68,7 +68,7 @@
68
68
  },
69
69
  {
70
70
  "description": "ignore punctuation",
71
- "property": "countwords",
71
+ "property": "countWords",
72
72
  "input": {
73
73
  "sentence": "car: carpet as java: javascript!!&@$%^&"
74
74
  },
@@ -82,7 +82,7 @@
82
82
  },
83
83
  {
84
84
  "description": "include numbers",
85
- "property": "countwords",
85
+ "property": "countWords",
86
86
  "input": {
87
87
  "sentence": "testing, 1, 2 testing"
88
88
  },
@@ -94,7 +94,7 @@
94
94
  },
95
95
  {
96
96
  "description": "normalize case",
97
- "property": "countwords",
97
+ "property": "countWords",
98
98
  "input": {
99
99
  "sentence": "go Go GO Stop stop"
100
100
  },
@@ -105,7 +105,7 @@
105
105
  },
106
106
  {
107
107
  "description": "with apostrophes",
108
- "property": "countwords",
108
+ "property": "countWords",
109
109
  "input": {
110
110
  "sentence": "First: don't laugh. Then: don't cry."
111
111
  },
@@ -119,7 +119,7 @@
119
119
  },
120
120
  {
121
121
  "description": "with quotations",
122
- "property": "countwords",
122
+ "property": "countWords",
123
123
  "input": {
124
124
  "sentence": "Joe can't tell between 'large' and large."
125
125
  },
@@ -134,7 +134,7 @@
134
134
  },
135
135
  {
136
136
  "description": "multiple spaces not detected as a word",
137
- "property": "countwords",
137
+ "property": "countWords",
138
138
  "input": {
139
139
  "sentence": " multiple whitespaces"
140
140
  },