trackler 2.2.1.10 → 2.2.1.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (240) hide show
  1. checksums.yaml +4 -4
  2. data/.gitmodules +3 -0
  3. data/lib/trackler/version.rb +1 -1
  4. data/problem-specifications/CONTRIBUTING.md +1 -1
  5. data/problem-specifications/TOPICS.txt +1 -0
  6. data/problem-specifications/exercises/accumulate/description.md +0 -3
  7. data/problem-specifications/exercises/hamming/canonical-data.json +3 -3
  8. data/problem-specifications/exercises/house/canonical-data.json +322 -0
  9. data/problem-specifications/exercises/palindrome-products/description.md +2 -2
  10. data/problem-specifications/exercises/simple-cipher/description.md +1 -1
  11. data/tracks/bash/config.json +0 -11
  12. data/tracks/cpp/docs/ABOUT.md +12 -37
  13. data/tracks/csharp/config.json +37 -0
  14. data/tracks/csharp/config/maintainers.json +10 -0
  15. data/tracks/csharp/docs/ABOUT.md +1 -1
  16. data/tracks/csharp/docs/RESOURCES.md +2 -2
  17. data/tracks/csharp/exercises/Exercises.All.sln +50 -8
  18. data/tracks/csharp/exercises/Exercises.Default.sln +50 -8
  19. data/tracks/csharp/exercises/collatz-conjecture/CollatzConjecture.cs +9 -0
  20. data/tracks/csharp/exercises/collatz-conjecture/CollatzConjecture.csproj +18 -0
  21. data/tracks/csharp/exercises/collatz-conjecture/CollatzConjectureTest.cs +43 -0
  22. data/tracks/csharp/exercises/collatz-conjecture/Example.cs +30 -0
  23. data/tracks/csharp/exercises/collatz-conjecture/README.md +38 -0
  24. data/tracks/csharp/exercises/diamond/Diamond.cs +1 -1
  25. data/tracks/csharp/exercises/diamond/Diamond.csproj +3 -1
  26. data/tracks/csharp/exercises/diamond/DiamondTest.cs +39 -21
  27. data/tracks/csharp/exercises/diamond/Example.cs +2 -2
  28. data/tracks/csharp/exercises/diamond/HINTS.md +3 -1
  29. data/tracks/csharp/exercises/spiral-matrix/Example.cs +40 -0
  30. data/tracks/csharp/exercises/spiral-matrix/README.md +36 -0
  31. data/tracks/csharp/exercises/spiral-matrix/SpiralMatrix.cs +9 -0
  32. data/tracks/csharp/exercises/spiral-matrix/SpiralMatrix.csproj +18 -0
  33. data/tracks/csharp/exercises/spiral-matrix/SpiralMatrixTest.cs +78 -0
  34. data/tracks/csharp/exercises/two-fer/Example.cs +16 -0
  35. data/tracks/csharp/exercises/two-fer/README.md +25 -0
  36. data/tracks/csharp/exercises/two-fer/TwoFer.cs +9 -0
  37. data/tracks/csharp/exercises/two-fer/TwoFer.csproj +18 -0
  38. data/tracks/csharp/exercises/two-fer/TwoFerTest.cs +24 -0
  39. data/tracks/dart/README.md +1 -1
  40. data/tracks/dart/docs/EXERCISE_README_INSERT.md +9 -0
  41. data/tracks/dart/docs/INSTALLATION.md +13 -0
  42. data/tracks/dart/docs/LEARNING.md +6 -0
  43. data/tracks/dart/docs/RESOURCES.md +7 -0
  44. data/tracks/dart/docs/TESTS.md +133 -0
  45. data/tracks/delphi/docs/ABOUT.md +18 -5
  46. data/tracks/delphi/docs/Getting_Started_Guide.md +930 -0
  47. data/tracks/delphi/exercises/hamming/uHammingExample.pas +1 -1
  48. data/tracks/delphi/exercises/hamming/uHammingTests.pas +15 -15
  49. data/tracks/ecmascript/.travis.yml +2 -1
  50. data/tracks/ecmascript/Makefile +19 -8
  51. data/tracks/ecmascript/config.json +16 -0
  52. data/tracks/ecmascript/exercises/accumulate/package.json +5 -5
  53. data/tracks/ecmascript/exercises/acronym/package.json +5 -5
  54. data/tracks/ecmascript/exercises/all-your-base/package.json +5 -5
  55. data/tracks/ecmascript/exercises/allergies/package.json +5 -5
  56. data/tracks/ecmascript/exercises/alphametics/package.json +5 -5
  57. data/tracks/ecmascript/exercises/anagram/package.json +5 -5
  58. data/tracks/ecmascript/exercises/atbash-cipher/package.json +5 -5
  59. data/tracks/ecmascript/exercises/beer-song/package.json +5 -5
  60. data/tracks/ecmascript/exercises/binary-search-tree/package.json +5 -5
  61. data/tracks/ecmascript/exercises/binary-search/package.json +5 -5
  62. data/tracks/ecmascript/exercises/binary/package.json +5 -5
  63. data/tracks/ecmascript/exercises/bob/package.json +5 -5
  64. data/tracks/ecmascript/exercises/bracket-push/package.json +5 -5
  65. data/tracks/ecmascript/exercises/circular-buffer/package.json +5 -5
  66. data/tracks/ecmascript/exercises/clock/package.json +5 -5
  67. data/tracks/ecmascript/exercises/connect/package.json +5 -5
  68. data/tracks/ecmascript/exercises/crypto-square/package.json +5 -5
  69. data/tracks/ecmascript/exercises/custom-set/package.json +5 -5
  70. data/tracks/ecmascript/exercises/diamond/package.json +5 -5
  71. data/tracks/ecmascript/exercises/difference-of-squares/package.json +5 -5
  72. data/tracks/ecmascript/exercises/diffie-hellman/package.json +5 -5
  73. data/tracks/ecmascript/exercises/etl/package.json +5 -5
  74. data/tracks/ecmascript/exercises/flatten-array/package.json +5 -5
  75. data/tracks/ecmascript/exercises/food-chain/package.json +5 -5
  76. data/tracks/ecmascript/exercises/gigasecond/package.json +5 -5
  77. data/tracks/ecmascript/exercises/grade-school/package.json +5 -5
  78. data/tracks/ecmascript/exercises/grains/package.json +5 -5
  79. data/tracks/ecmascript/exercises/hamming/package.json +5 -5
  80. data/tracks/ecmascript/exercises/hello-world/package.json +5 -5
  81. data/tracks/ecmascript/exercises/hexadecimal/package.json +5 -5
  82. data/tracks/ecmascript/exercises/isogram/package.json +5 -5
  83. data/tracks/ecmascript/exercises/kindergarten-garden/package.json +5 -5
  84. data/tracks/ecmascript/exercises/largest-series-product/package.json +5 -5
  85. data/tracks/ecmascript/exercises/leap/package.json +5 -5
  86. data/tracks/ecmascript/exercises/linked-list/package.json +5 -5
  87. data/tracks/ecmascript/exercises/list-ops/package.json +5 -5
  88. data/tracks/ecmascript/exercises/luhn/package.json +5 -5
  89. data/tracks/ecmascript/exercises/matrix/package.json +5 -5
  90. data/tracks/ecmascript/exercises/meetup/package.json +5 -5
  91. data/tracks/ecmascript/exercises/minesweeper/package.json +5 -5
  92. data/tracks/ecmascript/exercises/nth-prime/package.json +5 -5
  93. data/tracks/ecmascript/exercises/ocr-numbers/package.json +5 -5
  94. data/tracks/ecmascript/exercises/octal/package.json +5 -5
  95. data/tracks/ecmascript/exercises/palindrome-products/package.json +5 -5
  96. data/tracks/ecmascript/exercises/pangram/package.json +5 -5
  97. data/tracks/ecmascript/exercises/pascals-triangle/package.json +5 -5
  98. data/tracks/ecmascript/exercises/perfect-numbers/package.json +5 -5
  99. data/tracks/ecmascript/exercises/phone-number/package.json +5 -5
  100. data/tracks/ecmascript/exercises/pig-latin/package.json +5 -5
  101. data/tracks/ecmascript/exercises/prime-factors/package.json +5 -5
  102. data/tracks/ecmascript/exercises/pythagorean-triplet/package.json +5 -5
  103. data/tracks/ecmascript/exercises/queen-attack/package.json +5 -5
  104. data/tracks/ecmascript/exercises/raindrops/package.json +5 -5
  105. data/tracks/ecmascript/exercises/rna-transcription/package.json +5 -5
  106. data/tracks/ecmascript/exercises/robot-name/package.json +5 -5
  107. data/tracks/ecmascript/exercises/robot-simulator/package.json +5 -5
  108. data/tracks/ecmascript/exercises/roman-numerals/package.json +5 -5
  109. data/tracks/ecmascript/exercises/run-length-encoding/README.md +59 -0
  110. data/tracks/ecmascript/exercises/run-length-encoding/example.js +13 -0
  111. data/tracks/ecmascript/exercises/run-length-encoding/package.json +69 -0
  112. data/tracks/ecmascript/exercises/run-length-encoding/run-length-encoding.spec.js +59 -0
  113. data/tracks/ecmascript/exercises/saddle-points/package.json +5 -5
  114. data/tracks/ecmascript/exercises/say/package.json +5 -5
  115. data/tracks/ecmascript/exercises/scrabble-score/package.json +5 -5
  116. data/tracks/ecmascript/exercises/secret-handshake/package.json +5 -5
  117. data/tracks/ecmascript/exercises/series/package.json +5 -5
  118. data/tracks/ecmascript/exercises/sieve/package.json +5 -5
  119. data/tracks/ecmascript/exercises/simple-cipher/package.json +5 -5
  120. data/tracks/ecmascript/exercises/space-age/package.json +5 -5
  121. data/tracks/ecmascript/exercises/strain/package.json +5 -5
  122. data/tracks/ecmascript/exercises/sublist/package.json +5 -5
  123. data/tracks/ecmascript/exercises/sum-of-multiples/package.json +5 -5
  124. data/tracks/ecmascript/exercises/triangle/package.json +5 -5
  125. data/tracks/ecmascript/exercises/trinary/package.json +5 -5
  126. data/tracks/ecmascript/exercises/twelve-days/package.json +6 -5
  127. data/tracks/ecmascript/exercises/two-bucket/package.json +5 -5
  128. data/tracks/ecmascript/exercises/word-count/package.json +5 -5
  129. data/tracks/ecmascript/exercises/wordy/package.json +5 -5
  130. data/tracks/ecmascript/package.json +5 -5
  131. data/tracks/ecmascript/yarn.lock +403 -152
  132. data/tracks/elixir/docs/ABOUT.md +7 -20
  133. data/tracks/erlang/docs/ABOUT.md +4 -6
  134. data/tracks/fsharp/config.json +2 -1
  135. data/tracks/fsharp/docs/ABOUT.md +6 -2
  136. data/tracks/gnu-apl/.gitignore +4 -0
  137. data/tracks/gnu-apl/.travis.yml +5 -0
  138. data/tracks/gnu-apl/LICENSE +21 -0
  139. data/tracks/gnu-apl/README.md +67 -0
  140. data/tracks/gnu-apl/bin/fetch-configlet +32 -0
  141. data/tracks/gnu-apl/config.json +15 -0
  142. data/tracks/{scala/exercises/binary-search/src/main/scala/BinarySearch.scala → gnu-apl/config/exercise-readme-insert.md} +0 -0
  143. data/tracks/gnu-apl/config/exercise-readme.go.tmpl +16 -0
  144. data/tracks/gnu-apl/config/maintainers.json +6 -0
  145. data/tracks/gnu-apl/docs/ABOUT.md +0 -0
  146. data/tracks/gnu-apl/docs/INSTALLATION.md +0 -0
  147. data/tracks/gnu-apl/docs/LEARNING.md +0 -0
  148. data/tracks/gnu-apl/docs/RESOURCES.md +0 -0
  149. data/tracks/gnu-apl/docs/TESTS.md +0 -0
  150. data/tracks/gnu-apl/img/.keep +0 -0
  151. data/tracks/go/docs/ABOUT.md +4 -2
  152. data/tracks/go/exercises/pangram/example.go +1 -1
  153. data/tracks/go/exercises/pangram/pangram.go +1 -1
  154. data/tracks/go/exercises/pangram/pangram_test.go +1 -3
  155. data/tracks/groovy/README.md +2 -0
  156. data/tracks/groovy/config.json +25 -20
  157. data/tracks/groovy/docs/ABOUT.md +10 -3
  158. data/tracks/groovy/exercises/difference-of-squares/DifferenceOfSquares.groovy +19 -0
  159. data/tracks/groovy/exercises/difference-of-squares/{SquaresSpec.groovy → DifferenceOfSquaresSpec.groovy} +3 -3
  160. data/tracks/groovy/exercises/difference-of-squares/Example.groovy +1 -1
  161. data/tracks/groovy/exercises/hamming/Hamming.groovy +7 -0
  162. data/tracks/groovy/exercises/leap/Example.groovy +2 -2
  163. data/tracks/groovy/exercises/leap/Leap.groovy +11 -0
  164. data/tracks/groovy/exercises/leap/LeapSpec.groovy +4 -4
  165. data/tracks/groovy/exercises/nth-prime/Example.groovy +1 -1
  166. data/tracks/groovy/exercises/nth-prime/NthPrime.groovy +7 -0
  167. data/tracks/groovy/exercises/nth-prime/{PrimeSpec.groovy → NthPrimeSpec.groovy} +6 -6
  168. data/tracks/groovy/exercises/phone-number/PhoneNumber.groovy +17 -0
  169. data/tracks/groovy/exercises/raindrops/Raindrops.groovy +7 -0
  170. data/tracks/groovy/exercises/rna-transcription/Example.groovy +1 -1
  171. data/tracks/groovy/exercises/rna-transcription/RnaTranscription.groovy +7 -0
  172. data/tracks/groovy/exercises/rna-transcription/{ComplementSpec.groovy → RnaTranscriptionSpec.groovy} +2 -2
  173. data/tracks/groovy/exercises/robot-name/Example.groovy +2 -2
  174. data/tracks/groovy/exercises/robot-name/RobotName.groovy +9 -0
  175. data/tracks/groovy/exercises/robot-name/{RobotSpec.groovy → RobotNameSpec.groovy} +6 -6
  176. data/tracks/groovy/exercises/roman-numerals/Example.groovy +2 -2
  177. data/tracks/groovy/exercises/roman-numerals/RomanNumerals.groovy +7 -0
  178. data/tracks/groovy/exercises/roman-numerals/{RomanSpec.groovy → RomanNumeralsSpec.groovy} +2 -2
  179. data/tracks/groovy/exercises/word-count/Example.groovy +2 -2
  180. data/tracks/groovy/exercises/word-count/{Phrase.groovy → WordCount.groovy} +2 -2
  181. data/tracks/groovy/exercises/word-count/WordCountSpec.groovy +47 -0
  182. data/tracks/java/config.json +84 -74
  183. data/tracks/java/docs/ABOUT.md +11 -5
  184. data/tracks/java/exercises/house/README.md +124 -0
  185. data/tracks/java/exercises/house/build.gradle +18 -0
  186. data/tracks/java/exercises/house/src/example/java/House.java +55 -0
  187. data/tracks/java/exercises/house/src/main/java/.keep +0 -0
  188. data/tracks/java/exercises/house/src/test/java/HouseTest.java +341 -0
  189. data/tracks/java/exercises/minesweeper/src/example/java/MinesweeperBoard.java +3 -3
  190. data/tracks/java/exercises/series/src/test/java/SeriesTest.java +6 -5
  191. data/tracks/java/exercises/settings.gradle +1 -0
  192. data/tracks/java/exercises/two-fer/src/test/java/TwoferTest.java +9 -0
  193. data/tracks/javascript/exercises/circular-buffer/circular-buffer.spec.js +8 -0
  194. data/tracks/javascript/exercises/simple-cipher/README.md +1 -1
  195. data/tracks/kotlin/docs/ABOUT.md +7 -10
  196. data/tracks/lisp/.travis.yml +26 -11
  197. data/tracks/purescript/docs/ABOUT.md +16 -0
  198. data/tracks/r/config.json +1 -1
  199. data/tracks/r/config/maintainers.json +9 -9
  200. data/tracks/r/docs/ABOUT.md +9 -11
  201. data/tracks/r/docs/snippet.txt +10 -0
  202. data/tracks/ruby/docs/ABOUT.md +5 -5
  203. data/tracks/ruby/exercises/collatz-conjecture/.meta/generator/collatz_conjecture_case.rb +1 -2
  204. data/tracks/ruby/exercises/space-age/.meta/generator/space_age_case.rb +1 -2
  205. data/tracks/ruby/exercises/sum-of-multiples/.meta/generator/sum_of_multiples_case.rb +1 -1
  206. data/tracks/ruby/lib/generator/exercise_case.rb +15 -0
  207. data/tracks/scala/exercises/alphametics/src/test/scala/AlphameticsTest.scala +42 -28
  208. data/tracks/scala/exercises/binary-search/example.scala +1 -1
  209. data/tracks/scala/exercises/binary-search/src/main/scala/.keep +0 -0
  210. data/tracks/scala/exercises/binary-search/src/test/scala/BinarySearchTest.scala +13 -22
  211. data/tracks/scala/exercises/bowling/src/main/scala/.keep +0 -0
  212. data/tracks/scala/exercises/bowling/src/test/scala/BowlingSuite.scala +30 -17
  213. data/tracks/scala/exercises/change/src/test/scala/ChangeTest.scala +14 -4
  214. data/tracks/scala/exercises/custom-set/src/test/scala/CustomSetTest.scala +6 -4
  215. data/tracks/scala/exercises/food-chain/example.scala +4 -2
  216. data/tracks/scala/exercises/food-chain/src/test/scala/FoodChainTest.scala +170 -59
  217. data/tracks/scala/exercises/luhn/example.scala +9 -21
  218. data/tracks/scala/exercises/luhn/src/test/scala/LuhnTest.scala +46 -10
  219. data/tracks/scala/testgen/src/main/scala/AlphametricsTestGenerator.scala +42 -0
  220. data/tracks/scala/testgen/src/main/scala/BinarySearchTestGenerator.scala +32 -42
  221. data/tracks/scala/testgen/src/main/scala/BowlingTestGenerator.scala +22 -7
  222. data/tracks/scala/testgen/src/main/scala/ChangeTestGenerator.scala +37 -0
  223. data/tracks/scala/testgen/src/main/scala/CustomSetTestGenerator.scala +25 -20
  224. data/tracks/scala/testgen/src/main/scala/FoodChainTestGenerator.scala +13 -2
  225. data/tracks/scala/testgen/src/main/scala/LuhnTestGenerator.scala +15 -0
  226. data/tracks/scala/testgen/src/main/scala/TestBuilder.scala +10 -0
  227. data/tracks/sml/.travis.yml +9 -2
  228. data/tracks/sml/Makefile +42 -0
  229. data/tracks/sml/docs/EXERCISE_README_INSERT.md +21 -5
  230. data/tracks/sml/docs/RESOURCES.md +1 -1
  231. data/tracks/sml/docs/TESTS.md +2 -2
  232. metadata +67 -17
  233. data/tracks/bash/exercises/word-count/README.md +0 -24
  234. data/tracks/bash/exercises/word-count/example.awk +0 -12
  235. data/tracks/bash/exercises/word-count/example.sh +0 -21
  236. data/tracks/dart/.github/PULL_REQUEST_TEMPLATE.md +0 -23
  237. data/tracks/ecmascript/.babelrc +0 -3
  238. data/tracks/groovy/exercises/roman-numerals/Roman.groovy +0 -33
  239. data/tracks/groovy/exercises/word-count/PhraseSpec.groovy +0 -47
  240. data/tracks/scala/exercises/bowling/src/main/scala/Bowling.scala +0 -11
