trackler 2.0.5.1 → 2.0.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (246) hide show
  1. checksums.yaml +4 -4
  2. data/common/exercises/tree-building/description.md +15 -3
  3. data/lib/trackler/version.rb +1 -1
  4. data/tracks/ecmascript/exercises/queen-attack/queen-attack.spec.js +1 -1
  5. data/tracks/elm/.gitignore +1 -0
  6. data/tracks/elm/.travis.yml +3 -3
  7. data/tracks/elm/SETUP.md +16 -3
  8. data/tracks/elm/bin/build.sh +10 -10
  9. data/tracks/elm/bin/install-elm-format +1 -1
  10. data/tracks/elm/docs/INSTALLATION.md +2 -2
  11. data/tracks/elm/docs/TESTS.md +3 -3
  12. data/tracks/elm/elm-package.json +5 -5
  13. data/tracks/elm/exercises/accumulate/{Accumulate.example → Accumulate.example.elm} +0 -0
  14. data/tracks/elm/exercises/accumulate/{AccumulateTests.elm → Tests.elm} +2 -2
  15. data/tracks/elm/exercises/accumulate/elm-package.json +4 -4
  16. data/tracks/elm/exercises/accumulate/package.json +13 -0
  17. data/tracks/elm/exercises/allergies/{Allergies.example → Allergies.example.elm} +2 -2
  18. data/tracks/elm/exercises/allergies/{AllergiesTests.elm → Tests.elm} +2 -2
  19. data/tracks/elm/exercises/allergies/elm-package.json +4 -4
  20. data/tracks/elm/exercises/allergies/package.json +13 -0
  21. data/tracks/elm/exercises/anagram/{Anagram.example → Anagram.example.elm} +0 -0
  22. data/tracks/elm/exercises/anagram/{AnagramTests.elm → Tests.elm} +2 -2
  23. data/tracks/elm/exercises/anagram/elm-package.json +4 -4
  24. data/tracks/elm/exercises/anagram/package.json +13 -0
  25. data/tracks/elm/exercises/atbash-cipher/{AtbashCipher.example → AtbashCipher.example.elm} +0 -0
  26. data/tracks/elm/exercises/atbash-cipher/{AtbashCipherTests.elm → Tests.elm} +2 -2
  27. data/tracks/elm/exercises/atbash-cipher/elm-package.json +4 -4
  28. data/tracks/elm/exercises/atbash-cipher/package.json +13 -0
  29. data/tracks/elm/exercises/bob/{Bob.example → Bob.example.elm} +0 -0
  30. data/tracks/elm/exercises/bob/{BobTests.elm → Tests.elm} +3 -3
  31. data/tracks/elm/exercises/bob/elm-package.json +4 -4
  32. data/tracks/elm/exercises/bob/package.json +13 -0
  33. data/tracks/elm/exercises/difference-of-squares/{DifferenceOfSquares.example → DifferenceOfSquares.example.elm} +1 -1
  34. data/tracks/elm/exercises/difference-of-squares/{DifferenceOfSquaresTests.elm → Tests.elm} +2 -2
  35. data/tracks/elm/exercises/difference-of-squares/elm-package.json +4 -4
  36. data/tracks/elm/exercises/difference-of-squares/package.json +13 -0
  37. data/tracks/elm/exercises/gigasecond/{Gigasecond.example → Gigasecond.example.elm} +0 -0
  38. data/tracks/elm/exercises/gigasecond/{GigasecondTests.elm → Tests.elm} +2 -2
  39. data/tracks/elm/exercises/gigasecond/elm-package.json +4 -4
  40. data/tracks/elm/exercises/gigasecond/package.json +13 -0
  41. data/tracks/elm/exercises/grade-school/{GradeSchool.example → GradeSchool.example.elm} +1 -1
  42. data/tracks/elm/exercises/grade-school/{GradeSchoolTests.elm → Tests.elm} +2 -2
  43. data/tracks/elm/exercises/grade-school/elm-package.json +4 -4
  44. data/tracks/elm/exercises/grade-school/package.json +13 -0
  45. data/tracks/elm/exercises/hamming/{Hamming.example → Hamming.example.elm} +0 -0
  46. data/tracks/elm/exercises/hamming/{HammingTests.elm → Tests.elm} +2 -2
  47. data/tracks/elm/exercises/hamming/elm-package.json +4 -4
  48. data/tracks/elm/exercises/hamming/package.json +13 -0
  49. data/tracks/elm/exercises/hello-world/HelloWorld.elm +8 -8
  50. data/tracks/elm/exercises/hello-world/{HelloWorld.example → HelloWorld.example.elm} +0 -0
  51. data/tracks/elm/exercises/hello-world/{HelloWorldTests.elm → Tests.elm} +2 -2
  52. data/tracks/elm/exercises/hello-world/elm-package.json +4 -4
  53. data/tracks/elm/exercises/hello-world/package.json +13 -0
  54. data/tracks/elm/exercises/hello-world/yarn.lock +1136 -0
  55. data/tracks/elm/exercises/largest-series-product/{LargestSeriesProduct.example → LargestSeriesProduct.example.elm} +0 -0
  56. data/tracks/elm/exercises/largest-series-product/{LargestSeriesProductTests.elm → Tests.elm} +2 -2
  57. data/tracks/elm/exercises/largest-series-product/elm-package.json +4 -4
  58. data/tracks/elm/exercises/largest-series-product/package.json +13 -0
  59. data/tracks/elm/exercises/leap/{Leap.example → Leap.example.elm} +0 -0
  60. data/tracks/elm/exercises/leap/{LeapTests.elm → Tests.elm} +2 -2
  61. data/tracks/elm/exercises/leap/elm-package.json +4 -4
  62. data/tracks/elm/exercises/leap/package.json +13 -0
  63. data/tracks/elm/exercises/list-ops/{ListOps.example → ListOps.example.elm} +0 -0
  64. data/tracks/elm/exercises/list-ops/{ListOpsTests.elm → Tests.elm} +14 -14
  65. data/tracks/elm/exercises/list-ops/elm-package.json +4 -4
  66. data/tracks/elm/exercises/list-ops/package.json +13 -0
  67. data/tracks/elm/exercises/nucleotide-count/{NucleotideCount.example → NucleotideCount.example.elm} +0 -0
  68. data/tracks/elm/exercises/nucleotide-count/{NucleotideCountTests.elm → Tests.elm} +2 -2
  69. data/tracks/elm/exercises/nucleotide-count/elm-package.json +4 -4
  70. data/tracks/elm/exercises/nucleotide-count/package.json +13 -0
  71. data/tracks/elm/exercises/pangram/{Pangram.example → Pangram.example.elm} +0 -0
  72. data/tracks/elm/exercises/pangram/{PangramTests.elm → Tests.elm} +2 -2
  73. data/tracks/elm/exercises/pangram/elm-package.json +4 -4
  74. data/tracks/elm/exercises/pangram/package.json +13 -0
  75. data/tracks/elm/exercises/phone-number/{PhoneNumber.example → PhoneNumber.example.elm} +0 -0
  76. data/tracks/elm/exercises/phone-number/{PhoneNumberTests.elm → Tests.elm} +2 -2
  77. data/tracks/elm/exercises/phone-number/elm-package.json +4 -4
  78. data/tracks/elm/exercises/phone-number/package.json +13 -0
  79. data/tracks/elm/exercises/raindrops/{Raindrops.example → Raindrops.example.elm} +0 -0
  80. data/tracks/elm/exercises/raindrops/{RaindropsTests.elm → Tests.elm} +2 -2
  81. data/tracks/elm/exercises/raindrops/elm-package.json +4 -4
  82. data/tracks/elm/exercises/raindrops/package.json +13 -0
  83. data/tracks/elm/exercises/rna-transcription/{RNATranscription.example → RNATranscription.example.elm} +0 -0
  84. data/tracks/elm/exercises/rna-transcription/{RNATranscriptionTests.elm → Tests.elm} +2 -2
  85. data/tracks/elm/exercises/rna-transcription/elm-package.json +4 -4
  86. data/tracks/elm/exercises/rna-transcription/package.json +13 -0
  87. data/tracks/elm/exercises/robot-simulator/{RobotSimulator.example → RobotSimulator.example.elm} +0 -0
  88. data/tracks/elm/exercises/robot-simulator/{RobotSimulatorTests.elm → Tests.elm} +4 -4
  89. data/tracks/elm/exercises/robot-simulator/elm-package.json +4 -4
  90. data/tracks/elm/exercises/robot-simulator/package.json +13 -0
  91. data/tracks/elm/exercises/roman-numerals/{RomanNumerals.example → RomanNumerals.example.elm} +0 -0
  92. data/tracks/elm/exercises/roman-numerals/{RomanNumeralsTests.elm → Tests.elm} +2 -2
  93. data/tracks/elm/exercises/roman-numerals/elm-package.json +4 -4
  94. data/tracks/elm/exercises/roman-numerals/package.json +13 -0
  95. data/tracks/elm/exercises/run-length-encoding/{RunLengthEncoding.example → RunLengthEncoding.example.elm} +2 -2
  96. data/tracks/elm/exercises/run-length-encoding/{RunLengthEncodingTests.elm → Tests.elm} +2 -2
  97. data/tracks/elm/exercises/run-length-encoding/elm-package.json +4 -4
  98. data/tracks/elm/exercises/run-length-encoding/package.json +13 -0
  99. data/tracks/elm/exercises/say/{Say.example → Say.example.elm} +0 -0
  100. data/tracks/elm/exercises/say/{SayTests.elm → Tests.elm} +2 -2
  101. data/tracks/elm/exercises/say/elm-package.json +4 -4
  102. data/tracks/elm/exercises/say/package.json +13 -0
  103. data/tracks/elm/exercises/scrabble-score/{ScrabbleScore.example → ScrabbleScore.example.elm} +0 -0
  104. data/tracks/elm/exercises/scrabble-score/{ScrabbleScoreTests.elm → Tests.elm} +2 -2
  105. data/tracks/elm/exercises/scrabble-score/elm-package.json +4 -4
  106. data/tracks/elm/exercises/scrabble-score/package.json +13 -0
  107. data/tracks/elm/exercises/series/{Series.example → Series.example.elm} +0 -0
  108. data/tracks/elm/exercises/series/{SeriesTests.elm → Tests.elm} +2 -2
  109. data/tracks/elm/exercises/series/elm-package.json +4 -4
  110. data/tracks/elm/exercises/series/package.json +13 -0
  111. data/tracks/elm/exercises/space-age/{SpaceAge.example → SpaceAge.example.elm} +0 -0
  112. data/tracks/elm/exercises/space-age/{SpaceAgeTests.elm → Tests.elm} +2 -2
  113. data/tracks/elm/exercises/space-age/elm-package.json +4 -4
  114. data/tracks/elm/exercises/space-age/package.json +13 -0
  115. data/tracks/elm/exercises/strain/{Strain.example → Strain.example.elm} +0 -0
  116. data/tracks/elm/exercises/strain/{StrainTests.elm → Tests.elm} +3 -3
  117. data/tracks/elm/exercises/strain/elm-package.json +4 -4
  118. data/tracks/elm/exercises/strain/package.json +13 -0
  119. data/tracks/elm/exercises/sublist/{Sublist.example → Sublist.example.elm} +0 -0
  120. data/tracks/elm/exercises/sublist/{SublistTests.elm → Tests.elm} +5 -5
  121. data/tracks/elm/exercises/sublist/elm-package.json +4 -4
  122. data/tracks/elm/exercises/sublist/package.json +13 -0
  123. data/tracks/elm/exercises/sum-of-multiples/{SumOfMultiples.example → SumOfMultiples.example.elm} +1 -1
  124. data/tracks/elm/exercises/sum-of-multiples/{SumOfMultiplesTests.elm → Tests.elm} +2 -2
  125. data/tracks/elm/exercises/sum-of-multiples/elm-package.json +4 -4
  126. data/tracks/elm/exercises/sum-of-multiples/package.json +13 -0
  127. data/tracks/elm/exercises/triangle/{TriangleTests.elm → Tests.elm} +2 -2
  128. data/tracks/elm/exercises/triangle/{Triangle.example → Triangle.example.elm} +1 -1
  129. data/tracks/elm/exercises/triangle/elm-package.json +4 -4
  130. data/tracks/elm/exercises/triangle/package.json +13 -0
  131. data/tracks/elm/exercises/word-count/{WordCountTests.elm → Tests.elm} +2 -2
  132. data/tracks/elm/exercises/word-count/{WordCount.example → WordCount.example.elm} +0 -0
  133. data/tracks/elm/exercises/word-count/elm-package.json +4 -4
  134. data/tracks/elm/exercises/word-count/package.json +13 -0
  135. data/tracks/elm/package.json +10 -0
  136. data/tracks/fsharp/exercises/beer-song/HINTS.md +2 -0
  137. data/tracks/fsharp/exercises/grade-school/HINTS.md +3 -0
  138. data/tracks/fsharp/exercises/tree-building/Example.fs +7 -3
  139. data/tracks/fsharp/exercises/tree-building/TreeBuilding.fs +7 -4
  140. data/tracks/fsharp/exercises/tree-building/TreeBuildingTest.fs +49 -49
  141. data/tracks/fsharp/exercises/wordy/HINTS.md +3 -0
  142. data/tracks/java/config.json +13 -1
  143. data/tracks/java/exercises/anagram/build.gradle +0 -1
  144. data/tracks/java/exercises/anagram/src/test/java/AnagramTest.java +17 -13
  145. data/tracks/java/exercises/etl/build.gradle +0 -2
  146. data/tracks/java/exercises/grade-school/build.gradle +0 -1
  147. data/tracks/java/exercises/grade-school/src/test/java/SchoolTest.java +17 -13
  148. data/tracks/java/exercises/linked-list/build.gradle +0 -1
  149. data/tracks/java/exercises/linked-list/src/test/java/DequeTest.java +16 -15
  150. data/tracks/java/exercises/meetup/build.gradle +0 -1
  151. data/tracks/java/exercises/meetup/src/test/java/MeetupTest.java +96 -95
  152. data/tracks/java/exercises/nth-prime/build.gradle +0 -1
  153. data/tracks/java/exercises/nth-prime/src/test/java/PrimeTest.java +6 -5
  154. data/tracks/java/exercises/palindrome-products/build.gradle +18 -0
  155. data/tracks/java/exercises/palindrome-products/src/example/java/Palindromes.java +77 -0
  156. data/tracks/java/exercises/palindrome-products/src/main/java/.keep +0 -0
  157. data/tracks/java/exercises/palindrome-products/src/test/java/PalindromesTest.java +162 -0
  158. data/tracks/java/exercises/settings.gradle +2 -0
  159. data/tracks/java/exercises/sum-of-multiples/src/example/java/SumOfMultiples.java +1 -2
  160. data/tracks/java/exercises/sum-of-multiples/src/main/java/SumOfMultiples.java +0 -1
  161. data/tracks/java/exercises/sum-of-multiples/src/test/{SumOfMultiplesTest.java → java/SumOfMultiplesTest.java} +12 -24
  162. data/tracks/java/exercises/wordy/build.gradle +17 -0
  163. data/tracks/java/exercises/wordy/src/example/java/WordProblemSolver.java +57 -0
  164. data/tracks/java/exercises/wordy/src/main/java/WordProblemSolver.java +5 -0
  165. data/tracks/java/exercises/wordy/src/test/java/WordProblemSolverTest.java +119 -0
  166. data/tracks/lua/docs/TESTS.md +1 -1
  167. data/tracks/ruby/lib/generator.rb +17 -8
  168. data/tracks/ruby/test/fixtures/exercises/alpha/.meta/.version +1 -0
  169. data/tracks/ruby/test/fixtures/exercises/alpha/alpha_test.rb +1 -0
  170. data/tracks/ruby/test/fixtures/exercises/alpha/example.rb +5 -0
  171. data/tracks/ruby/test/fixtures/exercises/alpha/example.tt +1 -0
  172. data/tracks/ruby/test/fixtures/metadata/exercises/alpha/canonical-data.json +11 -0
  173. data/tracks/ruby/test/generator_test.rb +54 -1
  174. data/tracks/swift/docs/TESTS.md +12 -12
  175. data/tracks/swift/{img/page_assets/001-splash.png → docs/img/tests_001-splash.png} +0 -0
  176. data/tracks/swift/{img/page_assets/002-templateChooser.png → docs/img/tests_002-templateChooser.png} +0 -0
  177. data/tracks/swift/{img/page_assets/003-nameProject.jpg → docs/img/tests_003-nameProject.jpg} +0 -0
  178. data/tracks/swift/{img/page_assets/004-saveProject.jpg → docs/img/tests_004-saveProject.jpg} +0 -0
  179. data/tracks/swift/{img/page_assets/005-folderLayout.png → docs/img/tests_005-folderLayout.png} +0 -0
  180. data/tracks/swift/{img/page_assets/006-newProjectInitial.jpg → docs/img/tests_006-newProjectInitial.jpg} +0 -0
  181. data/tracks/swift/{img/page_assets/007-fileInspectorUpdate.png → docs/img/tests_007-fileInspectorUpdate.png} +0 -0
  182. data/tracks/swift/{img/page_assets/008-templateChooserSwift.png → docs/img/tests_008-templateChooserSwift.png} +0 -0
  183. data/tracks/swift/{img/page_assets/009-importTestSource.png → docs/img/tests_009-importTestSource.png} +0 -0
  184. data/tracks/swift/{img/page_assets/010-testsImportExample.png → docs/img/tests_010-testsImportExample.png} +0 -0
  185. data/tracks/swift/{img/page_assets/011-finalLayoutExample.png → docs/img/tests_011-finalLayoutExample.png} +0 -0
  186. metadata +122 -134
  187. data/tracks/elm/exercises/accumulate/runtests.bat +0 -1
  188. data/tracks/elm/exercises/accumulate/runtests.sh +0 -2
  189. data/tracks/elm/exercises/allergies/runtests.bat +0 -1
  190. data/tracks/elm/exercises/allergies/runtests.sh +0 -2
  191. data/tracks/elm/exercises/anagram/runtests.bat +0 -1
  192. data/tracks/elm/exercises/anagram/runtests.sh +0 -2
  193. data/tracks/elm/exercises/atbash-cipher/runtests.bat +0 -1
  194. data/tracks/elm/exercises/atbash-cipher/runtests.sh +0 -2
  195. data/tracks/elm/exercises/bob/runtests.bat +0 -1
  196. data/tracks/elm/exercises/bob/runtests.sh +0 -2
  197. data/tracks/elm/exercises/difference-of-squares/runtests.bat +0 -1
  198. data/tracks/elm/exercises/difference-of-squares/runtests.sh +0 -2
  199. data/tracks/elm/exercises/gigasecond/runtests.bat +0 -1
  200. data/tracks/elm/exercises/gigasecond/runtests.sh +0 -2
  201. data/tracks/elm/exercises/grade-school/runtests.bat +0 -1
  202. data/tracks/elm/exercises/grade-school/runtests.sh +0 -2
  203. data/tracks/elm/exercises/hamming/runtests.bat +0 -1
  204. data/tracks/elm/exercises/hamming/runtests.sh +0 -2
  205. data/tracks/elm/exercises/hello-world/runtests.bat +0 -1
  206. data/tracks/elm/exercises/hello-world/runtests.sh +0 -2
  207. data/tracks/elm/exercises/largest-series-product/runtests.bat +0 -1
  208. data/tracks/elm/exercises/largest-series-product/runtests.sh +0 -2
  209. data/tracks/elm/exercises/leap/runtests.bat +0 -1
  210. data/tracks/elm/exercises/leap/runtests.sh +0 -2
  211. data/tracks/elm/exercises/list-ops/runtests.bat +0 -1
  212. data/tracks/elm/exercises/list-ops/runtests.sh +0 -2
  213. data/tracks/elm/exercises/nucleotide-count/runtests.bat +0 -1
  214. data/tracks/elm/exercises/nucleotide-count/runtests.sh +0 -2
  215. data/tracks/elm/exercises/pangram/runtests.bat +0 -1
  216. data/tracks/elm/exercises/pangram/runtests.sh +0 -2
  217. data/tracks/elm/exercises/phone-number/runtests.bat +0 -1
  218. data/tracks/elm/exercises/phone-number/runtests.sh +0 -2
  219. data/tracks/elm/exercises/raindrops/runtests.bat +0 -1
  220. data/tracks/elm/exercises/raindrops/runtests.sh +0 -2
  221. data/tracks/elm/exercises/rna-transcription/runtests.bat +0 -1
  222. data/tracks/elm/exercises/rna-transcription/runtests.sh +0 -2
  223. data/tracks/elm/exercises/robot-simulator/runtests.bat +0 -1
  224. data/tracks/elm/exercises/robot-simulator/runtests.sh +0 -2
  225. data/tracks/elm/exercises/roman-numerals/runtests.bat +0 -1
  226. data/tracks/elm/exercises/roman-numerals/runtests.sh +0 -2
  227. data/tracks/elm/exercises/run-length-encoding/runtests.bat +0 -1
  228. data/tracks/elm/exercises/run-length-encoding/runtests.sh +0 -2
  229. data/tracks/elm/exercises/say/runtests.bat +0 -1
  230. data/tracks/elm/exercises/say/runtests.sh +0 -2
  231. data/tracks/elm/exercises/scrabble-score/runtests.bat +0 -1
  232. data/tracks/elm/exercises/scrabble-score/runtests.sh +0 -2
  233. data/tracks/elm/exercises/series/runtests.bat +0 -1
  234. data/tracks/elm/exercises/series/runtests.sh +0 -2
  235. data/tracks/elm/exercises/space-age/runtests.bat +0 -1
  236. data/tracks/elm/exercises/space-age/runtests.sh +0 -2
  237. data/tracks/elm/exercises/strain/runtests.bat +0 -1
  238. data/tracks/elm/exercises/strain/runtests.sh +0 -2
  239. data/tracks/elm/exercises/sublist/runtests.bat +0 -1
  240. data/tracks/elm/exercises/sublist/runtests.sh +0 -2
  241. data/tracks/elm/exercises/sum-of-multiples/runtests.bat +0 -1
  242. data/tracks/elm/exercises/sum-of-multiples/runtests.sh +0 -2
  243. data/tracks/elm/exercises/triangle/runtests.bat +0 -1
  244. data/tracks/elm/exercises/triangle/runtests.sh +0 -2
  245. data/tracks/elm/exercises/word-count/runtests.bat +0 -1
  246. data/tracks/elm/exercises/word-count/runtests.sh +0 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d08f22cd9cd8ad91c9bd2789324bc7e368e547c8
