trackler 2.2.1.128 → 2.2.1.129

Sign up to get free protection for your applications and to get access to all the features.
Files changed (308) hide show
  1. checksums.yaml +4 -4
  2. data/lib/trackler/version.rb +1 -1
  3. data/problem-specifications/exercises/bracket-push/canonical-data.json +9 -1
  4. data/tracks/bash/config.json +3 -3
  5. data/tracks/ceylon/exercises/bracket-push/source/bracketpush/BracketsTest.ceylon +3 -1
  6. data/tracks/crystal/exercises/difference-of-squares/spec/difference_of_squares_spec.cr +9 -9
  7. data/tracks/csharp/config.json +12 -0
  8. data/tracks/csharp/exercises/Exercises.sln +7 -1
  9. data/tracks/csharp/exercises/yacht/Example.cs +71 -0
  10. data/tracks/csharp/exercises/yacht/README.md +34 -0
  11. data/tracks/csharp/exercises/yacht/Yacht.cs +26 -0
  12. data/tracks/csharp/exercises/yacht/Yacht.csproj +18 -0
  13. data/tracks/csharp/exercises/yacht/YachtTest.cs +162 -0
  14. data/tracks/csharp/generators/Exercises/Yacht.cs +20 -0
  15. data/tracks/dart/exercises/leap/lib/example.dart +4 -8
  16. data/tracks/dart/exercises/leap/lib/leap.dart +1 -1
  17. data/tracks/dart/exercises/leap/test/leap_test.dart +14 -16
  18. data/tracks/delphi/config.json +11 -0
  19. data/tracks/delphi/exercises/bracket-push/BracketPush.dpr +60 -0
  20. data/tracks/delphi/exercises/bracket-push/README.md +31 -0
  21. data/tracks/delphi/exercises/bracket-push/uBracketPushExample.pas +40 -0
  22. data/tracks/delphi/exercises/bracket-push/uBracketPushTest.pas +158 -0
  23. data/tracks/fsharp/config.json +18 -6
  24. data/tracks/fsharp/exercises/Exercises.sln +7 -1
  25. data/tracks/fsharp/exercises/accumulate/Accumulate.fsproj +2 -2
  26. data/tracks/fsharp/exercises/acronym/Acronym.fsproj +2 -2
  27. data/tracks/fsharp/exercises/all-your-base/AllYourBase.fsproj +2 -2
  28. data/tracks/fsharp/exercises/allergies/Allergies.fsproj +2 -2
  29. data/tracks/fsharp/exercises/alphametics/Alphametics.fsproj +2 -2
  30. data/tracks/fsharp/exercises/anagram/Anagram.fsproj +2 -2
  31. data/tracks/fsharp/exercises/armstrong-numbers/ArmstrongNumbers.fsproj +2 -2
  32. data/tracks/fsharp/exercises/atbash-cipher/AtbashCipher.fsproj +2 -2
  33. data/tracks/fsharp/exercises/bank-account/BankAccount.fsproj +2 -2
  34. data/tracks/fsharp/exercises/beer-song/BeerSong.fsproj +2 -2
  35. data/tracks/fsharp/exercises/binary/Binary.fsproj +2 -2
  36. data/tracks/fsharp/exercises/binary-search/BinarySearch.fsproj +2 -2
  37. data/tracks/fsharp/exercises/binary-search-tree/BinarySearchTree.fsproj +2 -2
  38. data/tracks/fsharp/exercises/bob/Bob.fsproj +2 -2
  39. data/tracks/fsharp/exercises/book-store/BookStore.fsproj +2 -2
  40. data/tracks/fsharp/exercises/bowling/Bowling.fsproj +2 -2
  41. data/tracks/fsharp/exercises/bowling/BowlingTest.fs +15 -1
  42. data/tracks/fsharp/exercises/bracket-push/BracketPush.fsproj +2 -2
  43. data/tracks/fsharp/exercises/change/Change.fsproj +2 -2
  44. data/tracks/fsharp/exercises/circular-buffer/CircularBuffer.fsproj +2 -2
  45. data/tracks/fsharp/exercises/circular-buffer/CircularBufferTest.fs +1 -1
  46. data/tracks/fsharp/exercises/clock/Clock.fsproj +2 -2
  47. data/tracks/fsharp/exercises/collatz-conjecture/CollatzConjecture.fsproj +2 -2
  48. data/tracks/fsharp/exercises/complex-numbers/ComplexNumbers.fsproj +2 -2
  49. data/tracks/fsharp/exercises/connect/Connect.fsproj +2 -2
  50. data/tracks/fsharp/exercises/crypto-square/CryptoSquare.fsproj +2 -2
  51. data/tracks/fsharp/exercises/custom-set/CustomSet.fsproj +2 -2
  52. data/tracks/fsharp/exercises/diamond/Diamond.fsproj +2 -2
  53. data/tracks/fsharp/exercises/difference-of-squares/DifferenceOfSquares.fsproj +2 -2
  54. data/tracks/fsharp/exercises/diffie-hellman/DiffieHellman.fsproj +2 -2
  55. data/tracks/fsharp/exercises/dominoes/Dominoes.fsproj +2 -2
  56. data/tracks/fsharp/exercises/dot-dsl/DotDsl.fsproj +2 -2
  57. data/tracks/fsharp/exercises/error-handling/ErrorHandling.fsproj +2 -2
  58. data/tracks/fsharp/exercises/etl/Etl.fsproj +2 -2
  59. data/tracks/fsharp/exercises/food-chain/FoodChain.fsproj +2 -2
  60. data/tracks/fsharp/exercises/forth/Forth.fsproj +2 -2
  61. data/tracks/fsharp/exercises/forth/ForthTest.fs +1 -1
  62. data/tracks/fsharp/exercises/gigasecond/Gigasecond.fsproj +2 -2
  63. data/tracks/fsharp/exercises/go-counting/GoCounting.fsproj +2 -2
  64. data/tracks/fsharp/exercises/grade-school/GradeSchool.fsproj +2 -2
  65. data/tracks/fsharp/exercises/grains/Grains.fsproj +2 -2
  66. data/tracks/fsharp/exercises/grains/GrainsTest.fs +1 -1
  67. data/tracks/fsharp/exercises/grep/Grep.fsproj +2 -2
  68. data/tracks/fsharp/exercises/grep/GrepTest.fs +1 -1
  69. data/tracks/fsharp/exercises/hamming/Hamming.fsproj +2 -2
  70. data/tracks/fsharp/exercises/hangman/Hangman.fsproj +2 -2
  71. data/tracks/fsharp/exercises/hello-world/HelloWorld.fsproj +2 -2
  72. data/tracks/fsharp/exercises/hexadecimal/Hexadecimal.fsproj +2 -2
  73. data/tracks/fsharp/exercises/house/Example.fs +2 -2
  74. data/tracks/fsharp/exercises/house/House.fsproj +2 -2
  75. data/tracks/fsharp/exercises/house/HouseTest.fs +28 -211
  76. data/tracks/fsharp/exercises/isbn-verifier/IsbnVerifier.fsproj +2 -2
  77. data/tracks/fsharp/exercises/isbn-verifier/IsbnVerifierTest.fs +2 -2
  78. data/tracks/fsharp/exercises/isogram/Isogram.fsproj +2 -2
  79. data/tracks/fsharp/exercises/isogram/IsogramTest.fs +1 -1
  80. data/tracks/fsharp/exercises/kindergarten-garden/KindergartenGarden.fsproj +2 -2
  81. data/tracks/fsharp/exercises/largest-series-product/LargestSeriesProduct.fsproj +2 -2
  82. data/tracks/fsharp/exercises/leap/Leap.fsproj +2 -2
  83. data/tracks/fsharp/exercises/ledger/Ledger.fsproj +2 -2
  84. data/tracks/fsharp/exercises/lens-person/LensPerson.fsproj +2 -2
  85. data/tracks/fsharp/exercises/linked-list/LinkedList.fsproj +2 -2
  86. data/tracks/fsharp/exercises/list-ops/ListOps.fsproj +2 -2
  87. data/tracks/fsharp/exercises/list-ops/ListOpsTest.fs +1 -1
  88. data/tracks/fsharp/exercises/luhn/Luhn.fsproj +2 -2
  89. data/tracks/fsharp/exercises/markdown/Markdown.fsproj +2 -2
  90. data/tracks/fsharp/exercises/matrix/Matrix.fsproj +2 -2
  91. data/tracks/fsharp/exercises/meetup/Meetup.fsproj +2 -2
  92. data/tracks/fsharp/exercises/minesweeper/Minesweeper.fsproj +2 -2
  93. data/tracks/fsharp/exercises/nth-prime/NthPrime.fsproj +2 -2
  94. data/tracks/fsharp/exercises/nucleotide-count/NucleotideCount.fsproj +2 -2
  95. data/tracks/fsharp/exercises/ocr-numbers/OcrNumbers.fsproj +2 -2
  96. data/tracks/fsharp/exercises/octal/Octal.fsproj +2 -2
  97. data/tracks/fsharp/exercises/palindrome-products/PalindromeProducts.fsproj +2 -2
  98. data/tracks/fsharp/exercises/pangram/Pangram.fsproj +2 -2
  99. data/tracks/fsharp/exercises/parallel-letter-frequency/ParallelLetterFrequency.fsproj +2 -2
  100. data/tracks/fsharp/exercises/pascals-triangle/PascalsTriangle.fsproj +2 -2
  101. data/tracks/fsharp/exercises/perfect-numbers/PerfectNumbers.fsproj +2 -2
  102. data/tracks/fsharp/exercises/phone-number/PhoneNumber.fsproj +2 -2
  103. data/tracks/fsharp/exercises/pig-latin/PigLatin.fsproj +2 -2
  104. data/tracks/fsharp/exercises/poker/Poker.fsproj +2 -2
  105. data/tracks/fsharp/exercises/pov/Pov.fsproj +2 -2
  106. data/tracks/fsharp/exercises/pov/PovTest.fs +2 -2
  107. data/tracks/fsharp/exercises/prime-factors/PrimeFactors.fsproj +2 -2
  108. data/tracks/fsharp/exercises/protein-translation/ProteinTranslation.fsproj +2 -2
  109. data/tracks/fsharp/exercises/proverb/Proverb.fsproj +2 -2
  110. data/tracks/fsharp/exercises/pythagorean-triplet/PythagoreanTriplet.fsproj +2 -2
  111. data/tracks/fsharp/exercises/queen-attack/QueenAttack.fsproj +2 -2
  112. data/tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipher.fsproj +2 -2
  113. data/tracks/fsharp/exercises/raindrops/Raindrops.fsproj +2 -2
  114. data/tracks/fsharp/exercises/rational-numbers/RationalNumbers.fsproj +2 -2
  115. data/tracks/fsharp/exercises/react/Example.fs +1 -1
  116. data/tracks/fsharp/exercises/react/React.fsproj +2 -2
  117. data/tracks/fsharp/exercises/react/ReactTest.fs +14 -1
  118. data/tracks/fsharp/exercises/rectangles/Rectangles.fsproj +2 -2
  119. data/tracks/fsharp/exercises/reverse-string/ReverseString.fsproj +2 -2
  120. data/tracks/fsharp/exercises/rna-transcription/RnaTranscription.fsproj +2 -2
  121. data/tracks/fsharp/exercises/robot-name/RobotName.fsproj +2 -2
  122. data/tracks/fsharp/exercises/robot-simulator/RobotSimulator.fsproj +2 -2
  123. data/tracks/fsharp/exercises/roman-numerals/RomanNumerals.fsproj +2 -2
  124. data/tracks/fsharp/exercises/rotational-cipher/RotationalCipher.fsproj +2 -2
  125. data/tracks/fsharp/exercises/run-length-encoding/RunLengthEncoding.fsproj +2 -2
  126. data/tracks/fsharp/exercises/saddle-points/SaddlePoints.fsproj +2 -2
  127. data/tracks/fsharp/exercises/say/Say.fsproj +2 -2
  128. data/tracks/fsharp/exercises/scale-generator/ScaleGenerator.fsproj +2 -2
  129. data/tracks/fsharp/exercises/scrabble-score/ScrabbleScore.fsproj +2 -2
  130. data/tracks/fsharp/exercises/secret-handshake/SecretHandshake.fsproj +2 -2
  131. data/tracks/fsharp/exercises/series/Series.fsproj +2 -2
  132. data/tracks/fsharp/exercises/sgf-parsing/SgfParsing.fsproj +2 -2
  133. data/tracks/fsharp/exercises/sieve/Sieve.fsproj +2 -2
  134. data/tracks/fsharp/exercises/simple-cipher/SimpleCipher.fsproj +2 -2
  135. data/tracks/fsharp/exercises/simple-linked-list/SimpleLinkedList.fsproj +2 -2
  136. data/tracks/fsharp/exercises/space-age/SpaceAge.fsproj +2 -2
  137. data/tracks/fsharp/exercises/spiral-matrix/SpiralMatrix.fsproj +2 -2
  138. data/tracks/fsharp/exercises/strain/Strain.fsproj +2 -2
  139. data/tracks/fsharp/exercises/sublist/Sublist.fsproj +2 -2
  140. data/tracks/fsharp/exercises/sum-of-multiples/SumOfMultiples.fsproj +2 -2
  141. data/tracks/fsharp/exercises/tournament/Tournament.fsproj +2 -2
  142. data/tracks/fsharp/exercises/transpose/Transpose.fsproj +2 -2
  143. data/tracks/fsharp/exercises/tree-building/TreeBuilding.fsproj +2 -2
  144. data/tracks/fsharp/exercises/triangle/Triangle.fsproj +2 -2
  145. data/tracks/fsharp/exercises/trinary/Trinary.fsproj +2 -2
  146. data/tracks/fsharp/exercises/twelve-days/TwelveDays.fsproj +2 -2
  147. data/tracks/fsharp/exercises/two-bucket/TwoBucket.fsproj +2 -2
  148. data/tracks/fsharp/exercises/two-fer/TwoFer.fsproj +2 -2
  149. data/tracks/fsharp/exercises/variable-length-quantity/VariableLengthQuantity.fsproj +2 -2
  150. data/tracks/fsharp/exercises/word-count/WordCount.fsproj +2 -2
  151. data/tracks/fsharp/exercises/word-search/WordSearch.fsproj +2 -2
  152. data/tracks/fsharp/exercises/word-search/WordSearchTest.fs +1 -1
  153. data/tracks/fsharp/exercises/wordy/Wordy.fsproj +2 -2
  154. data/tracks/fsharp/exercises/yacht/Example.fs +65 -0
  155. data/tracks/fsharp/exercises/yacht/Program.fs +1 -0
  156. data/tracks/fsharp/exercises/yacht/README.md +34 -0
  157. data/tracks/fsharp/exercises/yacht/Yacht.fs +17 -0
  158. data/tracks/fsharp/exercises/yacht/Yacht.fsproj +23 -0
  159. data/tracks/fsharp/exercises/yacht/YachtTest.fs +113 -0
  160. data/tracks/fsharp/exercises/zebra-puzzle/ZebraPuzzle.fsproj +2 -2
  161. data/tracks/fsharp/exercises/zipper/Zipper.fsproj +2 -2
  162. data/tracks/fsharp/generators/CanonicalData.fs +2 -20
  163. data/tracks/fsharp/generators/Common.fs +1 -1
  164. data/tracks/fsharp/generators/Generators.fs +24 -11
  165. data/tracks/fsharp/generators/Generators.fsproj +4 -4
  166. data/tracks/fsharp/generators/Options.fs +1 -1
  167. data/tracks/haskell/exercises/bracket-push/package.yaml +1 -1
  168. data/tracks/haskell/exercises/bracket-push/test/Tests.hs +4 -0
  169. data/tracks/java/config.json +13 -0
  170. data/tracks/java/exercises/dominoes/.meta/src/reference/java/ChainNotFoundException.java +5 -0
  171. data/tracks/java/exercises/dominoes/.meta/src/reference/java/Domino.java +30 -0
  172. data/tracks/java/exercises/dominoes/.meta/src/reference/java/Dominoes.java +67 -0
  173. data/tracks/java/exercises/dominoes/.meta/version +2 -0
  174. data/tracks/java/exercises/dominoes/README.md +29 -0
  175. data/tracks/java/exercises/dominoes/build.gradle +18 -0
  176. data/tracks/java/exercises/dominoes/src/main/java/ChainNotFoundException.java +5 -0
  177. data/tracks/java/exercises/dominoes/src/main/java/Domino.java +30 -0
  178. data/tracks/java/exercises/dominoes/src/test/java/DominoesTest.java +230 -0
  179. data/tracks/java/exercises/settings.gradle +1 -0
  180. data/tracks/javascript/.eslintignore +0 -1
  181. data/tracks/javascript/exercises/simple-cipher/example.js +4 -6
  182. data/tracks/javascript/exercises/simple-cipher/simple-cipher.spec.js +7 -3
  183. data/tracks/php/config.json +7 -7
  184. data/tracks/python/config.json +195 -188
  185. data/tracks/python/exercises/alphametics/alphametics_test.py +1 -0
  186. data/tracks/python/exercises/bank-account/README.md +20 -1
  187. data/tracks/python/exercises/go-counting/README.md +2 -0
  188. data/tracks/python/test/check-exercises.py +1 -1
  189. data/tracks/rust/_test/ensure-stubs-compile.sh +5 -0
  190. data/tracks/rust/config/exercise_readme.go.tmpl +1 -1
  191. data/tracks/rust/config.json +10 -0
  192. data/tracks/rust/exercises/accumulate/README.md +1 -1
  193. data/tracks/rust/exercises/acronym/README.md +1 -1
  194. data/tracks/rust/exercises/all-your-base/README.md +1 -1
  195. data/tracks/rust/exercises/all-your-base/example.rs +15 -5
  196. data/tracks/rust/exercises/all-your-base/src/lib.rs +8 -1
  197. data/tracks/rust/exercises/all-your-base/tests/all-your-base.rs +10 -5
  198. data/tracks/rust/exercises/allergies/README.md +1 -1
  199. data/tracks/rust/exercises/alphametics/README.md +1 -1
  200. data/tracks/rust/exercises/anagram/README.md +1 -1
  201. data/tracks/rust/exercises/armstrong-numbers/.gitignore +3 -0
  202. data/tracks/rust/exercises/armstrong-numbers/Cargo.toml +3 -0
  203. data/tracks/rust/exercises/armstrong-numbers/README.md +51 -0
  204. data/tracks/rust/exercises/armstrong-numbers/example.rs +7 -0
  205. data/tracks/rust/exercises/armstrong-numbers/src/lib.rs +3 -0
  206. data/tracks/rust/exercises/armstrong-numbers/tests/armstrong-numbers.rs +49 -0
  207. data/tracks/rust/exercises/atbash-cipher/README.md +1 -1
  208. data/tracks/rust/exercises/beer-song/README.md +1 -1
  209. data/tracks/rust/exercises/binary-search/README.md +1 -1
  210. data/tracks/rust/exercises/bob/README.md +1 -1
  211. data/tracks/rust/exercises/book-store/README.md +1 -1
  212. data/tracks/rust/exercises/bowling/README.md +1 -1
  213. data/tracks/rust/exercises/bowling/example.rs +13 -8
  214. data/tracks/rust/exercises/bowling/src/lib.rs +22 -0
  215. data/tracks/rust/exercises/bowling/tests/bowling.rs +31 -31
  216. data/tracks/rust/exercises/bracket-push/README.md +1 -1
  217. data/tracks/rust/exercises/circular-buffer/README.md +1 -1
  218. data/tracks/rust/exercises/clock/README.md +1 -1
  219. data/tracks/rust/exercises/collatz-conjecture/README.md +1 -1
  220. data/tracks/rust/exercises/crypto-square/README.md +1 -1
  221. data/tracks/rust/exercises/crypto-square/example.rs +11 -3
  222. data/tracks/rust/exercises/crypto-square/tests/crypto-square.rs +8 -16
  223. data/tracks/rust/exercises/custom-set/README.md +1 -1
  224. data/tracks/rust/exercises/custom-set/example.rs +17 -17
  225. data/tracks/rust/exercises/custom-set/tests/custom-set.rs +84 -84
  226. data/tracks/rust/exercises/decimal/README.md +1 -1
  227. data/tracks/rust/exercises/difference-of-squares/README.md +1 -1
  228. data/tracks/rust/exercises/diffie-hellman/README.md +1 -1
  229. data/tracks/rust/exercises/dominoes/README.md +1 -1
  230. data/tracks/rust/exercises/etl/README.md +1 -1
  231. data/tracks/rust/exercises/forth/README.md +1 -1
  232. data/tracks/rust/exercises/gigasecond/README.md +1 -1
  233. data/tracks/rust/exercises/grade-school/README.md +1 -1
  234. data/tracks/rust/exercises/grains/README.md +1 -1
  235. data/tracks/rust/exercises/hamming/README.md +1 -1
  236. data/tracks/rust/exercises/hello-world/README.md +1 -1
  237. data/tracks/rust/exercises/hexadecimal/README.md +1 -1
  238. data/tracks/rust/exercises/isbn-verifier/README.md +1 -1
  239. data/tracks/rust/exercises/isogram/README.md +1 -1
  240. data/tracks/rust/exercises/largest-series-product/README.md +1 -1
  241. data/tracks/rust/exercises/largest-series-product/example.rs +10 -4
  242. data/tracks/rust/exercises/largest-series-product/src/lib.rs +9 -0
  243. data/tracks/rust/exercises/largest-series-product/tests/largest-series-product.rs +3 -3
  244. data/tracks/rust/exercises/leap/README.md +1 -1
  245. data/tracks/rust/exercises/luhn/README.md +1 -1
  246. data/tracks/rust/exercises/luhn-from/README.md +1 -1
  247. data/tracks/rust/exercises/luhn-trait/README.md +1 -1
  248. data/tracks/rust/exercises/macros/.meta/ALLOWED_TO_NOT_COMPILE +2 -0
  249. data/tracks/rust/exercises/macros/README.md +1 -1
  250. data/tracks/rust/exercises/minesweeper/README.md +1 -1
  251. data/tracks/rust/exercises/nth-prime/README.md +1 -1
  252. data/tracks/rust/exercises/nucleotide-codons/README.md +1 -1
  253. data/tracks/rust/exercises/nucleotide-count/README.md +1 -1
  254. data/tracks/rust/exercises/ocr-numbers/README.md +1 -1
  255. data/tracks/rust/exercises/ocr-numbers/example.rs +14 -6
  256. data/tracks/rust/exercises/ocr-numbers/src/lib.rs +7 -1
  257. data/tracks/rust/exercises/ocr-numbers/tests/ocr-numbers.rs +2 -2
  258. data/tracks/rust/exercises/pangram/README.md +1 -1
  259. data/tracks/rust/exercises/parallel-letter-frequency/README.md +1 -1
  260. data/tracks/rust/exercises/pascals-triangle/README.md +1 -1
  261. data/tracks/rust/exercises/perfect-numbers/README.md +1 -1
  262. data/tracks/rust/exercises/phone-number/README.md +1 -1
  263. data/tracks/rust/exercises/pig-latin/README.md +1 -1
  264. data/tracks/rust/exercises/poker/README.md +1 -1
  265. data/tracks/rust/exercises/prime-factors/README.md +1 -1
  266. data/tracks/rust/exercises/protein-translation/README.md +1 -1
  267. data/tracks/rust/exercises/proverb/README.md +1 -1
  268. data/tracks/rust/exercises/pythagorean-triplet/README.md +1 -1
  269. data/tracks/rust/exercises/queen-attack/README.md +1 -1
  270. data/tracks/rust/exercises/raindrops/README.md +1 -1
  271. data/tracks/rust/exercises/react/README.md +1 -1
  272. data/tracks/rust/exercises/react/example.rs +27 -18
  273. data/tracks/rust/exercises/react/src/lib.rs +25 -10
  274. data/tracks/rust/exercises/react/tests/react.rs +113 -83
  275. data/tracks/rust/exercises/rectangles/README.md +1 -1
  276. data/tracks/rust/exercises/reverse-string/README.md +1 -1
  277. data/tracks/rust/exercises/rna-transcription/README.md +1 -1
  278. data/tracks/rust/exercises/robot-name/README.md +1 -1
  279. data/tracks/rust/exercises/robot-simulator/README.md +1 -1
  280. data/tracks/rust/exercises/roman-numerals/README.md +1 -1
  281. data/tracks/rust/exercises/rotational-cipher/README.md +1 -1
  282. data/tracks/rust/exercises/run-length-encoding/README.md +1 -1
  283. data/tracks/rust/exercises/saddle-points/README.md +1 -1
  284. data/tracks/rust/exercises/say/README.md +1 -1
  285. data/tracks/rust/exercises/scrabble-score/README.md +1 -1
  286. data/tracks/rust/exercises/series/README.md +1 -1
  287. data/tracks/rust/exercises/sieve/README.md +1 -1
  288. data/tracks/rust/exercises/simple-linked-list/README.md +1 -1
  289. data/tracks/rust/exercises/space-age/README.md +1 -1
  290. data/tracks/rust/exercises/sublist/README.md +1 -1
  291. data/tracks/rust/exercises/sum-of-multiples/README.md +1 -1
  292. data/tracks/rust/exercises/tournament/README.md +1 -1
  293. data/tracks/rust/exercises/triangle/README.md +1 -1
  294. data/tracks/rust/exercises/two-bucket/README.md +1 -1
  295. data/tracks/rust/exercises/variable-length-quantity/README.md +1 -1
  296. data/tracks/rust/exercises/word-count/README.md +1 -1
  297. data/tracks/rust/exercises/wordy/README.md +1 -1
  298. data/tracks/typescript/config.json +11 -0
  299. data/tracks/typescript/exercises/list-ops/README.md +35 -0
  300. data/tracks/typescript/exercises/list-ops/list-ops.example.ts +80 -0
  301. data/tracks/typescript/exercises/list-ops/list-ops.test.ts +117 -0
  302. data/tracks/typescript/exercises/list-ops/list-ops.ts +0 -0
  303. data/tracks/typescript/exercises/list-ops/package.json +36 -0
  304. data/tracks/typescript/exercises/list-ops/tsconfig.json +22 -0
  305. data/tracks/typescript/exercises/list-ops/tslint.json +127 -0
  306. data/tracks/typescript/exercises/list-ops/yarn.lock +2624 -0
  307. metadata +42 -3
  308. data/tracks/dart/exercises/leap/pubspec.lock +0 -293