@@ -9,7 +9,7 @@
9
9
  "url": "https://github.com/exercism/xecmascript"
10
10
  },
11
11
  "devDependencies": {
12
- "babel-jest": "^20.0.1",
12
+ "babel-jest": "^20.0.3",
13
13
  "babel-plugin-transform-builtin-extend": "^1.1.2",
14
14
  "babel-preset-env": "^1.4.0",
15
15
  "eslint": "^3.19.0",
@@ -17,7 +17,7 @@
17
17
  "eslint-plugin-import": "^2.2.0",
18
18
  "eslint-plugin-jsx-a11y": "^5.0.1",
19
19
  "eslint-plugin-react": "^7.0.1",
20
- "jest": "^20.0.1"
20
+ "jest": "^20.0.4"
21
21
  },
22
22
  "jest": {
23
23
  "modulePathIgnorePatterns": [
@@ -36,9 +36,10 @@
36
36
  "Error"
37
37
  ]
38
38
  }
39
- ]
39
+ ],
40
+ ["transform-regenerator"]
40
41
  ]
41
- },
42
+ },
42
43
  "scripts": {
43
44
  "test": "jest --no-cache ./*",
44
45
  "watch": "jest --no-cache --watch ./*",
@@ -66,4 +67,3 @@
66
67
  ],