4
- data.tar.gz: 1f551cc425ba3ee5e263c1f6dcdd3a8716627764
3
+ metadata.gz: b9773ecbde701eefef54d155c99ae2c605cd9abf
4
+ data.tar.gz: 5f50ee1153696ce79b5440aa424c0cbccdf490c1
5
5
  SHA512:
6
- metadata.gz: 0b19b0c48ffe4addf76f7208a016a38f465ba69ce4e49d592399ee0162943b8c016e7eaccc87e9f1af631fa495a2a7b5852c5977033db463f77ac59775dae49f
7
- data.tar.gz: 725afee0fbc6423574cc17e67ff2992ca01464d2a441612be381161ae78f6f5e5a2b4dc5abafa95c9563c0886051e148eb3c3920b0c9c2512170d2ad1af0506b
6
+ metadata.gz: 909605d683b7f022647a5f046a40c35a8a12ab63c38dfb51e3fab6f1c7766d033ca368232a115162bf0a8e4e87ddbec626245e0f46c1179a84090d54ec404229
7
+ data.tar.gz: c352853d640a7f935b961d223c5ef202c30973982a2e0d65657eede8c18cc46c149fb9591ae1d7291c3a100046934a64ecedde199d53da45446d14d51a9a426b
@@ -6,6 +6,18 @@ reconstructed.
6
6
  Your job will be to refactor a working but slow and ugly piece of code that
