trackler 2.0.8.13 → 2.0.8.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/common/exercises/acronym/canonical-data.json +50 -39
  3. data/common/exercises/all-your-base/canonical-data.json +192 -146
  4. data/common/exercises/allergies/canonical-data.json +133 -93
  5. data/common/exercises/anagram/canonical-data.json +128 -106
  6. data/common/exercises/atbash-cipher/canonical-data.json +92 -74
  7. data/common/exercises/binary/canonical-data.json +94 -77
  8. data/common/exercises/bob/canonical-data.json +154 -127
  9. data/common/exercises/book-store/canonical-data.json +106 -92
  10. data/common/exercises/change/canonical-data.json +80 -68
  11. data/common/exercises/grains/canonical-data.json +75 -60
  12. data/common/exercises/hello-world/canonical-data.json +6 -6
  13. data/common/exercises/leap/canonical-data.json +28 -22
  14. data/common/exercises/luhn/canonical-data.json +16 -1
  15. data/common/exercises/pig-latin/canonical-data.json +93 -75
  16. data/common/exercises/raindrops/canonical-data.json +112 -92
  17. data/common/exercises/rna-transcription/canonical-data.json +64 -54
  18. data/common/exercises/run-length-encoding/canonical-data.json +20 -0
  19. data/common/exercises/run-length-encoding/description.md +3 -7
  20. data/common/exercises/say/canonical-data.json +98 -81
  21. data/common/exercises/scrabble-score/canonical-data.json +13 -0
  22. data/common/exercises/sieve/canonical-data.json +48 -42
  23. data/common/exercises/trinary/canonical-data.json +75 -60
  24. data/common/exercises/word-count/canonical-data.json +116 -54
  25. data/common/exercises/wordy/canonical-data.json +101 -83
  26. data/lib/trackler/version.rb +1 -1
  27. data/tracks/delphi/SETUP.md +10 -1
  28. data/tracks/delphi/config.json +8 -0
  29. data/tracks/delphi/docs/TESTS.md +4 -0
  30. data/tracks/delphi/exercises/hello-world/uTestHelloWorld.pas +49 -27
  31. data/tracks/delphi/exercises/triangle/Triangle.dpr +60 -0
  32. data/tracks/delphi/exercises/triangle/uTestTriangle.pas +186 -0
  33. data/tracks/delphi/exercises/triangle/uTriangleExample.pas +64 -0
  34. data/tracks/go/exercises/poker/poker_test.go +6 -6
  35. data/tracks/java/exercises/atbash-cipher/src/test/java/AtbashTest.java +2 -1
  36. data/tracks/scala/config.json +10 -0
  37. data/tracks/scala/exercises/variable-length-quantity/HINTS.md +2 -0
  38. data/tracks/scala/exercises/variable-length-quantity/build.sbt +3 -0
  39. data/tracks/scala/exercises/variable-length-quantity/example.scala +56 -0
  40. data/tracks/scala/exercises/variable-length-quantity/src/main/scala/VariableLengthQuantity.scala +0 -0
  41. data/tracks/scala/exercises/variable-length-quantity/src/test/scala/VariableLengthQuantityTest.scala +162 -0
  42. data/tracks/scala/testgen/src/main/scala/VariableLengthQuantityTestGenerator.scala +80 -0
  43. data/tracks/typescript/common/package.json +6 -7
  44. data/tracks/typescript/common/yarn.lock +422 -380
  45. data/tracks/typescript/config.json +12 -0
  46. data/tracks/typescript/exercises/anagram/package.json +6 -7
  47. data/tracks/typescript/exercises/anagram/yarn.lock +422 -380
  48. data/tracks/typescript/exercises/beer-song/package.json +6 -7
  49. data/tracks/typescript/exercises/beer-song/yarn.lock +422 -380
  50. data/tracks/typescript/exercises/bob/package.json +6 -7
  51. data/tracks/typescript/exercises/bob/yarn.lock +422 -380
  52. data/tracks/typescript/exercises/food-chain/package.json +6 -7
  53. data/tracks/typescript/exercises/food-chain/yarn.lock +422 -380
  54. data/tracks/typescript/exercises/gigasecond/package.json +6 -7
  55. data/tracks/typescript/exercises/gigasecond/yarn.lock +422 -380
  56. data/tracks/typescript/exercises/grade-school/grade-school.example.ts +31 -0
  57. data/tracks/typescript/exercises/grade-school/grade-school.test.ts +81 -0
  58. data/tracks/typescript/exercises/grade-school/package.json +36 -0
  59. data/tracks/typescript/exercises/grade-school/tsconfig.json +21 -0
  60. data/tracks/typescript/exercises/grade-school/tslint.json +127 -0
  61. data/tracks/typescript/exercises/grade-school/yarn.lock +2739 -0
  62. data/tracks/typescript/exercises/hamming/package.json +6 -7
  63. data/tracks/typescript/exercises/hamming/yarn.lock +422 -380
  64. data/tracks/typescript/exercises/hello-world/package.json +6 -7
  65. data/tracks/typescript/exercises/hello-world/yarn.lock +422 -380
  66. data/tracks/typescript/exercises/leap/package.json +6 -7
  67. data/tracks/typescript/exercises/leap/yarn.lock +422 -380
  68. data/tracks/typescript/exercises/pangram/package.json +6 -7
  69. data/tracks/typescript/exercises/pangram/yarn.lock +422 -380
  70. data/tracks/typescript/exercises/phone-number/package.json +6 -7
  71. data/tracks/typescript/exercises/phone-number/yarn.lock +422 -380
  72. data/tracks/typescript/exercises/rna-transcription/package.json +6 -7
  73. data/tracks/typescript/exercises/rna-transcription/yarn.lock +422 -380
  74. data/tracks/typescript/exercises/robot-name/package.json +36 -0
  75. data/tracks/typescript/exercises/robot-name/robot-name.example.ts +36 -0
  76. data/tracks/typescript/exercises/robot-name/robot-name.test.ts +86 -0
  77. data/tracks/typescript/exercises/robot-name/tsconfig.json +21 -0
  78. data/tracks/typescript/exercises/robot-name/tslint.json +127 -0
  79. data/tracks/typescript/exercises/robot-name/yarn.lock +2739 -0
  80. data/tracks/typescript/exercises/say/package.json +6 -7
  81. data/tracks/typescript/exercises/say/yarn.lock +422 -380
  82. data/tracks/typescript/exercises/word-count/package.json +6 -7
  83. data/tracks/typescript/exercises/word-count/yarn.lock +422 -380
  84. data/tracks/typescript/exercises/wordy/package.json +6 -7
  85. data/tracks/typescript/exercises/wordy/yarn.lock +422 -380
  86. metadata +23 -2