67
68
  "dependencies": {}
68
69
  }
69
-
@@ -9,7 +9,7 @@
9
9
  "url": "https://github.com/exercism/xecmascript"
10
10
  },
11
11
  "devDependencies": {
12
- "babel-jest": "^20.0.1",
12
+ "babel-jest": "^20.0.3",
13
13
  "babel-plugin-transform-builtin-extend": "^1.1.2",
14
14
  "babel-preset-env": "^1.4.0",
15
15
  "eslint": "^3.19.0",
@@ -17,7 +17,7 @@
17
17
  "eslint-plugin-import": "^2.2.0",
18
18
  "eslint-plugin-jsx-a11y": "^5.0.1",
19
19
  "eslint-plugin-react": "^7.0.1",
20
- "jest": "^20.0.1"
20
+ "jest": "^20.0.4"
21
21
  },
22
22
  "jest": {
23
23
  "modulePathIgnorePatterns": [
@@ -36,9 +36,10 @@
36
36
  "Error"
37
37
  ]
38
38
  }
39
- ]
39
+ ],
40
+ ["transform-regenerator"]
40
41
  ]
41
- },
42
+ },
42
43
  "scripts": {
43
44
  "test": "jest --no-cache ./*",
44
45
  "watch": "jest --no-cache --watch ./*",
@@ -66,4 +67,3 @@
66
67
  ],