7
7
  implements the tree building logic for highly abstracted records. The records
8
8
  only contain an ID number and a parent ID number. The ID number is always
9
- between 0 (inclusive) and the length of the record list (exclusive). No record
10
- has a parent ID lower than its own ID and no record, except the root record,
11
- has a parent ID that's equal to its own ID.
9
+ between 0 (inclusive) and the length of the record list (exclusive). All records
10
+ have a parent ID lower than their own ID, except for the root record, which has
11
+ a parent ID that's equal to its own ID.
12
+
13
+ An example tree:
14
+
15
+ <pre>
16
+ root (ID: 0, parent ID: 0)
17
+ |-- child1 (ID: 1, parent ID: 0)
18
+ | |-- grandchild1 (ID: 2, parent ID: 1)
19
+ | +-- grandchild2 (ID: 4, parent ID: 1)
20
+ +-- child2 (ID: 3, parent ID: 0)
21
+ | +-- grandchild3 (ID: 6, parent ID: 3)
22
+ +-- child3 (ID: 5, parent ID: 0)
23
+ </pre>
@@ -1,3 +1,3 @@
1
1
  module Trackler
2
- VERSION = "2.0.5.1"
2
+ VERSION = "2.0.5.2"
3
3
  end
@@ -2,7 +2,7 @@ import Queens from './queen-attack';
2
2
 
