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
@@ -9,6 +9,7 @@
9
9
  <Compile Include="Common.fs" />
10
10
  <Compile Include="Options.fs" />
11
11
  <Compile Include="CanonicalData.fs" />
12
+ <Compile Include="Track.fs" />
12
13
  <Compile Include="Formatting.fs" />
13
14
  <Compile Include="Rendering.fs" />
14
15
  <Compile Include="Exercise.fs" />
@@ -8,6 +8,7 @@ type Status =
8
8
  | Implemented
9
9
  | Unimplemented
10
10
  | MissingData
11
+ | Deprecated
11
12
  | Custom
12
13
 
13
14
  type CommandLineOptions =
@@ -36,13 +37,19 @@ let private normalizeCanonicalDataDirectory canonicalDataDirectory =
36
37
 
37
38
  let private normalizeExercise exercise = Option.ofNonEmptyString exercise
38
39
 
39
- let private normalizeStatus status =
40
- match Option.ofNonEmptyString status with
41
- | Some "Implemented" -> Some Implemented
42
- | Some "Unimplemented" -> Some Unimplemented
43
- | Some "MissingData" -> Some MissingData
44
- | Some "Custom" -> Some Custom
45
- | Some "All" -> None
40
+ let private normalizeStatus status =
41
+ let normalizedStatus =
42
+ status
43
+ |> Option.ofNonEmptyString
44
+ |> Option.map String.toLower
45
+
46
+ match normalizedStatus with
47
+ | Some "implemented" -> Some Implemented
48
+ | Some "unimplemented" -> Some Unimplemented
49
+ | Some "missingdata" -> Some MissingData
50
+ | Some "custom" -> Some Custom
51
+ | Some "deprecated" -> Some Deprecated
52
+ | Some "all" -> None
46
53
  | Some _ -> failwith "Invalid status"
47
54
  | None -> Some Implemented
48
55
 
@@ -16,6 +16,7 @@ let private isNotFilteredByStatus options (exercise: Exercise) =
16
16
  | Some Status.Implemented, Exercise.Generator _ -> true
17
17
  | Some Status.Unimplemented, Exercise.Unimplemented _ -> true
18
18
  | Some Status.MissingData, Exercise.MissingData _ -> true
19
+ | Some Status.Deprecated, Exercise.Deprecated _ -> true
19
20
  | Some Status.Custom, Exercise.Custom _ -> true
20
21
  | _ -> false
21
22
 
@@ -34,6 +35,8 @@ let private regenerateTestClass options =
34
35
  Log.Error("{Exercise}: missing test generator", unimplemented.Name)
35
36
  | Exercise.MissingData missingData ->
36
37
  Log.Warning("{Exercise}: missing canonical data", missingData.Name)
38
+ | Exercise.Deprecated deprecated ->
39
+ Log.Warning("{Exercise}: deprecated", deprecated.Name)
37
40
  | Exercise.Generator generator ->
38
41
  let canonicalData = parseCanonicalData' generator.Name
39
42
  generator.Regenerate(canonicalData)
@@ -7,7 +7,6 @@ open FSharp.Reflection
7
7
  open DotLiquid
8
8
  open DotLiquid.FileSystems
9
9
  open Formatting
10
- open System.Collections
11
10
 
12
11
  type OutputFilter() =
13
12
  static member Format (input: string) = formatValue input
