trackler 2.2.1.41 → 2.2.1.42

Sign up to get free protection for your applications and to get access to all the features.
Files changed (289) hide show
  1. checksums.yaml +4 -4
  2. data/.gitmodules +0 -3
  3. data/lib/trackler/version.rb +1 -1
  4. data/problem-specifications/exercises/change/metadata.yml +0 -3
  5. data/tracks/c/exercises/allergies/src/allergies.h +12 -12
  6. data/tracks/c/exercises/allergies/src/example.c +4 -4
  7. data/tracks/c/exercises/allergies/src/example.h +14 -14
  8. data/tracks/c/exercises/allergies/test/test_allergies.c +45 -45
  9. data/tracks/cfml/config.json +139 -193
  10. data/tracks/cfml/config/maintainers.json +11 -11
  11. data/tracks/csharp/exercises/etl/Etl.cs +1 -1
  12. data/tracks/csharp/exercises/etl/EtlTest.cs +102 -0
  13. data/tracks/csharp/exercises/etl/Example.cs +1 -1
  14. data/tracks/csharp/exercises/pascals-triangle/Example.cs +10 -1
  15. data/tracks/csharp/exercises/pascals-triangle/PascalsTriangle.cs +1 -0
  16. data/tracks/csharp/exercises/pascals-triangle/PascalsTriangleTest.cs +17 -50
  17. data/tracks/csharp/exercises/saddle-points/SaddlePointsTest.cs +75 -0
  18. data/tracks/csharp/generators/Exercises/Etl.cs +61 -0
  19. data/tracks/csharp/generators/Exercises/PascalsTriangle.cs +28 -0
  20. data/tracks/csharp/generators/Exercises/SaddlePoints.cs +50 -0
  21. data/tracks/csharp/generators/Output/ValueFormatter.cs +29 -0
  22. data/tracks/java/config.json +40 -5
  23. data/tracks/java/exercises/triangle/.meta/src/reference/java/Triangle.java +11 -10
  24. data/tracks/java/exercises/triangle/src/main/java/Triangle.java +9 -1
  25. data/tracks/java/exercises/triangle/src/test/java/TriangleTest.java +12 -12
  26. data/tracks/python/exercises/phone-number/phone_number.py +1 -1
  27. data/tracks/python/exercises/rna-transcription/rna_transcription.py +1 -1
  28. data/tracks/python/exercises/run-length-encoding/run_length_encoding.py +2 -2
  29. data/tracks/python/exercises/saddle-points/saddle_points.py +1 -1
  30. data/tracks/rust/exercises/etl/README.md +1 -1
  31. data/tracks/rust/exercises/ocr-numbers/README.md +1 -1
  32. data/tracks/rust/exercises/pascals-triangle/README.md +1 -1
  33. data/tracks/rust/exercises/rna-transcription/README.md +1 -1
  34. data/tracks/scala/exercises/meetup/src/test/scala/MeetupTest.scala +118 -93
  35. data/tracks/scala/testgen/src/main/scala/MeetupTestGenerator.scala +48 -0
  36. data/tracks/scala/testgen/src/main/scala/testgen/CanonicalDataParser.scala +1 -1
  37. data/tracks/typescript/config.json +13 -0
  38. data/tracks/typescript/exercises/bob/bob.ts +7 -0
  39. data/tracks/typescript/exercises/hello-world/hello-world.ts +7 -0
  40. data/tracks/typescript/exercises/leap/leap.ts +5 -0
  41. data/tracks/typescript/exercises/pangram/pangram.ts +11 -0
  42. data/tracks/typescript/exercises/prime-factors/README.md +73 -0
  43. data/tracks/typescript/exercises/prime-factors/package.json +36 -0
  44. data/tracks/typescript/exercises/prime-factors/prime-factors.example.ts +14 -0
  45. data/tracks/typescript/exercises/prime-factors/prime-factors.test.ts +25 -0
  46. data/tracks/{coldfusion/exercises/acronym/.meta/HINTS.md → typescript/exercises/prime-factors/prime-factors.ts} +0 -0
  47. data/tracks/typescript/exercises/prime-factors/tsconfig.json +22 -0
  48. data/tracks/typescript/exercises/prime-factors/tslint.json +127 -0
  49. data/tracks/typescript/exercises/prime-factors/yarn.lock +2305 -0
  50. data/tracks/typescript/exercises/rna-transcription/rna-transcription.ts +7 -0
  51. metadata +16 -242
  52. data/tracks/coldfusion/.gitignore +0 -5
  53. data/tracks/coldfusion/.travis.yml +0 -18
  54. data/tracks/coldfusion/CONTRIBUTING.md +0 -10
  55. data/tracks/coldfusion/LICENSE +0 -21
  56. data/tracks/coldfusion/README.md +0 -92
  57. data/tracks/coldfusion/bin/fetch-configlet +0 -32
  58. data/tracks/coldfusion/config.json +0 -223
  59. data/tracks/coldfusion/config/exercise_readme.go.tmpl +0 -16
  60. data/tracks/coldfusion/config/maintainers.json +0 -13
  61. data/tracks/coldfusion/docs/ABOUT.md +0 -10
  62. data/tracks/coldfusion/docs/EXERCISE_README_INSERT.md +0 -15
  63. data/tracks/coldfusion/docs/INSTALLATION.md +0 -35
  64. data/tracks/coldfusion/docs/LEARNING.md +0 -37
  65. data/tracks/coldfusion/docs/RESOURCES.md +0 -29
  66. data/tracks/coldfusion/docs/SNIPPET.txt +0 -8
  67. data/tracks/coldfusion/docs/TESTS.md +0 -13
  68. data/tracks/coldfusion/exercises/acronym/Acronym.cfc +0 -13
  69. data/tracks/coldfusion/exercises/acronym/AcronymTest.cfc +0 -43
  70. data/tracks/coldfusion/exercises/acronym/Solution.cfc +0 -22
  71. data/tracks/coldfusion/exercises/acronym/SolutionTest.cfc +0 -7
  72. data/tracks/coldfusion/exercises/acronym/TestRunner.cfc +0 -103
  73. data/tracks/coldfusion/exercises/acronym/box.json +0 -8
  74. data/tracks/coldfusion/exercises/acronym/index.cfm +0 -37
  75. data/tracks/coldfusion/exercises/atbash-cipher/.meta/HINTS.md +0 -0
  76. data/tracks/coldfusion/exercises/atbash-cipher/AtbashCipher.cfc +0 -14
  77. data/tracks/coldfusion/exercises/atbash-cipher/AtbashCipherTest.cfc +0 -71
  78. data/tracks/coldfusion/exercises/atbash-cipher/Solution.cfc +0 -56
  79. data/tracks/coldfusion/exercises/atbash-cipher/SolutionTest.cfc +0 -7
  80. data/tracks/coldfusion/exercises/atbash-cipher/TestRunner.cfc +0 -103
  81. data/tracks/coldfusion/exercises/atbash-cipher/box.json +0 -8
  82. data/tracks/coldfusion/exercises/atbash-cipher/index.cfm +0 -37
  83. data/tracks/coldfusion/exercises/bob/.meta/HINTS.md +0 -0
  84. data/tracks/coldfusion/exercises/bob/Bob.cfc +0 -13
  85. data/tracks/coldfusion/exercises/bob/BobTest.cfc +0 -115
  86. data/tracks/coldfusion/exercises/bob/Solution.cfc +0 -27
  87. data/tracks/coldfusion/exercises/bob/SolutionTest.cfc +0 -7
  88. data/tracks/coldfusion/exercises/bob/TestRunner.cfc +0 -103
  89. data/tracks/coldfusion/exercises/bob/box.json +0 -8
  90. data/tracks/coldfusion/exercises/bob/index.cfm +0 -37
  91. data/tracks/coldfusion/exercises/diamond/.meta/HINTS.md +0 -0
  92. data/tracks/coldfusion/exercises/diamond/Diamond.cfc +0 -13
  93. data/tracks/coldfusion/exercises/diamond/DiamondTest.cfc +0 -35
  94. data/tracks/coldfusion/exercises/diamond/Solution.cfc +0 -35
  95. data/tracks/coldfusion/exercises/diamond/SolutionTest.cfc +0 -7
  96. data/tracks/coldfusion/exercises/diamond/TestRunner.cfc +0 -103
  97. data/tracks/coldfusion/exercises/diamond/box.json +0 -8
  98. data/tracks/coldfusion/exercises/diamond/index.cfm +0 -37
  99. data/tracks/coldfusion/exercises/difference-of-squares/.meta/HINTS.md +0 -0
  100. data/tracks/coldfusion/exercises/difference-of-squares/DifferenceOfSquares.cfc +0 -18
  101. data/tracks/coldfusion/exercises/difference-of-squares/DifferenceOfSquaresTest.cfc +0 -63
  102. data/tracks/coldfusion/exercises/difference-of-squares/Solution.cfc +0 -28
  103. data/tracks/coldfusion/exercises/difference-of-squares/SolutionTest.cfc +0 -7
  104. data/tracks/coldfusion/exercises/difference-of-squares/TestRunner.cfc +0 -103
  105. data/tracks/coldfusion/exercises/difference-of-squares/box.json +0 -8
  106. data/tracks/coldfusion/exercises/difference-of-squares/index.cfm +0 -37
  107. data/tracks/coldfusion/exercises/flatten-array/.meta/HINTS.md +0 -0
  108. data/tracks/coldfusion/exercises/flatten-array/FlattenArray.cfc +0 -13
  109. data/tracks/coldfusion/exercises/flatten-array/FlattenArrayTest.cfc +0 -42
  110. data/tracks/coldfusion/exercises/flatten-array/Solution.cfc +0 -26
  111. data/tracks/coldfusion/exercises/flatten-array/SolutionTest.cfc +0 -7
  112. data/tracks/coldfusion/exercises/flatten-array/TestRunner.cfc +0 -103
  113. data/tracks/coldfusion/exercises/flatten-array/box.json +0 -8
  114. data/tracks/coldfusion/exercises/flatten-array/index.cfm +0 -37
  115. data/tracks/coldfusion/exercises/gigasecond/.meta/HINTS.md +0 -0
  116. data/tracks/coldfusion/exercises/gigasecond/Gigasecond.cfc +0 -13
  117. data/tracks/coldfusion/exercises/gigasecond/GigasecondTest.cfc +0 -39
  118. data/tracks/coldfusion/exercises/gigasecond/Solution.cfc +0 -16
  119. data/tracks/coldfusion/exercises/gigasecond/SolutionTest.cfc +0 -7
  120. data/tracks/coldfusion/exercises/gigasecond/TestRunner.cfc +0 -103
  121. data/tracks/coldfusion/exercises/gigasecond/box.json +0 -8
  122. data/tracks/coldfusion/exercises/gigasecond/index.cfm +0 -37
  123. data/tracks/coldfusion/exercises/grains/.meta/HINTS.md +0 -0
  124. data/tracks/coldfusion/exercises/grains/Grains.cfc +0 -14
  125. data/tracks/coldfusion/exercises/grains/GrainsTest.cfc +0 -63
  126. data/tracks/coldfusion/exercises/grains/Solution.cfc +0 -22
  127. data/tracks/coldfusion/exercises/grains/SolutionTest.cfc +0 -7
  128. data/tracks/coldfusion/exercises/grains/TestRunner.cfc +0 -103
  129. data/tracks/coldfusion/exercises/grains/box.json +0 -8
  130. data/tracks/coldfusion/exercises/grains/index.cfm +0 -37
  131. data/tracks/coldfusion/exercises/hamming/.meta/HINTS.md +0 -0
  132. data/tracks/coldfusion/exercises/hamming/Hamming.cfc +0 -13
  133. data/tracks/coldfusion/exercises/hamming/HammingTest.cfc +0 -75
  134. data/tracks/coldfusion/exercises/hamming/Solution.cfc +0 -25
  135. data/tracks/coldfusion/exercises/hamming/SolutionTest.cfc +0 -7
  136. data/tracks/coldfusion/exercises/hamming/TestRunner.cfc +0 -103
  137. data/tracks/coldfusion/exercises/hamming/box.json +0 -8
  138. data/tracks/coldfusion/exercises/hamming/index.cfm +0 -37
  139. data/tracks/coldfusion/exercises/hello-world/HelloWorld.cfc +0 -13
  140. data/tracks/coldfusion/exercises/hello-world/HelloWorldTest.cfc +0 -18
  141. data/tracks/coldfusion/exercises/hello-world/Solution.cfc +0 -13
  142. data/tracks/coldfusion/exercises/hello-world/SolutionTest.cfc +0 -7
  143. data/tracks/coldfusion/exercises/hello-world/TestRunner.cfc +0 -103
  144. data/tracks/coldfusion/exercises/hello-world/box.json +0 -8
  145. data/tracks/coldfusion/exercises/hello-world/index.cfm +0 -37
  146. data/tracks/coldfusion/exercises/isogram/.meta/HINTS.md +0 -0
  147. data/tracks/coldfusion/exercises/isogram/Isogram.cfc +0 -13
  148. data/tracks/coldfusion/exercises/isogram/IsogramTest.cfc +0 -55
  149. data/tracks/coldfusion/exercises/isogram/Solution.cfc +0 -23
  150. data/tracks/coldfusion/exercises/isogram/SolutionTest.cfc +0 -7
  151. data/tracks/coldfusion/exercises/isogram/TestRunner.cfc +0 -103
  152. data/tracks/coldfusion/exercises/isogram/box.json +0 -8
  153. data/tracks/coldfusion/exercises/isogram/index.cfm +0 -37
  154. data/tracks/coldfusion/exercises/largest-series-product/.meta/HINTS.md +0 -0
  155. data/tracks/coldfusion/exercises/largest-series-product/LargestSeriesProduct.cfc +0 -13
  156. data/tracks/coldfusion/exercises/largest-series-product/LargestSeriesProductTest.cfc +0 -75
  157. data/tracks/coldfusion/exercises/largest-series-product/Solution.cfc +0 -41
  158. data/tracks/coldfusion/exercises/largest-series-product/SolutionTest.cfc +0 -7
  159. data/tracks/coldfusion/exercises/largest-series-product/TestRunner.cfc +0 -103
  160. data/tracks/coldfusion/exercises/largest-series-product/box.json +0 -8
  161. data/tracks/coldfusion/exercises/largest-series-product/index.cfm +0 -37
  162. data/tracks/coldfusion/exercises/leap/Leap.cfc +0 -15
  163. data/tracks/coldfusion/exercises/leap/LeapTest.cfc +0 -39
  164. data/tracks/coldfusion/exercises/leap/README.md +0 -33
  165. data/tracks/coldfusion/exercises/leap/Solution.cfc +0 -19
  166. data/tracks/coldfusion/exercises/leap/SolutionTest.cfc +0 -7
  167. data/tracks/coldfusion/exercises/leap/TestRunner.cfc +0 -103
  168. data/tracks/coldfusion/exercises/leap/box.json +0 -8
  169. data/tracks/coldfusion/exercises/leap/index.cfm +0 -37
  170. data/tracks/coldfusion/exercises/luhn/.meta/HINTS.md +0 -0
  171. data/tracks/coldfusion/exercises/luhn/Luhn.cfc +0 -13
  172. data/tracks/coldfusion/exercises/luhn/LuhnTest.cfc +0 -67
  173. data/tracks/coldfusion/exercises/luhn/Solution.cfc +0 -38
  174. data/tracks/coldfusion/exercises/luhn/SolutionTest.cfc +0 -7
  175. data/tracks/coldfusion/exercises/luhn/TestRunner.cfc +0 -103
  176. data/tracks/coldfusion/exercises/luhn/box.json +0 -8
  177. data/tracks/coldfusion/exercises/luhn/index.cfm +0 -37
  178. data/tracks/coldfusion/exercises/nth-prime/.meta/HINTS.md +0 -0
  179. data/tracks/coldfusion/exercises/nth-prime/NthPrime.cfc +0 -13
  180. data/tracks/coldfusion/exercises/nth-prime/NthPrimeTest.cfc +0 -35
  181. data/tracks/coldfusion/exercises/nth-prime/Solution.cfc +0 -33
  182. data/tracks/coldfusion/exercises/nth-prime/SolutionTest.cfc +0 -7
  183. data/tracks/coldfusion/exercises/nth-prime/TestRunner.cfc +0 -103
  184. data/tracks/coldfusion/exercises/nth-prime/box.json +0 -8
  185. data/tracks/coldfusion/exercises/nth-prime/index.cfm +0 -37
  186. data/tracks/coldfusion/exercises/pangram/.meta/HINTS.md +0 -0
  187. data/tracks/coldfusion/exercises/pangram/Pangram.cfc +0 -13
  188. data/tracks/coldfusion/exercises/pangram/PangramTest.cfc +0 -55
  189. data/tracks/coldfusion/exercises/pangram/Solution.cfc +0 -21
  190. data/tracks/coldfusion/exercises/pangram/SolutionTest.cfc +0 -7
  191. data/tracks/coldfusion/exercises/pangram/TestRunner.cfc +0 -103
  192. data/tracks/coldfusion/exercises/pangram/box.json +0 -8
  193. data/tracks/coldfusion/exercises/pangram/index.cfm +0 -37
  194. data/tracks/coldfusion/exercises/pig-latin/.meta/HINTS.md +0 -0
  195. data/tracks/coldfusion/exercises/pig-latin/PigLatin.cfc +0 -13
  196. data/tracks/coldfusion/exercises/pig-latin/PigLatinTest.cfc +0 -115
  197. data/tracks/coldfusion/exercises/pig-latin/Solution.cfc +0 -30
  198. data/tracks/coldfusion/exercises/pig-latin/SolutionTest.cfc +0 -7
  199. data/tracks/coldfusion/exercises/pig-latin/TestRunner.cfc +0 -103
  200. data/tracks/coldfusion/exercises/pig-latin/box.json +0 -8
  201. data/tracks/coldfusion/exercises/pig-latin/index.cfm +0 -37
  202. data/tracks/coldfusion/exercises/raindrops/.meta/HINTS.md +0 -0
  203. data/tracks/coldfusion/exercises/raindrops/Raindrops.cfc +0 -13
  204. data/tracks/coldfusion/exercises/raindrops/RaindropsTest.cfc +0 -87
  205. data/tracks/coldfusion/exercises/raindrops/Solution.cfc +0 -33
  206. data/tracks/coldfusion/exercises/raindrops/SolutionTest.cfc +0 -7
  207. data/tracks/coldfusion/exercises/raindrops/TestRunner.cfc +0 -103
  208. data/tracks/coldfusion/exercises/raindrops/box.json +0 -8
  209. data/tracks/coldfusion/exercises/raindrops/index.cfm +0 -37
  210. data/tracks/coldfusion/exercises/rna-transcription/.meta/HINTS.md +0 -0
  211. data/tracks/coldfusion/exercises/rna-transcription/RnaTranscription.cfc +0 -13
  212. data/tracks/coldfusion/exercises/rna-transcription/RnaTranscriptionTest.cfc +0 -47
  213. data/tracks/coldfusion/exercises/rna-transcription/Solution.cfc +0 -35
  214. data/tracks/coldfusion/exercises/rna-transcription/SolutionTest.cfc +0 -7
  215. data/tracks/coldfusion/exercises/rna-transcription/TestRunner.cfc +0 -103
  216. data/tracks/coldfusion/exercises/rna-transcription/box.json +0 -8
  217. data/tracks/coldfusion/exercises/rna-transcription/index.cfm +0 -37
  218. data/tracks/coldfusion/exercises/saddle-points/.meta/HINTS.md +0 -0
  219. data/tracks/coldfusion/exercises/saddle-points/SaddlePoints.cfc +0 -13
  220. data/tracks/coldfusion/exercises/saddle-points/SaddlePointsTest.cfc +0 -35
  221. data/tracks/coldfusion/exercises/saddle-points/Solution.cfc +0 -59
  222. data/tracks/coldfusion/exercises/saddle-points/SolutionTest.cfc +0 -7
  223. data/tracks/coldfusion/exercises/saddle-points/TestRunner.cfc +0 -103
  224. data/tracks/coldfusion/exercises/saddle-points/box.json +0 -8
  225. data/tracks/coldfusion/exercises/saddle-points/index.cfm +0 -37
  226. data/tracks/coldfusion/exercises/scrabble-score/.meta/HINTS.md +0 -0
  227. data/tracks/coldfusion/exercises/scrabble-score/ScrabbleScore.cfc +0 -13
  228. data/tracks/coldfusion/exercises/scrabble-score/ScrabbleScoreTest.cfc +0 -59
  229. data/tracks/coldfusion/exercises/scrabble-score/Solution.cfc +0 -50
  230. data/tracks/coldfusion/exercises/scrabble-score/SolutionTest.cfc +0 -7
  231. data/tracks/coldfusion/exercises/scrabble-score/TestRunner.cfc +0 -103
  232. data/tracks/coldfusion/exercises/scrabble-score/box.json +0 -8
  233. data/tracks/coldfusion/exercises/scrabble-score/index.cfm +0 -37
  234. data/tracks/coldfusion/exercises/secret-handshake/.meta/HINTS.md +0 -0
  235. data/tracks/coldfusion/exercises/secret-handshake/SecretHandshake.cfc +0 -13
  236. data/tracks/coldfusion/exercises/secret-handshake/SecretHandshakeTest.cfc +0 -63
  237. data/tracks/coldfusion/exercises/secret-handshake/Solution.cfc +0 -31
  238. data/tracks/coldfusion/exercises/secret-handshake/SolutionTest.cfc +0 -7
  239. data/tracks/coldfusion/exercises/secret-handshake/TestRunner.cfc +0 -103
  240. data/tracks/coldfusion/exercises/secret-handshake/box.json +0 -8
  241. data/tracks/coldfusion/exercises/secret-handshake/index.cfm +0 -37
  242. data/tracks/coldfusion/exercises/space-age/.meta/HINTS.md +0 -0
  243. data/tracks/coldfusion/exercises/space-age/Solution.cfc +0 -28
  244. data/tracks/coldfusion/exercises/space-age/SolutionTest.cfc +0 -7
  245. data/tracks/coldfusion/exercises/space-age/SpaceAge.cfc +0 -13
  246. data/tracks/coldfusion/exercises/space-age/SpaceAgeTest.cfc +0 -47
  247. data/tracks/coldfusion/exercises/space-age/TestRunner.cfc +0 -103
  248. data/tracks/coldfusion/exercises/space-age/box.json +0 -8
  249. data/tracks/coldfusion/exercises/space-age/index.cfm +0 -37
  250. data/tracks/coldfusion/exercises/sum-of-multiples/.meta/HINTS.md +0 -0
  251. data/tracks/coldfusion/exercises/sum-of-multiples/Solution.cfc +0 -27
  252. data/tracks/coldfusion/exercises/sum-of-multiples/SolutionTest.cfc +0 -7
  253. data/tracks/coldfusion/exercises/sum-of-multiples/SumOfMultiples.cfc +0 -13
  254. data/tracks/coldfusion/exercises/sum-of-multiples/SumOfMultiplesTest.cfc +0 -63
  255. data/tracks/coldfusion/exercises/sum-of-multiples/TestRunner.cfc +0 -103
  256. data/tracks/coldfusion/exercises/sum-of-multiples/box.json +0 -8
  257. data/tracks/coldfusion/exercises/sum-of-multiples/index.cfm +0 -37
  258. data/tracks/coldfusion/exercises/triangle/.meta/HINTS.md +0 -0
  259. data/tracks/coldfusion/exercises/triangle/Solution.cfc +0 -53
  260. data/tracks/coldfusion/exercises/triangle/SolutionTest.cfc +0 -7
  261. data/tracks/coldfusion/exercises/triangle/TestRunner.cfc +0 -103
  262. data/tracks/coldfusion/exercises/triangle/Triangle.cfc +0 -18
  263. data/tracks/coldfusion/exercises/triangle/TriangleTest.cfc +0 -95
  264. data/tracks/coldfusion/exercises/triangle/box.json +0 -8
  265. data/tracks/coldfusion/exercises/triangle/index.cfm +0 -37
  266. data/tracks/coldfusion/exercises/word-count/.meta/HINTS.md +0 -0
  267. data/tracks/coldfusion/exercises/word-count/Solution.cfc +0 -22
  268. data/tracks/coldfusion/exercises/word-count/SolutionTest.cfc +0 -7
  269. data/tracks/coldfusion/exercises/word-count/TestRunner.cfc +0 -103
  270. data/tracks/coldfusion/exercises/word-count/WordCount.cfc +0 -13
  271. data/tracks/coldfusion/exercises/word-count/WordCountTest.cfc +0 -55
  272. data/tracks/coldfusion/exercises/word-count/box.json +0 -8
  273. data/tracks/coldfusion/exercises/word-count/index.cfm +0 -37
  274. data/tracks/coldfusion/img/icon.png +0 -0
  275. data/tracks/coldfusion/tasks/GenerateTests.cfc +0 -179
  276. data/tracks/coldfusion/tasks/ScaffoldExercise.cfc +0 -85
  277. data/tracks/coldfusion/tasks/TestAllSolutions.cfc +0 -24
  278. data/tracks/coldfusion/tasks/exercise_template/.meta/HINTS.md +0 -0
  279. data/tracks/coldfusion/tasks/exercise_template/@@name@@.cfc +0 -13
  280. data/tracks/coldfusion/tasks/exercise_template/@@name@@Test.cfc +0 -15
  281. data/tracks/coldfusion/tasks/exercise_template/Solution.cfc +0 -6
  282. data/tracks/coldfusion/tasks/exercise_template/SolutionTest.cfc +0 -7
  283. data/tracks/coldfusion/tasks/exercise_template/TestRunner.cfc +0 -103
  284. data/tracks/coldfusion/tasks/exercise_template/box.json +0 -8
  285. data/tracks/coldfusion/tasks/exercise_template/index.cfm +0 -37
  286. data/tracks/csharp/exercises/etl/ETLTest.cs +0 -51
  287. data/tracks/csharp/exercises/saddle-points/SaddlePointTest.cs +0 -68
  288. data/tracks/java/exercises/triangle/.meta/src/reference/java/TriangleKind.java +0 -5
  289. data/tracks/java/exercises/triangle/src/main/java/TriangleKind.java +0 -5