3
3
  describe('Queens', () => {
4
4
  it('has the correct default positions', () => {
5
- const queens = new Queens;
5
+ const queens = new Queens();
6
6
  expect(queens.white).toEqual([0, 3]);
7
7
  expect(queens.black).toEqual([7, 3]);
8
8
  });
@@ -6,3 +6,4 @@ bin/elm-format
6
6
  elm-stuff
7
7
  CHECKLIST
8
8
  build.js
9
+ node_modules
@@ -7,8 +7,7 @@ sudo: false
7
7
  install:
8
8
  - nvm install 6
9
9
  - nvm use 6
10
- - npm install -g elm@0.17.1 elm-test@0.17.3
11
- - elm package install -y
10
+ - npm install
12
11
  - bin/install-elm-format linux
13
12
  - export PATH=$PATH:$PWD/bin
14
13
 
@@ -19,4 +18,5 @@ script:
19
18
 
20
19
  cache:
21
20
  directories:
22
- - elm-stuff
21
+ - node_modules
22
+ - elm-stuff
data/tracks/elm/SETUP.md CHANGED
@@ -1,5 +1,18 @@
1
- ## Getting Started
1
+ ## Elm Installation
2
2
 
3
- To get started, please see docs on exercism.io:
3
+ Refer to the [exercism help page][http://exercism.io/languages/elm] for Elm installation and learning
4
+ resources.
4
5
 
5
- http://exercism.io/languages/elm
6
+ ## Writing the Code
7
+
8
+ The first time you start an exercise, you'll need to ensure you have the appropriate dependancies installed.
9
+
10
+ ```bash
11
+ $ npm install
12
+ ```
13
+
14
+ Execute the tests with:
15
+
16
+ ```bash
17
+ $ npm test
18
+ ```
@@ -12,7 +12,7 @@ if [ $? -ne 0 ]; then
12
12
  exit 1
13
13
  fi
14
14
 
15
- elm-format --yes --validate exercises/**/*{.example,Tests.elm}
15
+ elm-format --yes --validate exercises/**/{*.example.elm,Tests.elm}
16
16
 
17
17
  if [ $? -ne 0 ]; then
18
18
  echo "*******************************************************************"
@@ -33,30 +33,30 @@ fi
33
33
  declare -i TEST_RESULT=0
34
34
  FAILED_EXERCISES=''
35
35
 
36
- for example_file in exercises/**/*.example
36
+ for example_file in exercises/**/*.example.elm
37
37
  do
38
38
  exercise_dir=$(dirname $example_file)
39
- exercise=$(basename $example_file .example)
40
- mv "$exercise_dir/$exercise.elm" "$exercise_dir/$exercise.impl"
41
- mv "$exercise_dir/$exercise.example" "$exercise_dir/$exercise.elm"
39
+ exercise_name=$(basename $example_file .example.elm)
40
+ mv "$exercise_dir/$exercise_name.elm" "$exercise_dir/$exercise_name.impl"
41
+ mv "$exercise_dir/$exercise_name.example.elm" "$exercise_dir/$exercise_name.elm"
42
42
  echo '-------------------------------------------------------'
43
- echo "Testing $exercise"
43
+ echo "Testing $exercise_name"
44
44
 
45
45
  # prevent elm-test from installing dependencies
46
46
  mv $exercise_dir/elm-package.json $exercise_dir/elm-package.json.disabled
47
47
 
48
- elm-test $exercise_dir/*Tests.elm
48
+ npm test -- $exercise_dir/Tests.elm
49
49
 
50
50
  # capture result from last command (elm-test)
51
51
  if [ $? -ne 0 ]; then
52
52
  TEST_RESULT=1
53
- FAILED_EXERCISES+="$exercise\n"
53
+ FAILED_EXERCISES+="$exercise_name\n"
54
54
  fi
55
55
 
56
56
  # be kind, rewind
57
57
  mv $exercise_dir/elm-package.json.disabled $exercise_dir/elm-package.json
58
- mv "$exercise_dir/$exercise.elm" "$exercise_dir/$exercise.example"
59
- mv "$exercise_dir/$exercise.impl" "$exercise_dir/$exercise.elm"
58
+ mv "$exercise_dir/$exercise_name.elm" "$exercise_dir/$exercise_name.example.elm"
59
+ mv "$exercise_dir/$exercise_name.impl" "$exercise_dir/$exercise_name.elm"
60
60
  done
61
61
 
62
62
  if [ $TEST_RESULT -ne 0 ]; then
@@ -12,7 +12,7 @@ case $(uname) in
12
12
  echo "linux";;
13
13
  esac)
14
14
 
15
- URL=https://github.com/avh4/elm-format/releases/download/0.4.0-alpha/elm-format-0.17-0.4.0-alpha-$OS-x64.tgz
15
+ URL=https://github.com/avh4/elm-format/releases/download/0.5.2-alpha/elm-format-0.18-0.5.2-alpha-$OS-x64.tgz
16
16
 
17
17
  curl -L $URL | tar -xvzO > bin/elm-format
18
18
 
@@ -2,8 +2,8 @@
2
2
 
3
3
  The simplest way to install Elm is via Node.js/NPM.
4
4
 
5
- If you don't already have Node.js installed on your computer, you can download it from [the official site](https://nodejs.org/). Once you have Node.js up and running, follow these steps to install the Elm platform and `elm-test`.
5
+ If you don't already have Node.js installed on your computer, you can download it from [the official site](https://nodejs.org/). Once you have Node.js up and running, run this command from inside an exercise directory to install the Elm platform and `elm-test`.
6
6
 
7
7
  ```bash
8
- $ npm install --global elm@0.17.1 elm-test@0.17.3
8
+ $ npm install
9
9
  ```
@@ -2,15 +2,15 @@ The Elm exercise test suites may be run from the exercise directory.
2
2
 
3
3
  ```bash
4
4
  $ cd exercism/project/directory/elm/hello-world
5
- $ elm-test *Tests.elm
5
+ $ npm install # only required the first time you start an exercise
6
+ $ npm test
6
7
  ```
7
- Replace `*` with the name of the exercise you're on, e.g. HelloWorld for the Hello World exercise.
8
8
 
9
9
  ## Hints and tips
10
10
 
11
11
  ### Coding the exercise
12
12
 
13
- The README.md for each exercise gives a general description but the Elm test program will be very specific. Open the test program and give it a quick look - if it seems like cheating, do it anyway. Look for helpful comments, test data, and just the names of the test functions. Try running the test command before you have written anything and see if the error messages give you an idea of where to start.
13
+ The README.md for each exercise gives a general description, but the Elm test program will be very specific. Open the test program and give it a quick look - if it seems like cheating, do it anyway. Look for helpful comments, test data, and just the names of the test functions. Try running the test command before you have written anything and see if the error messages give you an idea of where to start.
14
14
 
15
15
  Your first goal it to get something to compile, even though it fails tests. For this, you should "stub" functions. That means leave the body empty, except for whatever it must return. Write something like `myFunc param = 0` or whatever it takes just to get it to compile. Sometimes to figure out function types you will have to go back to the test program and read in more detail. Once you have figured out all the required function signatures, the test program will complain that `0` is the wrong answer. Now start filling in function bodies.
16
16
 
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.0.0",
2
+ "version": "3.0.0",
3
3
  "summary": "Exercism problems in Elm.",
4
4
  "repository": "https://github.com/exercism/xelm.git",
5
5
  "license": "BSD3",
@@ -38,9 +38,9 @@
38
38
  ],
39
39
  "exposed-modules": [],
40
40
  "dependencies": {
41
- "elm-lang/core": "4.0.0 <= v < 5.0.0",
42
- "elm-community/elm-test": "2.0.0 <= v < 3.0.0",
43
- "rtfeldman/node-test-runner": "2.0.0 <= v < 3.0.0"
41
+ "elm-lang/core": "5.0.0 <= v < 6.0.0",
42
+ "elm-community/elm-test": "3.0.0 <= v < 4.0.0",
43
+ "rtfeldman/node-test-runner": "3.0.0 <= v < 4.0.0"
44
44
  },
45
- "elm-version": "0.17.0 <= v < 0.18.0"
45
+ "elm-version": "0.18.0 <= v < 0.19.0"
46
46
  }
@@ -1,6 +1,6 @@
1
1
  port module Main exposing (..)
2
2
 
3
- import Test.Runner.Node exposing (run)
3
+ import Test.Runner.Node exposing (run, TestProgram)
4
4
  import Json.Encode exposing (Value)
5
5
  import Test exposing (..)
6
6
  import Expect
@@ -31,7 +31,7 @@ tests =
31
31
  ]
32
32
 
33
33
 
34
- main : Program Value
34
+ main : TestProgram
35
35
  main =
36
36
  run emit tests
37
37
 
@@ -8,9 +8,9 @@
8
8
  ],
9
9
  "exposed-modules": [],
10
10
  "dependencies": {
11
- "elm-lang/core": "4.0.0 <= v < 5.0.0",
12
- "elm-community/elm-test": "2.0.0 <= v < 3.0.0",
13
- "rtfeldman/node-test-runner": "2.0.0 <= v < 3.0.0"
11
+ "elm-lang/core": "5.0.0 <= v < 6.0.0",
12
+ "elm-community/elm-test": "3.0.0 <= v < 4.0.0",
13
+ "rtfeldman/node-test-runner": "3.0.0 <= v < 4.0.0"
14
14
  },
15
- "elm-version": "0.17.0 <= v < 0.18.0"
15
+ "elm-version": "0.18.0 <= v < 0.19.0"
16
16
  }
@@ -0,0 +1,13 @@
1
+ {
2
+ "description": "Excercism/Elm",
3
+ "repository": "https://github.com/exercism/xelm.git",
4
+ "license": "MIT",
5
+ "scripts": {
6
+ "postinstall": "elm-package install -y",
7
+ "test": "elm-test Tests.elm"
8
+ },
9
+ "dependencies": {
10
+ "elm": "^0.18.0",
11
+ "elm-test": "^0.18.0"
12
+ }
13
+ }
@@ -12,9 +12,9 @@ isAllergicTo name score =
12
12
  toList : Int -> List String
13
13
  toList score =
14
14
  allergies
15
- |> List.indexedMap (\i n -> ( Bitwise.shiftLeft 1 i, n ))
15
+ |> List.indexedMap (\i n -> ( Bitwise.shiftLeftBy i 1, n ))
16
16
  |> List.filter (\( s, n ) -> Bitwise.and s score > 0)
17
- |> List.map snd
17
+ |> List.map Tuple.second
18
18
 
19
19
 
20
20
  allergies : List String
@@ -1,6 +1,6 @@
1
1
  port module Main exposing (..)
2
2
 
3
- import Test.Runner.Node exposing (run)
3
+ import Test.Runner.Node exposing (run, TestProgram)
4
4
  import Json.Encode exposing (Value)
5
5
  import Test exposing (..)
6
6
  import Expect
@@ -50,7 +50,7 @@ tests =
50
50
  ]
51
51
 
52
52
 
53
- main : Program Value
53
+ main : TestProgram
54
54
  main =
55
55
  run emit tests
56
56
 
@@ -8,9 +8,9 @@
8
8
  ],
9
9
  "exposed-modules": [],
10
10
  "dependencies": {
11
- "elm-lang/core": "4.0.0 <= v < 5.0.0",
12
- "elm-community/elm-test": "2.0.0 <= v < 3.0.0",
13
- "rtfeldman/node-test-runner": "2.0.0 <= v < 3.0.0"
11
+ "elm-lang/core": "5.0.0 <= v < 6.0.0",
12
+ "elm-community/elm-test": "3.0.0 <= v < 4.0.0",
13
+ "rtfeldman/node-test-runner": "3.0.0 <= v < 4.0.0"
14
14
  },
15
- "elm-version": "0.17.0 <= v < 0.18.0"
15
+ "elm-version": "0.18.0 <= v < 0.19.0"
16
16
  }
@@ -0,0 +1,13 @@
1
+ {
2
+ "description": "Excercism/Elm",
3
+ "repository": "https://github.com/exercism/xelm.git",
4
+ "license": "MIT",
5
+ "scripts": {
6
+ "postinstall": "elm-package install -y",
7
+ "test": "elm-test Tests.elm"
8
+ },
9
+ "dependencies": {
10
+ "elm": "^0.18.0",
11
+ "elm-test": "^0.18.0"
12
+ }
13
+ }
@@ -1,6 +1,6 @@
1
1
  port module Main exposing (..)
2
2
 
3
- import Test.Runner.Node exposing (run)
3
+ import Test.Runner.Node exposing (run, TestProgram)
4
4
  import Json.Encode exposing (Value)
5
5
  import Test exposing (..)
6
6
  import Expect
@@ -93,7 +93,7 @@ tests =
93
93
  ]
94
94
 
95
95
 
96
- main : Program Value
96
+ main : TestProgram
97
97
  main =
98
98
  run emit tests
99
99
 
@@ -8,9 +8,9 @@
8
8
  ],
9
9
  "exposed-modules": [],
10
10
  "dependencies": {
11
- "elm-lang/core": "4.0.0 <= v < 5.0.0",
12
- "elm-community/elm-test": "2.0.0 <= v < 3.0.0",
13
- "rtfeldman/node-test-runner": "2.0.0 <= v < 3.0.0"
11
+ "elm-lang/core": "5.0.0 <= v < 6.0.0",
12
+ "elm-community/elm-test": "3.0.0 <= v < 4.0.0",
13
+ "rtfeldman/node-test-runner": "3.0.0 <= v < 4.0.0"
14
14
  },
15
- "elm-version": "0.17.0 <= v < 0.18.0"
15
+ "elm-version": "0.18.0 <= v < 0.19.0"
16
16
  }
@@ -0,0 +1,13 @@
1
+ {
2
+ "description": "Excercism/Elm",
3
+ "repository": "https://github.com/exercism/xelm.git",
4
+ "license": "MIT",
5
+ "scripts": {
6
+ "postinstall": "elm-package install -y",
7
+ "test": "elm-test Tests.elm"
8
+ },
9
+ "dependencies": {
10
+ "elm": "^0.18.0",
11
+ "elm-test": "^0.18.0"
12
+ }
13
+ }
@@ -1,6 +1,6 @@
1
1
  port module Main exposing (..)
2
2
 
3
- import Test.Runner.Node exposing (run)
3
+ import Test.Runner.Node exposing (run, TestProgram)
4
4
  import Json.Encode exposing (Value)
5
5
  import Test exposing (..)
6
6
  import Expect
@@ -37,7 +37,7 @@ tests =
37
37
  ]
38
38
 
39
39
 
40
- main : Program Value
40
+ main : TestProgram
41
41
  main =
42
42
  run emit tests
43
43
 
@@ -8,9 +8,9 @@
8
8
  ],
9
9
  "exposed-modules": [],
10
10
  "dependencies": {
11
- "elm-lang/core": "4.0.0 <= v < 5.0.0",
12
- "elm-community/elm-test": "2.0.0 <= v < 3.0.0",
13
- "rtfeldman/node-test-runner": "2.0.0 <= v < 3.0.0"
11
+ "elm-lang/core": "5.0.0 <= v < 6.0.0",
12
+ "elm-community/elm-test": "3.0.0 <= v < 4.0.0",
13
+ "rtfeldman/node-test-runner": "3.0.0 <= v < 4.0.0"
14
14
  },
15
- "elm-version": "0.17.0 <= v < 0.18.0"
15
+ "elm-version": "0.18.0 <= v < 0.19.0"
16
16
  }
@@ -0,0 +1,13 @@
1
+ {
2
+ "description": "Excercism/Elm",
3
+ "repository": "https://github.com/exercism/xelm.git",
4
+ "license": "MIT",
5
+ "scripts": {
6
+ "postinstall": "elm-package install -y",
7
+ "test": "elm-test Tests.elm"
8
+ },
9
+ "dependencies": {
10
+ "elm": "^0.18.0",
11
+ "elm-test": "^0.18.0"
12
+ }
13
+ }
@@ -1,6 +1,6 @@
1
1
  port module Main exposing (..)
2
2
 
3
- import Test.Runner.Node exposing (run)
3
+ import Test.Runner.Node exposing (run, TestProgram)
4
4
  import Json.Encode exposing (Value)
5
5
  import Test exposing (..)
6
6
  import Expect
@@ -137,7 +137,7 @@ listOfCharacters length characterList =
137
137
 
138
138
  gibberish : Int -> Random.Generator Char -> String
139
139
  gibberish length characterList =
140
- fst (Random.step (Random.map String.fromList (listOfCharacters length characterList)) (Random.initialSeed 424242))
140
+ Tuple.first (Random.step (Random.map String.fromList (listOfCharacters length characterList)) (Random.initialSeed 424242))
141
141
 
142
142
 
143
143
  uppercaseGibberish : Int -> String
@@ -150,7 +150,7 @@ gibberishQuestion length =
150
150
  (gibberish length anyCharacter) ++ "?"
151
151
 
152
152
 
153
- main : Program Value
153
+ main : TestProgram
154
154
  main =
155
155
  run emit tests
156
156