@@ -0,0 +1,26 @@
1
+ module Generators.Track
2
+
3
+ open System.IO
4
+ open Newtonsoft.Json
5
+
6
+ type ConfigExercise =
7
+ { Slug: string
8
+ Deprecated: bool }
9
+
10
+ type Config =
11
+ { Exercises: ConfigExercise list }
12
+
13
+ let private convertTrackConfig trackConfigContents = JsonConvert.DeserializeObject<Config>(trackConfigContents)
14
+
15
+ let private trackConfigFile = Path.Combine("..", "config.json")
16
+
17
+ let private readTrackConfig = File.ReadAllText trackConfigFile
18
+
19
+ let private parseTrackConfig = convertTrackConfig readTrackConfig
20
+
21
+ let isDeprecated =
22
+ let config = parseTrackConfig
23
+
24
+ fun exercise ->
25
+ config.Exercises
26
+ |> List.exists (fun x -> x.Slug = exercise && x.Deprecated)
@@ -86,11 +86,13 @@ type TestGroups []struct {
86
86
  type OneCase struct {
87
87
  Description string
88
88
  Property string
89
- Set []int // "empty"/"contains"/"add" cases
90
- Set1 []int // "subset"/"disjoint"/"equal"/"difference"/"intersection"/"union" cases
91
- Set2 []int // "subset"/"disjoint"/"equal"/"difference"/"intersection"/"union" cases
92
- Element int // "contains"/"add" cases
93
- Expected interface{} // bool or []int
89
+ Input struct {
90
+ Set []int // "empty"/"contains"/"add" cases
91
+ Set1 []int // "subset"/"disjoint"/"equal"/"difference"/"intersection"/"union" cases
92
+ Set2 []int // "subset"/"disjoint"/"equal"/"difference"/"intersection"/"union" cases
93
+ Element int // "contains"/"add" cases
94
+ }
95
+ Expected interface{} // bool or []int
94
96
  }
95
97
 
96
98
  func (c OneCase) PropertyMatch(property string) bool { return c.Property == property }
@@ -127,7 +129,7 @@ var tmpl = `
127
129
  // {{ .GroupComment $property}}
128
130
  var {{$property}}Cases = []unaryBoolCase{ {{range .}} {{range .Cases}}
129
131
  {{if .PropertyMatch $property}} { // {{.Description}}
130
- {{strs .Set | printf "%#v"}},
132
+ {{strs .Input.Set | printf "%#v"}},
131
133
  {{.Expected}},
132
134
  },
133
135
  {{- end}}{{end}}{{end}}
@@ -138,8 +140,8 @@ var {{$property}}Cases = []unaryBoolCase{ {{range .}} {{range .Cases}}
138
140
  // {{ .GroupComment $property}}
139
141
  var {{$property}}Cases = []eleBoolCase{ {{range .}} {{range .Cases}}
140
142
  {{if .PropertyMatch $property}} { // {{.Description}}
141
- {{strs .Set | printf "%#v"}},
142
- {{str .Element | printf "%q"}},
143
+ {{strs .Input.Set | printf "%#v"}},
144
+ {{str .Input.Element | printf "%q"}},
143
145
  {{.Expected}},
144
146
  },
145
147
  {{- end}}{{end}}{{end}}
@@ -150,8 +152,8 @@ var {{$property}}Cases = []eleBoolCase{ {{range .}} {{range .Cases}}
150
152
  // {{ .GroupComment $property}}
151
153
  var {{$property}}Cases = []eleOpCase{ {{range .}} {{range .Cases}}
152
154
  {{if .PropertyMatch $property}} { // {{.Description}}
153
- {{strs .Set | printf "%#v"}},
154
- {{str .Element | printf "%q"}},
155
+ {{strs .Input.Set | printf "%#v"}},
156
+ {{str .Input.Element | printf "%q"}},
155
157
  {{istrs .Expected | printf "%#v"}},
156
158
  },
157
159
  {{- end}}{{end}}{{end}}
@@ -162,8 +164,8 @@ var {{$property}}Cases = []eleOpCase{ {{range .}} {{range .Cases}}
162
164
  // {{ .GroupComment $property}}
163
165
  var {{$property}}Cases = []binBoolCase{ {{range .}} {{range .Cases}}
164
166
  {{if .PropertyMatch $property}} { // {{.Description}}
165
- {{strs .Set1 | printf "%#v"}},
166
- {{strs .Set2 | printf "%#v"}},
167
+ {{strs .Input.Set1 | printf "%#v"}},
168
+ {{strs .Input.Set2 | printf "%#v"}},
167
169
  {{.Expected}},
168
170
  },
169
171
  {{- end}}{{end}}{{end}}
@@ -174,8 +176,8 @@ var {{$property}}Cases = []binBoolCase{ {{range .}} {{range .Cases}}
174
176
  // {{ .GroupComment $property}}
175
177
  var {{$property}}Cases = []binOpCase{ {{range .}} {{range .Cases}}
176
178
  {{if .PropertyMatch $property}} { // {{.Description}}
177
- {{strs .Set1 | printf "%#v"}},
178
- {{strs .Set2 | printf "%#v"}},
179
+ {{strs .Input.Set1 | printf "%#v"}},
180
+ {{strs .Input.Set2 | printf "%#v"}},
179
181
  {{istrs .Expected | printf "%#v"}},
180
182
  },
181
183
  {{- end}}{{end}}{{end}}
@@ -1,8 +1,8 @@
1
1
  package stringset
2
2
 
3
3
  // Source: exercism/problem-specifications
4
- // Commit: 390a769 custom-set: add test for inequality of subset (#991)
5
- // Problem Specifications Version: 1.1.0
4
+ // Commit: 1ef368e custom-set: apply "input" policy
5
+ // Problem Specifications Version: 1.3.0
6
6
 
7
7
  // Returns true if the set contains no elements
8
8
  var emptyCases = []unaryBoolCase{
@@ -9,7 +9,15 @@ import static org.junit.Assert.assertEquals;
9
9
 
10
10
  public class SieveTest {
11
11
 
12
+ @Test
13
+ public void noPrimesUnder2(){
14
+ Sieve sieve = new Sieve(1);
15
+ List<Integer> expectedOutput = Collections.emptyList();
16
+
17
+ assertEquals(expectedOutput, sieve.getPrimes());
18
+ }
12
19
 
20
+ @Ignore("Remove to run test")
13
21
  @Test
14
22
  public void findFirstPrime() {
15
23
  Sieve sieve = new Sieve(2);
@@ -27,6 +35,15 @@ public class SieveTest {
27
35
  assertEquals(expectedOutput, sieve.getPrimes());
28
36
  }
29
37
 
38
+ @Ignore("Remove to run test")
39
+ @Test
40
+ public void limitIsPrime(){
41
+ Sieve sieve = new Sieve(13);
42
+ List<Integer> expectedOutput = Arrays.asList(2, 3, 5, 7, 11, 13);
43
+
44
+ assertEquals(expectedOutput, sieve.getPrimes());
45
+ }
46
+
30
47
  @Ignore("Remove to run test")
31
48
  @Test
32
49
  public void findPrimesUpTo1000() {
@@ -119,14 +119,26 @@ public class TwelveDaysTest {
119
119
 
120
120
  @Ignore("Remove to run test")
121
121
  @Test
122
- public void testMultipleVerses() {
123
- String expectedVerseOneToThree = "On the first day of Christmas my true love gave to me, " +
122
+ public void testFirstThreeVerses() {
123
+ String expectedVersesOneToThree = "On the first day of Christmas my true love gave to me, " +
124
124
  "a Partridge in a Pear Tree.\n\n" +
125
125
  "On the second day of Christmas my true love gave to me, two Turtle Doves, " +
126
126
  "and a Partridge in a Pear Tree.\n\n" +
127
127
  "On the third day of Christmas my true love gave to me, three French Hens, two Turtle Doves, " +
128
128
  "and a Partridge in a Pear Tree.\n";
129
- assertEquals(expectedVerseOneToThree, twelveDays.verses(1, 3));
129
+ assertEquals(expectedVersesOneToThree, twelveDays.verses(1, 3));
130
+ }
131
+
132
+ @Ignore("Remove to run test")
133
+ @Test
134
+ public void testFourthToSixthVerses() {
135
+ String expectedVersesFourToSix = "On the fourth day of Christmas my true love gave to me, " +
136
+ "four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.\n\n" +
137
+ "On the fifth day of Christmas my true love gave to me, five Gold Rings, four Calling Birds, " +
138
+ "three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.\n\n" +
139
+ "On the sixth day of Christmas my true love gave to me, six Geese-a-Laying, five Gold Rings, " +
140
+ "four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.\n";
141
+ assertEquals(expectedVersesFourToSix, twelveDays.verses(4, 6));
130
142
  }
131
143
 
132
144
  @Ignore("Remove to run test")
@@ -38,13 +38,4 @@ public class TwoferTest {
38
38
 
39
39
  assertEquals(expected, twofer.twofer(input));
40
40
  }
41
-
42
- @Ignore("Remove to run test")
43
- @Test
44
- public void emptyStringGiven() {
45
- String input = "";
46
- String expected = "One for , one for me.";
47
-
48
- assertEquals(expected, twofer.twofer(input) );
49
- }
50
41
  }
@@ -4,10 +4,44 @@
4
4
  {{- with .Hints }}
5
5
  {{ . }}
6
6
  {{ end }}
7
- {{- with .TrackInsert }}
8
- {{ . }}
9
- {{ end }}
10
- {{- with .Spec.Credits -}}
7
+ ## Getting Started
8
+ For installation and learning resources, refer to the
9
+ [exercism help page](http://exercism.io/languages/ocaml).
10
+
11
+ ## Installation
12
+ To work on the exercises, you will need `Opam` and `Core`. Consult [opam](https://opam.ocaml.org) website for instructions on how to install `opam` for your OS. Once `opam` is installed open a terminal window and run the following command to install core:
13
+
14
+ ```bash
15
+ opam install core
16
+ ```
17
+
18
+ To run the tests you will need `OUnit`. Install it using `opam`:
19
+
20
+ ```bash
21
+ opam install ounit
22
+ ```
23
+
24
+ ## Running Tests
25
+ A Makefile is provided with a default target to compile your solution and run the tests. At the command line, type:
26
+
27
+ ```bash
28
+ make
29
+ ```
30
+
31
+ ## Interactive Shell
32
+ `utop` is a command line program which allows you to run Ocaml code interactively. The easiest way to install it is via opam:
33
+ ```bash
34
+ opam install utop
35
+ ```
36
+ Consult [utop](https://github.com/diml/utop/blob/master/README.md) for more detail.
37
+
38
+ ## Feedback, Issues, Pull Requests
39
+ The [exercism/ocaml](https://github.com/exercism/ocaml) repository on
40
+ GitHub is the home for all of the Ocaml exercises.
41
+
42
+ If you have feedback about an exercise, or want to help implementing a new
43
+ one, head over there and create an issue. We'll do our best to help you!
44
+ {{ with .Spec.Credits }}
11
45
  ## Source
12
46
 
13
47
  {{ . }}
@@ -7,8 +7,6 @@ Techies love their TLA (Three Letter Acronyms)!
7
7
  Help generate some jargon by writing a program that converts a long name
8
8
  like Portable Network Graphics to its acronym (PNG).
9
9
 
10
-
11
-
12
10
  ## Getting Started
13
11
  For installation and learning resources, refer to the
14
12
  [exercism help page](http://exercism.io/languages/ocaml).
@@ -6,6 +6,7 @@ Implement general base conversion. Given a number in base **a**,
6
6
  represented as a sequence of digits, convert it to base **b**.
7
7
 
8
8
  ## Note
9
+
9
10
  - Try to implement the conversion yourself.
10
11
  Do not use something else to perform the conversion for you.
11
12
 
@@ -28,10 +29,8 @@ The number 1120, *in base 3*, means:
28
29
 
29
30
  I think you got the idea!
30
31
 
31
-
32
32
  *Yes. Those three numbers above are exactly the same. Congratulations!*
33
33
 
34
-
35
34
  ## Getting Started
36
35
  For installation and learning resources, refer to the
37
36
  [exercism help page](http://exercism.io/languages/ocaml).
@@ -70,6 +69,5 @@ GitHub is the home for all of the Ocaml exercises.
70
69
  If you have feedback about an exercise, or want to help implementing a new
71
70
  one, head over there and create an issue. We'll do our best to help you!
72
71
 
73
-
74
72
  ## Submitting Incomplete Solutions
75
73
  It's possible to submit an incomplete solution so you can see how others have completed the exercise.
@@ -6,7 +6,6 @@ Given `"listen"` and a list of candidates like `"enlists" "google"
6
6
  "inlets" "banana"` the program should return a list containing
7
7
  `"inlets"`.
8
8
 
9
-
10
9
  ## Getting Started
11
10
  For installation and learning resources, refer to the
12
11
  [exercism help page](http://exercism.io/languages/ocaml).
@@ -9,7 +9,7 @@ letter, the second with the second-last, and so on.
9
9
 
10
10
  An Atbash cipher for the Latin alphabet would be as follows:
11
11
 
12
- ```plain
12
+ ```text
13
13
  Plain: abcdefghijklmnopqrstuvwxyz
14
14
  Cipher: zyxwvutsrqponmlkjihgfedcba
15
15
  ```
@@ -23,6 +23,7 @@ being 5 letters, and punctuation is excluded. This is to make it harder to guess
23
23
  things based on word boundaries.
24
24
 
25
25
  ## Examples
26
+
26
27
  - Encoding `test` gives `gvhg`
27
28
  - Decoding `gvhg` gives `test`
28
29
  - Decoding `gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt` gives `thequickbrownfoxjumpsoverthelazydog`
@@ -46,7 +47,6 @@ See [String documentation](http://caml.inria.fr/pub/docs/manual-ocaml/libref/Str
46
47
  for more useful functions.
47
48
 
48
49
 
49
-
50
50
  ## Getting Started
51
51
  For installation and learning resources, refer to the
52
52
  [exercism help page](http://exercism.io/languages/ocaml).
@@ -1,10 +1,10 @@
1
1
  # Beer Song
2
2
 
3
- Produce the lyrics to that beloved classic, that field-trip favorite: 99 Bottles of Beer on the Wall.
3
+ Recite the lyrics to that beloved classic, that field-trip favorite: 99 Bottles of Beer on the Wall.
4
4
 
5
5
  Note that not all verses are identical.
6
6
 
7
- ```plain
7
+ ```text
8
8
  99 bottles of beer on the wall, 99 bottles of beer.
9
9
  Take one down and pass it around, 98 bottles of beer on the wall.
10
10
 
@@ -320,7 +320,6 @@ are some additional things you could try:
320
320
  Then please share your thoughts in a comment on the submission. Did this
321
321
  experiment make the code better? Worse? Did you learn anything from it?
322
322
 
323
-
324
323
  ## Getting Started
325
324
  For installation and learning resources, refer to the
326
325
  [exercism help page](http://exercism.io/languages/ocaml).
@@ -34,7 +34,6 @@ A binary search halves the number of items to check with each iteration,
34
34
  so locating an item (or determining its absence) takes logarithmic time.
35
35
  A binary search is a dichotomic divide and conquer search algorithm.
36
36
 
37
-
38
37
  ## Getting Started
39
38
  For installation and learning resources, refer to the
40
39
  [exercism help page](http://exercism.io/languages/ocaml).
@@ -6,6 +6,8 @@ Bob answers 'Sure.' if you ask him a question.
6
6
 
7
7
  He answers 'Whoa, chill out!' if you yell at him.
8
8
 
9
+ He answers 'Calm down, I know what I'm doing!' if you yell a question at him.
10
+
9
11
  He says 'Fine. Be that way!' if you address him without actually saying
10
12
  anything.
11
13
 
@@ -40,7 +42,6 @@ test.native: *.ml *.mli
40
42
  Note the additional `-pkg str` option.
41
43
 
42
44
 
43
-
44
45
  ## Getting Started
45
46
  For installation and learning resources, refer to the
46
47
  [exercism help page](http://exercism.io/languages/ocaml).
@@ -2,19 +2,29 @@
2
2
 
3
3
  Score a bowling game.
4
4
 
5
- Bowling is game where players roll a heavy ball to knock down pins
5
+ Bowling is a game where players roll a heavy ball to knock down pins
6
6
  arranged in a triangle. Write code to keep track of the score
7
7
  of a game of bowling.
8
8
 
9
9
  ## Scoring Bowling
10
10
 
11
- The game consists of 10 frames. A frame is composed of one or two ball throws with 10 pins standing at frame initialization. There are three cases for the tabulation of a frame.
11
+ The game consists of 10 frames. A frame is composed of one or two ball
12
+ throws with 10 pins standing at frame initialization. There are three
13
+ cases for the tabulation of a frame.
12
14
 
13
- * An open frame is where a score of less than 10 is recorded for the frame. In this case the score for the frame is the number of pins knocked down.
15
+ * An open frame is where a score of less than 10 is recorded for the
16
+ frame. In this case the score for the frame is the number of pins
17
+ knocked down.
14
18
 
15
- * A spare is where all ten pins are knocked down after the second throw. The total value of a spare is 10 plus the number of pins knocked down in their next throw.
19
+ * A spare is where all ten pins are knocked down by the second
20
+ throw. The total value of a spare is 10 plus the number of pins
21
+ knocked down in their next throw.
16
22
 
17
- * A strike is where all ten pins are knocked down after the first throw. The total value of a strike is 10 plus the number of pins knocked down in their next two throws. If a strike is immediately followed by a second strike, then we can not total the value of first strike until they throw the ball one more time.
23
+ * A strike is where all ten pins are knocked down by the first
24
+ throw. The total value of a strike is 10 plus the number of pins
25
+ knocked down in the next two throws. If a strike is immediately
26
+ followed by a second strike, then the value of the first strike
27
+ cannot be determined until the ball is thrown one more time.
18
28
 
19
29
  Here is a three frame example:
20
30
 
@@ -30,7 +40,11 @@ Frame 3 is (9 + 0) = 9
30
40
 
31
41
  This means the current running total is 48.
32
42
 
33
- The tenth frame in the game is a special case. If someone throws a strike or a spare then they get a fill ball. Fill balls exist to calculate the total of the 10th frame. Scoring a strike or spare on the fill ball does not give the player more fill balls. The total value of the 10th frame is the total number of pins knocked down.
43
+ The tenth frame in the game is a special case. If someone throws a
44
+ strike or a spare then they get a fill ball. Fill balls exist to
45
+ calculate the total of the 10th frame. Scoring a strike or spare on
46
+ the fill ball does not give the player more fill balls. The total
47
+ value of the 10th frame is the total number of pins knocked down.
34
48
 
35
49
  For a tenth frame of X1/ (strike and a spare), the total value is 20.
36
50
 
@@ -46,7 +60,6 @@ support two operations:
46
60
  * `score() : int` is called only at the very end of the game. It
47
61
  returns the total score for that game.
48
62
 
49
-
50
63
  ## Getting Started
51
64
  For installation and learning resources, refer to the
52
65
  [exercism help page](http://exercism.io/languages/ocaml).