@@ -13,12 +13,12 @@ fn roll_returns_a_result() {
13
13
  fn you_can_not_roll_more_than_ten_pins_in_a_single_roll() {
14
14
  let mut game = BowlingGame::new();
15
15
 
16
- assert!(game.roll(11).is_err());
16
+ assert_eq!(game.roll(11), Err(Error::NotEnoughPinsLeft));;
17
17
  }
18
18
 
19
19
  #[test]
20
20
  #[ignore]
21
- fn a_game_score_is_ok_if_ten_frames_have_been_rolled() {
21
+ fn a_game_score_is_some_if_ten_frames_have_been_rolled() {
22
22
  let mut game = BowlingGame::new();
23
23
 
24
24
  for _ in 0..10 {
@@ -26,7 +26,7 @@ fn a_game_score_is_ok_if_ten_frames_have_been_rolled() {
26
26
  let _ = game.roll(0);
27
27
  }
28
28
 
29
- assert!(game.score().is_ok());
29
+ assert!(game.score().is_some());
30
30
  }
31
31
 
32
32
  #[test]
@@ -34,12 +34,12 @@ fn a_game_score_is_ok_if_ten_frames_have_been_rolled() {
34
34
  fn you_can_not_score_a_game_with_no_rolls() {
35
35
  let game = BowlingGame::new();
36
36
 
37
- assert!(game.score().is_err());
37
+ assert_eq!(game.score(), None);
38
38
  }
39
39
 
40
40
  #[test]
41
41
  #[ignore]
42
- fn a_game_score_is_err_if_fewer_than_ten_frames_have_been_rolled() {
42
+ fn a_game_score_is_none_if_fewer_than_ten_frames_have_been_rolled() {
43
43
  let mut game = BowlingGame::new();
44
44
 
45
45
  for _ in 0..9 {
@@ -47,7 +47,7 @@ fn a_game_score_is_err_if_fewer_than_ten_frames_have_been_rolled() {
47
47
  let _ = game.roll(0);
48
48
  }
49
49
 
50
- assert!(game.score().is_err());
50
+ assert_eq!(game.score(), None);
51
51
  }
52
52
 
53
53
  #[test]
@@ -60,7 +60,7 @@ fn a_roll_is_err_if_the_game_is_done() {
60
60
  let _ = game.roll(0);
61
61
  }
62
62
 
63
- assert!(game.roll(0).is_err());
63
+ assert_eq!(game.roll(0), Err(Error::GameComplete));;
64
64
  }
65
65
 
66
66
  #[test]
@@ -72,7 +72,7 @@ fn twenty_zero_pin_rolls_scores_zero() {
72
72
  let _ = game.roll(0);
73
73
  }
74
74
 
75
- assert_eq!(game.score(), Ok(0));
75
+ assert_eq!(game.score(), Some(0));
76
76
  }
77
77
 
78
78
  #[test]
@@ -85,7 +85,7 @@ fn ten_frames_without_a_strike_or_spare() {
85
85
  let _ = game.roll(6);
86
86
  }
87
87
 
88
- assert_eq!(game.score(), Ok(90));
88
+ assert_eq!(game.score(), Some(90));
89
89
  }
90
90
 
91
91
  #[test]
@@ -100,7 +100,7 @@ fn spare_in_the_first_frame_followed_by_zeros() {
100
100
  let _ = game.roll(0);
101
101
  }
102
102
 
103
- assert_eq!(game.score(), Ok(10));
103
+ assert_eq!(game.score(), Some(10));
104
104
  }
105
105
 
106
106
  #[test]
@@ -116,7 +116,7 @@ fn points_scored_in_the_roll_after_a_spare_are_counted_twice_as_a_bonus() {
116
116
  let _ = game.roll(0);
117
117
  }
118
118
 
119
- assert_eq!(game.score(), Ok(16));
119
+ assert_eq!(game.score(), Some(16));
120
120
  }
121
121
 
122
122
  #[test]
@@ -134,7 +134,7 @@ fn consecutive_spares_each_get_a_one_roll_bonus() {
134
134
  let _ = game.roll(0);
135
135
  }
136
136
 
137
- assert_eq!(game.score(), Ok(31));
137
+ assert_eq!(game.score(), Some(31));
138
138
  }
