trackler 2.1.0.29 → 2.1.0.30

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. checksums.yaml +4 -4
  2. data/common/exercises/twelve-days/description.md +1 -1
  3. data/lib/trackler/version.rb +1 -1
  4. data/tracks/delphi/SETUP.md +1 -1
  5. data/tracks/ecmascript/Makefile +4 -3
  6. data/tracks/ecmascript/config.json +0 -65
  7. data/tracks/ecmascript/exercises/accumulate/package.json +6 -0
  8. data/tracks/ecmascript/exercises/acronym/package.json +6 -0
  9. data/tracks/ecmascript/exercises/all-your-base/package.json +6 -0
  10. data/tracks/ecmascript/exercises/allergies/package.json +6 -0
  11. data/tracks/ecmascript/exercises/anagram/package.json +6 -0
  12. data/tracks/ecmascript/exercises/atbash-cipher/package.json +6 -0
  13. data/tracks/ecmascript/exercises/beer-song/package.json +6 -0
  14. data/tracks/ecmascript/exercises/binary-search-tree/package.json +6 -0
  15. data/tracks/ecmascript/exercises/binary-search/package.json +6 -0
  16. data/tracks/ecmascript/exercises/binary/package.json +6 -0
  17. data/tracks/ecmascript/exercises/bob/package.json +6 -0
  18. data/tracks/ecmascript/exercises/bracket-push/package.json +6 -0
  19. data/tracks/ecmascript/exercises/circular-buffer/circular-buffer.spec.js +11 -13
  20. data/tracks/ecmascript/exercises/circular-buffer/example.js +15 -14
  21. data/tracks/ecmascript/exercises/circular-buffer/package.json +6 -0
  22. data/tracks/ecmascript/exercises/clock/package.json +6 -0
  23. data/tracks/ecmascript/exercises/connect/package.json +6 -0
  24. data/tracks/ecmascript/exercises/crypto-square/package.json +6 -0
  25. data/tracks/ecmascript/exercises/custom-set/package.json +6 -0
  26. data/tracks/ecmascript/exercises/diamond/package.json +6 -0
  27. data/tracks/ecmascript/exercises/difference-of-squares/package.json +6 -0
  28. data/tracks/ecmascript/exercises/etl/package.json +6 -0
  29. data/tracks/ecmascript/exercises/food-chain/package.json +6 -0
  30. data/tracks/ecmascript/exercises/gigasecond/package.json +6 -0
  31. data/tracks/ecmascript/exercises/grade-school/package.json +6 -0
  32. data/tracks/ecmascript/exercises/grains/package.json +6 -0
  33. data/tracks/ecmascript/exercises/hamming/package.json +6 -0
  34. data/tracks/ecmascript/exercises/hello-world/package.json +6 -0
  35. data/tracks/ecmascript/exercises/hexadecimal/package.json +6 -0
  36. data/tracks/ecmascript/exercises/isogram/package.json +6 -0
  37. data/tracks/ecmascript/exercises/kindergarten-garden/package.json +6 -0
  38. data/tracks/ecmascript/exercises/largest-series-product/package.json +6 -0
  39. data/tracks/ecmascript/exercises/leap/package.json +6 -0
  40. data/tracks/ecmascript/exercises/linked-list/package.json +6 -0
  41. data/tracks/ecmascript/exercises/luhn/package.json +6 -0
  42. data/tracks/ecmascript/exercises/matrix/package.json +6 -0
  43. data/tracks/ecmascript/exercises/meetup/package.json +6 -0
  44. data/tracks/ecmascript/exercises/nth-prime/package.json +6 -0
  45. data/tracks/ecmascript/exercises/ocr-numbers/package.json +6 -0
  46. data/tracks/ecmascript/exercises/octal/package.json +6 -0
  47. data/tracks/ecmascript/exercises/package.json +11 -0
  48. data/tracks/ecmascript/exercises/palindrome-products/package.json +6 -0
  49. data/tracks/ecmascript/exercises/pangram/package.json +6 -0
  50. data/tracks/ecmascript/exercises/pascals-triangle/package.json +6 -0
  51. data/tracks/ecmascript/exercises/perfect-numbers/package.json +6 -0
  52. data/tracks/ecmascript/exercises/phone-number/package.json +6 -0
  53. data/tracks/ecmascript/exercises/pig-latin/package.json +6 -0
  54. data/tracks/ecmascript/exercises/prime-factors/package.json +6 -0
  55. data/tracks/ecmascript/exercises/pythagorean-triplet/package.json +6 -0
  56. data/tracks/ecmascript/exercises/queen-attack/package.json +6 -0
  57. data/tracks/ecmascript/exercises/raindrops/package.json +6 -0
  58. data/tracks/ecmascript/exercises/rna-transcription/package.json +6 -0
  59. data/tracks/ecmascript/exercises/robot-name/package.json +6 -0
  60. data/tracks/ecmascript/exercises/robot-simulator/package.json +6 -0
  61. data/tracks/ecmascript/exercises/roman-numerals/package.json +6 -0
  62. data/tracks/ecmascript/exercises/saddle-points/package.json +6 -0
  63. data/tracks/ecmascript/exercises/say/package.json +6 -0
  64. data/tracks/ecmascript/exercises/scrabble-score/package.json +6 -0
  65. data/tracks/ecmascript/exercises/secret-handshake/package.json +6 -0
  66. data/tracks/ecmascript/exercises/series/package.json +6 -0
  67. data/tracks/ecmascript/exercises/sieve/package.json +6 -0
  68. data/tracks/ecmascript/exercises/simple-cipher/package.json +6 -0
  69. data/tracks/ecmascript/exercises/space-age/package.json +6 -0
  70. data/tracks/ecmascript/exercises/strain/package.json +6 -0
  71. data/tracks/ecmascript/exercises/sum-of-multiples/package.json +6 -0
  72. data/tracks/ecmascript/exercises/triangle/package.json +6 -0
  73. data/tracks/ecmascript/exercises/trinary/package.json +6 -0
  74. data/tracks/ecmascript/exercises/two-bucket/package.json +6 -0
  75. data/tracks/ecmascript/exercises/word-count/package.json +6 -0
  76. data/tracks/ecmascript/exercises/wordy/package.json +6 -0
  77. data/tracks/ecmascript/package.json +6 -0
  78. data/tracks/ecmascript/yarn.lock +9 -2
  79. data/tracks/go/README.md +3 -4
  80. data/tracks/haskell/README.md +1 -1
  81. data/tracks/java/.gitignore +0 -1
  82. data/tracks/java/.travis.yml +15 -1
  83. data/tracks/java/bin/journey-test.sh +3 -4
  84. data/tracks/java/bin/unit-tests.sh +2 -2
  85. data/tracks/java/gradle/wrapper/gradle-wrapper.jar +0 -0
  86. data/tracks/java/gradle/wrapper/gradle-wrapper.properties +6 -0
  87. data/tracks/java/gradlew +172 -0
  88. data/tracks/java/gradlew.bat +84 -0
  89. data/tracks/javascript/config.json +0 -74
  90. data/tracks/javascript/exercises/isogram/isogram.spec.js +6 -0
  91. data/tracks/php/config.json +5 -0
  92. data/tracks/php/exercises/prime-factors/example.php +13 -0
  93. data/tracks/php/exercises/prime-factors/prime-factors_test.php +46 -0
  94. data/tracks/ruby/exercises/isogram/.meta/.version +1 -1
  95. data/tracks/ruby/exercises/isogram/.meta/generator/isogram_case.rb +15 -1
  96. data/tracks/ruby/exercises/isogram/isogram_test.rb +10 -10
  97. data/tracks/ruby/exercises/sum-of-multiples/.meta/.version +1 -0
  98. data/tracks/ruby/exercises/sum-of-multiples/.meta/generator/sum_of_multiples_case.rb +11 -0
  99. data/tracks/ruby/exercises/sum-of-multiples/.meta/solutions/sum_of_multiples.rb +4 -0
  100. data/tracks/ruby/exercises/sum-of-multiples/sum_of_multiples_test.rb +51 -12
  101. data/tracks/rust/exercises/forth/example.rs +2 -6
  102. data/tracks/rust/exercises/forth/tests/forth.rs +18 -18
  103. metadata +10 -2
