trackler 2.0.0.0 → 2.0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/common/bin/jsonlint +17 -1
  3. data/common/exercises/bowling/canonical-data.json +17 -9
  4. data/lib/trackler/version.rb +1 -1
  5. data/tracks/coffeescript/config.json +107 -23
  6. data/tracks/coldfusion/config.json +7 -3
  7. data/tracks/cpp/config.json +172 -36
  8. data/tracks/elisp/config.json +92 -20
  9. data/tracks/go/config.json +367 -75
  10. data/tracks/groovy/config.json +62 -14
  11. data/tracks/haxe/config.json +12 -4
  12. data/tracks/nasm/config.json +3 -3
  13. data/tracks/nim/config.json +67 -15
  14. data/tracks/perl5/config.json +307 -63
  15. data/tracks/perl6/config.json +57 -13
  16. data/tracks/pony/config.json +32 -8
  17. data/tracks/powershell/config.json +15 -7
  18. data/tracks/python/config.json +0 -64
  19. data/tracks/sml/{accumulate → exercises/accumulate}/example.sml +0 -0
  20. data/tracks/sml/{accumulate → exercises/accumulate}/test_accumulate.sml +0 -0
  21. data/tracks/sml/{allergies → exercises/allergies}/example.sml +0 -0
  22. data/tracks/sml/{allergies → exercises/allergies}/test_allergies.sml +0 -0
  23. data/tracks/sml/{anagram → exercises/anagram}/example.sml +0 -0
  24. data/tracks/sml/{anagram → exercises/anagram}/test_anagram.sml +0 -0
  25. data/tracks/sml/{binary → exercises/binary}/example.sml +0 -0
  26. data/tracks/sml/{binary → exercises/binary}/test_binary.sml +0 -0
  27. data/tracks/sml/{hamming → exercises/hamming}/example.sml +0 -0
  28. data/tracks/sml/{hamming → exercises/hamming}/test_hamming.sml +0 -0
  29. data/tracks/tcl/config.json +3 -3
  30. data/tracks/teco/config.json +3 -3
  31. data/tracks/vbnet/config.json +37 -10
  32. metadata +11 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 86fe3d1c913914d40f4165113ee9a0c7a99d9df4
4
- data.tar.gz: 3a641896c1d89ed920a28d38915590d3301d07b3
3
+ metadata.gz: 9fff91f419bbd95eb001c7301034cbc92258f23a
4
+ data.tar.gz: dce4a5c8121cf481fc009dbe4a46724f5c2da472
5
5
  SHA512:
6
- metadata.gz: 3db27fe235eccf6eab8d4d4c374e3d760468e95aba0c437255a2b303f9eea44dc9980416171dfa8a8662f8e0d9f8f9f160cad2c2f6a2780f26e03f1aa54b684e
7
- data.tar.gz: 73b0a528842f91407430543ef748810906113146ac270cb5501ce4e52e88197fa2b948a2053e72cdd82d99880c88a6d7f9ca7bcd29d1aca44e83194c576cca4c
6
+ metadata.gz: 6e84750de6af3b699e3b2aa498f8dab12820be37e78d5f5898141e42f2d7ab80b14827e006972fc497e1f816b848e45285d45d0a627487d61a289e2ac01bca2e
7
+ data.tar.gz: e8d7320afbd63cf0045ee8a92880332e26f1f9e43d2183af992d9cfff5132b0be3a3ef2d8780f2b287fab1e2696e8e1a694b980200a7860552cefcaba427f8a2
data/common/bin/jsonlint CHANGED
@@ -1,8 +1,24 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
+ LINTER=jq
4
+ INSTRUCTIONS_URL="https://stedolan.github.io/jq/download/"
5
+
6
+ function command_exists() {
7
+ type "$1" &> /dev/null
8
+ }
9
+
10
+ function error_exit {
11
+ printf "$1" >&2
12
+ exit "${2:-1}"
13
+ }
14
+
15
+ if ! command_exists $LINTER; then
16
+ error_exit "'$LINTER' is not installed.\nSee $INSTRUCTIONS_URL for installation instructions.\n"
17
+ fi
18
+
3
19
  STATUS=0