@@ -1,129 +1,156 @@
1
1
  {
2
- "cases": [
3
- {
4
- "description": "stating something",
5
- "input": "Tom-ay-to, tom-aaaah-to.",
6
- "expected": "Whatever."
7
- },
8
- {
9
- "description": "shouting",
10
- "input": "WATCH OUT!",
11
- "expected": "Whoa, chill out!"
12
- },
13
- {
14
- "description": "shouting gibberish",
15
- "input": "FCECDFCAAB",
16
- "expected": "Whoa, chill out!"
17
- },
18
- {
19
- "description": "asking a question",
20
- "input": "Does this cryogenic chamber make me look fat?",
21
- "expected": "Sure."
22
- },
23
- {
24
- "description": "asking a numeric question",
25
- "input": "You are, what, like 15?",
26
- "expected": "Sure."
27
- },
28
- {
29
- "description": "asking gibberish",
30
- "input": "fffbbcbeab?",
31
- "expected": "Sure."
32
- },
33
- {
34
- "description": "talking forcefully",
35
- "input": "Let's go make out behind the gym!",
36
- "expected": "Whatever."
37
- },
38
- {
39
- "description": "using acronyms in regular speech",
40
- "input": "It's OK if you don't want to go to the DMV.",
41
- "expected": "Whatever."
42
- },
43
- {
44
- "description": "forceful question",
45
- "input": "WHAT THE HELL WERE YOU THINKING?",
46
- "expected": "Whoa, chill out!"
47
- },
48
- {
49
- "description": "shouting numbers",
50
- "input": "1, 2, 3 GO!",
51
- "expected": "Whoa, chill out!"
52
- },
53
- {
54
- "description": "only numbers",
55
- "input": "1, 2, 3",
56
- "expected": "Whatever."
57
- },
58
- {
59
- "description": "question with only numbers",
60
- "input": "4?",
61
- "expected": "Sure."
62
- },
63
- {
64
- "description": "shouting with special characters",
65
- "input": "ZOMG THE %^*@#$(*^ ZOMBIES ARE COMING!!11!!1!",
66
- "expected": "Whoa, chill out!"
67
- },
68
- {
69
- "description": "shouting with no exclamation mark",
70
- "input": "I HATE YOU",
71
- "expected": "Whoa, chill out!"
72
- },
73
- {
74
- "description": "statement containing question mark",
75
- "input": "Ending with ? means a question.",
76
- "expected": "Whatever."
77
- },
78
- {
79
- "description": "non-letters with question",
80
- "input": ":) ?",
81
- "expected": "Sure."
82
- },
83
- {
84
- "description": "prattling on",
85
- "input": "Wait! Hang on. Are you going to be OK?",
86
- "expected": "Sure."
87
- },
88
- {
89
- "description": "silence",
90
- "input": "",
91
- "expected": "Fine. Be that way!"
92
- },
93
- {
94
- "description": "prolonged silence",
95
- "input": " ",
96
- "expected": "Fine. Be that way!"
97
- },
98
- {
99
- "description": "alternate silence",
100
- "input": "\t\t\t\t\t\t\t\t\t\t",
101
- "expected": "Fine. Be that way!"
102
- },
103
- {
104
- "description": "multiple line question",
105
- "input": "\nDoes this cryogenic chamber make me look fat?\nno",
106
- "expected": "Whatever."
107
- },
108
- {
109
- "description": "starting with whitespace",
110
- "input": " hmmmmmmm...",
111
- "expected": "Whatever."
112
- },
113
- {
114
- "description": "ending with whitespace",
115
- "input": "Okay if like my spacebar quite a bit? ",
116
- "expected": "Sure."
117
- },
118
- {
119
- "description": "other whitespace",
120
- "input": "\n\r \t",
121
- "expected": "Fine. Be that way!"
122
- },
123
- {
124
- "description": "non-question ending with whitespace",
125
- "input": "This is a statement ending with whitespace ",
126
- "expected": "Whatever."
127
- }
128
- ]
2
+ "exercise": "bob",
3
+ "version": "1.0.0",
4
+ "cases": [
5
+ {
6
+ "description": "stating something",
7
+ "property": "response",
8
+ "input": "Tom-ay-to, tom-aaaah-to.",
9
+ "expected": "Whatever."
10
+ },
11
+ {
12
+ "description": "shouting",
13
+ "property": "response",
14
+ "input": "WATCH OUT!",
15
+ "expected": "Whoa, chill out!"
16
+ },
17
+ {
18
+ "description": "shouting gibberish",
19
+ "property": "response",
20
+ "input": "FCECDFCAAB",
21
+ "expected": "Whoa, chill out!"
22
+ },
23
+ {
24
+ "description": "asking a question",
25
+ "property": "response",
26
+ "input": "Does this cryogenic chamber make me look fat?",
27
+ "expected": "Sure."
28
+ },
29
+ {
30
+ "description": "asking a numeric question",
31
+ "property": "response",
32
+ "input": "You are, what, like 15?",
33
+ "expected": "Sure."
34
+ },
35
+ {
36
+ "description": "asking gibberish",
37
+ "property": "response",
38
+ "input": "fffbbcbeab?",
39
+ "expected": "Sure."
40
+ },
41
+ {
42
+ "description": "talking forcefully",
43
+ "property": "response",
44
+ "input": "Let's go make out behind the gym!",
45
+ "expected": "Whatever."
46
+ },
47
+ {
48
+ "description": "using acronyms in regular speech",
49
+ "property": "response",
50
+ "input": "It's OK if you don't want to go to the DMV.",
51
+ "expected": "Whatever."
52
+ },
53
+ {
54
+ "description": "forceful question",
55
+ "property": "response",
56
+ "input": "WHAT THE HELL WERE YOU THINKING?",
57
+ "expected": "Whoa, chill out!"
58
+ },
59
+ {
60
+ "description": "shouting numbers",
61
+ "property": "response",
62
+ "input": "1, 2, 3 GO!",
63
+ "expected": "Whoa, chill out!"
64
+ },
65
+ {
66
+ "description": "only numbers",
67
+ "property": "response",
68
+ "input": "1, 2, 3",
69
+ "expected": "Whatever."
70
+ },
71
+ {
72
+ "description": "question with only numbers",
73
+ "property": "response",
74
+ "input": "4?",
75
+ "expected": "Sure."
76
+ },
77
+ {
78
+ "description": "shouting with special characters",
79
+ "property": "response",
80
+ "input": "ZOMG THE %^*@#$(*^ ZOMBIES ARE COMING!!11!!1!",
81
+ "expected": "Whoa, chill out!"
82
+ },
83
+ {
84
+ "description": "shouting with no exclamation mark",
85
+ "property": "response",
86
+ "input": "I HATE YOU",
87
+ "expected": "Whoa, chill out!"
88
+ },
89
+ {
90
+ "description": "statement containing question mark",
91
+ "property": "response",
92
+ "input": "Ending with ? means a question.",
93
+ "expected": "Whatever."
94
+ },
95
+ {
96
+ "description": "non-letters with question",
97
+ "property": "response",
98
+ "input": ":) ?",
99
+ "expected": "Sure."
100
+ },
101
+ {
102
+ "description": "prattling on",
103
+ "property": "response",
104
+ "input": "Wait! Hang on. Are you going to be OK?",
105
+ "expected": "Sure."
106
+ },
107
+ {
108
+ "description": "silence",
109
+ "property": "response",
110
+ "input": "",
111
+ "expected": "Fine. Be that way!"
112
+ },
113
+ {
114
+ "description": "prolonged silence",
115
+ "property": "response",
116
+ "input": " ",
117
+ "expected": "Fine. Be that way!"
118
+ },
119
+ {
120
+ "description": "alternate silence",
121
+ "property": "response",
122
+ "input": "\t\t\t\t\t\t\t\t\t\t",
123
+ "expected": "Fine. Be that way!"
124
+ },
125
+ {
126
+ "description": "multiple line question",
127
+ "property": "response",
128
+ "input": "\nDoes this cryogenic chamber make me look fat?\nno",
129
+ "expected": "Whatever."
130
+ },
131
+ {
132
+ "description": "starting with whitespace",
133
+ "property": "response",
134
+ "input": " hmmmmmmm...",
135
+ "expected": "Whatever."
136
+ },
137
+ {
138
+ "description": "ending with whitespace",
139
+ "property": "response",
140
+ "input": "Okay if like my spacebar quite a bit? ",
141
+ "expected": "Sure."
142
+ },
143
+ {
144
+ "description": "other whitespace",
145
+ "property": "response",
146
+ "input": "\n\r \t",
147
+ "expected": "Fine. Be that way!"
148
+ },
149
+ {
150
+ "description": "non-question ending with whitespace",
151
+ "property": "response",
152
+ "input": "This is a statement ending with whitespace ",
153
+ "expected": "Whatever."
154
+ }
155
+ ]
129
156
  }