139
139
 
140
140
  #[test]
@@ -150,7 +150,7 @@ fn if_the_last_frame_is_a_spare_you_get_one_extra_roll_that_is_scored_once() {
150
150
  let _ = game.roll(5);
151
151
  let _ = game.roll(7);
152
152
 
153
- assert_eq!(game.score(), Ok(17));
153
+ assert_eq!(game.score(), Some(17));
154
154
  }
155
155
 
156
156
  #[test]
@@ -164,7 +164,7 @@ fn a_strike_earns_ten_points_in_a_frame_with_a_single_roll() {
164
164
  let _ = game.roll(0);
165
165
  }
166
166
 
167
- assert_eq!(game.score(), Ok(10));
167
+ assert_eq!(game.score(), Some(10));
168
168
  }
169
169
 
170
170
  #[test]
@@ -180,7 +180,7 @@ fn points_scored_in_the_two_rolls_after_a_strike_are_counted_twice_as_a_bonus()
180
180
  let _ = game.roll(0);
181
181
  }
182
182
 
183
- assert_eq!(game.score(), Ok(26));
183
+ assert_eq!(game.score(), Some(26));
184
184
  }
185
185
 
186
186
  #[test]
@@ -198,7 +198,7 @@ fn consecutive_strikes_each_get_the_two_roll_bonus() {
198
198
  let _ = game.roll(0);
199
199
  }