@@ -1,25 +1,28 @@
1
1
  let buffer, bufferMax;
2
2
 
3
- const BufferEmptyException = () => ({
4
- name: "buffer empty exception!",
5
- message: "can't read from an empty buffer!"
6
- });
7
-
8
- const BufferFullException = () => ({
9
- name: "buffer full exception!",
10
- message: "can't write to a full buffer!"
11
- });
3
+ export class BufferEmptyError extends Error {
4
+ constructor(message) {
5
+ super();
6
+ this.message = message || 'Buffer is empty.';
7
+ }
8
+ };
9
+ export class BufferFullError extends Error {
10
+ constructor(message) {
11
+ super();
12
+ this.message = message || 'Buffer is full.';
13
+ }
14
+ };
12
15
 
13
16
  const read = () => {
14
17
  if (buffer.length === 0){
15
- throw BufferEmptyException();
18
+ throw new BufferEmptyError();
16
19
  }
17
20
  return buffer.splice(0,1)[0];
18
21
  };
19
22
 
20
23
  const write = (value) => {
21
24
  if (buffer.length === bufferMax){
22
- throw BufferFullException();
25
+ throw new BufferFullError();
23
26
  }
24
27
  value ? buffer.push(value) : null;
25
28
  };
@@ -41,9 +44,7 @@ const CircularBuffer = (capacity) => {
41
44
  write: write,
42
45
  forceWrite: forceWrite,
43
46
  clear: clear
44
- }
47
+ };
45
48
  };