67
68
  "dependencies": {}
68
69
  }
69
-
@@ -9,7 +9,7 @@
9
9
  "url": "https://github.com/exercism/xecmascript"
10
10
  },
11
11
  "devDependencies": {
12
- "babel-jest": "^20.0.1",
12
+ "babel-jest": "^20.0.3",
13
13
  "babel-plugin-transform-builtin-extend": "^1.1.2",
14
14
  "babel-preset-env": "^1.4.0",
15
15
  "eslint": "^3.19.0",
@@ -17,7 +17,7 @@
17
17
  "eslint-plugin-import": "^2.2.0",
18
18
  "eslint-plugin-jsx-a11y": "^5.0.1",
19
19
  "eslint-plugin-react": "^7.0.1",
20
- "jest": "^20.0.1"
20
+ "jest": "^20.0.4"
21
21
  },
22
22
  "jest": {
23
23
  "modulePathIgnorePatterns": [
@@ -36,9 +36,10 @@
36
36
  "Error"
37
37
  ]
38
38
  }
39
- ]
39
+ ],
40
+ ["transform-regenerator"]
40
41
  ]
41
- },
42
+ },
42
43
  "scripts": {
43
44
  "test": "jest --no-cache ./*",
44
45
  "watch": "jest --no-cache --watch ./*",
@@ -66,4 +67,3 @@
66
67
  ],