200
200
 
201
- assert_eq!(game.score(), Ok(81));
201
+ assert_eq!(game.score(), Some(81));
202
202
  }
203
203
 
204
204
  #[test]
@@ -214,7 +214,7 @@ fn a_strike_in_the_last_frame_earns_a_two_roll_bonus_that_is_counted_once() {
214
214
  let _ = game.roll(7);
215
215
  let _ = game.roll(1);
216
216
 
217
- assert_eq!(game.score(), Ok(18));
217
+ assert_eq!(game.score(), Some(18));
218
218
  }
219
219
 
220
220
  #[test]
@@ -230,7 +230,7 @@ fn a_spare_with_the_two_roll_bonus_does_not_get_a_bonus_roll() {
230
230
  let _ = game.roll(7);
231
231
  let _ = game.roll(3);
232
232
 
233
- assert_eq!(game.score(), Ok(20));
233
+ assert_eq!(game.score(), Some(20));
234
234
  }
235
235
 
236
236
  #[test]
@@ -246,7 +246,7 @@ fn strikes_with_the_two_roll_bonus_do_not_get_a_bonus_roll() {
246
246
  let _ = game.roll(10);
247
247
  let _ = game.roll(10);
248
248
 
249
- assert_eq!(game.score(), Ok(30));
249
+ assert_eq!(game.score(), Some(30));
250
250
  }