4
20
  for f in $(ls exercises/**/*.json); do
5
- cat $f | jq . > /dev/null 2>&1
21
+ cat $f | $LINTER . > /dev/null 2>&1
6
22
  if [ $? != 0 ]; then
7
23
  echo "Invalid json: $f"
8
24
  STATUS=1
@@ -15,7 +15,7 @@
15
15
  ],
16
16
  "score": {
17
17
  "description": [
18
- "Returns the final score of a bowling game"
18
+ "returns the final score of a bowling game"
19
19
  ],
20
20
  "cases": [{
21
21
  "description": "should be able to score a game with all zeros",
@@ -42,7 +42,7 @@
42
42
  "rolls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 3, 7],
43
43
  "expected": 17
44
44
  }, {
45
- "description": "a strike earns ten points in frame with a single roll",
45
+ "description": "a strike earns ten points in a frame with a single roll",
46
46
  "rolls": [10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
47
47
  "expected": 10
48
48
  }, {
@@ -74,31 +74,39 @@
74
74
  "rolls": [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10],
75
75
  "expected": 300
76
76
  }, {
77
- "description": "Rolls can not score negative points",
77
+ "description": "rolls can not score negative points",
78
78
  "rolls": [-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
79
79
  "expected": -1
80
80
  }, {
81
- "description": "A roll can not score more than 10 points",
81
+ "description": "a roll can not score more than 10 points",
82
82
  "rolls": [11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
83
83
  "expected": -1
84
84
  }, {
85
- "description": "Two rolls in a frame can not score more than 10 points",
85
+ "description": "two rolls in a frame can not score more than 10 points",
86
86
  "rolls": [5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
87
87
  "expected": -1
88
88
  }, {
89
- "description": "Two bonus rolls after a strike in the last frame can not score more than 10 points",
89
+ "description": "two bonus rolls after a strike in the last frame can not score more than 10 points",
90
90
  "rolls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 5, 6],
91
91
  "expected": -1
92
92
  }, {
93
- "description": "An unstarted game can not be scored",
93
+ "description": "two bonus rolls after a strike in the last frame can score more than 10 points if one is a strike",
94
+ "rolls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 6],
95
+ "expected": 26
96
+ }, {
97
+ "description": "the second bonus rolls after a strike in the last frame can not be a strike if the first one is not a strike",
98
+ "rolls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 6, 10],
99
+ "expected": -1
100
+ }, {
101
+ "description": "an unstarted game can not be scored",
94
102
  "rolls": [],
95
103
  "expected": -1
96
104
  }, {
97
- "description": "An incomplete game can not be scored",
105
+ "description": "an incomplete game can not be scored",
98
106
  "rolls": [0, 0],
99
107
  "expected": -1
100
108
  }, {
101
- "description": "A game with more than ten frames can not be scored",
109
+ "description": "a game with more than ten frames can not be scored",
102
110
  "rolls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
103
111
  "expected": -1
104
112
  }, {
@@ -1,3 +1,3 @@
1
1
  module Trackler
2
- VERSION = "2.0.0.0"
2
+ VERSION = "2.0.0.1"
3
3
  end
@@ -3,29 +3,6 @@
3
3
  "language": "CoffeeScript",
4
4
  "repository": "https://github.com/exercism/xcoffeescript",
5
5
  "active": true,
6
- "problems": [
7
- "hello-world",
8
- "bob",
9
- "word-count",
10
- "accumulate",
11
- "binary",
12
- "anagram",
13
- "trinary",
14
- "hexadecimal",
15
- "triangle",
16
- "luhn",
17
- "binary-search-tree",
18
- "nth-prime",
19
- "palindrome-products",
20
- "queen-attack",
21
- "wordy",
22
- "clock",
23
- "beer-song",
24
- "atbash-cipher",
25
- "linked-list",
26
- "pascals-triangle",
27
- "nucleotide-count"
28
- ],
29
6
  "deprecated": [
30
7
 
31
8
  ],
@@ -36,5 +13,112 @@
36
13
  ],
37
14
  "foregone": [
38
15
 
16
+ ],
17
+ "exercises": [
18
+ {
19
+ "difficulty": 1,
20
+ "slug": "hello-world",
21
+ "topics": []
22
+ },
23
+ {
24
+ "difficulty": 1,
25
+ "slug": "bob",
26
+ "topics": []
27
+ },
28
+ {
29
+ "difficulty": 1,
30
+ "slug": "word-count",
31
+ "topics": []
32
+ },
33
+ {
34
+ "difficulty": 1,
35
+ "slug": "accumulate",
36
+ "topics": []
37
+ },
38
+ {
39
+ "difficulty": 1,
40
+ "slug": "binary",
41
+ "topics": []
42
+ },
43
+ {
44
+ "difficulty": 1,
45
+ "slug": "anagram",
46
+ "topics": []
47
+ },
48
+ {
49
+ "difficulty": 1,
50
+ "slug": "trinary",
51
+ "topics": []
52
+ },
53
+ {
54
+ "difficulty": 1,
55
+ "slug": "hexadecimal",
56
+ "topics": []
57
+ },
58
+ {
59
+ "difficulty": 1,
60
+ "slug": "triangle",
61
+ "topics": []
62
+ },
63
+ {
64
+ "difficulty": 1,
65
+ "slug": "luhn",
66
+ "topics": []
67
+ },
68
+ {
69
+ "difficulty": 1,
70
+ "slug": "binary-search-tree",
71
+ "topics": []
72
+ },
73
+ {
74
+ "difficulty": 1,
75
+ "slug": "nth-prime",
76
+ "topics": []
77
+ },
78
+ {
79
+ "difficulty": 1,
80
+ "slug": "palindrome-products",
81
+ "topics": []
82
+ },
83
+ {
84
+ "difficulty": 1,
85
+ "slug": "queen-attack",
86
+ "topics": []
87
+ },
88
+ {
89
+ "difficulty": 1,
90
+ "slug": "wordy",
91
+ "topics": []
92
+ },
93
+ {
94
+ "difficulty": 1,
95
+ "slug": "clock",
96
+ "topics": []
97
+ },
98
+ {
99
+ "difficulty": 1,
100
+ "slug": "beer-song",
101
+ "topics": []
102
+ },
103
+ {
104
+ "difficulty": 1,
105
+ "slug": "atbash-cipher",
106
+ "topics": []
107
+ },
108
+ {
109
+ "difficulty": 1,
110
+ "slug": "linked-list",
111
+ "topics": []
112
+ },
113
+ {
114
+ "difficulty": 1,
115
+ "slug": "pascals-triangle",
116
+ "topics": []
117
+ },
118
+ {
119
+ "difficulty": 1,
120
+ "slug": "nucleotide-count",
121
+ "topics": []
122
+ }
39
123
  ]
40
124
  }
@@ -4,9 +4,6 @@
4
4
  "repository": "https://github.com/exercism/xcoldfusion",
5
5
  "active": false,
6
6
  "test_pattern": "TODO",
7
- "problems": [
8
- "leap"
9
- ],
10
7
  "deprecated": [
11
8
 
12
9
  ],
@@ -15,5 +12,12 @@
15
12
  ],
16
13
  "foregone": [
17
14
 
15
+ ],
16
+ "exercises": [
17
+ {
18
+ "difficulty": 1,
19
+ "slug": "leap",
20
+ "topics": []
21
+ }
18
22
  ]
19
23
  }
@@ -3,42 +3,6 @@
3
3
  "language": "C++",
4
4
  "repository": "https://github.com/exercism/xcpp",
5
5
  "active": true,
6
- "problems": [
7
- "bob",
8
- "leap",
9
- "gigasecond",
10
- "hamming",
11
- "anagram",
12
- "etl",
13
- "word-count",
14
- "difference-of-squares",
15
- "nucleotide-count",
16
- "food-chain",
17
- "phone-number",
18
- "grade-school",
19
- "robot-name",
20
- "sum-of-multiples",
21
- "space-age",
22
- "meetup",
23
- "scrabble-score",
24
- "triangle",
25
- "grains",
26
- "raindrops",
27
- "roman-numerals",
28
- "binary",
29
- "prime-factors",
30
- "crypto-square",
31
- "trinary",
32
- "rna-transcription",
33
- "say",
34
- "sieve",
35
- "series",
36
- "clock",
37
- "beer-song",
38
- "nth-prime",
39
- "hexadecimal",
40
- "queen-attack"
41
- ],
42
6
  "deprecated": [
43
7
 
44
8
  ],
@@ -48,5 +12,177 @@
48
12
  ],
49
13
  "foregone": [
50
14
  "point-mutations"
15
+ ],
16
+ "exercises": [
17
+ {
18
+ "difficulty": 1,
19
+ "slug": "bob",
20
+ "topics": []
21
+ },
22
+ {
23
+ "difficulty": 1,
24
+ "slug": "leap",
25
+ "topics": []
26
+ },
27
+ {
28
+ "difficulty": 1,
29
+ "slug": "gigasecond",
30
+ "topics": []
31
+ },
32
+ {
33
+ "difficulty": 1,
34
+ "slug": "hamming",
35
+ "topics": []
36
+ },
37
+ {
38
+ "difficulty": 1,
39
+ "slug": "anagram",
40
+ "topics": []
41
+ },
42
+ {
43
+ "difficulty": 1,
44
+ "slug": "etl",
45
+ "topics": []
46
+ },
47
+ {
48
+ "difficulty": 1,
49
+ "slug": "word-count",
50
+ "topics": []
51
+ },
52
+ {
53
+ "difficulty": 1,
54
+ "slug": "difference-of-squares",
55
+ "topics": []
56
+ },
57
+ {
58
+ "difficulty": 1,
59
+ "slug": "nucleotide-count",
60
+ "topics": []
61
+ },
62
+ {
63
+ "difficulty": 1,
64
+ "slug": "food-chain",
65
+ "topics": []
66
+ },
67
+ {
68
+ "difficulty": 1,
69
+ "slug": "phone-number",
70
+ "topics": []
71
+ },
72
+ {
73
+ "difficulty": 1,
74
+ "slug": "grade-school",
75
+ "topics": []
76
+ },
77
+ {
78
+ "difficulty": 1,
79
+ "slug": "robot-name",
80
+ "topics": []
81
+ },
82
+ {
83
+ "difficulty": 1,
84
+ "slug": "sum-of-multiples",
85
+ "topics": []
86
+ },
87
+ {
88
+ "difficulty": 1,
89
+ "slug": "space-age",
90
+ "topics": []
91
+ },
92
+ {
93
+ "difficulty": 1,
94
+ "slug": "meetup",
95
+ "topics": []
96
+ },
97
+ {
98
+ "difficulty": 1,
99
+ "slug": "scrabble-score",
100
+ "topics": []
101
+ },
102
+ {
103
+ "difficulty": 1,
104
+ "slug": "triangle",
105
+ "topics": []
106
+ },
107
+ {
108
+ "difficulty": 1,
109
+ "slug": "grains",
110
+ "topics": []
111
+ },
112
+ {
113
+ "difficulty": 1,
114
+ "slug": "raindrops",
115
+ "topics": []
116
+ },
117
+ {
118
+ "difficulty": 1,
119
+ "slug": "roman-numerals",
120
+ "topics": []
121
+ },
122
+ {
123
+ "difficulty": 1,
124
+ "slug": "binary",
125
+ "topics": []
126
+ },
127
+ {
128
+ "difficulty": 1,
129
+ "slug": "prime-factors",
130
+ "topics": []
131
+ },
132
+ {
133
+ "difficulty": 1,
134
+ "slug": "crypto-square",
135
+ "topics": []
136
+ },
137
+ {
138
+ "difficulty": 1,
139
+ "slug": "trinary",
140
+ "topics": []
141
+ },
142
+ {
143
+ "difficulty": 1,
144
+ "slug": "rna-transcription",
145
+ "topics": []
146
+ },
147
+ {
148
+ "difficulty": 1,
149
+ "slug": "say",
150
+ "topics": []
151
+ },
152
+ {
153
+ "difficulty": 1,
154
+ "slug": "sieve",
155
+ "topics": []
156
+ },
157
+ {
158
+ "difficulty": 1,
159
+ "slug": "series",
160
+ "topics": []
161
+ },
162
+ {
163
+ "difficulty": 1,
164
+ "slug": "clock",
165
+ "topics": []
166
+ },
167
+ {
168
+ "difficulty": 1,
169
+ "slug": "beer-song",
170
+ "topics": []
171
+ },
172
+ {
173
+ "difficulty": 1,
174
+ "slug": "nth-prime",
175
+ "topics": []
176
+ },
177
+ {
178
+ "difficulty": 1,
179
+ "slug": "hexadecimal",
180
+ "topics": []
181
+ },
182
+ {
183
+ "difficulty": 1,
184
+ "slug": "queen-attack",
185
+ "topics": []
186
+ }
51
187
  ]
52
188
  }
@@ -3,26 +3,6 @@
3
3
  "language": "Emacs Lisp",
4
4
  "repository": "https://github.com/exercism/xelisp",
5
5
  "active": true,
6
- "problems": [
7
- "hello-world",
8
- "bob",
9
- "difference-of-squares",
10
- "gigasecond",
11
- "hamming",
12
- "anagram",
13
- "binary",
14
- "leap",
15
- "allergies",
16
- "robot-name",
17
- "rna-transcription",
18
- "atbash-cipher",
19
- "raindrops",
20
- "roman-numerals",
21
- "perfect-numbers",
22
- "etl",
23
- "word-count",
24
- "nucleotide-count"
25
- ],
26
6
  "deprecated": [
27
7
 
28
8
  ],
@@ -32,5 +12,97 @@
32
12
  ],