46
49
 
47
50
  export { CircularBuffer as default };
48
- export { BufferFullException as bufferFullException };
49
- export { BufferEmptyException as bufferEmptyException };
@@ -11,6 +11,7 @@
11
11
  "devDependencies": {
12
12
  "babel-jest": "^20.0.1",
13
13
  "babel-preset-env": "^1.4.0",
14
+ "babel-plugin-transform-builtin-extend": "^1.1.2",
14
15
  "eslint": "^3.19.0",
15
16
  "jest": "^20.0.1"
16
17
  },
@@ -22,6 +23,11 @@
22
23
  "babel": {
23
24
  "presets": [
24
25
  "env"
26
+ ],
27
+ "plugins": [
28
+ ["babel-plugin-transform-builtin-extend", {
29
+ "globals": ["Error"]
30
+ }]
25
31
  ]
26
32
  },
27
33
  "scripts": {
@@ -11,6 +11,7 @@
11
11
  "devDependencies": {
12
12
  "babel-jest": "^20.0.1",
13
13
  "babel-preset-env": "^1.4.0",
14
+ "babel-plugin-transform-builtin-extend": "^1.1.2",
14
15
  "eslint": "^3.19.0",
15
16
  "jest": "^20.0.1"
16
17
  },
@@ -22,6 +23,11 @@
22
23
  "babel": {
23
24
  "presets": [
24
25
  "env"
26
+ ],
27
+ "plugins": [
28
+ ["babel-plugin-transform-builtin-extend", {
29
+ "globals": ["Error"]
30
+ }]
25
31
  ]
26
32
  },
27
33
  "scripts": {
@@ -11,6 +11,7 @@
11
11
  "devDependencies": {
12
12
  "babel-jest": "^20.0.1",
13
13
  "babel-preset-env": "^1.4.0",
14
+ "babel-plugin-transform-builtin-extend": "^1.1.2",
14
15
  "eslint": "^3.19.0",
15
16
  "jest": "^20.0.1"
16
17
  },
@@ -22,6 +23,11 @@
22
23
  "babel": {
23
24
  "presets": [
24
25
  "env"
26
+ ],
27
+ "plugins": [
28
+ ["babel-plugin-transform-builtin-extend", {
29
+ "globals": ["Error"]
30
+ }]
25
31
  ]
26
32
  },
27
33
  "scripts": {
@@ -11,6 +11,7 @@
11
11
  "devDependencies": {
12
12
  "babel-jest": "^20.0.1",
13
13
  "babel-preset-env": "^1.4.0",
14
+ "babel-plugin-transform-builtin-extend": "^1.1.2",
14
15
  "eslint": "^3.19.0",
15
16
  "jest": "^20.0.1"
16
17
  },
@@ -22,6 +23,11 @@
22
23
  "babel": {
23
24
  "presets": [
24
25
  "env"
26
+ ],
27
+ "plugins": [
28
+ ["babel-plugin-transform-builtin-extend", {
29
+ "globals": ["Error"]
30
+ }]
25
31
  ]
26
32
  },
27
33
  "scripts": {
@@ -11,6 +11,7 @@
11
11
  "devDependencies": {
12
12
  "babel-jest": "^20.0.1",
13
13
  "babel-preset-env": "^1.4.0",
14
+ "babel-plugin-transform-builtin-extend": "^1.1.2",
14
15
  "eslint": "^3.19.0",
15
16
  "jest": "^20.0.1"
16
17
  },
@@ -22,6 +23,11 @@
22
23
  "babel": {
23
24
  "presets": [
24
25
  "env"
26
+ ],
27
+ "plugins": [
28
+ ["babel-plugin-transform-builtin-extend", {
29
+ "globals": ["Error"]
30
+ }]
25
31
  ]
26
32
  },
27
33
  "scripts": {
@@ -11,6 +11,7 @@
11
11
  "devDependencies": {
12
12
  "babel-jest": "^20.0.1",
13
13
  "babel-preset-env": "^1.4.0",
14
+ "babel-plugin-transform-builtin-extend": "^1.1.2",
14
15
  "eslint": "^3.19.0",
15
16
  "jest": "^20.0.1"
16
17
  },
@@ -22,6 +23,11 @@
22
23
  "babel": {
23
24
  "presets": [
24
25
  "env"
26
+ ],
27
+ "plugins": [
28
+ ["babel-plugin-transform-builtin-extend", {
29
+ "globals": ["Error"]
30
+ }]
25
31
  ]
26
32
  },
27
33
  "scripts": {
@@ -11,6 +11,7 @@
11
11
  "devDependencies": {
12
12
  "babel-jest": "^20.0.1",
13
13
  "babel-preset-env": "^1.4.0",
14
+ "babel-plugin-transform-builtin-extend": "^1.1.2",
14
15
  "eslint": "^3.19.0",
15
16
  "jest": "^20.0.1"
16
17
  },
@@ -22,6 +23,11 @@
22
23
  "babel": {
23
24
  "presets": [
24
25
  "env"
26
+ ],
27
+ "plugins": [
28
+ ["babel-plugin-transform-builtin-extend", {
29
+ "globals": ["Error"]
30
+ }]
25
31
  ]
26
32
  },
27
33
  "scripts": {
@@ -11,6 +11,7 @@
11
11
  "devDependencies": {
12
12
  "babel-jest": "^20.0.1",
13
13
  "babel-preset-env": "^1.4.0",
14
+ "babel-plugin-transform-builtin-extend": "^1.1.2",
14
15
  "eslint": "^3.19.0",
15
16
  "jest": "^20.0.1"
16
17
  },
@@ -22,6 +23,11 @@
22
23
  "babel": {
23
24
  "presets": [
24
25
  "env"
26
+ ],
27
+ "plugins": [
28
+ ["babel-plugin-transform-builtin-extend", {
29
+ "globals": ["Error"]
30
+ }]
25
31
  ]
26
32
  },
27
33
  "scripts": {
@@ -11,6 +11,7 @@
11
11
  "devDependencies": {
12
12
  "babel-jest": "^20.0.1",
13
13
  "babel-preset-env": "^1.4.0",
14
+ "babel-plugin-transform-builtin-extend": "^1.1.2",
14
15
  "eslint": "^3.19.0",
15
16
  "jest": "^20.0.1"
16
17
  },
@@ -22,6 +23,11 @@
22
23
  "babel": {
23
24
  "presets": [
24
25
  "env"
26
+ ],
27
+ "plugins": [
28
+ ["babel-plugin-transform-builtin-extend", {
29
+ "globals": ["Error"]
30
+ }]
25
31
  ]
26
32
  },
27
33
  "scripts": {
@@ -11,6 +11,7 @@
11
11
  "devDependencies": {
12
12
  "babel-jest": "^20.0.1",
13
13
  "babel-preset-env": "^1.4.0",
14
+ "babel-plugin-transform-builtin-extend": "^1.1.2",
14
15
  "eslint": "^3.19.0",
15
16
  "jest": "^20.0.1"
16
17
  },
@@ -22,6 +23,11 @@
22
23
  "babel": {
23
24
  "presets": [
24
25
  "env"
26
+ ],
27
+ "plugins": [
28
+ ["babel-plugin-transform-builtin-extend", {
29
+ "globals": ["Error"]
30
+ }]
25
31
  ]
26
32
  },
27
33
  "scripts": {
@@ -11,6 +11,7 @@
11
11
  "devDependencies": {
12
12
  "babel-jest": "^20.0.1",
13
13
  "babel-preset-env": "^1.4.0",
14
+ "babel-plugin-transform-builtin-extend": "^1.1.2",
14
15
  "eslint": "^3.19.0",
15
16
  "jest": "^20.0.1"
16
17
  },
@@ -22,6 +23,11 @@
22
23
  "babel": {
23
24
  "presets": [
24
25
  "env"
26
+ ],
27
+ "plugins": [
28
+ ["babel-plugin-transform-builtin-extend", {
29
+ "globals": ["Error"]
30
+ }]
25
31
  ]
26
32
  },
27
33
  "scripts": {
@@ -11,6 +11,7 @@
11
11
  "devDependencies": {
12
12
  "babel-jest": "^20.0.1",
13
13
  "babel-preset-env": "^1.4.0",
14
+ "babel-plugin-transform-builtin-extend": "^1.1.2",
14
15
  "eslint": "^3.19.0",
15
16
  "jest": "^20.0.1"
16
17
  },
@@ -22,6 +23,11 @@
22
23
  "babel": {
23
24
  "presets": [
24
25
  "env"
26
+ ],
27
+ "plugins": [
28
+ ["babel-plugin-transform-builtin-extend", {
29
+ "globals": ["Error"]
30
+ }]
25
31
  ]
26
32
  },
27
33
  "scripts": {
@@ -11,6 +11,7 @@
11
11
  "devDependencies": {
12
12
  "babel-jest": "^20.0.1",
13
13
  "babel-preset-env": "^1.4.0",
14
+ "babel-plugin-transform-builtin-extend": "^1.1.2",
14
15
  "eslint": "^3.19.0",
15
16
  "jest": "^20.0.1"
16
17
  },
@@ -22,6 +23,11 @@
22
23
  "babel": {
23
24
  "presets": [
24
25
  "env"
26
+ ],
27
+ "plugins": [
28
+ ["babel-plugin-transform-builtin-extend", {
29
+ "globals": ["Error"]
30
+ }]
25
31
  ]
26
32
  },
27
33
  "scripts": {
@@ -11,6 +11,7 @@
11
11
  "devDependencies": {
12
12
  "babel-jest": "^20.0.1",
13
13
  "babel-preset-env": "^1.4.0",
14
+ "babel-plugin-transform-builtin-extend": "^1.1.2",
14
15
  "eslint": "^3.19.0",
15
16
  "jest": "^20.0.1"
16
17
  },
@@ -22,6 +23,11 @@
22
23
  "babel": {
23
24
  "presets": [
24
25
  "env"
26
+ ],
27
+ "plugins": [
28
+ ["babel-plugin-transform-builtin-extend", {
29
+ "globals": ["Error"]
30
+ }]
25
31
  ]
26
32
  },
27
33
  "scripts": {
@@ -11,6 +11,7 @@
11
11
  "devDependencies": {
12
12
  "babel-jest": "^20.0.1",
13
13
  "babel-preset-env": "^1.4.0",
14
+ "babel-plugin-transform-builtin-extend": "^1.1.2",
14
15
  "eslint": "^3.19.0",
15
16
  "jest": "^20.0.1"
16
17
  },
@@ -22,6 +23,11 @@
22
23
  "babel": {
23
24
  "presets": [
24
25
  "env"
26
+ ],
27
+ "plugins": [
28
+ ["babel-plugin-transform-builtin-extend", {
29
+ "globals": ["Error"]
30
+ }]
25
31
  ]
26
32
  },
27
33
  "scripts": {
@@ -11,6 +11,7 @@
11
11
  "devDependencies": {
12
12
  "babel-jest": "^20.0.1",
13
13
  "babel-preset-env": "^1.4.0",
14
+ "babel-plugin-transform-builtin-extend": "^1.1.2",
14
15
  "eslint": "^3.19.0",
15
16
  "jest": "^20.0.1"
16
17
  },
@@ -22,6 +23,11 @@
22
23
  "babel": {
23
24
  "presets": [
24
25
  "env"
26
+ ],
27
+ "plugins": [
28
+ ["babel-plugin-transform-builtin-extend", {
29
+ "globals": ["Error"]
30
+ }]
25
31
  ]
26
32
  },
27
33
  "scripts": {
@@ -11,6 +11,7 @@
11
11
  "devDependencies": {
12
12
  "babel-jest": "^20.0.1",
13
13
  "babel-preset-env": "^1.4.0",
14
+ "babel-plugin-transform-builtin-extend": "^1.1.2",
14
15
  "eslint": "^3.19.0",
15
16
  "jest": "^20.0.1"
16
17
  },
@@ -22,6 +23,11 @@
22
23
  "babel": {
23
24
  "presets": [
24
25
  "env"
26
+ ],
27
+ "plugins": [
28
+ ["babel-plugin-transform-builtin-extend", {
29
+ "globals": ["Error"]
30
+ }]
25
31
  ]
26
32
  },
27
33
  "scripts": {
@@ -11,6 +11,7 @@
11
11
  "devDependencies": {
12
12
  "babel-jest": "^20.0.1",
13
13
  "babel-preset-env": "^1.4.0",
14
+ "babel-plugin-transform-builtin-extend": "^1.1.2",
14
15
  "eslint": "^3.19.0",
15
16
  "jest": "^20.0.1"
16
17
  },
@@ -22,6 +23,11 @@
22
23
  "babel": {
23
24
  "presets": [
24
25
  "env"
26
+ ],
27
+ "plugins": [
28
+ ["babel-plugin-transform-builtin-extend", {
29
+ "globals": ["Error"]
30
+ }]
25
31
  ]
26
32
  },
27
33
  "scripts": {
@@ -11,6 +11,7 @@
11
11
  "devDependencies": {
12
12
  "babel-jest": "^20.0.1",
13
13
  "babel-preset-env": "^1.4.0",
14
+ "babel-plugin-transform-builtin-extend": "^1.1.2",
14
15
  "eslint": "^3.19.0",
15
16
  "jest": "^20.0.1"
16
17
  },
@@ -22,6 +23,11 @@
22
23
  "babel": {
23
24
  "presets": [
24
25
  "env"
26
+ ],
27
+ "plugins": [
28
+ ["babel-plugin-transform-builtin-extend", {
29
+ "globals": ["Error"]
30
+ }]
25
31
  ]
26
32
  },
27
33
  "scripts": {
@@ -11,6 +11,7 @@
11
11
  "devDependencies": {
12
12
  "babel-jest": "^20.0.1",
13
13
  "babel-preset-env": "^1.4.0",
14
+ "babel-plugin-transform-builtin-extend": "^1.1.2",
14
15
  "eslint": "^3.19.0",
15
16
  "jest": "^20.0.1"
16
17
  },
@@ -22,6 +23,11 @@
22
23
  "babel": {
23
24
  "presets": [
24
25
  "env"
26
+ ],
27
+ "plugins": [
28
+ ["babel-plugin-transform-builtin-extend", {
29
+ "globals": ["Error"]
30
+ }]
25
31
  ]
26
32
  },
27
33
  "scripts": {