251
251
 
252
252
  #[test]
@@ -262,7 +262,7 @@ fn a_strike_with_the_one_roll_bonus_after_a_spare_in_the_last_frame_does_not_get
262
262
  let _ = game.roll(3);
263
263
  let _ = game.roll(10);
264
264
 
265
- assert_eq!(game.score(), Ok(20));
265
+ assert_eq!(game.score(), Some(20));
266
266
  }
267
267
 
268
268
  #[test]
@@ -274,7 +274,7 @@ fn all_strikes_is_a_perfect_score_of_300() {
274
274
  let _ = game.roll(10);
275
275
  }
276
276
 
277
- assert_eq!(game.score(), Ok(300));
277
+ assert_eq!(game.score(), Some(300));
278
278
  }
279
279
 
280
280
  #[test]
@@ -283,7 +283,7 @@ fn you_can_not_roll_more_than_ten_pins_in_a_single_frame() {
283
283
  let mut game = BowlingGame::new();
284
284
 
285
285
  assert!(game.roll(5).is_ok());
286
- assert!(game.roll(6).is_err());
286
+ assert_eq!(game.roll(6), Err(Error::NotEnoughPinsLeft));;
287
287
  }
288
288
 
289
289
  #[test]
@@ -297,7 +297,7 @@ fn first_bonus_ball_after_a_final_strike_can_not_score_an_invalid_number_of_pins
297
297
 