67
68
  "dependencies": {}
68
69
  }
69
-
@@ -9,7 +9,7 @@
9
9
  "url": "https://github.com/exercism/xecmascript"
10
10
  },
11
11
  "devDependencies": {
12
- "babel-jest": "^20.0.1",
12
+ "babel-jest": "^20.0.3",
13
13
  "babel-plugin-transform-builtin-extend": "^1.1.2",
14
14
  "babel-preset-env": "^1.4.0",
15
15
  "eslint": "^3.19.0",
@@ -17,7 +17,7 @@
17
17
  "eslint-plugin-import": "^2.2.0",
18
18
  "eslint-plugin-jsx-a11y": "^5.0.1",
19
19
  "eslint-plugin-react": "^7.0.1",
20
- "jest": "^20.0.1"
20
+ "jest": "^20.0.4"
21
21
  },
22
22
  "jest": {
23
23
  "modulePathIgnorePatterns": [
@@ -36,9 +36,10 @@
36
36
  "Error"
37
37
  ]
38
38
  }
39
- ]
39
+ ],
40
+ ["transform-regenerator"]
40
41
  ]
41
- },
42
+ },
42
43
  "scripts": {
43
44
  "test": "jest --no-cache ./*",
44
45
  "watch": "jest --no-cache --watch ./*",
@@ -66,4 +67,3 @@
66
67
  ],