@@ -1,18 +0,0 @@
1
- /**
2
- * Your implmentation of the Triangle exercise
3
- */
4
- component {
5
-
6
- function equilateral( array sides ) {
7
- // Implement me here
8
- }
9
-
10
- function isosceles( array sides ) {
11
- // Implement me here
12
- }
13
-
14
- function scalene( array sides ) {
15
- // Implement me here
16
- }
17
-
18
- }
@@ -1,95 +0,0 @@
1
- component extends="testbox.system.BaseSpec" {
2
-
3
- function beforeAll(){
4
- SUT = createObject( 'Triangle' );
5
- }
6
-
7
- function run(){
8
-
9
- describe( "My Triangle class", function(){
10
-
11
- describe( 'returns true if the triangle is equilateral', function(){
12
-
13
- it( 'true if all sides are equal', function(){
14
- expect( SUT.equilateral( sides=[2, 2, 2] ) ).toBeTrue();
15
- });
16
-
17
- it( 'false if any side is unequal', function(){
18
- expect( SUT.equilateral( sides=[2, 3, 2] ) ).toBeFalse();
19
- });
20
-
21
- it( 'false if no sides are equal', function(){
22
- expect( SUT.equilateral( sides=[5, 4, 6] ) ).toBeFalse();
23
- });
24
-
25
- it( 'All zero sides are illegal, so the triangle is not equilateral', function(){
26
- expect( SUT.equilateral( sides=[0, 0, 0] ) ).toBeFalse();
27
- });
28
-
29
- it( 'sides may be floats', function(){
30
- expect( SUT.equilateral( sides=[0.5, 0.5, 0.5] ) ).toBeTrue();
31
- });
32
-
33
- });
34
-
35
- describe( 'returns true if the triangle is isosceles', function(){
36
-
37
- it( 'true if last two sides are equal', function(){
38
- expect( SUT.isosceles( sides=[3, 4, 4] ) ).toBeTrue();
39
- });
40
-
41
- it( 'true if first two sides are equal', function(){
42
- expect( SUT.isosceles( sides=[4, 4, 3] ) ).toBeTrue();
43
- });
44
-
45
- it( 'true if first and last sides are equal', function(){
46
- expect( SUT.isosceles( sides=[4, 3, 4] ) ).toBeTrue();
47
- });
48
-
49
- it( 'equilateral triangles are also isosceles', function(){
50
- expect( SUT.isosceles( sides=[4, 4, 4] ) ).toBeTrue();
51
- });
52
-
53
- it( 'false if no sides are equal', function(){
54
- expect( SUT.isosceles( sides=[2, 3, 4] ) ).toBeFalse();
55
- });
56
-
57
- it( 'Sides that violate triangle inequality are not isosceles, even if two are equal', function(){
58
- expect( SUT.isosceles( sides=[1, 1, 3] ) ).toBeFalse();
59
- });
60
-
61
- it( 'sides may be floats', function(){
62
- expect( SUT.isosceles( sides=[0.5, 0.4, 0.5] ) ).toBeTrue();
63
- });
64
-
65
- });
66
-
67
- describe( 'returns true if the triangle is scalene', function(){
68
-
69
- it( 'true if no sides are equal', function(){
70
- expect( SUT.scalene( sides=[5, 4, 6] ) ).toBeTrue();
71
- });
72
-
73
- it( 'false if all sides are equal', function(){
74
- expect( SUT.scalene( sides=[4, 4, 4] ) ).toBeFalse();
75
- });
76
-
77
- it( 'false if two sides are equal', function(){
78
- expect( SUT.scalene( sides=[4, 4, 3] ) ).toBeFalse();
79
- });
80
-
81
- it( 'Sides that violate triangle inequality are not scalene, even if they are all different', function(){
82
- expect( SUT.scalene( sides=[7, 3, 2] ) ).toBeFalse();
83
- });
84
-
85
- it( 'sides may be floats', function(){
86
- expect( SUT.scalene( sides=[0.5, 0.4, 0.6] ) ).toBeTrue();
87
- });
88
-
89
- });
90
-
91
- });
92
-
93
- }
94
-
95
- }
@@ -1,8 +0,0 @@
1
- {
2
- "dependencies":{
3
- "testbox":"^2.5.0+107"
4
- },
5
- "installPaths":{
6
- "testbox":"testbox"
7
- }
8
- }
@@ -1,37 +0,0 @@
1
- <!---
2
-
3
- This file will only be used if you want to start up a web server in this directory. You can do so by running:
4
-
5
- $> box
6
- CommandBox> install
7
- CommandBox> server start
8
-
9
- However, this is not necessary unless you really just want to use the HTML reporters on TestBox.
10
- Ideally, you'll skip the need for this file entirely and just run the tests directly frm the CLI like this:
11
-
12
- CommandBox> task run TestRunner
13
-
14
- --->
15
- <cfsetting showDebugOutput="false">
16
- <cfparam name="url.reporter" default="simple">
17
- <cfscript>
18
- // get a list of all CFCs in this folder whose name looks like "XXXTest.cfc"
19
- // And turn it into compnent path relative to the web root
20
- url.bundles = directoryList(
21
- path=expandPath( '/' ),
22
- filter='*Test.cfc' )
23
- .map( function( path ) {
24
- return path
25
- .replaceNoCase( expandPath( '/' ), '' )
26
- .left( -4 )
27
- } )
28
- .toList();
29
- </cfscript>
30
-
31
- <!--- Ensure TestBox --->
32
- <cfif fileExists( "/testbox/system/runners/HTMLRunner.cfm" )>
33
- <!--- Include the TestBox HTML Runner --->
34
- <cfinclude template="/testbox/system/runners/HTMLRunner.cfm">
35
- <cfelse>
36
- Oops, you don't have TestBox installed yet! Please run <b>box install</b> from the root of your excercise folder and refresh this page.
37
- </cfif>
@@ -1,22 +0,0 @@
1
- /**
2
- * Here is an example solution for the WordCount exercise
3
- */
4
- component {
5
-
6
- function countwords( input ) {
7
- return input
8
- // Strip out chars we don't care about
9
- .reReplaceNoCase( '[^a-z0-9'' ]', '', 'all' )
10
- // Break string into array
11
- .listToArray( ' ' )
12
- // Reduce arary into struct of word counts
13
- .reduce( function( wordStats, word ){
14
- // Clean quoted words
15
- word = word.reReplaceNocase( "^'(.*)'$", "\1" );
16
- // Aggregate word counts
17
- wordStats[ word ] = ( wordStats[ word ] ?: 0 ) + 1;
18
- return wordStats;
19
- }, {} );
20
- }
21
-
22
- }
@@ -1,7 +0,0 @@
1
- component extends="WordCountTest" {
2
-
3
- function beforeAll(){
4
- SUT = createObject( 'Solution' );
5
- }
6
-
7
- }
@@ -1,103 +0,0 @@
1
- /**
2
- * I am a CommandBox task runner which you can use to test your implementation of this exercise against the
3
- * provided test suite. To use me, open the CommandBox CLI and run this:
4
- *
5
- * CommandBox> task run TestRunner
6
- *
7
- * To start up a test watcher that will automatically rerun the test suite every time you save a file change, run this:
8
- *
9
- * CommandBox> task run TestRunner --watcher
10
- *
11
- */
12
- component {
13
-
14
- /**
15
- * @solution Runs the tests against the solution
16
- * @watcher Start up a file watch that re-runs the tests on file changes. Use Ctrl-C to stop
17
- */
18
- function run( boolean solution=false, boolean watcher=false ) {
19
-
20
- ensureTestBox();
21
-
22
- if( watcher ) {
23
-
24
- // Tabula rasa
25
- command( 'cls' ).run();
26
-
27
- // Start watcher
28
- watch()
29
- .paths( '*.cfc' )
30
- .inDirectory( getCWD() )
31
- .withDelay( 500 )
32
- .onChange( function() {
33
-
34
- // Clear the screen
35
- command( 'cls' )
36
- .run();
37
-
38
- // This is neccessary so changes to tests get picked up right away.
39
- pagePoolClear();
40
-
41
- runTests( solution );
42
-
43
- } )
44
- .start();
45
-
46
- } else {
47
- runTests( solution );
48
- }
49
-
50
- }
51
-
52
- /**
53
- * Make sure the TestBox framework is installed
54
- */
55
- private function ensureTestBox() {
56
- var excerciseRoot = getCWD();
57
- var testBoxRoot = excerciseRoot & '/testbox';
58
-
59
- if( !directoryExists( testBoxRoot ) ) {
60
-
61
- print.boldYellowLine( 'Installing some missing dependencies for you!' ).toConsole();
62
- command( 'install' )
63
- .inWorkingDirectory( excerciseRoot )
64
- .run();
65
- }
66
-
67
- // Bootstrap TestBox framework
68
- filesystemUtil.createMapping( '/testbox', testBoxRoot );
69
- }
70
-
71
- /**
72
- * Invoke TestBox to run the test suite
73
- */
74
- private function runTests( boolean solution=false ) {
75
-
76
- // Create TestBox and run the tests
77
- testData = new testbox.system.TestBox()
78
- .runRaw( directory = {
79
- // Find all CFCs...
80
- mapping = filesystemUtil.makePathRelative( getCWD() ),
81
- // ... in this directory ...
82
- recurse = false,
83
- // ... whose name ends in "test"
84
- filter = function( path ) {
85
- return path.reFind( ( solution ? 'Solution' : '' ) & 'Test.cfc$' );
86
- }
87
- } )
88
- .getMemento();
89
-
90
- // Print out the results with ANSI formatting for the CLI
91
- getInstance( 'CLIRenderer@testbox-commands' )
92
- .render( print, testData, true );
93
-
94
- print.toConsole();
95
-
96
- // Set proper exit code
97
- if( testData.totalFail || testData.totalError ) {
98
- setExitCode( 1 );
99
- }
100
- }
101
-
102
- }
103
-
@@ -1,13 +0,0 @@
1
- /**
2
- * Your implmentation of the WordCount exercise
3
- */
4
- component {
5
-
6
- /**
7
- * @returns
8
- */
9
- function countwords( input ) {
10
- // Implement me here
11
- }
12
-
13
- }
@@ -1,55 +0,0 @@
1
- component extends="testbox.system.BaseSpec" {
2
-
3
- function beforeAll(){
4
- SUT = createObject( 'WordCount' );
5
- }
6
-
7
- function run(){
8
-
9
- describe( "My WordCount class", function(){
10
-
11
- it( 'count one word', function(){
12
- expect( SUT.countwords( input='word' ) ).toBe( {"word":1} );
13
- });
14
-
15
- it( 'count one of each word', function(){
16
- expect( SUT.countwords( input='one of each' ) ).toBe( {"one":1,"of":1,"each":1} );
17
- });
18
-
19
- it( 'multiple occurrences of a word', function(){
20
- expect( SUT.countwords( input='one fish two fish red fish blue fish' ) ).toBe( {"one":1,"fish":4,"two":1,"red":1,"blue":1} );
21
- });
22
-
23
- it( 'handles cramped lists', function(){
24
- expect( SUT.countwords( input='one, two, three' ) ).toBe( {"one":1,"two":1,"three":1} );
25
- });
26
-
27
- it( 'handles expanded lists', function(){
28
- expect( SUT.countwords( input='one, #chr( 10 )#two, #chr( 10 )#three' ) ).toBe( {"one":1,"two":1,"three":1} );
29
- });
30
-
31
- it( 'ignore punctuation', function(){
32
- expect( SUT.countwords( input='car: carpet as java: javascript!!&@$%^&' ) ).toBe( {"car":1,"carpet":1,"as":1,"java":1,"javascript":1} );
33
- });
34
-
35
- it( 'include numbers', function(){
36
- expect( SUT.countwords( input='testing, 1, 2 testing' ) ).toBe( {"testing":2,"1":1,"2":1} );
37
- });
38
-
39
- it( 'normalize case', function(){
40
- expect( SUT.countwords( input='go Go GO Stop stop' ) ).toBe( {"go":3,"stop":2} );
41
- });
42
-
43
- it( 'with apostrophes', function(){
44
- expect( SUT.countwords( input='First: don''t laugh. Then: don''t cry.' ) ).toBe( {"first":1,"don't":2,"laugh":1,"then":1,"cry":1} );
45
- });
46
-
47
- it( 'with quotations', function(){
48
- expect( SUT.countwords( input='Joe can''t tell between ''large'' and large.' ) ).toBe( {"joe":1,"can't":1,"tell":1,"between":1,"large":2,"and":1} );
49
- });
50
-
51
- });
52
-
53
- }
54
-
55
- }
@@ -1,8 +0,0 @@
1
- {
2
- "dependencies":{
3
- "testbox":"^2.5.0+107"
4
- },
5
- "installPaths":{
6
- "testbox":"testbox"
7
- }
8
- }
@@ -1,37 +0,0 @@
1
- <!---
2
-
3
- This file will only be used if you want to start up a web server in this directory. You can do so by running:
4
-
5
- $> box
6
- CommandBox> install
7
- CommandBox> server start
8
-
9
- However, this is not necessary unless you really just want to use the HTML reporters on TestBox.
10
- Ideally, you'll skip the need for this file entirely and just run the tests directly frm the CLI like this:
11
-
12
- CommandBox> task run TestRunner
13
-
14
- --->
15
- <cfsetting showDebugOutput="false">
16
- <cfparam name="url.reporter" default="simple">
17
- <cfscript>
18
- // get a list of all CFCs in this folder whose name looks like "XXXTest.cfc"
19
- // And turn it into compnent path relative to the web root
20
- url.bundles = directoryList(
21
- path=expandPath( '/' ),
22
- filter='*Test.cfc' )
23
- .map( function( path ) {
24
- return path
25
- .replaceNoCase( expandPath( '/' ), '' )
26
- .left( -4 )
27
- } )
28
- .toList();
29
- </cfscript>
30
-
31
- <!--- Ensure TestBox --->
32
- <cfif fileExists( "/testbox/system/runners/HTMLRunner.cfm" )>
33
- <!--- Include the TestBox HTML Runner --->
34
- <cfinclude template="/testbox/system/runners/HTMLRunner.cfm">
35
- <cfelse>
36
- Oops, you don't have TestBox installed yet! Please run <b>box install</b> from the root of your excercise folder and refresh this page.
37
- </cfif>
Binary file
@@ -1,179 +0,0 @@
1
- /**
2
- * I scaffold a new exercise from the template.
3
- */
4
- component {
5
-
6
- function run(
7
- slug,
8
- boolean all=false
9
- ) {
10
- var repoRootPath = expandPath( getDirectoryFromPath( getCurrentTemplatePath() ) & '../' );
11
- var problemSpecsPath = expandPath( getDirectoryFromPath( getCurrentTemplatePath() ) & '../../problem-specifications' );
12
-
13
- if( !directoryExists( problemSpecsPath ) ){
14
- error( 'Cannot find [problem-specifications] repo. It needs to be git cloned to [#problemSpecsPath#]' );
15
- }
16
-
17
- if( all ) {
18
-
19
- // Get an array of all the excercise names
20
- var exercises = directoryList( expandPath( getDirectoryFromPath( getCurrentTemplatePath() ) & '../exercises' ) )
21
- .map( function( path ) {
22
- return path.listLast( '/\' );
23
- } );
24
-
25
- } else {
26
-
27
- // Acquire slug
28
- if( isNull( arguments.slug ) ) {
29
- arguments.slug = ask( 'Exercise slug as defined by Excercism. Ex: "hello-world": ' );
30
- }
31
- var exercises = [ slug ];
32
-
33
- }
34
-
35
- exercises.each( function( slug ) {
36
-
37
- try {
38
-
39
- // Slug of hello-world defaults to name of HelloWorld
40
- var exerciseName = arguments.slug
41
- .listToArray( '-' )
42
- .map( function( i ){
43
- return i.left( 1 ).uCase() & i.right( -1 ).lCase();
44
- } )
45
- .toList( '' );
46
-
47
- var exercisePath = problemSpecsPath & '/exercises/' & slug;
48
- if( !directoryExists( exercisePath ) ){
49
- error( 'Cannot find exercise [#slug#] in problem-specifications repo. Tests not generated.' );
50
- }
51
-
52
- var canonicalDataPath = exercisePath & '/canonical-data.json';
53
- if( !fileExists( canonicalDataPath ) ){
54
- error( 'Cannot find [canonical-data.json] for this slug. No tests will be generated' );
55
- }
56
-
57
- var canonicalData = deserializeJSON( fileRead( canonicalDataPath ) );
58
- var testCases = generateCases( canonicalData.cases );
59
-
60
- var testStub = fileRead( repoRootPath & '/tasks/exercise_template/@@name@@Test.cfc' );
61
- testStub = testStub.replace( '@@name@@', exerciseName, 'all' );
62
- testStub = testStub.replace( '@@testCases@@', testCases, 'all' );
63
- var targetExercisePath = repoRootPath & 'exercises/' & slug;
64
- var newTestPath = targetExercisePath & '/' & exerciseName & 'Test.cfc';
65
-
66
- if( !directoryExists( targetExercisePath ) ) {
67
- error( 'Target exercise does not exist! [#targetExercisePath#]' );
68
- }
69
-
70
- fileWrite( newTestPath, testStub );
71
-
72
- print.greenLine( 'Test generated!' )
73
- .indentedYellowLine( newTestPath )
74
- .toConsole();
75
- } catch( 'commandException' var e ) {
76
- print.boldRedLine( e.message )
77
- .line();
78
- }
79
-
80
- } ); // End exercises.each()
81
- }
82
-
83
- private function generateCases( cases, level=1 ) {
84
- var CRLF = chr( 13 ) & chr( 10 );
85
- var testCases = ''
86
-
87
- cases.each( function( case ) {
88
-
89
- // Nested spec
90
- if( case.keyExists( 'cases' ) ) {
91
-
92
- testCases &= "#CRLF##repeatString( chr( 9 ), level )# describe( #generateDescription( case.description )#, function(){
93
- #generateCases( case.cases, level+1 )#
94
- #repeatString( chr( 9 ), level )# });#CRLF#";
95
-
96
- } else {
97
- case.expected = case.expected ?: '__NULL__';
98
- // Don't adjust whitespace
99
- testCases &= "#CRLF##repeatString( chr( 9 ), level )# it( #generateDescription( case.description )#, function(){#CRLF#";
100
- // Special check for when error should be tested
101
- if( isStruct( case.expected ) && case.expected.keyExists( 'error' ) ) {
102
- testCases &= "#repeatString( chr( 9 ), level )# expect( function(){ SUT.#case.property#(#generateInput( case )#); } ).#generateExpectation( case.expected )#;#CRLF#";
103
- // "normal" expectation
104
- } else {
105
- testCases &= "#repeatString( chr( 9 ), level )# expect( SUT.#case.property#(#generateInput( case )#) ).#generateExpectation( case.expected )#;#CRLF#";
106
- }
107
- testCases &= "#repeatString( chr( 9 ), level )# });#CRLF#";
108
- }
109
-
110
- } );
111
-
112
- return testCases;
113
- }
114
-
115
- private function generateDescription( description ) {
116
- return escapeString( description );
117
- }
118
-
119
- private function generateInput( case ) {
120
- var thisInput = '';
121
- for( var key in case ) {
122
- if( !listFindNoCase( 'description,property,expected,cases,comments', key ) && !isNull( case[ key ] ) ) {
123
- thisInput = thisInput.listAppend( "#key#=#escapeString( case[ key ] )#" );
124
- }
125
- }
126
- if( thisInput.len() ) {
127
- return ' ' & thisInput.listChangeDelims( ', ', ',' ) & ' ';
128
- } else {
129
- return thisInput;
130
- }
131
- }
132
-
133
- private function generateExpectation( expected ) {
134
- if( isSimpleValue( expected ) && compareNoCase( expected, 'true' ) == 0 ) {
135
- return 'toBeTrue()';
136
- } else if( isSimpleValue( expected ) && compareNoCase( expected, 'false' ) == 0 ) {
137
- return 'toBeFalse()';
138
- } else if( isSimpleValue( expected) && expected == '__NULL__' ) {
139
- return 'toBeNull()';
140
- } else if( isStruct( expected ) && expected.keyExists( 'error' ) ) {
141
- return 'toThrow( message=#escapeString( expected.error )# )';
142
- } else {
143
- return "toBe( #escapeString( expected )# )";
144
- }
145
-
146
- }
147
-
148
- private function escapeString( myString ) {
149
- if( isSimpleValue( myString ) ) {
150
- myString = replace( myString, "'", "''", "all" );
151
- myString = replace( myString, '##', '####', 'all' );
152
- myString = replace( myString, chr( 13 ), '##chr( 13 )##', 'all' );
153
- myString = replace( myString, chr( 10 ), '##chr( 10 )##', 'all' );
154
- return "'" & myString & "'";
155
- } else {
156
- return convertJSONEscapesToCFML( serializeJSON( myString ) );
157
- }
158
- }
159
-
160
-
161
- // A complex value serialized as JSON differs from CFML struct literals in that
162
- // double quotes are \" instead of "". Any escaped double quotes must be converted
163
- // to the CFML version to work as an object literal.
164
- private function convertJSONEscapesToCFML( required string arg ) {
165
- arguments.arg = replaceNoCase( arguments.arg, '\\', '__double_backslash_', 'all' );
166
- arguments.arg = replaceNoCase( arguments.arg, '\/', '/', 'all' );
167
- arguments.arg = replaceNoCase( arguments.arg, '\"', '""', 'all' );
168
- arguments.arg = replaceNoCase( arguments.arg, '\t', ' ', 'all' );
169
- arguments.arg = replaceNoCase( arguments.arg, '\n', chr(13)&chr(10), 'all' );
170
- arguments.arg = replaceNoCase( arguments.arg, '\r', chr(13), 'all' );
171
- arguments.arg = replaceNoCase( arguments.arg, '\f', chr(12), 'all' );
172
- arguments.arg = replaceNoCase( arguments.arg, '\b', chr(8), 'all' );
173
- // This doesn't work-- I'd need to do it in a loop and replace each one individually. Meh...
174
- // arguments.arg = reReplaceNoCase( arguments.arg, '\\u([0-9a-f]{4})', chr( inputBaseN( '\1', 16 ) ), 'all' );
175
- arguments.arg = replaceNoCase( arguments.arg, '__double_backslash_', '\', 'all' );
176
- return arguments.arg;
177
- }
178
-
179
- }