33
13
  "foregone": [
34
14
 
15
+ ],
16
+ "exercises": [
17
+ {
18
+ "difficulty": 1,
19
+ "slug": "hello-world",
20
+ "topics": []
21
+ },
22
+ {
23
+ "difficulty": 1,
24
+ "slug": "bob",
25
+ "topics": []
26
+ },
27
+ {
28
+ "difficulty": 1,
29
+ "slug": "difference-of-squares",
30
+ "topics": []
31
+ },
32
+ {
33
+ "difficulty": 1,
34
+ "slug": "gigasecond",
35
+ "topics": []
36
+ },
37
+ {
38
+ "difficulty": 1,
39
+ "slug": "hamming",
40
+ "topics": []
41
+ },
42
+ {
43
+ "difficulty": 1,
44
+ "slug": "anagram",
45
+ "topics": []
46
+ },
47
+ {
48
+ "difficulty": 1,
49
+ "slug": "binary",
50
+ "topics": []
51
+ },
52
+ {
53
+ "difficulty": 1,
54
+ "slug": "leap",
55
+ "topics": []
56
+ },
57
+ {
58
+ "difficulty": 1,
59
+ "slug": "allergies",
60
+ "topics": []
61
+ },
62
+ {
63
+ "difficulty": 1,
64
+ "slug": "robot-name",
65
+ "topics": []
66
+ },
67
+ {
68
+ "difficulty": 1,
69
+ "slug": "rna-transcription",
70
+ "topics": []
71
+ },
72
+ {
73
+ "difficulty": 1,
74
+ "slug": "atbash-cipher",
75
+ "topics": []
76
+ },
77
+ {
78
+ "difficulty": 1,
79
+ "slug": "raindrops",
80
+ "topics": []
81
+ },
82
+ {
83
+ "difficulty": 1,
84
+ "slug": "roman-numerals",
85
+ "topics": []
86
+ },
87
+ {
88
+ "difficulty": 1,
89
+ "slug": "perfect-numbers",
90
+ "topics": []
91
+ },
92
+ {
93
+ "difficulty": 1,
94
+ "slug": "etl",
95
+ "topics": []
96
+ },
97
+ {
98
+ "difficulty": 1,
99
+ "slug": "word-count",
100
+ "topics": []
101
+ },
102
+ {
103
+ "difficulty": 1,
104
+ "slug": "nucleotide-count",
105
+ "topics": []
106
+ }
35
107
  ]
36
108
  }