@@ -1,93 +1,107 @@
1
1
  {
2
- "book-store": {
3
- "description": [
4
- "Calculate lowest price for a shopping basket containing ",
5
- "books only from a single series. There is no ",
6
- "discount advantage for having more than one copy of ",
7
- "any single book in a grouping."
8
- ],
9
- "total": {
10
- "description": "returns the total basket price after applying best discount",
11
- "cases": [
12
- {
13
- "description": "Only a single book",
14
- "basket": [1],
15
- "targetgrouping": [[1]],
16
- "expected": 8.00
17
- },
18
- {
19
- "description": "Two of the same book",
20
- "basket": [2,2],
21
- "targetgrouping": [[2],[2]],
22
- "expected": 16.00
23
- },
24
- {
25
- "description": "Empty basket",
26
- "basket": [],
27
- "targetgrouping": [],
28
- "expected": 0.00
29
- },
30
- {
31
- "description": "Two different books",
32
- "basket": [1,2],
33
- "targetgrouping": [[1,2]],
34
- "expected": 15.20
35
- },
36
- {
37
- "description": "Three different books",
38
- "basket": [1,2,3],
39
- "targetgrouping": [[1,2,3]],
40
- "expected": 21.60
41
- },
42
- {
43
- "description": "Four different books",
44
- "basket": [1,2,3,4],
45
- "targetgrouping": [[1,2,3,4]],
46
- "expected": 25.60
47
- },
48
- {
49
- "description": "Five different books",
50
- "basket": [1,2,3,4,5],
51
- "targetgrouping": [[1,2,3,4,5]],
52
- "expected": 30.00
53
- },
54
- {
55
- "description": "Two groups of four is cheaper than group of five plus group of three",
56
- "basket": [1,1,2,2,3,3,4,5],
57
- "targetgrouping": [[1,2,3,4],[1,2,3,5]],
58
- "expected": 51.20
59
- },
60
- {
61
- "description": "Group of four plus group of two is cheaper than two groups of three",
62
- "basket": [1,1,2,2,3,4],
63
- "targetgrouping": [[1,2,3,4],[1,2]],
64
- "expected": 40.8
65
- },
66
- {
67
- "description": "Two each of first 4 books and 1 copy each of rest",
68
- "basket": [1,1,2,2,3,3,4,4,5],
69
- "targetgrouping": [[1,2,3,4,5],[1,2,3,4]],
70
- "expected": 55.60
71
- },
72
- {
73
- "description": "Two copies of each book",
74
- "basket": [1,1,2,2,3,3,4,4,5,5],
75
- "targetgrouping": [[1,2,3,4,5],[1,2,3,4,5]],
76
- "expected": 60.00
77
- },
78
- {
79
- "description": "Three copies of first book and 2 each of remaining",
80
- "basket": [1,1,2,2,3,3,4,4,5,5,1],
81
- "targetgrouping": [[1,2,3,4,5],[1,2,3,4,5],[1]],
82
- "expected": 68.00
83
- },
84
- {
85
- "description": "Three each of first 2 books and 2 each of remaining books",
86
- "basket": [1,1,2,2,3,3,4,4,5,5,1,2],
87
- "targetgrouping": [[1,2,3,4,5],[1,2,3,4,5],[1,2]],
88
- "expected": 75.20
89
- }
90
- ]
91
- }
92
- }
93
- }
2
+ "exercise": "book-store",
3
+ "version": "1.0.0",
4
+ "cases": [
5
+ {
6
+ "description": "Return the total basket price after applying the best discount.",
7
+ "comments": [
8
+ "Calculate lowest price for a shopping basket containing books only from ",
9
+ "a single series. There is no discount advantage for having more than ",
10
+ "one copy of any single book in a grouping."
11
+ ],
12
+ "cases": [
13
+ {
14
+ "property": "total",
15
+ "description": "Only a single book",
16
+ "basket": [1],
17
+ "targetgrouping": [[1]],
18
+ "expected": 8.00
19
+ },
20
+ {
21
+ "property": "total",
22
+ "description": "Two of the same book",
23
+ "basket": [2,2],
24
+ "targetgrouping": [[2],[2]],
25
+ "expected": 16.00
26
+ },
27
+ {
28
+ "property": "total",
29
+ "description": "Empty basket",
30
+ "basket": [],
31
+ "targetgrouping": [],
32
+ "expected": 0.00
33
+ },
34
+ {
35
+ "property": "total",
36
+ "description": "Two different books",
37
+ "basket": [1,2],
38
+ "targetgrouping": [[1,2]],
39
+ "expected": 15.20
40
+ },
41
+ {
42
+ "property": "total",
43
+ "description": "Three different books",
44
+ "basket": [1,2,3],
45
+ "targetgrouping": [[1,2,3]],
46
+ "expected": 21.60
47
+ },
48
+ {
49
+ "property": "total",
50
+ "description": "Four different books",
51
+ "basket": [1,2,3,4],
52
+ "targetgrouping": [[1,2,3,4]],
53
+ "expected": 25.60
54
+ },
55
+ {
56
+ "property": "total",
57
+ "description": "Five different books",
58
+ "basket": [1,2,3,4,5],
59
+ "targetgrouping": [[1,2,3,4,5]],
60
+ "expected": 30.00
61
+ },
62
+ {
63
+ "property": "total",
64
+ "description": "Two groups of four is cheaper than group of five plus group of three",
65
+ "basket": [1,1,2,2,3,3,4,5],
66
+ "targetgrouping": [[1,2,3,4],[1,2,3,5]],
67
+ "expected": 51.20
68
+ },
69
+ {
70
+ "property": "total",
71
+ "description": "Group of four plus group of two is cheaper than two groups of three",
72
+ "basket": [1,1,2,2,3,4],
73
+ "targetgrouping": [[1,2,3,4],[1,2]],
74
+ "expected": 40.8
75
+ },
76
+ {
77
+ "property": "total",
78
+ "description": "Two each of first 4 books and 1 copy each of rest",
79
+ "basket": [1,1,2,2,3,3,4,4,5],
80
+ "targetgrouping": [[1,2,3,4,5],[1,2,3,4]],
81
+ "expected": 55.60
82
+ },
83
+ {
84
+ "property": "total",
85
+ "description": "Two copies of each book",
86
+ "basket": [1,1,2,2,3,3,4,4,5,5],
87
+ "targetgrouping": [[1,2,3,4,5],[1,2,3,4,5]],
88
+ "expected": 60.00
89
+ },
90
+ {
91
+ "property": "total",
92
+ "description": "Three copies of first book and 2 each of remaining",
93
+ "basket": [1,1,2,2,3,3,4,4,5,5,1],
94
+ "targetgrouping": [[1,2,3,4,5],[1,2,3,4,5],[1]],
95
+ "expected": 68.00
96
+ },
97
+ {
98
+ "property": "total",
99
+ "description": "Three each of first 2 books and 2 each of remaining books",
100
+ "basket": [1,1,2,2,3,3,4,4,5,5,1,2],
101
+ "targetgrouping": [[1,2,3,4,5],[1,2,3,4,5],[1,2]],
102
+ "expected": 75.20
103
+ }
104
+ ]
105
+ }
106
+ ]
107
+ }