trackler 2.2.1.59 → 2.2.1.60

Sign up to get free protection for your applications and to get access to all the features.
Files changed (234) hide show
  1. checksums.yaml +4 -4
  2. data/lib/trackler/version.rb +1 -1
  3. data/problem-specifications/exercises/food-chain/canonical-data.json +31 -23
  4. data/problem-specifications/exercises/house/canonical-data.json +45 -33
  5. data/problem-specifications/exercises/house/description.md +1 -1
  6. data/problem-specifications/exercises/kindergarten-garden/description.md +3 -3
  7. data/problem-specifications/exercises/nucleotide-count/description.md +2 -2
  8. data/problem-specifications/exercises/palindrome-products/description.md +1 -1
  9. data/problem-specifications/exercises/rectangles/description.md +9 -9
  10. data/problem-specifications/exercises/twelve-days/canonical-data.json +171 -0
  11. data/problem-specifications/exercises/two-bucket/description.md +7 -7
  12. data/tracks/c/docs/CONTRIBUTING.md +88 -39
  13. data/tracks/c/exercises/phone-number/test/test_phone_number.c +33 -29
  14. data/tracks/c/exercises/triangle/src/example.c +12 -12
  15. data/tracks/c/exercises/triangle/src/example.h +3 -3
  16. data/tracks/c/exercises/triangle/test/test_triangle.c +16 -16
  17. data/tracks/c/exercises/word-count/src/example.c +12 -3
  18. data/tracks/c/exercises/word-count/src/word_count.h +10 -5
  19. data/tracks/c/exercises/word-count/test/test_word_count.c +248 -58
  20. data/tracks/ceylon/exercises/hamming/source/hamming/HammingTest.ceylon +3 -3
  21. data/tracks/ceylon/exercises/leap/source/leap/LeapTest.ceylon +2 -2
  22. data/tracks/dart/exercises/phone-number/README.md +1 -1
  23. data/tracks/dart/exercises/phone-number/test/phone_number_test.dart +5 -5
  24. data/tracks/gnu-apl/.dockerignore +5 -0
  25. data/tracks/gnu-apl/.travis.yml +9 -4
  26. data/tracks/gnu-apl/Dockerfiles/release.dockerfile +15 -0
  27. data/tracks/gnu-apl/Dockerfiles/svn.dockerfile +22 -0
  28. data/tracks/gnu-apl/README.md +1 -1
  29. data/tracks/gnu-apl/bin/install-apl +26 -0
  30. data/tracks/gnu-apl/test.apl +7 -6
  31. data/tracks/go/docs/TESTS.md +1 -1
  32. data/tracks/haskell/.travis.yml +1 -1
  33. data/tracks/haskell/config.json +9 -0
  34. data/tracks/haskell/exercises/accumulate/stack.yaml +1 -1
  35. data/tracks/haskell/exercises/acronym/package.yaml +1 -1
  36. data/tracks/haskell/exercises/acronym/stack.yaml +1 -1
  37. data/tracks/haskell/exercises/acronym/test/Tests.hs +3 -0
  38. data/tracks/haskell/exercises/all-your-base/stack.yaml +1 -1
  39. data/tracks/haskell/exercises/allergies/stack.yaml +1 -1
  40. data/tracks/haskell/exercises/alphametics/examples/success-standard/src/Alphametics.hs +2 -1
  41. data/tracks/haskell/exercises/alphametics/stack.yaml +1 -1
  42. data/tracks/haskell/exercises/anagram/stack.yaml +1 -1
  43. data/tracks/haskell/exercises/atbash-cipher/stack.yaml +1 -1
  44. data/tracks/haskell/exercises/bank-account/stack.yaml +1 -1
  45. data/tracks/haskell/exercises/beer-song/stack.yaml +1 -1
  46. data/tracks/haskell/exercises/binary-search-tree/stack.yaml +1 -1
  47. data/tracks/haskell/exercises/binary/stack.yaml +1 -1
  48. data/tracks/haskell/exercises/bob/stack.yaml +1 -1
  49. data/tracks/haskell/exercises/bowling/stack.yaml +1 -1
  50. data/tracks/haskell/exercises/bracket-push/stack.yaml +1 -1
  51. data/tracks/haskell/exercises/change/stack.yaml +1 -1
  52. data/tracks/haskell/exercises/clock/stack.yaml +1 -1
  53. data/tracks/haskell/exercises/collatz-conjecture/stack.yaml +1 -1
  54. data/tracks/haskell/exercises/complex-numbers/stack.yaml +1 -1
  55. data/tracks/haskell/exercises/connect/stack.yaml +1 -1
  56. data/tracks/haskell/exercises/crypto-square/package.yaml +1 -1
  57. data/tracks/haskell/exercises/crypto-square/stack.yaml +1 -1
  58. data/tracks/haskell/exercises/crypto-square/test/Tests.hs +9 -5
  59. data/tracks/haskell/exercises/custom-set/package.yaml +1 -1
  60. data/tracks/haskell/exercises/custom-set/stack.yaml +1 -1
  61. data/tracks/haskell/exercises/custom-set/test/Tests.hs +3 -0
  62. data/tracks/haskell/exercises/diamond/stack.yaml +1 -1
  63. data/tracks/haskell/exercises/difference-of-squares/stack.yaml +1 -1
  64. data/tracks/haskell/exercises/dominoes/README.md +3 -3
  65. data/tracks/haskell/exercises/dominoes/stack.yaml +1 -1
  66. data/tracks/haskell/exercises/etl/stack.yaml +1 -1
  67. data/tracks/haskell/exercises/food-chain/stack.yaml +1 -1
  68. data/tracks/haskell/exercises/forth/stack.yaml +1 -1
  69. data/tracks/haskell/exercises/gigasecond/stack.yaml +1 -1
  70. data/tracks/haskell/exercises/go-counting/stack.yaml +1 -1
  71. data/tracks/haskell/exercises/grade-school/stack.yaml +1 -1
  72. data/tracks/haskell/exercises/grains/stack.yaml +1 -1
  73. data/tracks/haskell/exercises/hamming/package.yaml +1 -1
  74. data/tracks/haskell/exercises/hamming/stack.yaml +1 -1
  75. data/tracks/haskell/exercises/hamming/test/Tests.hs +4 -4
  76. data/tracks/haskell/exercises/hello-world/stack.yaml +1 -1
  77. data/tracks/haskell/exercises/hexadecimal/stack.yaml +1 -1
  78. data/tracks/haskell/exercises/house/README.md +1 -1
  79. data/tracks/haskell/exercises/house/stack.yaml +1 -1
  80. data/tracks/haskell/exercises/isbn-verifier/README.md +96 -0
  81. data/tracks/haskell/exercises/isbn-verifier/examples/success-standard/package.yaml +16 -0
  82. data/tracks/haskell/exercises/isbn-verifier/examples/success-standard/src/IsbnVerifier.hs +10 -0
  83. data/tracks/haskell/exercises/isbn-verifier/package.yaml +20 -0
  84. data/tracks/haskell/exercises/isbn-verifier/src/IsbnVerifier.hs +4 -0
  85. data/tracks/haskell/exercises/isbn-verifier/stack.yaml +1 -0
  86. data/tracks/haskell/exercises/isbn-verifier/test/Tests.hs +74 -0
  87. data/tracks/haskell/exercises/isogram/stack.yaml +1 -1
  88. data/tracks/haskell/exercises/kindergarten-garden/README.md +3 -3
  89. data/tracks/haskell/exercises/kindergarten-garden/stack.yaml +1 -1
  90. data/tracks/haskell/exercises/largest-series-product/stack.yaml +1 -1
  91. data/tracks/haskell/exercises/leap/package.yaml +1 -1
  92. data/tracks/haskell/exercises/leap/stack.yaml +1 -1
  93. data/tracks/haskell/exercises/leap/test/Tests.hs +1 -1
  94. data/tracks/haskell/exercises/lens-person/stack.yaml +1 -1
  95. data/tracks/haskell/exercises/linked-list/stack.yaml +1 -1
  96. data/tracks/haskell/exercises/list-ops/stack.yaml +1 -1
  97. data/tracks/haskell/exercises/luhn/stack.yaml +1 -1
  98. data/tracks/haskell/exercises/matrix/stack.yaml +1 -1
  99. data/tracks/haskell/exercises/meetup/stack.yaml +1 -1
  100. data/tracks/haskell/exercises/minesweeper/stack.yaml +1 -1
  101. data/tracks/haskell/exercises/nth-prime/package.yaml +1 -1
  102. data/tracks/haskell/exercises/nth-prime/stack.yaml +1 -1
  103. data/tracks/haskell/exercises/nucleotide-count/README.md +2 -2
  104. data/tracks/haskell/exercises/nucleotide-count/package.yaml +1 -1
  105. data/tracks/haskell/exercises/nucleotide-count/stack.yaml +1 -1
  106. data/tracks/haskell/exercises/nucleotide-count/test/Tests.hs +6 -0
  107. data/tracks/haskell/exercises/ocr-numbers/stack.yaml +1 -1
  108. data/tracks/haskell/exercises/octal/stack.yaml +1 -1
  109. data/tracks/haskell/exercises/palindrome-products/README.md +1 -1
  110. data/tracks/haskell/exercises/palindrome-products/stack.yaml +1 -1
  111. data/tracks/haskell/exercises/pangram/package.yaml +1 -1
  112. data/tracks/haskell/exercises/pangram/stack.yaml +1 -1
  113. data/tracks/haskell/exercises/pangram/test/Tests.hs +6 -2
  114. data/tracks/haskell/exercises/parallel-letter-frequency/stack.yaml +1 -1
  115. data/tracks/haskell/exercises/pascals-triangle/stack.yaml +1 -1
  116. data/tracks/haskell/exercises/perfect-numbers/stack.yaml +1 -1
  117. data/tracks/haskell/exercises/phone-number/README.md +1 -1
  118. data/tracks/haskell/exercises/phone-number/stack.yaml +1 -1
  119. data/tracks/haskell/exercises/pig-latin/stack.yaml +1 -1
  120. data/tracks/haskell/exercises/pov/stack.yaml +1 -1
  121. data/tracks/haskell/exercises/prime-factors/stack.yaml +1 -1
  122. data/tracks/haskell/exercises/pythagorean-triplet/stack.yaml +1 -1
  123. data/tracks/haskell/exercises/queen-attack/stack.yaml +1 -1
  124. data/tracks/haskell/exercises/raindrops/stack.yaml +1 -1
  125. data/tracks/haskell/exercises/rna-transcription/stack.yaml +1 -1
  126. data/tracks/haskell/exercises/robot-name/stack.yaml +1 -1
  127. data/tracks/haskell/exercises/robot-simulator/stack.yaml +1 -1
  128. data/tracks/haskell/exercises/roman-numerals/stack.yaml +1 -1
  129. data/tracks/haskell/exercises/rotational-cipher/stack.yaml +1 -1
  130. data/tracks/haskell/exercises/run-length-encoding/stack.yaml +1 -1
  131. data/tracks/haskell/exercises/saddle-points/stack.yaml +1 -1
  132. data/tracks/haskell/exercises/say/stack.yaml +1 -1
  133. data/tracks/haskell/exercises/scrabble-score/stack.yaml +1 -1
  134. data/tracks/haskell/exercises/secret-handshake/stack.yaml +1 -1
  135. data/tracks/haskell/exercises/series/stack.yaml +1 -1
  136. data/tracks/haskell/exercises/sgf-parsing/stack.yaml +1 -1
  137. data/tracks/haskell/exercises/sieve/stack.yaml +1 -1
  138. data/tracks/haskell/exercises/simple-cipher/stack.yaml +1 -1
  139. data/tracks/haskell/exercises/simple-linked-list/stack.yaml +1 -1
  140. data/tracks/haskell/exercises/space-age/stack.yaml +1 -1
  141. data/tracks/haskell/exercises/spiral-matrix/stack.yaml +1 -1
  142. data/tracks/haskell/exercises/strain/stack.yaml +1 -1
  143. data/tracks/haskell/exercises/sublist/stack.yaml +1 -1
  144. data/tracks/haskell/exercises/sum-of-multiples/stack.yaml +1 -1
  145. data/tracks/haskell/exercises/triangle/stack.yaml +1 -1
  146. data/tracks/haskell/exercises/trinary/stack.yaml +1 -1
  147. data/tracks/haskell/exercises/word-count/stack.yaml +1 -1
  148. data/tracks/haskell/exercises/wordy/examples/success-standard/src/WordProblem.hs +6 -5
  149. data/tracks/haskell/exercises/wordy/stack.yaml +1 -1
  150. data/tracks/haskell/exercises/zebra-puzzle/package.yaml +1 -1
  151. data/tracks/haskell/exercises/zebra-puzzle/stack.yaml +1 -1
  152. data/tracks/haskell/exercises/zipper/README.md +1 -1
  153. data/tracks/haskell/exercises/zipper/stack.yaml +1 -1
  154. data/tracks/javascript/.eslintignore +43 -0
  155. data/tracks/javascript/.travis.yml +2 -1
  156. data/tracks/javascript/exercises/bowling/README.md +5 -5
  157. data/tracks/javascript/exercises/crypto-square/example.js +2 -1
  158. data/tracks/javascript/exercises/diffie-hellman/diffie-hellman.spec.js +20 -20
  159. data/tracks/javascript/exercises/diffie-hellman/example.js +10 -10
  160. data/tracks/javascript/exercises/largest-series-product/example.js +2 -1
  161. data/tracks/javascript/exercises/sieve/example.js +5 -2
  162. data/tracks/javascript/package-lock.json +129 -76
  163. data/tracks/javascript/package.json +6 -5
  164. data/tracks/ocaml/config.json +10 -0
  165. data/tracks/ocaml/exercises/hamming/test.ml +3 -3
  166. data/tracks/ocaml/exercises/leap/test.ml +2 -2
  167. data/tracks/ocaml/exercises/pangram/test.ml +3 -3
  168. data/tracks/ocaml/exercises/rectangles/.merlin +5 -0
  169. data/tracks/ocaml/exercises/rectangles/Makefile +11 -0
  170. data/tracks/ocaml/exercises/rectangles/example.ml +30 -0
  171. data/tracks/ocaml/exercises/rectangles/rectangles.mli +1 -0
  172. data/tracks/ocaml/exercises/rectangles/test.ml +72 -0
  173. data/tracks/ocaml/tools/test-generator/templates/ocaml/leap/test.ml +1 -1
  174. data/tracks/ocaml/tools/test-generator/templates/ocaml/rectangles/test.ml +15 -0
  175. data/tracks/pony/README.md +1 -1
  176. data/tracks/pony/exercises/atbash-cipher/example.pony +6 -10
  177. data/tracks/pony/exercises/difference-of-squares/example.pony +3 -7
  178. data/tracks/rust/_test/count-ignores.sh +2 -2
  179. data/tracks/rust/config.json +24 -0
  180. data/tracks/rust/config/maintainers.json +10 -0
  181. data/tracks/rust/exercises/acronym/README.md +0 -1
  182. data/tracks/rust/exercises/all-your-base/README.md +1 -1
  183. data/tracks/rust/exercises/allergies/README.md +0 -1
  184. data/tracks/rust/exercises/alphametics/README.md +2 -2
  185. data/tracks/rust/exercises/atbash-cipher/README.md +2 -1
  186. data/tracks/rust/exercises/beer-song/README.md +1 -1
  187. data/tracks/rust/exercises/bowling/README.md +20 -6
  188. data/tracks/rust/exercises/circular-buffer/README.md +13 -6
  189. data/tracks/rust/exercises/crypto-square/README.md +10 -8
  190. data/tracks/rust/exercises/dominoes/Cargo.toml +1 -1
  191. data/tracks/rust/exercises/etl/README.md +2 -0
  192. data/tracks/rust/exercises/grade-school/README.md +0 -1
  193. data/tracks/rust/exercises/grains/README.md +0 -1
  194. data/tracks/rust/exercises/isbn-verifier/Cargo.lock +4 -0
  195. data/tracks/rust/exercises/isbn-verifier/Cargo.toml +3 -0
  196. data/tracks/rust/exercises/isbn-verifier/README.md +74 -0
  197. data/tracks/rust/exercises/isbn-verifier/example.rs +44 -0
  198. data/tracks/rust/exercises/isbn-verifier/src/lib.rs +4 -0
  199. data/tracks/rust/exercises/isbn-verifier/tests/isbn-verifier.rs +83 -0
  200. data/tracks/rust/exercises/isogram/README.md +3 -2
  201. data/tracks/rust/exercises/leap/README.md +1 -1
  202. data/tracks/rust/exercises/luhn/README.md +7 -7
  203. data/tracks/rust/exercises/nucleotide-count/README.md +8 -22
  204. data/tracks/rust/exercises/ocr-numbers/README.md +5 -5
  205. data/tracks/rust/exercises/pangram/README.md +1 -1
  206. data/tracks/rust/exercises/pascals-triangle/README.md +1 -1
  207. data/tracks/rust/exercises/perfect-numbers/README.md +2 -2
  208. data/tracks/rust/exercises/phone-number/README.md +3 -2
  209. data/tracks/rust/exercises/protein-translation/README.md +4 -5
  210. data/tracks/rust/exercises/proverb/README.md +13 -11
  211. data/tracks/rust/exercises/proverb/example.rs +14 -15
  212. data/tracks/rust/exercises/proverb/tests/proverb.rs +40 -13
  213. data/tracks/rust/exercises/pythagorean-triplet/README.md +3 -3
  214. data/tracks/rust/exercises/queen-attack/README.md +1 -1
  215. data/tracks/rust/exercises/rectangles/README.md +7 -7
  216. data/tracks/rust/exercises/roman-numerals/README.md +1 -1
  217. data/tracks/rust/exercises/rotational-cipher/README.md +2 -1
  218. data/tracks/rust/exercises/run-length-encoding/README.md +4 -4
  219. data/tracks/rust/exercises/scrabble-score/README.md +3 -1
  220. data/tracks/rust/exercises/space-age/README.md +1 -1
  221. data/tracks/rust/exercises/tournament/README.md +5 -5
  222. data/tracks/rust/exercises/triangle/README.md +9 -6
  223. data/tracks/rust/exercises/two-bucket/Cargo.lock +4 -0
  224. data/tracks/rust/exercises/two-bucket/Cargo.toml +3 -0
  225. data/tracks/rust/exercises/two-bucket/README.md +69 -0
  226. data/tracks/rust/exercises/two-bucket/example.rs +129 -0
  227. data/tracks/rust/exercises/two-bucket/src/lib.rs +26 -0
  228. data/tracks/rust/exercises/two-bucket/tests/two-bucket.rs +68 -0
  229. data/tracks/rust/exercises/variable-length-quantity/README.md +6 -7
  230. data/tracks/rust/exercises/word-count/README.md +1 -2
  231. data/tracks/rust/exercises/wordy/README.md +0 -5
  232. metadata +33 -4
  233. data/tracks/go/.github/PULL_REQUEST_TEMPLATE.md +0 -23
  234. data/tracks/ruby/.github/PULL_REQUEST_TEMPLATE.md +0 -40
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ed67c6391790bb62b8a9b5d6aafee1d403f8bd34
4
- data.tar.gz: 415063bcd0265caa42ae9ba5c03d4fd13004b8e2
3
+ metadata.gz: 9cec9f8c559485824d5d57d0b2578336f601e776
4
+ data.tar.gz: 6f588d3e3c6d3e226246f73d66a5c6d0e09ae2d6
5
5
  SHA512:
6
- metadata.gz: 261c39ecf0b278418a1df105613968e7f5761f939e13faabc30aca95e4499847caf64165936348b7a369bb6252366851c2168ec1358c35bb32bb608fa1b55fec
7
- data.tar.gz: fcd9d3385a1629daf5294a467872046ea879d1ccf8e2c2e6176dfff322f44bc33872c7e961f8c10d8070108fd509326647cc8f39687c729faa1ff8ac3f4a4e9b
6
+ metadata.gz: 73a6ff50cf53e5e4d7d64a589690482c0179f8196a7d54abbd686b78e53f82d22eaaaffa329687a03044504f44e6cac34b9b2d4810e37777b210b19e021b3cf7
7
+ data.tar.gz: 81bced17971429b32a39df39099f8eefd6ad069604b23373a49b0710583bb01530ef5e5ceac1546096961eb8bcbfdee5d567da844edb7889473a9a2b99e99b90
@@ -1,3 +1,3 @@
1
1
  module Trackler
2
- VERSION = "2.2.1.59"
2
+ VERSION = "2.2.1.60"
3
3
  end
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "exercise": "food-chain",
3
- "version": "1.0.0",
3
+ "version": "2.0.0",
4
4
  "comments": [
5
5
  "JSON doesn't allow for multi-line strings, so all verses are presented ",
6
6
  "here as arrays of strings. It's up to the test generator to join the ",
@@ -17,8 +17,9 @@
17
17
  "cases": [
18
18
  {
19
19
  "description": "fly",
20
- "property": "verse",
21
- "start verse": 1,
20
+ "property": "recite",
21
+ "startVerse": 1,
22
+ "endVerse": 1,
22
23
  "expected": [
23
24
  "I know an old lady who swallowed a fly.",
24
25
  "I don't know why she swallowed the fly. Perhaps she'll die."
@@ -26,8 +27,9 @@
26
27
  },
27
28
  {
28
29
  "description": "spider",
29
- "property": "verse",
30
- "start verse": 2,
30
+ "property": "recite",
31
+ "startVerse": 2,
32
+ "endVerse": 2,
31
33
  "expected": [
32
34
  "I know an old lady who swallowed a spider.",
33
35
  "It wriggled and jiggled and tickled inside her.",
@@ -37,8 +39,9 @@
37
39
  },
38
40
  {
39
41
  "description": "bird",
40
- "property": "verse",
41
- "start verse": 3,
42
+ "property": "recite",
43
+ "startVerse": 3,
44
+ "endVerse": 3,
42
45
  "expected": [
43
46
  "I know an old lady who swallowed a bird.",
44
47
  "How absurd to swallow a bird!",
@@ -49,8 +52,9 @@
49
52
  },
50
53
  {
51
54
  "description": "cat",
52
- "property": "verse",
53
- "start verse": 4,
55
+ "property": "recite",
56
+ "startVerse": 4,
57
+ "endVerse": 4,
54
58
  "expected": [
55
59
  "I know an old lady who swallowed a cat.",
56
60
  "Imagine that, to swallow a cat!",
@@ -62,8 +66,9 @@
62
66
  },
63
67
  {
64
68
  "description": "dog",
65
- "property": "verse",
66
- "start verse": 5,
69
+ "property": "recite",
70
+ "startVerse": 5,
71
+ "endVerse": 5,
67
72
  "expected": [
68
73
  "I know an old lady who swallowed a dog.",
69
74
  "What a hog, to swallow a dog!",
@@ -76,8 +81,9 @@
76
81
  },
77
82
  {
78
83
  "description": "goat",
79
- "property": "verse",
80
- "start verse": 6,
84
+ "property": "recite",
85
+ "startVerse": 6,
86
+ "endVerse": 6,
81
87
  "expected": [
82
88
  "I know an old lady who swallowed a goat.",
83
89
  "Just opened her throat and swallowed a goat!",
@@ -91,8 +97,9 @@
91
97
  },
92
98
  {
93
99
  "description": "cow",
94
- "property": "verse",
95
- "start verse": 7,
100
+ "property": "recite",
101
+ "startVerse": 7,
102
+ "endVerse": 7,
96
103
  "expected": [
97
104
  "I know an old lady who swallowed a cow.",
98
105
  "I don't know how she swallowed a cow!",
@@ -107,8 +114,9 @@
107
114
  },
108
115
  {
109
116
  "description": "horse",
110
- "property": "verse",
111
- "start verse": 8,
117
+ "property": "recite",
118
+ "startVerse": 8,
119
+ "endVerse": 8,
112
120
  "expected": [
113
121
  "I know an old lady who swallowed a horse.",
114
122
  "She's dead, of course!"
@@ -116,9 +124,9 @@
116
124
  },
117
125
  {
118
126
  "description": "multiple verses",
119
- "property": "verse",
120
- "start verse": 1,
121
- "end verse": 3,
127
+ "property": "recite",
128
+ "startVerse": 1,
129
+ "endVerse": 3,
122
130
  "expected": [
123
131
  "I know an old lady who swallowed a fly.",
124
132
  "I don't know why she swallowed the fly. Perhaps she'll die.",
@@ -137,9 +145,9 @@
137
145
  },
138
146
  {
139
147
  "description": "full song",
140
- "property": "verse",
141
- "start verse": 1,
142
- "end verse": 8,
148
+ "property": "recite",
149
+ "startVerse": 1,
150
+ "endVerse": 8,
143
151
  "expected": [
144
152
  "I know an old lady who swallowed a fly.",
145
153
  "I don't know why she swallowed the fly. Perhaps she'll die.",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "exercise": "house",
3
- "version": "1.0.0",
3
+ "version": "2.0.0",
4
4
  "comments": [
5
5
  "JSON doesn't allow for multi-line strings, so all verses are presented ",
6
6
  "here as arrays of strings. It's up to the test generator to join the ",
@@ -8,8 +8,8 @@
8
8
  "Some languages test for the verse() method, which takes a start verse ",
9
9
  "and optional end verse, but other languages have only tested for the full poem.",
10
10
  "For those languages in the latter category, you may wish to only ",
11
- "implement the full song test and leave the rest alone, ignoring the start verse, ",
12
- "end verse, and verse fields."
11
+ "implement the full song test and leave the rest alone, ignoring the startVerse ",
12
+ "and endVerse fields."
13
13
  ],
14
14
  "cases": [
15
15
  {
@@ -17,16 +17,18 @@
17
17
  "cases": [
18
18
  {
19
19
  "description": "verse one - the house that jack built",
20
- "property": "verse",
21
- "verse": 1,
20
+ "property": "recite",
21
+ "startVerse": 1,
22
+ "endVerse": 1,
22
23
  "expected": [
23
24
  "This is the house that Jack built."
24
25
  ]
25
26
  },
26
27
  {
27
28
  "description": "verse two - the malt that lay",
28
- "property": "verse",
29
- "verse": 2,
29
+ "property": "recite",
30
+ "startVerse": 2,
31
+ "endVerse": 2,
30
32
  "expected": [
31
33
  "This is the malt",
32
34
  "that lay in the house that Jack built."
@@ -34,8 +36,9 @@
34
36
  },
35
37
  {
36
38
  "description": "verse three - the rat that ate",
37
- "property": "verse",
38
- "verse": 3,
39
+ "property": "recite",
40
+ "startVerse": 3,
41
+ "endVerse": 3,
39
42
  "expected": [
40
43
  "This is the rat",
41
44
  "that ate the malt",
@@ -44,8 +47,9 @@
44
47
  },
45
48
  {
46
49
  "description": "verse four - the cat that killed",
47
- "property": "verse",
48
- "verse": 4,
50
+ "property": "recite",
51
+ "startVerse": 4,
52
+ "endVerse": 4,
49
53
  "expected": [
50
54
  "This is the cat",
51
55
  "that killed the rat",
@@ -55,8 +59,9 @@
55
59
  },
56
60
  {
57
61
  "description": "verse five - the dog that worried",
58
- "property": "verse",
59
- "verse": 5,
62
+ "property": "recite",
63
+ "startVerse": 5,
64
+ "endVerse": 5,
60
65
  "expected": [
61
66
  "This is the dog",
62
67
  "that worried the cat",
@@ -67,8 +72,9 @@
67
72
  },
68
73
  {
69
74
  "description": "verse six - the cow with the crumpled horn",
70
- "property": "verse",
71
- "verse": 6,
75
+ "property": "recite",
76
+ "startVerse": 6,
77
+ "endVerse": 6,
72
78
  "expected": [
73
79
  "This is the cow with the crumpled horn",
74
80
  "that tossed the dog",
@@ -80,8 +86,9 @@
80
86
  },
81
87
  {
82
88
  "description": "verse seven - the maiden all forlorn",
83
- "property": "verse",
84
- "verse": 7,
89
+ "property": "recite",
90
+ "startVerse": 7,
91
+ "endVerse": 7,
85
92
  "expected": [
86
93
  "This is the maiden all forlorn",
87
94
  "that milked the cow with the crumpled horn",
@@ -94,8 +101,9 @@
94
101
  },
95
102
  {
96
103
  "description": "verse eight - the man all tattered and torn",
97
- "property": "verse",
98
- "verse": 8,
104
+ "property": "recite",
105
+ "startVerse": 8,
106
+ "endVerse": 8,
99
107
  "expected": [
100
108
  "This is the man all tattered and torn",
101
109
  "that kissed the maiden all forlorn",
@@ -109,8 +117,9 @@
109
117
  },
110
118
  {
111
119
  "description": "verse nine - the priest all shaven and shorn",
112
- "property": "verse",
113
- "verse": 9,
120
+ "property": "recite",
121
+ "startVerse": 9,
122
+ "endVerse": 9,
114
123
  "expected": [
115
124
  "This is the priest all shaven and shorn",
116
125
  "that married the man all tattered and torn",
@@ -125,8 +134,9 @@
125
134
  },
126
135
  {
127
136
  "description": "verse 10 - the rooster that crowed in the morn",
128
- "property": "verse",
129
- "verse": 10,
137
+ "property": "recite",
138
+ "startVerse": 10,
139
+ "endVerse": 10,
130
140
  "expected": [
131
141
  "This is the rooster that crowed in the morn",
132
142
  "that woke the priest all shaven and shorn",
@@ -142,8 +152,9 @@
142
152
  },
143
153
  {
144
154
  "description": "verse 11 - the farmer sowing his corn",
145
- "property": "verse",
146
- "verse": 11,
155
+ "property": "recite",
156
+ "startVerse": 11,
157
+ "endVerse": 11,
147
158
  "expected": [
148
159
  "This is the farmer sowing his corn",
149
160
  "that kept the rooster that crowed in the morn",
@@ -160,8 +171,9 @@
160
171
  },
161
172
  {
162
173
  "description": "verse 12 - the horse and the hound and the horn",
163
- "property": "verse",
164
- "verse": 12,
174
+ "property": "recite",
175
+ "startVerse": 12,
176
+ "endVerse": 12,
165
177
  "expected": [
166
178
  "This is the horse and the hound and the horn",
167
179
  "that belonged to the farmer sowing his corn",
@@ -179,9 +191,9 @@
179
191
  },
180
192
  {
181
193
  "description": "multiple verses",
182
- "property": "verses",
183
- "start verse": 4,
184
- "end verse": 8,
194
+ "property": "recite",
195
+ "startVerse": 4,
196
+ "endVerse": 8,
185
197
  "expected": [
186
198
  "This is the cat",
187
199
  "that killed the rat",
@@ -221,9 +233,9 @@
221
233
  },
222
234
  {
223
235
  "description": "full rhyme",
224
- "property": "verses",
225
- "start verse": 1,
226
- "end verse": 12,
236
+ "property": "recite",
237
+ "startVerse": 1,
238
+ "endVerse": 12,
227
239
  "expected": [
228
240
  "This is the house that Jack built.",
229
241
  "",
@@ -1,4 +1,4 @@
1
- Output the nursery rhyme 'This is the House that Jack Built'.
1
+ Recite the nursery rhyme 'This is the House that Jack Built'.
2
2
 
3
3
  > [The] process of placing a phrase of clause within another phrase of
4
4
  > clause is called embedding. It is through the processes of recursion
@@ -7,8 +7,8 @@ actual dirt, and grow actual plants.
7
7
 
8
8
  They've chosen to grow grass, clover, radishes, and violets.
9
9
 
10
- To this end, the children have put little cups along the window sills, and
11
- planted one type of plant in each cup, choosing randomly from the available
10
+ To this end, the children have put little cups along the window sills, and
11
+ planted one type of plant in each cup, choosing randomly from the available
12
12
  types of seeds.
13
13
 
14
14
  ```text
@@ -23,7 +23,7 @@ There are 12 children in the class:
23
23
  - Eve, Fred, Ginny, Harriet,
24
24
  - Ileana, Joseph, Kincaid, and Larry.
25
25
 
26
- Each child gets 4 cups, two on each row. Their teacher assigns cups to
26
+ Each child gets 4 cups, two on each row. Their teacher assigns cups to
27
27
  the children alphabetically by their names.
28
28
 
29
29
  The following diagram represents Alice's plants:
@@ -1,7 +1,7 @@
1
1
  Given a single stranded DNA string, compute how many times each nucleotide occurs in the string.
2
2
 
3
- The genetic language of every living thing on the planet is DNA.
4
- DNA is a large molecule that is built from an extremely long sequence of individual elements called nucleotides.
3
+ The genetic language of every living thing on the planet is DNA.
4
+ DNA is a large molecule that is built from an extremely long sequence of individual elements called nucleotides.
5
5
  4 types exist in DNA and these differ only slightly and can be represented as the following symbols: 'A' for adenine, 'C' for cytosine, 'G' for guanine, and 'T' thymine.
6
6
 
7
7
  Here is an analogy:
@@ -7,7 +7,7 @@ Given a range of numbers, find the largest and smallest palindromes which
7
7
  are products of numbers within that range.
8
8
 
9
9
  Your solution should return the largest and smallest palindromes, along with the
10
- factors of each within the range. If the largest or smallest palindrome has more
10
+ factors of each within the range. If the largest or smallest palindrome has more
11
11
  than one pair of factors within the range, then return all the pairs.
12
12
 
13
13
  ## Example 1
@@ -35,27 +35,27 @@ The above diagram contains 6 rectangles:
35
35
  ```
36
36
 
37
37
  ```text
38
-
39
-
38
+
39
+
40
40
  +--+
41
41
  | |
42
42
  +--+
43
43
  ```
44
44
 
45
45
  ```text
46
-
47
-
46
+
47
+
48
48
  +--+
49
49
  | |
50
50
  +--+
51
51
  ```
52
52
 
53
53
  ```text
54
-
55
- ++
56
- ++
57
-
58
-
54
+
55
+ ++
56
+ ++
57
+
58
+
59
59
  ```
60
60
 
61
61
  You may assume that the input is always a proper rectangle (i.e. the length of
@@ -0,0 +1,171 @@
1
+ {
2
+ "exercise": "twelve-days",
3
+ "version": "1.0.0",
4
+ "comments": [
5
+ "JSON doesn't allow for multi-line strings, so all verses are presented ",
6
+ "here as arrays of strings. It's up to the test generator to join the ",
7
+ "lines together with line breaks."
8
+ ],
9
+ "cases": [
10
+ {
11
+ "description": "verse",
12
+ "cases": [
13
+ {
14
+ "description": "first day a partridge in a pear tree",
15
+ "property": "recite",
16
+ "startVerse": 1,
17
+ "endVerse": 1,
18
+ "expected": [
19
+ "On the first day of Christmas my true love gave to me, a Partridge in a Pear Tree."
20
+ ]
21
+ },
22
+ {
23
+ "description": "second day two turtle doves",
24
+ "property": "recite",
25
+ "startVerse": 2,
26
+ "endVerse": 2,
27
+ "expected": [
28
+ "On the second day of Christmas my true love gave to me, two Turtle Doves, and a Partridge in a Pear Tree."
29
+ ]
30
+ },
31
+ {
32
+ "description": "third day three french hens",
33
+ "property": "recite",
34
+ "startVerse": 3,
35
+ "endVerse": 3,
36
+ "expected": [
37
+ "On the third day of Christmas my true love gave to me, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree."
38
+ ]
39
+ },
40
+ {
41
+ "description": "fourth day four calling birds",
42
+ "property": "recite",
43
+ "startVerse": 4,
44
+ "endVerse": 4,
45
+ "expected": [
46
+ "On the fourth day of Christmas my true love gave to me, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree."
47
+ ]
48
+ },
49
+ {
50
+ "description": "fifth day five gold rings",
51
+ "property": "recite",
52
+ "startVerse": 5,
53
+ "endVerse": 5,
54
+ "expected": [
55
+ "On the fifth day of Christmas my true love gave to me, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree."
56
+ ]
57
+ },
58
+ {
59
+ "description": "sixth day six geese-a-laying",
60
+ "property": "recite",
61
+ "startVerse": 6,
62
+ "endVerse": 6,
63
+ "expected": [
64
+ "On the sixth day of Christmas my true love gave to me, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree."
65
+ ]
66
+ },
67
+ {
68
+ "description": "seventh day seven swans-a-swimming",
69
+ "property": "recite",
70
+ "startVerse": 7,
71
+ "endVerse": 7,
72
+ "expected": [
73
+ "On the seventh day of Christmas my true love gave to me, seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree."
74
+ ]
75
+ },
76
+ {
77
+ "description": "eighth day eight maids-a-milking",
78
+ "property": "recite",
79
+ "startVerse": 8,
80
+ "endVerse": 8,
81
+ "expected": [
82
+ "On the eighth day of Christmas my true love gave to me, eight Maids-a-Milking, seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree."
83
+ ]
84
+ },
85
+ {
86
+ "description": "ninth day nine ladies dancing",
87
+ "property": "recite",
88
+ "startVerse": 9,
89
+ "endVerse": 9,
90
+ "expected": [
91
+ "On the ninth day of Christmas my true love gave to me, nine Ladies Dancing, eight Maids-a-Milking, seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree."
92
+ ]
93
+ },
94
+ {
95
+ "description": "tenth day ten lords-a-leaping",
96
+ "property": "recite",
97
+ "startVerse": 10,
98
+ "endVerse": 10,
99
+ "expected": [
100
+ "On the tenth day of Christmas my true love gave to me, ten Lords-a-Leaping, nine Ladies Dancing, eight Maids-a-Milking, seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree."
101
+ ]
102
+ },
103
+ {
104
+ "description": "eleventh day eleven pipers piping",
105
+ "property": "recite",
106
+ "startVerse": 11,
107
+ "endVerse": 11,
108
+ "expected": [
109
+ "On the eleventh day of Christmas my true love gave to me, eleven Pipers Piping, ten Lords-a-Leaping, nine Ladies Dancing, eight Maids-a-Milking, seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree."
110
+ ]
111
+ },
112
+ {
113
+ "description": "twelfth day twelve drummers drumming",
114
+ "property": "recite",
115
+ "startVerse": 12,
116
+ "endVerse": 12,
117
+ "expected": [
118
+ "On the twelfth day of Christmas my true love gave to me, twelve Drummers Drumming, eleven Pipers Piping, ten Lords-a-Leaping, nine Ladies Dancing, eight Maids-a-Milking, seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree."
119
+ ]
120
+ }
121
+ ]
122
+ },
123
+ {
124
+ "description": "lyrics",
125
+ "cases": [
126
+ {
127
+ "description": "recites first three verses of the song",
128
+ "property": "recite",
129
+ "startVerse": 1,
130
+ "endVerse": 3,
131
+ "expected": [
132
+ "On the first day of Christmas my true love gave to me, a Partridge in a Pear Tree.",
133
+ "On the second day of Christmas my true love gave to me, two Turtle Doves, and a Partridge in a Pear Tree.",
134
+ "On the third day of Christmas my true love gave to me, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree."
135
+ ]
136
+ },
137
+ {
138
+ "description": "recites three verses from the middle of the song",
139
+ "property": "recite",
140
+ "startVerse": 4,
141
+ "endVerse": 6,
142
+ "expected": [
143
+ "On the fourth day of Christmas my true love gave to me, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.",
144
+ "On the fifth day of Christmas my true love gave to me, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.",
145
+ "On the sixth day of Christmas my true love gave to me, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree."
146
+ ]
147
+ },
148
+ {
149
+ "description": "recites the whole song",
150
+ "property": "recite",
151
+ "startVerse": 1,
152
+ "endVerse": 12,
153
+ "expected": [
154
+ "On the first day of Christmas my true love gave to me, a Partridge in a Pear Tree.",
155
+ "On the second day of Christmas my true love gave to me, two Turtle Doves, and a Partridge in a Pear Tree.",
156
+ "On the third day of Christmas my true love gave to me, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.",
157
+ "On the fourth day of Christmas my true love gave to me, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.",
158
+ "On the fifth day of Christmas my true love gave to me, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.",
159
+ "On the sixth day of Christmas my true love gave to me, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.",
160
+ "On the seventh day of Christmas my true love gave to me, seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.",
161
+ "On the eighth day of Christmas my true love gave to me, eight Maids-a-Milking, seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.",
162
+ "On the ninth day of Christmas my true love gave to me, nine Ladies Dancing, eight Maids-a-Milking, seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.",
163
+ "On the tenth day of Christmas my true love gave to me, ten Lords-a-Leaping, nine Ladies Dancing, eight Maids-a-Milking, seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.",
164
+ "On the eleventh day of Christmas my true love gave to me, eleven Pipers Piping, ten Lords-a-Leaping, nine Ladies Dancing, eight Maids-a-Milking, seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.",
165
+ "On the twelfth day of Christmas my true love gave to me, twelve Drummers Drumming, eleven Pipers Piping, ten Lords-a-Leaping, nine Ladies Dancing, eight Maids-a-Milking, seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree."
166
+ ]
167
+ }
168
+ ]
169
+ }
170
+ ]
171
+ }