trackler 2.1.0.34 → 2.1.0.36
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.
- checksums.yaml +4 -4
- data/lib/trackler/version.rb +1 -1
- data/tracks/coq/config.json +3 -5
- data/tracks/csharp/.gitignore +5 -1
- data/tracks/csharp/exercises/acronym/AcronymTest.cs +3 -7
- data/tracks/csharp/exercises/atbash-cipher/AtbashCipherTest.cs +2 -0
- data/tracks/csharp/exercises/beer-song/BeerSongTest.cs +9 -7
- data/tracks/csharp/exercises/bob/Bob.cs +1 -1
- data/tracks/csharp/exercises/bob/BobTest.cs +79 -37
- data/tracks/csharp/exercises/bob/Example.cs +1 -1
- data/tracks/csharp/exercises/food-chain/FoodChainTest.cs +2 -0
- data/tracks/csharp/exercises/hello-world/HelloWorldTest.cs +5 -3
- data/tracks/csharp/exercises/isogram/IsogramTest.cs +8 -0
- data/tracks/csharp/exercises/leap/LeapTest.cs +2 -0
- data/tracks/csharp/exercises/luhn/LuhnTest.cs +2 -0
- data/tracks/csharp/exercises/nth-prime/NthPrimeTest.cs +2 -0
- data/tracks/csharp/exercises/perfect-numbers/PerfectNumbersTest.cs +2 -0
- data/tracks/csharp/exercises/pig-latin/PigLatinTest.cs +2 -0
- data/tracks/csharp/exercises/raindrops/RaindropsTest.cs +2 -0
- data/tracks/csharp/exercises/roman-numerals/RomanNumeralsTest.cs +2 -0
- data/tracks/csharp/exercises/rotational-cipher/RotationalCipherTest.cs +2 -0
- data/tracks/csharp/exercises/wordy/WordyTest.cs +2 -0
- data/tracks/csharp/generators/Classes/TestClass.cs +1 -0
- data/tracks/csharp/generators/Classes/TestClassRenderer.cs +4 -1
- data/tracks/csharp/generators/Exercises/Bob.cs +20 -0
- data/tracks/csharp/generators/Exercises/Exercise.cs +2 -1
- data/tracks/csharp/generators/Methods/TestMethodGenerator.cs +4 -0
- data/tracks/delphi/exercises/hello-world/uTestHelloWorld.pas +12 -1
- data/tracks/elixir/config.json +58 -7
- data/tracks/go/config.json +5 -6
- data/tracks/go/exercises/anagram/anagram_test.go +2 -2
- data/tracks/go/exercises/anagram/example.go +2 -3
- data/tracks/java/.travis.yml +9 -9
- data/tracks/java/bin/fetch-configlet +1 -1
- data/tracks/java/bin/journey-test.sh +23 -17
- data/tracks/java/bin/unit-tests.sh +2 -2
- data/tracks/julia/exercises/rotational-cipher/runtests.jl +13 -13
- data/tracks/julia/runtests.jl +13 -0
- data/tracks/lisp/config.json +174 -120
- data/tracks/lua/README.md +9 -8
- data/tracks/ocaml/config.json +0 -5
- data/tracks/php/config.json +424 -402
- data/tracks/ruby/README.md +6 -0
- data/tracks/scala/config.json +0 -7
- data/tracks/typescript/config.json +27 -13
- metadata +3 -2
data/tracks/elixir/config.json
CHANGED
|
@@ -103,6 +103,7 @@
|
|
|
103
103
|
"slug": "acronym",
|
|
104
104
|
"difficulty": 2,
|
|
105
105
|
"topics": [
|
|
106
|
+
|
|
106
107
|
]
|
|
107
108
|
},
|
|
108
109
|
{
|
|
@@ -116,30 +117,35 @@
|
|
|
116
117
|
"slug": "raindrops",
|
|
117
118
|
"difficulty": 2,
|
|
118
119
|
"topics": [
|
|
120
|
+
|
|
119
121
|
]
|
|
120
122
|
},
|
|
121
123
|
{
|
|
122
124
|
"slug": "run-length-encoding",
|
|
123
125
|
"difficulty": 2,
|
|
124
126
|
"topics": [
|
|
127
|
+
|
|
125
128
|
]
|
|
126
129
|
},
|
|
127
130
|
{
|
|
128
131
|
"slug": "sublist",
|
|
129
132
|
"difficulty": 2,
|
|
130
133
|
"topics": [
|
|
134
|
+
|
|
131
135
|
]
|
|
132
136
|
},
|
|
133
137
|
{
|
|
134
138
|
"slug": "scrabble-score",
|
|
135
139
|
"difficulty": 2,
|
|
136
140
|
"topics": [
|
|
141
|
+
|
|
137
142
|
]
|
|
138
143
|
},
|
|
139
144
|
{
|
|
140
145
|
"slug": "sum-of-multiples",
|
|
141
146
|
"difficulty": 2,
|
|
142
147
|
"topics": [
|
|
148
|
+
|
|
143
149
|
]
|
|
144
150
|
},
|
|
145
151
|
{
|
|
@@ -161,6 +167,7 @@
|
|
|
161
167
|
"slug": "anagram",
|
|
162
168
|
"difficulty": 2,
|
|
163
169
|
"topics": [
|
|
170
|
+
|
|
164
171
|
]
|
|
165
172
|
},
|
|
166
173
|
{
|
|
@@ -175,66 +182,77 @@
|
|
|
175
182
|
"slug": "bracket-push",
|
|
176
183
|
"difficulty": 3,
|
|
177
184
|
"topics": [
|
|
185
|
+
|
|
178
186
|
]
|
|
179
187
|
},
|
|
180
188
|
{
|
|
181
189
|
"slug": "rna-transcription",
|
|
182
190
|
"difficulty": 2,
|
|
183
191
|
"topics": [
|
|
192
|
+
|
|
184
193
|
]
|
|
185
194
|
},
|
|
186
195
|
{
|
|
187
196
|
"slug": "phone-number",
|
|
188
197
|
"difficulty": 3,
|
|
189
198
|
"topics": [
|
|
199
|
+
|
|
190
200
|
]
|
|
191
201
|
},
|
|
192
202
|
{
|
|
193
203
|
"slug": "nth-prime",
|
|
194
204
|
"difficulty": 2,
|
|
195
205
|
"topics": [
|
|
206
|
+
|
|
196
207
|
]
|
|
197
208
|
},
|
|
198
209
|
{
|
|
199
210
|
"slug": "roman-numerals",
|
|
200
211
|
"difficulty": 2,
|
|
201
212
|
"topics": [
|
|
213
|
+
|
|
202
214
|
]
|
|
203
215
|
},
|
|
204
216
|
{
|
|
205
217
|
"slug": "all-your-base",
|
|
206
218
|
"difficulty": 2,
|
|
207
219
|
"topics": [
|
|
220
|
+
|
|
208
221
|
]
|
|
209
222
|
},
|
|
210
223
|
{
|
|
211
224
|
"slug": "hamming",
|
|
212
225
|
"difficulty": 2,
|
|
213
226
|
"topics": [
|
|
227
|
+
|
|
214
228
|
]
|
|
215
229
|
},
|
|
216
230
|
{
|
|
217
231
|
"slug": "triangle",
|
|
218
232
|
"difficulty": 2,
|
|
219
233
|
"topics": [
|
|
234
|
+
|
|
220
235
|
]
|
|
221
236
|
},
|
|
222
237
|
{
|
|
223
238
|
"slug": "beer-song",
|
|
224
239
|
"difficulty": 3,
|
|
225
240
|
"topics": [
|
|
241
|
+
|
|
226
242
|
]
|
|
227
243
|
},
|
|
228
244
|
{
|
|
229
245
|
"slug": "isogram",
|
|
230
246
|
"difficulty": 3,
|
|
231
247
|
"topics": [
|
|
248
|
+
|
|
232
249
|
]
|
|
233
250
|
},
|
|
234
251
|
{
|
|
235
252
|
"slug": "grade-school",
|
|
236
253
|
"difficulty": 3,
|
|
237
254
|
"topics": [
|
|
255
|
+
|
|
238
256
|
]
|
|
239
257
|
},
|
|
240
258
|
{
|
|
@@ -250,60 +268,70 @@
|
|
|
250
268
|
"slug": "list-ops",
|
|
251
269
|
"difficulty": 4,
|
|
252
270
|
"topics": [
|
|
271
|
+
|
|
253
272
|
]
|
|
254
273
|
},
|
|
255
274
|
{
|
|
256
275
|
"slug": "flatten-array",
|
|
257
276
|
"difficulty": 3,
|
|
258
277
|
"topics": [
|
|
278
|
+
|
|
259
279
|
]
|
|
260
280
|
},
|
|
261
281
|
{
|
|
262
282
|
"slug": "leap",
|
|
263
283
|
"difficulty": 3,
|
|
264
284
|
"topics": [
|
|
285
|
+
|
|
265
286
|
]
|
|
266
287
|
},
|
|
267
288
|
{
|
|
268
289
|
"slug": "kindergarten-garden",
|
|
269
290
|
"difficulty": 3,
|
|
270
291
|
"topics": [
|
|
292
|
+
|
|
271
293
|
]
|
|
272
294
|
},
|
|
273
295
|
{
|
|
274
296
|
"slug": "etl",
|
|
275
297
|
"difficulty": 2,
|
|
276
298
|
"topics": [
|
|
299
|
+
|
|
277
300
|
]
|
|
278
301
|
},
|
|
279
302
|
{
|
|
280
303
|
"slug": "meetup",
|
|
281
304
|
"difficulty": 4,
|
|
282
305
|
"topics": [
|
|
306
|
+
|
|
283
307
|
]
|
|
284
308
|
},
|
|
285
309
|
{
|
|
286
310
|
"slug": "grains",
|
|
287
311
|
"difficulty": 3,
|
|
288
312
|
"topics": [
|
|
313
|
+
|
|
289
314
|
]
|
|
290
315
|
},
|
|
291
316
|
{
|
|
292
317
|
"slug": "change",
|
|
293
318
|
"difficulty": 3,
|
|
294
319
|
"topics": [
|
|
320
|
+
|
|
295
321
|
]
|
|
296
322
|
},
|
|
297
323
|
{
|
|
298
324
|
"slug": "parallel-letter-frequency",
|
|
299
325
|
"difficulty": 4,
|
|
300
326
|
"topics": [
|
|
327
|
+
|
|
301
328
|
]
|
|
302
329
|
},
|
|
303
330
|
{
|
|
304
331
|
"slug": "binary",
|
|
305
332
|
"difficulty": 3,
|
|
306
333
|
"topics": [
|
|
334
|
+
|
|
307
335
|
]
|
|
308
336
|
},
|
|
309
337
|
{
|
|
@@ -318,66 +346,77 @@
|
|
|
318
346
|
"slug": "luhn",
|
|
319
347
|
"difficulty": 5,
|
|
320
348
|
"topics": [
|
|
349
|
+
|
|
321
350
|
]
|
|
322
351
|
},
|
|
323
352
|
{
|
|
324
353
|
"slug": "markdown",
|
|
325
354
|
"difficulty": 5,
|
|
326
355
|
"topics": [
|
|
356
|
+
|
|
327
357
|
]
|
|
328
358
|
},
|
|
329
359
|
{
|
|
330
360
|
"slug": "gigasecond",
|
|
331
361
|
"difficulty": 3,
|
|
332
362
|
"topics": [
|
|
363
|
+
|
|
333
364
|
]
|
|
334
365
|
},
|
|
335
366
|
{
|
|
336
367
|
"slug": "queen-attack",
|
|
337
368
|
"difficulty": 7,
|
|
338
369
|
"topics": [
|
|
370
|
+
|
|
339
371
|
]
|
|
340
372
|
},
|
|
341
373
|
{
|
|
342
374
|
"slug": "pascals-triangle",
|
|
343
375
|
"difficulty": 3,
|
|
344
376
|
"topics": [
|
|
377
|
+
|
|
345
378
|
]
|
|
346
379
|
},
|
|
347
380
|
{
|
|
348
381
|
"slug": "saddle-points",
|
|
349
382
|
"difficulty": 5,
|
|
350
383
|
"topics": [
|
|
384
|
+
|
|
351
385
|
]
|
|
352
386
|
},
|
|
353
387
|
{
|
|
354
388
|
"slug": "hexadecimal",
|
|
355
389
|
"difficulty": 3,
|
|
356
390
|
"topics": [
|
|
391
|
+
|
|
357
392
|
]
|
|
358
393
|
},
|
|
359
394
|
{
|
|
360
395
|
"slug": "diamond",
|
|
361
396
|
"difficulty": 5,
|
|
362
397
|
"topics": [
|
|
398
|
+
|
|
363
399
|
]
|
|
364
400
|
},
|
|
365
401
|
{
|
|
366
402
|
"slug": "binary-search",
|
|
367
403
|
"difficulty": 3,
|
|
368
404
|
"topics": [
|
|
405
|
+
|
|
369
406
|
]
|
|
370
407
|
},
|
|
371
408
|
{
|
|
372
409
|
"slug": "prime-factors",
|
|
373
410
|
"difficulty": 3,
|
|
374
411
|
"topics": [
|
|
412
|
+
|
|
375
413
|
]
|
|
376
414
|
},
|
|
377
415
|
{
|
|
378
416
|
"slug": "perfect-numbers",
|
|
379
417
|
"difficulty": 3,
|
|
380
418
|
"topics": [
|
|
419
|
+
|
|
381
420
|
]
|
|
382
421
|
},
|
|
383
422
|
{
|
|
@@ -391,24 +430,28 @@
|
|
|
391
430
|
"slug": "sieve",
|
|
392
431
|
"difficulty": 5,
|
|
393
432
|
"topics": [
|
|
433
|
+
|
|
394
434
|
]
|
|
395
435
|
},
|
|
396
436
|
{
|
|
397
437
|
"slug": "wordy",
|
|
398
438
|
"difficulty": 6,
|
|
399
439
|
"topics": [
|
|
440
|
+
|
|
400
441
|
]
|
|
401
442
|
},
|
|
402
443
|
{
|
|
403
444
|
"slug": "robot-simulator",
|
|
404
445
|
"difficulty": 6,
|
|
405
446
|
"topics": [
|
|
447
|
+
|
|
406
448
|
]
|
|
407
449
|
},
|
|
408
450
|
{
|
|
409
451
|
"slug": "atbash-cipher",
|
|
410
452
|
"difficulty": 3,
|
|
411
453
|
"topics": [
|
|
454
|
+
|
|
412
455
|
]
|
|
413
456
|
},
|
|
414
457
|
{
|
|
@@ -423,66 +466,77 @@
|
|
|
423
466
|
"slug": "bank-account",
|
|
424
467
|
"difficulty": 7,
|
|
425
468
|
"topics": [
|
|
469
|
+
|
|
426
470
|
]
|
|
427
471
|
},
|
|
428
472
|
{
|
|
429
473
|
"slug": "largest-series-product",
|
|
430
474
|
"difficulty": 4,
|
|
431
475
|
"topics": [
|
|
476
|
+
|
|
432
477
|
]
|
|
433
478
|
},
|
|
434
479
|
{
|
|
435
480
|
"slug": "crypto-square",
|
|
436
481
|
"difficulty": 4,
|
|
437
482
|
"topics": [
|
|
483
|
+
|
|
438
484
|
]
|
|
439
485
|
},
|
|
440
486
|
{
|
|
441
487
|
"slug": "pythagorean-triplet",
|
|
442
488
|
"difficulty": 5,
|
|
443
489
|
"topics": [
|
|
490
|
+
|
|
444
491
|
]
|
|
445
492
|
},
|
|
446
493
|
{
|
|
447
494
|
"slug": "allergies",
|
|
448
495
|
"difficulty": 4,
|
|
449
496
|
"topics": [
|
|
497
|
+
|
|
450
498
|
]
|
|
451
499
|
},
|
|
452
500
|
{
|
|
453
501
|
"slug": "palindrome-products",
|
|
454
502
|
"difficulty": 5,
|
|
455
503
|
"topics": [
|
|
504
|
+
|
|
456
505
|
]
|
|
457
506
|
},
|
|
458
507
|
{
|
|
459
508
|
"slug": "rail-fence-cipher",
|
|
460
509
|
"difficulty": 6,
|
|
461
510
|
"topics": [
|
|
511
|
+
|
|
462
512
|
]
|
|
463
513
|
},
|
|
464
514
|
{
|
|
465
515
|
"slug": "zipper",
|
|
466
516
|
"difficulty": 8,
|
|
467
517
|
"topics": [
|
|
518
|
+
|
|
468
519
|
]
|
|
469
520
|
},
|
|
470
521
|
{
|
|
471
522
|
"slug": "minesweeper",
|
|
472
523
|
"difficulty": 7,
|
|
473
524
|
"topics": [
|
|
525
|
+
|
|
474
526
|
]
|
|
475
527
|
},
|
|
476
528
|
{
|
|
477
529
|
"slug": "connect",
|
|
478
530
|
"difficulty": 7,
|
|
479
531
|
"topics": [
|
|
532
|
+
|
|
480
533
|
]
|
|
481
534
|
},
|
|
482
535
|
{
|
|
483
536
|
"slug": "difference-of-squares",
|
|
484
537
|
"difficulty": 4,
|
|
485
538
|
"topics": [
|
|
539
|
+
|
|
486
540
|
]
|
|
487
541
|
},
|
|
488
542
|
{
|
|
@@ -496,24 +550,28 @@
|
|
|
496
550
|
"slug": "bowling",
|
|
497
551
|
"difficulty": 8,
|
|
498
552
|
"topics": [
|
|
553
|
+
|
|
499
554
|
]
|
|
500
555
|
},
|
|
501
556
|
{
|
|
502
557
|
"slug": "dot-dsl",
|
|
503
558
|
"difficulty": 8,
|
|
504
559
|
"topics": [
|
|
560
|
+
|
|
505
561
|
]
|
|
506
562
|
},
|
|
507
563
|
{
|
|
508
564
|
"slug": "custom-set",
|
|
509
565
|
"difficulty": 5,
|
|
510
566
|
"topics": [
|
|
567
|
+
|
|
511
568
|
]
|
|
512
569
|
},
|
|
513
570
|
{
|
|
514
571
|
"slug": "forth",
|
|
515
572
|
"difficulty": 10,
|
|
516
573
|
"topics": [
|
|
574
|
+
|
|
517
575
|
]
|
|
518
576
|
},
|
|
519
577
|
{
|
|
@@ -553,13 +611,6 @@
|
|
|
553
611
|
],
|
|
554
612
|
"deprecated": [
|
|
555
613
|
|
|
556
|
-
],
|
|
557
|
-
"ignored": [
|
|
558
|
-
"docs",
|
|
559
|
-
"deps",
|
|
560
|
-
"img",
|
|
561
|
-
"test",
|
|
562
|
-
"_build"
|
|
563
614
|
],
|
|
564
615
|
"foregone": [
|
|
565
616
|
"robot-name"
|
data/tracks/go/config.json
CHANGED
|
@@ -13,12 +13,6 @@
|
|
|
13
13
|
"point-mutations",
|
|
14
14
|
"trinary"
|
|
15
15
|
],
|
|
16
|
-
"ignored": [
|
|
17
|
-
"error-handling",
|
|
18
|
-
"img",
|
|
19
|
-
"gen",
|
|
20
|
-
"docs"
|
|
21
|
-
],
|
|
22
16
|
"foregone": [
|
|
23
17
|
"space-age",
|
|
24
18
|
"linked-list",
|
|
@@ -140,6 +134,11 @@
|
|
|
140
134
|
"Mathematics"
|
|
141
135
|
]
|
|
142
136
|
},
|
|
137
|
+
{
|
|
138
|
+
"difficulty": 1,
|
|
139
|
+
"slug": "error-handling",
|
|
140
|
+
"topics": []
|
|
141
|
+
},
|
|
143
142
|
{
|
|
144
143
|
"difficulty": 5,
|
|
145
144
|
"slug": "secret-handshake",
|
|
@@ -6,7 +6,7 @@ import (
|
|
|
6
6
|
"testing"
|
|
7
7
|
)
|
|
8
8
|
|
|
9
|
-
const targetTestVersion =
|
|
9
|
+
const targetTestVersion = 2
|
|
10
10
|
|
|
11
11
|
var testCases = []struct {
|
|
12
12
|
subject string
|
|
@@ -125,7 +125,7 @@ var testCases = []struct {
|
|
|
125
125
|
"Carthorse",
|
|
126
126
|
"radishes",
|
|
127
127
|
},
|
|
128
|
-
expected: []string{"
|
|
128
|
+
expected: []string{"Carthorse"},
|
|
129
129
|
description: "candidates are case insensitive",
|
|
130
130
|
},
|
|
131
131
|
}
|
|
@@ -5,14 +5,13 @@ import (
|
|
|
5
5
|
"strings"
|
|
6
6
|
)
|
|
7
7
|
|
|
8
|
-
const testVersion =
|
|
8
|
+
const testVersion = 2
|
|
9
9
|
|
|
10
10
|
func Detect(subject string, candidates []string) []string {
|
|
11
11
|
subject = strings.ToLower(subject)
|
|
12
12
|
var matches []string
|
|
13
13
|
for _, c := range candidates {
|
|
14
|
-
|
|
15
|
-
if isAnagram(subject, c) {
|
|
14
|
+
if tc := strings.ToLower(c); isAnagram(subject, tc) {
|
|
16
15
|
matches = append(matches, c)
|
|
17
16
|
}
|
|
18
17
|
}
|
data/tracks/java/.travis.yml
CHANGED
|
@@ -3,14 +3,6 @@ language: java
|
|
|
3
3
|
jdk:
|
|
4
4
|
- oraclejdk8
|
|
5
5
|
|
|
6
|
-
notifications:
|
|
7
|
-
webhooks:
|
|
8
|
-
urls:
|
|
9
|
-
- https://webhooks.gitter.im/e/5e9ccd41111917b19478
|
|
10
|
-
on_success: change # options: [always|never|change] default: always
|
|
11
|
-
on_failure: always # options: [always|never|change] default: always
|
|
12
|
-
on_start: never # options: [always|never|change] default: always
|
|
13
|
-
|
|
14
6
|
# http://docs.travis-ci.com/user/migrating-from-legacy
|
|
15
7
|
sudo: false
|
|
16
8
|
|
|
@@ -43,4 +35,12 @@ cache:
|
|
|
43
35
|
bundler: true
|
|
44
36
|
directories:
|
|
45
37
|
- $HOME/.gradle/caches/
|
|
46
|
-
- $HOME/.gradle/wrapper/
|
|
38
|
+
- $HOME/.gradle/wrapper/
|
|
39
|
+
|
|
40
|
+
notifications:
|
|
41
|
+
webhooks:
|
|
42
|
+
urls:
|
|
43
|
+
- https://webhooks.gitter.im/e/5e9ccd41111917b19478
|
|
44
|
+
on_success: change # options: [always|never|change] default: always
|
|
45
|
+
on_failure: always # options: [always|never|change] default: always
|
|
46
|
+
on_start: never # options: [always|never|change] default: always
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
|
|
3
|
+
# This script is shared between the Java and Kotlin tracks. If you make an update to this script on
|
|
4
|
+
# one track, please create a companion PR to merge it in to the other. Thank you!
|
|
5
|
+
TRACK=java
|
|
6
|
+
TRACK_REPO="x${TRACK}"
|
|
7
|
+
TRACK_SRC_EXT="java"
|
|
8
|
+
|
|
3
9
|
on_exit() {
|
|
4
10
|
echo ">>> on_exit()"
|
|
5
11
|
if [[ "$xapi_pid" != "" ]] ; then
|
|
@@ -16,7 +22,7 @@ assert_installed() {
|
|
|
16
22
|
|
|
17
23
|
if [[ "`which $binary`" == "" ]]; then
|
|
18
24
|
echo "${binary} not found; it is required to perform this test."
|
|
19
|
-
echo -e "Have you completed the setup instructions at https://github.com/exercism
|
|
25
|
+
echo -e "Have you completed the setup instructions at https://github.com/exercism/${TRACK_REPO} ?\n"
|
|
20
26
|
echo "PATH=${PATH}"
|
|
21
27
|
echo "aborting."
|
|
22
28
|
exit 1
|
|
@@ -35,7 +41,7 @@ assert_ruby_installed() {
|
|
|
35
41
|
if [[ "${expected_ruby_ver}" != "" && "${current_ruby_ver}" != "${expected_ruby_ver}" ]]; then
|
|
36
42
|
echo "${ruby_app_home} requires Ruby ${expected_ruby_ver}; current Ruby version is ${current_ruby_ver}."
|
|
37
43
|
echo -e "Ruby used: `which ruby`.\n"
|
|
38
|
-
echo -e "Have you completed the setup instructions at https://github.com/exercism
|
|
44
|
+
echo -e "Have you completed the setup instructions at https://github.com/exercism/${TRACK_REPO} ?\n"
|
|
39
45
|
echo "PATH=${PATH}"
|
|
40
46
|
echo "aborting."
|
|
41
47
|
exit 1
|
|
@@ -141,7 +147,7 @@ make_local_trackler() {
|
|
|
141
147
|
local xapi_home="$2"
|
|
142
148
|
echo ">>> make_local_trackler(trackler=\"${trackler}\", xapi_home=\"${xapi_home}\")"
|
|
143
149
|
|
|
144
|
-
local
|
|
150
|
+
local track_root=$( pwd )
|
|
145
151
|
pushd ${trackler}
|
|
146
152
|
|
|
147
153
|
# Get the version of Trackler x-api is currently using
|
|
@@ -151,11 +157,11 @@ make_local_trackler() {
|
|
|
151
157
|
git submodule init -- common
|
|
152
158
|
git submodule update
|
|
153
159
|
|
|
154
|
-
# Bake in local copy of
|
|
155
|
-
rmdir tracks
|
|
156
|
-
mkdir -p tracks/
|
|
157
|
-
cp ${
|
|
158
|
-
cp -r ${
|
|
160
|
+
# Bake in local copy of this track; this is what we are testing.
|
|
161
|
+
rmdir tracks/${TRACK}
|
|
162
|
+
mkdir -p tracks/${TRACK}/exercises
|
|
163
|
+
cp ${track_root}/config.json tracks/${TRACK}
|
|
164
|
+
cp -r ${track_root}/exercises tracks/${TRACK}
|
|
159
165
|
|
|
160
166
|
gem install bundler
|
|
161
167
|
bundle install
|
|
@@ -208,7 +214,7 @@ solve_all_exercises() {
|
|
|
208
214
|
local exercism_configfile="$2"
|
|
209
215
|
echo ">>> solve_all_exercises(exercism_exercises_dir=\"${exercism_exercises_dir}\", exercism_configfile=\"${exercism_configfile}\")"
|
|
210
216
|
|
|
211
|
-
local
|
|
217
|
+
local track_root=$( pwd )
|
|
212
218
|
local exercism_cli="./exercism --config ${exercism_configfile}"
|
|
213
219
|
local exercises=`cat config.json | jq '.exercises[].slug + " "' --join-output`
|
|
214
220
|
local total_exercises=`cat config.json | jq '.exercises | length'`
|
|
@@ -222,15 +228,15 @@ solve_all_exercises() {
|
|
|
222
228
|
echo "${current_exercise_number} of ${total_exercises} -- ${exercise}"
|
|
223
229
|
echo "=================================================="
|
|
224
230
|
|
|
225
|
-
${exercism_cli} fetch
|
|
226
|
-
cp -R -H ${
|
|
231
|
+
${exercism_cli} fetch ${TRACK} $exercise
|
|
232
|
+
cp -R -H ${track_root}/exercises/${exercise}/src/example/${TRACK}/* ${exercism_exercises_dir}/${TRACK}/${exercise}/src/main/${TRACK}/
|
|
227
233
|
|
|
228
|
-
pushd ${exercism_exercises_dir}
|
|
234
|
+
pushd ${exercism_exercises_dir}/${TRACK}/${exercise}
|
|
229
235
|
# Check that tests compile before we strip @Ignore annotations
|
|
230
236
|
"$EXECPATH"/gradlew compileTestJava
|
|
231
237
|
# Ensure we run all the tests (as delivered, all but the first is @Ignore'd)
|
|
232
|
-
for testfile in `find . -name "*Test
|
|
233
|
-
sed 's/@Ignore\(.*\)//' ${testfile} > "${tempfile}" && mv "${tempfile}" "${testfile}"
|
|
238
|
+
for testfile in `find . -name "*Test.${TRACK_SRC_EXT}"`; do
|
|
239
|
+
sed 's/@Ignore\(\(.*\)\)\{0,1\}//' ${testfile} > "${tempfile}" && mv "${tempfile}" "${testfile}"
|
|
234
240
|
done
|
|
235
241
|
"$EXECPATH"/gradlew test
|
|
236
242
|
popd
|
|
@@ -244,9 +250,9 @@ main() {
|
|
|
244
250
|
# all functions assume current working directory is repository root.
|
|
245
251
|
cd "${SCRIPTPATH}/.."
|
|
246
252
|
|
|
247
|
-
local
|
|
253
|
+
local track_root=$( pwd )
|
|
248
254
|
local build_dir="build"
|
|
249
|
-
local build_path="${
|
|
255
|
+
local build_path="${track_root}/${build_dir}"
|
|
250
256
|
|
|
251
257
|
local xapi_home="${build_path}/x-api"
|
|
252
258
|
local trackler_home="${build_path}/trackler"
|
|
@@ -260,7 +266,7 @@ main() {
|
|
|
260
266
|
|
|
261
267
|
clean "${build_dir}"
|
|
262
268
|
|
|
263
|
-
# Make a version of trackler that includes the source from this repo.
|
|
269
|
+
# Make a local version of trackler that includes the source from this repo.
|
|
264
270
|
git_clone "x-api" "${xapi_home}"
|
|
265
271
|
git_clone "trackler" "${trackler_home}"
|
|
266
272
|
assert_ruby_installed "${trackler_home}"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#!/bin/bash
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
2
|
set -e
|
|
3
3
|
./gradlew --version
|
|
4
4
|
|
|
@@ -10,6 +10,6 @@ bin/configlet .
|
|
|
10
10
|
pushd exercises
|
|
11
11
|
echo ""
|
|
12
12
|
echo ">>> Running tests..."
|
|
13
|
-
TERM=dumb ../gradlew check compileStarterSourceJava --continue
|
|
13
|
+
TERM=dumb ../gradlew check compileStarterSourceJava --parallel --continue
|
|
14
14
|
popd
|
|
15
15
|
|
|
@@ -32,20 +32,20 @@ include("rotational-cipher.jl")
|
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
-
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
|
36
|
-
# Additional exercises
|
|
37
|
-
#
|
|
38
|
-
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
|
35
|
+
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
|
36
|
+
# Additional exercises #
|
|
37
|
+
# Change @test_skip to @test for the optional bonus exercises from HINTS.md #
|
|
38
|
+
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
|
39
39
|
|
|
40
40
|
# Bonus A
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
@testset "Bonus A: string literal R13" begin
|
|
42
|
+
@test_skip R13"The quick brown fox jumps over the lazy dog." == "Gur dhvpx oebja sbk whzcf bire gur ynml qbt."
|
|
43
|
+
end
|
|
44
44
|
|
|
45
45
|
# Bonus B
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
@testset "Bonus B: string literals" begin
|
|
47
|
+
@test_skip R5"OMG" == "TRL"
|
|
48
|
+
@test_skip R4"Testing 1 2 3 testing" == "Xiwxmrk 1 2 3 xiwxmrk"
|
|
49
|
+
@test_skip R21"Let's eat, Grandma!" == "Gzo'n zvo, Bmviyhv!"
|
|
50
|
+
@test_skip R13"The quick brown fox jumps over the lazy dog." == "Gur dhvpx oebja sbk whzcf bire gur ynml qbt."
|
|
51
|
+
end
|
data/tracks/julia/runtests.jl
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
using Base.Test
|
|
2
2
|
|
|
3
|
+
import Base.Test.@test_skip, Base.Test.@test_broken
|
|
4
|
+
|
|
5
|
+
# When testing the example solution, all tests must pass, even ones marked as skipped or broken.
|
|
6
|
+
# The track user will not be affected by this.
|
|
7
|
+
# Overwrite @test_skip, @test_broken with @test
|
|
8
|
+
macro test_skip(ex)
|
|
9
|
+
@test eval(ex)
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
macro test_broken(ex)
|
|
13
|
+
@test eval(ex)
|
|
14
|
+
end
|
|
15
|
+
|
|
3
16
|
for (root, dirs, files) in walkdir("exercises")
|
|
4
17
|
for exercise in dirs
|
|
5
18
|
# Allow only testing specified execises
|