67
68
  "dependencies": {}
68
69
  }
69
-
@@ -9,7 +9,7 @@
9
9
  "url": "https://github.com/exercism/xecmascript"
10
10
  },
11
11
  "devDependencies": {
12
- "babel-jest": "^20.0.1",
12
+ "babel-jest": "^20.0.3",
13
13
  "babel-plugin-transform-builtin-extend": "^1.1.2",
14
14
  "babel-preset-env": "^1.4.0",
15
15
  "eslint": "^3.19.0",
@@ -17,7 +17,7 @@
17
17
  "eslint-plugin-import": "^2.2.0",
18
18
  "eslint-plugin-jsx-a11y": "^5.0.1",
19
19
  "eslint-plugin-react": "^7.0.1",
20
- "jest": "^20.0.1"
20
+ "jest": "^20.0.4"
21
21
  },
22
22
  "jest": {
23
23
  "modulePathIgnorePatterns": [
@@ -36,9 +36,10 @@
36
36
  "Error"
37
37
  ]
38
38
  }
39
- ]
39
+ ],
40
+ ["transform-regenerator"]
40
41
  ]
41
- },
42
+ },
42
43
  "scripts": {
43
44
  "test": "jest --no-cache ./*",
44
45
  "watch": "jest --no-cache --watch ./*",
@@ -66,4 +67,3 @@
66
67
  ],
67
68
  "dependencies": {}
68
69
  }
69
-
@@ -9,7 +9,7 @@
9
9
  "url": "https://github.com/exercism/xecmascript"
10
10
  },
11
11
  "devDependencies": {
12
- "babel-jest": "^20.0.1",
12
+ "babel-jest": "^20.0.3",
13
13
  "babel-plugin-transform-builtin-extend": "^1.1.2",
14
14
  "babel-preset-env": "^1.4.0",
15
15
  "eslint": "^3.19.0",
@@ -17,7 +17,7 @@
17
17
  "eslint-plugin-import": "^2.2.0",
18
18
  "eslint-plugin-jsx-a11y": "^5.0.1",
19
19
  "eslint-plugin-react": "^7.0.1",
20
- "jest": "^20.0.1"
20
+ "jest": "^20.0.4"
21
21
  },
22
22
  "jest": {
23
23
  "modulePathIgnorePatterns": [
@@ -36,9 +36,10 @@
36
36
  "Error"
37
37
  ]
38
38
  }
39
- ]
39
+ ],
40
+ ["transform-regenerator"]
40
41
  ]
41
- },
42
+ },
42
43
  "scripts": {
43
44
  "test": "jest --no-cache ./*",
44
45
  "watch": "jest --no-cache --watch ./*",
@@ -66,4 +67,3 @@
66
67
  ],
67
68
  "dependencies": {}
68
69
  }
69
-
@@ -9,7 +9,7 @@
9
9
  "url": "https://github.com/exercism/xecmascript"
10
10
  },
11
11
  "devDependencies": {
12
- "babel-jest": "^20.0.1",
12
+ "babel-jest": "^20.0.3",
13
13
  "babel-plugin-transform-builtin-extend": "^1.1.2",
14
14
  "babel-preset-env": "^1.4.0",
15
15
  "eslint": "^3.19.0",
@@ -17,7 +17,7 @@
17
17
  "eslint-plugin-import": "^2.2.0",
18
18
  "eslint-plugin-jsx-a11y": "^5.0.1",
19
19
  "eslint-plugin-react": "^7.0.1",
20
- "jest": "^20.0.1"
20
+ "jest": "^20.0.4"
21
21
  },
