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
@@ -17,7 +17,6 @@ Convert a number to a string, the contents of which depend on the number's facto
17
17
  - 34 has four factors: 1, 2, 17, and 34.
18
18
  - In raindrop-speak, this would be "34".
19
19
 
20
-
21
20
  ## Getting Started
22
21
  For installation and learning resources, refer to the
23
22
  [exercism help page](http://exercism.io/languages/ocaml).
@@ -15,7 +15,6 @@ In addition, compute cells should allow for registering change notification
15
15
  callbacks. Call a cell’s callbacks when the cell’s value in a new stable
16
16
  state has changed from the previous stable state.
17
17
 
18
-
19
18
  ## Getting Started
20
19
  For installation and learning resources, refer to the
21
20
  [exercism help page](http://exercism.io/languages/ocaml).
@@ -54,6 +53,5 @@ GitHub is the home for all of the Ocaml exercises.
54
53
  If you have feedback about an exercise, or want to help implementing a new
55
54
  one, head over there and create an issue. We'll do our best to help you!
56
55
 
57
-
58
56
  ## Submitting Incomplete Solutions
59
57
  It's possible to submit an incomplete solution so you can see how others have completed the exercise.
@@ -1,3 +1,67 @@
1
+ # Rectangles
2
+
3
+ Count the rectangles in an ASCII diagram like the one below.
4
+
5
+ ```text
6
+ +--+
7
+ ++ |
8
+ +-++--+
9
+ | | |
10
+ +--+--+
11
+ ```
12
+
13
+ The above diagram contains 6 rectangles:
14
+
15
+ ```text
16
+
17
+
18
+ +-----+
19
+ | |
20
+ +-----+
21
+ ```
22
+
23
+ ```text
24
+ +--+
25
+ | |
26
+ | |
27
+ | |
28
+ +--+
29
+ ```
30
+
31
+ ```text
32
+ +--+
33
+ | |
34
+ +--+
35
+
36
+
37
+ ```
38
+
39
+ ```text
40
+
41
+
42
+ +--+
43
+ | |
44
+ +--+
45
+ ```
46
+
47
+ ```text
48
+
49
+
50
+ +--+
51
+ | |
52
+ +--+
53
+ ```
54
+
55
+ ```text
56
+
57
+ ++
58
+ ++
59
+
60
+
61
+ ```
62
+
63
+ You may assume that the input is always a proper rectangle (i.e. the length of
64
+ every line equals the length of the first line).
1
65
 
2
66
  ## Getting Started
3
67
  For installation and learning resources, refer to the
@@ -36,3 +100,6 @@ GitHub is the home for all of the Ocaml exercises.
36
100
 
37
101
  If you have feedback about an exercise, or want to help implementing a new
38
102
  one, head over there and create an issue. We'll do our best to help you!
103
+
104
+ ## Submitting Incomplete Solutions
105
+ It's possible to submit an incomplete solution so you can see how others have completed the exercise.
@@ -1,4 +1,4 @@
1
- # Rna Transcription
1
+ # RNA Transcription
2
2
 
3
3
  Given a DNA strand, return its RNA complement (per RNA transcription).
4
4
 
@@ -18,7 +18,6 @@ each nucleotide with its complement:
18
18
  * `T` -> `A`
19
19
  * `A` -> `U`
20
20
 
21
-
22
21
  ## Getting Started
23
22
  For installation and learning resources, refer to the
24
23
  [exercism help page](http://exercism.io/languages/ocaml).
@@ -15,7 +15,6 @@ The names must be random: they should not follow a predictable sequence.
15
15
  Random names means a risk of collisions. Your solution must ensure that
16
16
  every existing robot has a unique name.
17
17
 
18
-
19
18
  ## Getting Started
20
19
  For installation and learning resources, refer to the
21
20
  [exercism help page](http://exercism.io/languages/ocaml).
@@ -14,7 +14,7 @@ The Romans wrote numbers using letters - I, V, X, L, C, D, M. (notice
14
14
  these letters have lots of straight lines and are hence easy to hack
15
15
  into stone tablets).
16
16
 
17
- ```
17
+ ```text
18
18
  1 => I
19
19
  10 => X
20
20
  7 => VII
@@ -42,7 +42,6 @@ In Roman numerals 1990 is MCMXC:
42
42
 
43
43
  See also: http://www.novaroma.org/via_romana/numbers.html
44
44
 
45
-
46
45
  ## Getting Started
47
46
  For installation and learning resources, refer to the
48
47
  [exercism help page](http://exercism.io/languages/ocaml).
@@ -7,23 +7,22 @@ Run-length encoding (RLE) is a simple form of data compression, where runs
7
7
 
8
8
  For example we can represent the original 53 characters with only 13.
9
9
 
10
- ```
10
+ ```text
11
11
  "WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWB" -> "12WB12W3B24WB"
12
12
  ```
13
13
 
14
14
  RLE allows the original data to be perfectly reconstructed from
15
15
  the compressed data, which makes it a lossless data compression.
16
16
 
17
- ```
17
+ ```text
18
18
  "AABCCCDEEEE" -> "2AB3CD4E" -> "AABCCCDEEEE"
19
19
  ```
20
20
 
21
21
  For simplicity, you can assume that the unencoded string will only contain
22
- the letters A through Z (either lower or upper case) and whitespace. This way
23
- data to be encoded will never contain any numbers and numbers inside data to
22
+ the letters A through Z (either lower or upper case) and whitespace. This way
23
+ data to be encoded will never contain any numbers and numbers inside data to
24
24
  be decoded always represent the count for the following character.
25
25
 
26
-
27
26
  ## Getting Started
28
27
  For installation and learning resources, refer to the
29
28
  [exercism help page](http://exercism.io/languages/ocaml).
@@ -62,7 +62,6 @@ Use _and_ (correctly) when spelling out the number in English:
62
62
  - 1002 becomes "one thousand and two".
63
63
  - 1323 becomes "one thousand three hundred and twenty-three".
64
64
 
65
-
66
65
  ## Getting Started
67
66
  For installation and learning resources, refer to the
68
67
  [exercism help page](http://exercism.io/languages/ocaml).
@@ -12,12 +12,11 @@ Given an age in seconds, calculate how old someone would be on:
12
12
  - Neptune: orbital period 164.79132 Earth years
13
13
 
14
14
  So if you were told someone were 1,000,000,000 seconds old, you should
15
- be able to say that they're 31 Earth-years old.
15
+ be able to say that they're 31.69 Earth-years old.
16
16
 
17
17
  If you're wondering why Pluto didn't make the cut, go watch [this
18
18
  youtube video](http://www.youtube.com/watch?v=Z_2gbGXzFbs).
19
19
 
20
-
21
20
  ## Getting Started
22
21
  For installation and learning resources, refer to the
23
22
  [exercism help page](http://exercism.io/languages/ocaml).
@@ -2,22 +2,24 @@
2
2
 
3
3
  Determine if a triangle is equilateral, isosceles, or scalene.
4
4
 
5
- An _equilateral_ triangle has all three sides the same length.<br/>
5
+ An _equilateral_ triangle has all three sides the same length.
6
+
6
7
  An _isosceles_ triangle has at least two sides the same length. (It is sometimes
7
8
  specified as having exactly two sides the same length, but for the purposes of
8
- this exercise we'll say at least two.)<br/>
9
+ this exercise we'll say at least two.)
10
+
9
11
  A _scalene_ triangle has all sides of different lengths.
10
12
 
11
13
  ## Note
12
14
 
13
- For a shape to be a triangle at all, all sides have to be of length > 0, and
14
- the sum of the lengths of any two sides must be greater than or equal to the
15
+ For a shape to be a triangle at all, all sides have to be of length > 0, and
16
+ the sum of the lengths of any two sides must be greater than or equal to the
15
17
  length of the third side. See [Triangle Inequality](https://en.wikipedia.org/wiki/Triangle_inequality).
16
18
 
17
19
  ## Dig Deeper
18
20
 
19
- The case where the sum of the lengths of two sides _equals_ that of the
20
- third is known as a _degenerate_ triangle - it has zero area and looks like
21
+ The case where the sum of the lengths of two sides _equals_ that of the
22
+ third is known as a _degenerate_ triangle - it has zero area and looks like
21
23
  a single line. Feel free to add your own code/tests to check for degenerate triangles.
22
24
 
23
25
  ## Getting Started
@@ -4,15 +4,13 @@ Given a phrase, count the occurrences of each word in that phrase.
4
4
 
5
5
  For example for the input `"olly olly in come free"`
6
6
 
7
- ```plain
7
+ ```text
8
8
  olly: 2
9
9
  in: 1
10
10
  come: 1
11
11
  free: 1
12
12
  ```
13
13
 
14
-
15
-
16
14
  ## Getting Started
17
15
  For installation and learning resources, refer to the
18
16
  [exercism help page](http://exercism.io/languages/ocaml).
@@ -3,7 +3,7 @@
3
3
  Creating a zipper for a binary tree.
4
4
 
5
5
  [Zippers](https://en.wikipedia.org/wiki/Zipper_%28data_structure%29) are
6
- a way purely functional of navigating within a data structure and
6
+ a purely functional way of navigating within a data structure and
7
7
  manipulating it. They essentially contain a data structure and a
8
8
  pointer into that data structure (called the focus).
9
9
 
@@ -27,7 +27,6 @@ list of child nodes) a zipper might support these operations:
27
27
  `next` node if possible otherwise to the `prev` node if possible,
28
28
  otherwise to the parent node, returns a new zipper)
29
29
 
30
-
31
30
  ## Getting Started
32
31
  For installation and learning resources, refer to the
33
32
  [exercism help page](http://exercism.io/languages/ocaml).
@@ -66,6 +65,5 @@ GitHub is the home for all of the Ocaml exercises.
66
65
  If you have feedback about an exercise, or want to help implementing a new
67
66
  one, head over there and create an issue. We'll do our best to help you!
68
67
 
69
-
70
68
  ## Submitting Incomplete Solutions
71
69
  It's possible to submit an incomplete solution so you can see how others have completed the exercise.
@@ -7,7 +7,7 @@ before_script:
7
7
  - docker run
8
8
  --volume $PWD:/exercism
9
9
  exercism-rakudo-star perl6 -e
10
- '.add(‘Example.pm6’).copy(.dir.first({.extension eq ‘pm6’ && .basename neExample.pm6’}))
10
+ '.add(‘.meta/solutions’).dir.first({.extension eq ‘pm6’}).copy(.dir.first({.extension eq ‘pm6’}))
11
11
  for $*CWD.add(‘exercism/exercises’).dir' # replace stub files with complete solutions from Example.pm6
12
12
  script:
13
13
  - bin/configlet lint .
@@ -8,7 +8,7 @@ The `exercise-gen.pl6` file can be used in the following ways:
8
8
  You will either need to create a symlink to or clone the
9
9
  [problem-specifications](https://github.com/exercism/problem-specifications) repository
10
10
  into the root directory of this repository.
11
- The generator will retrieve data from an `example.yaml` file within
11
+ The generator will retrieve data from the `.meta/exercise-data.yaml` file within
12
12
  each exercise directory, and use the contained information to generate
13
13
  test files using `templates/test.mustache`, and Example.pm6 files using
14
14
  `templates/module.mustache`. If it finds a `canonical-data.json` file in
@@ -22,7 +22,6 @@ plan: 2
22
22
  modules:
23
23
  - use: Data::Dump
24
24
  - use: Foo::Bar
25
- imports: 'MyClass &my-subroutine'
26
25
  methods: 'foo bar'
27
26
  tests: |
28
27
  ok my-subroutine, 'Perl 6 code here';
@@ -6,14 +6,13 @@ use Exercism::Generator;
6
6
 
7
7
  my %*SUB-MAIN-OPTS = :named-anywhere;
8
8
 
9
- proto sub MAIN (|) {
10
- if $base-dir.add('problem-specifications') !~~ :d {
11
- note 'problem-specifications directory not found; some exercises may generate incorrectly.';
9
+ given $base-dir {
10
+ if .add('problem-specifications') !~~ :d {
11
+ note 'problem-specifications directory not found; exercise(s) may generate incorrectly.';
12
12
  }
13
- if $base-dir.add('bin/configlet') !~~ :f {
13
+ if .add('bin/configlet') !~~ :f {
14
14
  note 'configlet not found; README.md file(s) will not be generated.';
15
15
  }
16
- {*}
17
16
  }
18
17
 
19
18
  multi sub MAIN (Bool:D :$all where *.so) {
@@ -26,26 +25,29 @@ multi sub MAIN (*@exercises) {
26
25
 
27
26
  multi sub MAIN {
28
27
  say 'No args given; working in current directory.';
29
- if 'example.yaml'.IO ~~ :f {
28
+ if '.meta/exercise-data.yaml'.IO ~~ :f {
30
29
  generate $*CWD.IO.basename;
31
30
  } else {
32
- say 'example.yaml not found in current directory; exiting.';
31
+ say 'exercise-data.yaml not found in .meta of current directory; exiting.';
33
32
  exit;
34
33
  }
35
34
  }
36
35
 
37
- my @dir-not-found;
38
- my @yaml-not-found;
39
-
40
36
  sub generate ($exercise) {
37
+ state (@dir-not-found, @yaml-not-found);
38
+ END {
39
+ if @dir-not-found {note 'exercise directory does not exist for: ' ~ join ' ', @dir-not-found}
40
+ if @yaml-not-found {note '.meta/exercise-data.yaml not found for: ' ~ join ' ', @yaml-not-found}
41
+ }
41
42
  if (my $exercise-dir = $base-dir.add("exercises/$exercise")) !~~ :d {
42
43
  push @dir-not-found, $exercise;
43
- next;
44
+ return;
44
45
  }
45
- if (my $yaml-file = $exercise-dir.add('example.yaml')) !~~ :f {
46
+ if (my $yaml-file = $exercise-dir.add('.meta/exercise-data.yaml')) !~~ :f {
46
47
  push @yaml-not-found, $exercise;
47
- next;
48
- };
48
+ return;
49
+ }
50
+
49
51
  print "Generating $exercise... ";
50
52
 
51
53
  given Exercism::Generator.new: :$exercise, data => yaml-parse $yaml-file.absolute {
@@ -53,8 +55,9 @@ sub generate ($exercise) {
53
55
  $testfile.spurt: .test;
54
56
  $testfile.chmod: 0o755;
55
57
  }
56
- $exercise-dir.add('Example.pm6').spurt: .example;
57
58
  $exercise-dir.add("{.data<exercise>}.pm6").spurt: .stub;
59
+ $exercise-dir.add('.meta/solutions').mkdir;
60
+ $exercise-dir.add(".meta/solutions/{.data<exercise>}.pm6").spurt: .example;
58
61
  }
59
62
 
60
63
  given $base-dir.add('bin/configlet') {
@@ -65,6 +68,3 @@ sub generate ($exercise) {
65
68
 
66
69
  say 'Generated.';
67
70
  }
68
-
69
- if @dir-not-found {warn 'exercise directory does not exist for: ' ~ join ' ', @dir-not-found}
70
- if @yaml-not-found {note 'example.yaml not found for: ' ~ join ' ', @yaml-not-found}
@@ -4,6 +4,7 @@
4
4
  "active": true,
5
5
  "blurb": "Forget everything you know or think you know about Perl. Perl 6 is a production ready new emerging language that is highly expressive, feature-packed and optimized for fun.",
6
6
  "test_pattern": ".*\\.t$",
7
+ "solution_pattern": "\\.meta/solutions/[^/]+\\.pm6$",
7
8
  "foregone": [
8
9
 
9
10
  ],