298
298
  let _ = game.roll(10);
299
299
 
300
- assert!(game.roll(11).is_err());
300
+ assert_eq!(game.roll(11), Err(Error::NotEnoughPinsLeft));;
301
301
  }
302
302
 
303
303
  #[test]
@@ -312,7 +312,7 @@ fn the_two_balls_after_a_final_strike_can_not_score_an_invalid_number_of_pins()
312
312
  let _ = game.roll(10);
313
313
 
314
314
  assert!(game.roll(5).is_ok());
315
- assert!(game.roll(6).is_err());
315
+ assert_eq!(game.roll(6), Err(Error::NotEnoughPinsLeft));;
316
316
  }
317
317
 
318
318
  #[test]
@@ -342,7 +342,7 @@ fn the_two_balls_after_a_final_strike_can_not_be_a_non_strike_followed_by_a_stri
342
342
  let _ = game.roll(10);
343
343
 
344
344
  assert!(game.roll(6).is_ok());
345
- assert!(game.roll(10).is_err());
345
+ assert_eq!(game.roll(10), Err(Error::NotEnoughPinsLeft));;
346
346
  }
347
347
 
348
348
  #[test]
@@ -357,7 +357,7 @@ fn second_bonus_ball_after_a_final_strike_can_not_score_an_invalid_number_of_pin
357
357
  let _ = game.roll(10);
358
358
 
359
359
  assert!(game.roll(10).is_ok());
360
- assert!(game.roll(11).is_err());
360
+ assert_eq!(game.roll(11), Err(Error::NotEnoughPinsLeft));;
361
361
  }
362
362
 
363
363
  #[test]