22
22
  "jest": {
23
23
  "modulePathIgnorePatterns": [
@@ -36,9 +36,10 @@
36
36
  "Error"
37
37
  ]
38
38
  }
39
- ]
39
+ ],
40
+ ["transform-regenerator"]
40
41
  ]
41
- },
42
+ },
42
43
  "scripts": {
43
44
  "test": "jest --no-cache ./*",
44
45
  "watch": "jest --no-cache --watch ./*",
@@ -66,4 +67,3 @@
66
67
  ],
67
68
  "dependencies": {}
68
69
  }
69
-
@@ -9,7 +9,7 @@
9
9
  "url": "https://github.com/exercism/xecmascript"
10
10
  },
11
11
  "devDependencies": {
12
- "babel-jest": "^20.0.1",
12
+ "babel-jest": "^20.0.3",
13
13
  "babel-plugin-transform-builtin-extend": "^1.1.2",
14
14
  "babel-preset-env": "^1.4.0",
15
15
  "eslint": "^3.19.0",
@@ -17,7 +17,7 @@
17
17
  "eslint-plugin-import": "^2.2.0",
18
18
  "eslint-plugin-jsx-a11y": "^5.0.1",
19
19
  "eslint-plugin-react": "^7.0.1",
20
- "jest": "^20.0.1"
20
+ "jest": "^20.0.4"
21
21
  },
22
22
  "jest": {
23
23
  "modulePathIgnorePatterns": [
@@ -36,9 +36,10 @@
36
36
  "Error"
37
37
  ]
38
38
  }
39
- ]
39
+ ],
40
+ ["transform-regenerator"]
40
41
  ]
41
- },
42
+ },
42
43
  "scripts": {
43
44
  "test": "jest --no-cache ./*",
44
45
  "watch": "jest --no-cache --watch ./*",
@@ -66,4 +67,3 @@
66
67
  ],
67
68
  "dependencies": {}
68
69
  }
69
-
@@ -9,7 +9,7 @@
9
9
  "url": "https://github.com/exercism/xecmascript"
10
10
  },
11
11
  "devDependencies": {
12
- "babel-jest": "^20.0.1",
12
+ "babel-jest": "^20.0.3",
13
13
  "babel-plugin-transform-builtin-extend": "^1.1.2",
14
14
  "babel-preset-env": "^1.4.0",
15
15
  "eslint": "^3.19.0",
@@ -17,7 +17,7 @@
17
17
  "eslint-plugin-import": "^2.2.0",
18
18
  "eslint-plugin-jsx-a11y": "^5.0.1",
19
19
  "eslint-plugin-react": "^7.0.1",
20
- "jest": "^20.0.1"
20
+ "jest": "^20.0.4"
21
21
  },
22
22
  "jest": {
23
23
  "modulePathIgnorePatterns": [
@@ -36,9 +36,10 @@
36
36
  "Error"
37
37
  ]
38
38
  }
39
- ]
39
+ ],
40
+ ["transform-regenerator"]
40
41
  ]
41
- },
42
+ },
42
43
  "scripts": {
43
44
  "test": "jest --no-cache ./*",
44
45
  "watch": "jest --no-cache --watch ./*",
@@ -66,4 +67,3 @@
66
67
  ],
67
68
  "dependencies": {}
68
69
  }
69
-
@@ -9,7 +9,7 @@
9
9
  "url": "https://github.com/exercism/xecmascript"
10
10
  },
11
11
  "devDependencies": {
12
- "babel-jest": "^20.0.1",
12
+ "babel-jest": "^20.0.3",
13
13
  "babel-plugin-transform-builtin-extend": "^1.1.2",
14
14
  "babel-preset-env": "^1.4.0",
15
15
  "eslint": "^3.19.0",
@@ -17,7 +17,7 @@
17
17
  "eslint-plugin-import": "^2.2.0",
18
18
  "eslint-plugin-jsx-a11y": "^5.0.1",
19
19
  "eslint-plugin-react": "^7.0.1",
20
- "jest": "^20.0.1"
20
+ "jest": "^20.0.4"
21
21
  },
22
22
  "jest": {
23
23
  "modulePathIgnorePatterns": [
@@ -36,9 +36,10 @@
36
36
  "Error"
37
37
  ]
38
38
  }
39
- ]
39
+ ],
40
+ ["transform-regenerator"]
40
41
  ]
41
- },
42
+ },
42
43
  "scripts": {
43
44
  "test": "jest --no-cache ./*",
44
45
  "watch": "jest --no-cache --watch ./*",
@@ -66,4 +67,3 @@
66
67
  ],
67
68
  "dependencies": {}
68
69
  }