@@ -371,15 +371,15 @@ fn if_the_last_frame_is_a_strike_you_can_not_score_before_the_extra_rolls_are_ta
371
371
 
372
372
  let _ = game.roll(10);
373
373
 
374
- assert!(game.score().is_err());
374
+ assert_eq!(game.score(), None);
375
375
 
376
376
  let _ = game.roll(10);
377
377
 
378
- assert!(game.score().is_err());
378
+ assert_eq!(game.score(), None);
379
379
 
380
380
  let _ = game.roll(10);
381
381
 
382
- assert!(game.score().is_ok());
382
+ assert!(game.score().is_some());
383
383
  }
384
384
 
385
385
  #[test]
@@ -394,9 +394,9 @@ fn if_the_last_frame_is_a_spare_you_can_not_create_a_score_before_extra_roll_is_
394
394
  let _ = game.roll(5);
395
395
  let _ = game.roll(5);
396
396
 
397
- assert!(game.score().is_err());
397
+ assert_eq!(game.score(), None);
398
398
 
399
399
  let _ = game.roll(10);
400
400
 
401
- assert!(game.score().is_ok());
401
+ assert!(game.score().is_some());
402
402
  }
@@ -35,7 +35,7 @@ haven't already, it will help you with organizing your files.
35
35
 
36
36
  ## Feedback, Issues, Pull Requests
37
37
 