69
-
@@ -0,0 +1,59 @@
1
+ # Run Length Encoding
2
+
3
+ Implement run-length encoding and decoding.
4
+
5
+ Run-length encoding (RLE) is a simple form of data compression, where runs
6
+ (consecutive data elements) are replaced by just one data value and count.
7
+
8
+ In the following example, we can represent the original 53 characters with only 13.
9
+
10
+ ```
11
+ "WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWB" -> "12WB12W3B24WB"
12
+ ```
13
+
14
+ RLE allows the original data to be perfectly reconstructed from
15
+ the compressed data, which makes it a lossless data compression.
16
+
17
+ ```
18
+ "AABCCCDEEEE" -> "2AB3CD4E" -> "AABCCCDEEEE"
19
+ ```
20
+
21
+ For simplicity, you can assume that the unencoded string will only contain
22
+ the letters A through Z (either lower or upper case) and whitespace. This way
23
+ data to be encoded will never contain any numbers and numbers inside data to
24
+ be decoded will always represent the count for the following character.
25
+
26
+ ## Setup
27
+
28
+ Go through the setup instructions for EcmaScript to
29
+ install the necessary dependencies:
30
+
31
+ http://exercism.io/languages/ecmascript
32
+
33
+ ## Requirements
34
+
35
+ Install assignment dependencies:
36
+
37
+ ```bash
38
+ $ npm install
39
+ ```
40
+
41
+ ## Making the test suite pass
42
+
43
+ Execute the tests with:
44
+
45
+ ```bash
46
+ $ npm test
47
+ ```
48
+
49
+ In the test suites all tests but the first have been skipped.
50
+
51
+ Once you get a test passing, you can enable the next one by
52
+ changing `xtest` to `test`.
53
+
54
+ ## Source
55
+
56
+ Wikipedia [https://en.wikipedia.org/wiki/Run-length_encoding](https://en.wikipedia.org/wiki/Run-length_encoding)
57
+
58
+ ## Submitting Incomplete Solutions
59
+ It's possible to submit an incomplete solution so you can see how others have completed the exercise.
@@ -0,0 +1,13 @@
1
+
2
+ export const encode = (plainText) => {
3
+ const consecutiveChars = /([\w\s])\1*/g;
4
+ return plainText.replace(consecutiveChars,
5
+ match => (match.length > 1 ? match.length + match[0] : match[0]));
6
+ };
7
+
8
+
9
+ export const decode = (encodedText) => {
10
+ const countAndChar = /(\d+)(\w|\s)/g;
11
+ return encodedText.replace(countAndChar,
12
+ (match, repeats, char) => new Array(+repeats + 1).join(char));
13
+ };
@@ -0,0 +1,69 @@
1
+ {
2
+ "name": "xecmascript",
3
+ "version": "0.0.0",
4
+ "description": "Exercism exercises in ECMAScript 6.",
5
+ "author": "Katrina Owen",
6
+ "private": true,
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/exercism/xecmascript"
10
+ },
11
+ "devDependencies": {
12
+ "babel-jest": "^20.0.3",
13
+ "babel-plugin-transform-builtin-extend": "^1.1.2",
14
+ "babel-preset-env": "^1.4.0",
15
+ "eslint": "^3.19.0",
16
+ "eslint-config-airbnb": "^15.0.1",
17
+ "eslint-plugin-import": "^2.2.0",
18
+ "eslint-plugin-jsx-a11y": "^5.0.1",
19
+ "eslint-plugin-react": "^7.0.1",
20
+ "jest": "^20.0.4"
21
+ },
22
+ "jest": {
23
+ "modulePathIgnorePatterns": [
24
+ "package.json"
25
+ ]
26
+ },
27
+ "babel": {
28
+ "presets": [
29
+ "env"
30
+ ],
31
+ "plugins": [
32
+ [
33
+ "babel-plugin-transform-builtin-extend",
34
+ {
35
+ "globals": [
36
+ "Error"
37
+ ]
38
+ }
39
+ ],
40
+ ["transform-regenerator"]
41
+ ]
42
+ },
43
+ "scripts": {
44
+ "test": "jest --no-cache ./*",
45
+ "watch": "jest --no-cache --watch ./*",
46
+ "lint": "eslint .",
47
+ "lint-test": "eslint . && jest --no-cache ./* "
48
+ },
49
+ "eslintConfig": {
50
+ "parserOptions": {
51
+ "ecmaVersion": 6,
52
+ "sourceType": "module"
53
+ },
54
+ "env": {
55
+ "es6": true,
56
+ "node": true,
57
+ "jest": true
58
+ },
59
+ "extends": "airbnb",
60
+ "rules": {
61
+ "import/no-unresolved": "off",
62
+ "import/extensions": "off"
63
+ }
64
+ },
65
+ "licenses": [
66
+ "MIT"
67
+ ],
68
+ "dependencies": {}
69
+ }