38
- The [exercism/rust](https://github.com/exercism/rust) repository on GitHub is the home for all of the Rust exercises. If you have feedback about an exercise, or want to help implement new exercises, head over there and create an issue. Members of the [rust track team](https://github.com/orgs/exercism/teams/rust) are happy to help!
38
+ The [exercism/rust](https://github.com/exercism/rust) repository on GitHub is the home for all of the Rust exercises. If you have feedback about an exercise, or want to help implement new exercises, head over there and create an issue. Members of the rust track team are happy to help!
39
39
 
40
40
  If you want to know more about Exercism, take a look at the [contribution guide](https://github.com/exercism/docs/blob/master/contributing-to-language-tracks/README.md).
41
41
 
@@ -74,7 +74,7 @@ haven't already, it will help you with organizing your files.
74
74
 
75
75
  ## Feedback, Issues, Pull Requests
76
76
 
77
- The [exercism/rust](https://github.com/exercism/rust) repository on GitHub is the home for all of the Rust exercises. If you have feedback about an exercise, or want to help implement new exercises, head over there and create an issue. Members of the [rust track team](https://github.com/orgs/exercism/teams/rust) are happy to help!
77
+ The [exercism/rust](https://github.com/exercism/rust) repository on GitHub is the home for all of the Rust exercises. If you have feedback about an exercise, or want to help implement new exercises, head over there and create an issue. Members of the rust track team are happy to help!
78
78
 
79
79
  If you want to know more about Exercism, take a look at the [contribution guide](https://github.com/exercism/docs/blob/master/contributing-to-language-tracks/README.md).
80
80
 
@@ -42,7 +42,7 @@ haven't already, it will help you with organizing your files.
42
42
 
43
43
  ## Feedback, Issues, Pull Requests
44
44
 
45
- The [exercism/rust](https://github.com/exercism/rust) repository on GitHub is the home for all of the Rust exercises. If you have feedback about an exercise, or want to help implement new exercises, head over there and create an issue. Members of the [rust track team](https://github.com/orgs/exercism/teams/rust) are happy to help!
45
+ The [exercism/rust](https://github.com/exercism/rust) repository on GitHub is the home for all of the Rust exercises. If you have feedback about an exercise, or want to help implement new exercises, head over there and create an issue. Members of the rust track team are happy to help!
46
46
 
47
47
  If you want to know more about Exercism, take a look at the [contribution guide](https://github.com/exercism/docs/blob/master/contributing-to-language-tracks/README.md).
48
48
 
@@ -50,7 +50,7 @@ haven't already, it will help you with organizing your files.
50
50
 
51
51
  ## Feedback, Issues, Pull Requests
52
52
 
53
- The [exercism/rust](https://github.com/exercism/rust) repository on GitHub is the home for all of the Rust exercises. If you have feedback about an exercise, or want to help implement new exercises, head over there and create an issue. Members of the [rust track team](https://github.com/orgs/exercism/teams/rust) are happy to help!
53
+ The [exercism/rust](https://github.com/exercism/rust) repository on GitHub is the home for all of the Rust exercises. If you have feedback about an exercise, or want to help implement new exercises, head over there and create an issue. Members of the rust track team are happy to help!
54
54
 
55
55
  If you want to know more about Exercism, take a look at the [contribution guide](https://github.com/exercism/docs/blob/master/contributing-to-language-tracks/README.md).
56
56
 
@@ -93,7 +93,7 @@ haven't already, it will help you with organizing your files.
93
93
 
94
94
  ## Feedback, Issues, Pull Requests
95
95
 
96
- The [exercism/rust](https://github.com/exercism/rust) repository on GitHub is the home for all of the Rust exercises. If you have feedback about an exercise, or want to help implement new exercises, head over there and create an issue. Members of the [rust track team](https://github.com/orgs/exercism/teams/rust) are happy to help!
96
+ The [exercism/rust](https://github.com/exercism/rust) repository on GitHub is the home for all of the Rust exercises. If you have feedback about an exercise, or want to help implement new exercises, head over there and create an issue. Members of the rust track team are happy to help!
97
97
 
98
98
  If you want to know more about Exercism, take a look at the [contribution guide](https://github.com/exercism/docs/blob/master/contributing-to-language-tracks/README.md).
99
99
 
@@ -40,10 +40,18 @@ fn prepare(input: &str) -> Vec<char> {
40
40
  output.extend(
41
41
  input
42
42
  .chars()
43
- .filter(|&c| c.is_ascii() && !c.is_whitespace())
44
- .map(|c| c.to_ascii_lowercase())
45
- .filter(|&c| c >= 'a' && c <= 'z'),
43
+ .filter(|&c| c.is_ascii() && !c.is_whitespace() && !c.is_ascii_punctuation())
44
+ .map(|c| c.to_ascii_lowercase()),
46
45
  );
46
+
47
+ // add space padding to the end such that the actual string returned
48
+ // forms a perfect rectangle
49
+ let (r, c) = dimensions(output.len());
50
+ let padding_qty = (r * c) - output.len();
51
+ for _ in 0..padding_qty {
52
+ output.push(' ');
53
+ }
54
+
47
55
  output.shrink_to_fit();
48
56
 
49
57
  output
@@ -10,7 +10,6 @@ fn test_empty_input() {
10
10
  test("", "")
11
11
  }
12
12
 
13
-
14
13
  #[test]
15
14
  #[ignore]
16
15
  fn test_encrypt_also_decrypts_square() {
@@ -28,7 +27,7 @@ fn test_encrypt_also_decrypts_square() {
28
27
  fn test_example() {
29
28
  test(
30
29
  "If man was meant to stay on the ground, god would have given us roots.",
31
- "imtgdvs fearwer mayoogo anouuio ntnnlvt wttddes aohghn sseoau",
30
+ "imtgdvs fearwer mayoogo anouuio ntnnlvt wttddes aohghn sseoau ",
32
31
  )
33
32
  }
34
33
 
@@ -54,15 +53,6 @@ fn test_everything_becomes_lowercase() {
54
53
  test("CASE", "cs ae");
55
54
  }
56
55
 
57
- #[test]
58
- #[ignore]
59
- fn test_ignore_non_ascii_chars() {
60
- test(
61
- "She got her education, then got rich programming: 👩‍🎓🎓👩‍💻💰",
62
- "setnhm hrigpm eeoori gdnton outrgg tchir haeca",
63
- );
64
- }
65
-
66
56
  #[test]
67
57
  #[ignore]
68
58
  fn test_long() {
@@ -79,10 +69,12 @@ and the others, too.
79
69
 
80
70
  -- John F. Kennedy, 12 September 1962
81
71
  "#,
82
- &(String::from("wohaseagabnttenwan eoennaronedcwpghnf cnmdoseaisshettidk ") +
83
- "hwodtyhlztkaaoocte oeoobbaweoilrnphhn ocnteuriaflleeowen shihctdlnolewwseoe " +
84
- "eoneabbldusnietitd totoueesmrbglapnhy oshtscceeeeelrotes geiheaaranciienere " +
85
- "otsetuuvseasnuensp todrhsseuruognadtt ogeteeetrgsntwntoe tochyttoeieeoidoom " +
86
- "htaiahhotettalowjb eodnrearhshhclnioe mtegeytgeaaacienhr"),
72
+ &(String::from("womdbudlmecsgwdwob enooetbsenaotioihe ")
73
+ + "cwotcbeeaeunolnnnr henhaecrsrsealeaf1 ocieucavugetciwnk9 "
74
+ + "ohnosauerithcnhde6 sotteusteehaegitn2 eohhtseotsatptchn "
75
+ + "tsiehetohatwtohee oesrethrenceopwod gtdtyhagbdhanoety "
76
+ + "ooehaetaesaresih1 tgcirygnsklewtne2 ooaneaoitilweptrs "
77
+ + "ttdgerazoleiaoese hoesaeleflnlrnntp etanshwaosgleedot "
78
+ + "mhnoyainubeiuatoe oedtbrldreinnnojm "),
87
79
  )
88
80
  }
@@ -31,7 +31,7 @@ haven't already, it will help you with organizing your files.
31
31
 
32
32
  ## Feedback, Issues, Pull Requests
33
33
 
34
- The [exercism/rust](https://github.com/exercism/rust) repository on GitHub is the home for all of the Rust exercises. If you have feedback about an exercise, or want to help implement new exercises, head over there and create an issue. Members of the [rust track team](https://github.com/orgs/exercism/teams/rust) are happy to help!
34
+ The [exercism/rust](https://github.com/exercism/rust) repository on GitHub is the home for all of the Rust exercises. If you have feedback about an exercise, or want to help implement new exercises, head over there and create an issue. Members of the rust track team are happy to help!
35
35
 
36
36
  If you want to know more about Exercism, take a look at the [contribution guide](https://github.com/exercism/docs/blob/master/contributing-to-language-tracks/README.md).
37
37
 
@@ -11,10 +11,10 @@ impl<T: Ord + Clone> PartialEq for CustomSet<T> {
11
11
  }
12
12
 
13
13
  impl<T: Ord + Clone> CustomSet<T> {
14
- pub fn new(inputs: Vec<T>) -> CustomSet<T> {
14
+ pub fn new(inputs: &[T]) -> CustomSet<T> {
15
15
  let mut s = CustomSet { collection: Vec::new() };
16
16
  for input in inputs {
17
- s.add(input);
17
+ s.add(input.clone());
18
18
  }
19
19
  s
20
20
  }
@@ -42,26 +42,26 @@ impl<T: Ord + Clone> CustomSet<T> {
42
42
  }
43
43
 
44
44
  pub fn intersection(&self, other: &Self) -> CustomSet<T> {
45
- CustomSet::new(self.collection
46
- .iter()
47
- .cloned()
48
- .filter(|c| other.contains(c))
49
- .collect())
45
+ CustomSet::new(&self.collection
46
+ .iter()
47
+ .cloned()
48
+ .filter(|c| other.contains(c))
49
+ .collect::<Vec<_>>())
50
50
  }
51
51
 
52
52
  pub fn union(&self, other: &Self) -> CustomSet<T> {
53
- CustomSet::new(self.collection
54
- .iter()
55
- .cloned()
56
- .chain(other.collection.iter().cloned())
57
- .collect())
53
+ CustomSet::new(&self.collection
54
+ .iter()
55
+ .cloned()
56
+ .chain(other.collection.iter().cloned())
57
+ .collect::<Vec<_>>())
58
58
  }
59
59
 
60
60
  pub fn difference(&self, other: &Self) -> CustomSet<T> {
61
- CustomSet::new(self.collection
62
- .iter()
63
- .cloned()
64
- .filter(|c| !other.contains(c))
65
- .collect())
61
+ CustomSet::new(&self.collection
62
+ .iter()
63
+ .cloned()
64
+ .filter(|c| !other.contains(c))
65
+ .collect::<Vec<_>>())
66
66
  }
67
67
  }