trackler 2.0.8.15 → 2.0.8.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/common/exercises/clock/canonical-data.json +473 -425
  3. data/common/exercises/crypto-square/canonical-data.json +105 -95
  4. data/common/exercises/difference-of-squares/canonical-data.json +76 -62
  5. data/common/exercises/etl/canonical-data.json +67 -59
  6. data/common/exercises/meetup/canonical-data.json +859 -762
  7. data/common/exercises/meetup/description.md +13 -7
  8. data/common/exercises/minesweeper/canonical-data.json +21 -5
  9. data/common/exercises/nth-prime/canonical-data.json +23 -16
  10. data/common/exercises/nucleotide-count/canonical-data.json +49 -41
  11. data/common/exercises/ocr-numbers/canonical-data.json +204 -183
  12. data/common/exercises/pascals-triangle/canonical-data.json +38 -27
  13. data/common/exercises/queen-attack/canonical-data.json +125 -109
  14. data/common/exercises/rotational-cipher/canonical-data.json +1 -1
  15. data/common/exercises/triangle/canonical-data.json +103 -74
  16. data/lib/trackler/version.rb +1 -1
  17. data/tracks/csharp/docs/TESTS.md +7 -1
  18. data/tracks/csharp/exercises/{exercises.sln → Exercises.All.sln} +0 -0
  19. data/tracks/csharp/exercises/Exercises.Default.sln +1433 -0
  20. data/tracks/csharp/exercises/Exercises.Refactoring.sln +61 -0
  21. data/tracks/csharp/exercises/acronym/AcronymTest.cs +35 -11
  22. data/tracks/csharp/exercises/parallel-letter-frequency/ParallelLetterFrequencyTest.cs +2 -2
  23. data/tracks/delphi/docs/TESTS.md +2 -2
  24. data/tracks/elixir/exercises/bowling/bowling.exs +1 -1
  25. data/tracks/fsharp/docs/LEARNING.md +2 -1
  26. data/tracks/go/config.json +7 -1
  27. data/tracks/go/exercises/prime-factors/{primefactors_test.go → prime_factors_test.go} +4 -1
  28. data/tracks/go/exercises/protein-translation/protein_translation_test.go +6 -6
  29. data/tracks/go/exercises/pythagorean-triplet/example.go +2 -0
  30. data/tracks/go/exercises/pythagorean-triplet/pythagorean_triplet_test.go +8 -0
  31. data/tracks/julia/README.md +2 -0
  32. data/tracks/julia/config.json +9 -0
  33. data/tracks/julia/exercises/rotational-cipher/HINTS.md +21 -0
  34. data/tracks/julia/exercises/rotational-cipher/example.jl +16 -0
  35. data/tracks/julia/exercises/rotational-cipher/rotational-cipher.jl +0 -0
  36. data/tracks/julia/exercises/rotational-cipher/runtests.jl +51 -0
  37. data/tracks/ocaml/config.json +5 -0
  38. data/tracks/ocaml/exercises/connect/.merlin +3 -0
  39. data/tracks/ocaml/exercises/connect/Makefile +15 -0
  40. data/tracks/ocaml/exercises/connect/connect.mli +4 -0
  41. data/tracks/ocaml/exercises/connect/example.ml +80 -0
  42. data/tracks/ocaml/exercises/connect/test.ml +121 -0
  43. data/tracks/ocaml/tools/test-generator/templates/connect/template.ml +23 -0
  44. data/tracks/python/exercises/all-your-base/all_your_base_test.py +2 -0
  45. data/tracks/python/exercises/luhn/example.py +5 -8
  46. data/tracks/python/exercises/luhn/luhn_test.py +34 -24
  47. data/tracks/ruby/README.md +138 -23
  48. metadata +16 -4
@@ -1,97 +1,107 @@
1
1
  {
2
- "normalized_plaintext": {
3
- "description": "the spaces and punctuation are removed from the English text and the message is downcased",
4
- "cases": [
5
- {
6
- "description": "Lowercase",
7
- "plaintext": "Hello",
8
- "expected": "hello"
9
- },
10
- {
11
- "description": "Remove spaces",
12
- "plaintext": "Hi there",
13
- "expected": "hithere"
14
- },
15
- {
16
- "description": "Remove punctuation",
17
- "plaintext": "@1, 2%, 3 Go!",
18
- "expected": "123go"
19
- }
20
- ]
21
- },
22
- "plaintext_segments": {
23
- "description": "The plaintext should be organized in to a rectangle. The size of the rectangle (`r x c`) should be decided by the length of the message, such that `c >= r` and `c - r <= 1`, where `c` is the number of columns and `r` is the number of rows.",
24
- "cases": [
25
- {
26
- "description": "empty plaintext results in an empty rectangle",
27
- "plaintext": "",
28
- "expected": "[]"
29
- },
30
- {
31
- "description": "4 character plaintext results in an 2x2 rectangle",
32
- "plaintext": "Ab Cd",
33
- "expected": [
34
- "ab",
35
- "cd"
36
- ]
37
- },
38
- {
39
- "description": "9 character plaintext results in an 3x3 rectangle",
40
- "plaintext": "This is fun!",
41
- "expected": [
42
- "thi",
43
- "sis",
44
- "fun"
45
- ]
46
- },
47
- {
48
- "description": "54 character plaintext results in an 8x7 rectangle",
49
- "plaintext": "If man was meant to stay on the ground, god would have given us roots.",
50
- "expected": [
51
- "ifmanwas",
52
- "meanttos",
53
- "tayonthe",
54
- "groundgo",
55
- "dwouldha",
56
- "vegivenu",
57
- "sroots"
58
- ]
59
- }
60
- ]
61
- },
62
- "encoded": {
63
- "description": "The coded message is obtained by reading down the columns going left to right.",
64
- "cases": [
65
- {
66
- "description": "empty plaintext results in an empty encode",
67
- "plaintext": "",
68
- "expected": ""
69
- },
70
- {
71
- "description": "Non-empty plaintext results in the combined plaintext segments",
72
- "plaintext": "If man was meant to stay on the ground, god would have given us roots.",
73
- "expected": "imtgdvsfearwermayoogoanouuiontnnlvtwttddesaohghnsseoau"
74
- }
75
- ]
76
- },
77
- "ciphertext": {
78
- "description": "Output the encoded text in chunks. Phrases that fill perfect squares `(r X r)` should be output in `r`-length chunks separated by spaces. Imperfect squares will have `n` empty spaces. Those spaces should be distributed evenly across the last `n` rows.",
79
- "cases": [
80
- {
81
- "description": "empty plaintext results in an empty ciphertext",
82
- "plaintext": "",
83
- "expected": ""
84
- },
85
- {
86
- "description": "9 character plaintext results in 3 chunks of 3 characters",
87
- "plaintext": "This is fun!",
88
- "expected": "tsf hiu isn"
89
- },
90
- {
91
- "description": "54 character plaintext results in 7 chunks, the last two padded with spaces",
92
- "plaintext": "If man was meant to stay on the ground, god would have given us roots.",
93
- "expected": "imtgdvs fearwer mayoogo anouuio ntnnlvt wttddes aohghn sseoau "
94
- }
95
- ]
96
- }
2
+ "exercise": "crypto-square",
3
+ "version": "1.0.0",
4
+ "cases": [
5
+ {
6
+ "description": "the spaces and punctuation are removed from the English text and the message is downcased",
7
+ "cases": [
8
+ {
9
+ "description": "Lowercase",
10
+ "property": "normalizedPlaintext",
11
+ "plaintext": "Hello",
12
+ "expected": "hello"
13
+ },
14
+ {
15
+ "description": "Remove spaces",
16
+ "property": "normalizedPlaintext",
17
+ "plaintext": "Hi there",
18
+ "expected": "hithere"
19
+ },
20
+ {
21
+ "description": "Remove punctuation",
22
+ "property": "normalizedPlaintext",
23
+ "plaintext": "@1, 2%, 3 Go!",
24
+ "expected": "123go"
25
+ }
26
+ ]
27
+ },
28
+ {
29
+ "description": "The plaintext should be organized in to a rectangle. The size of the rectangle (`r x c`) should be decided by the length of the message, such that `c >= r` and `c - r <= 1`, where `c` is the number of columns and `r` is the number of rows.",
30
+ "cases": [
31
+ {
32
+ "description": "empty plaintext results in an empty rectangle",
33
+ "property": "plaintextSegments",
34
+ "plaintext": "",
35
+ "expected": "[]"
36
+ },
37
+ {
38
+ "description": "4 character plaintext results in an 2x2 rectangle",
39
+ "property": "plaintextSegments",
40
+ "plaintext": "Ab Cd",
41
+ "expected": [ "ab",
42
+ "cd" ]
43
+ },
44
+ {
45
+ "description": "9 character plaintext results in an 3x3 rectangle",
46
+ "property": "plaintextSegments",
47
+ "plaintext": "This is fun!",
48
+ "expected": [ "thi",
49
+ "sis",
50
+ "fun" ]
51
+ },
52
+ {
53
+ "description": "54 character plaintext results in an 8x7 rectangle",
54
+ "property": "plaintextSegments",
55
+ "plaintext": "If man was meant to stay on the ground, god would have given us roots.",
56
+ "expected": [ "ifmanwas",
57
+ "meanttos",
58
+ "tayonthe",
59
+ "groundgo",
60
+ "dwouldha",
61
+ "vegivenu",
62
+ "sroots" ]
63
+ }
64
+ ]
65
+ },
66
+ {
67
+ "description": "The coded message is obtained by reading down the columns going left to right.",
68
+ "cases": [
69
+ {
70
+ "description": "empty plaintext results in an empty encode",
71
+ "property": "encoded",
72
+ "plaintext": "",
73
+ "expected": ""
74
+ },
75
+ {
76
+ "description": "Non-empty plaintext results in the combined plaintext segments",
77
+ "property": "encoded",
78
+ "plaintext": "If man was meant to stay on the ground, god would have given us roots.",
79
+ "expected": "imtgdvsfearwermayoogoanouuiontnnlvtwttddesaohghnsseoau"
80
+ }
81
+ ]
82
+ },
83
+ {
84
+ "description": "Output the encoded text in chunks. Phrases that fill perfect squares `(r X r)` should be output in `r`-length chunks separated by spaces. Imperfect squares will have `n` empty spaces. Those spaces should be distributed evenly across the last `n` rows.",
85
+ "cases": [
86
+ {
87
+ "description": "empty plaintext results in an empty ciphertext",
88
+ "property": "ciphertext",
89
+ "plaintext": "",
90
+ "expected": ""
91
+ },
92
+ {
93
+ "description": "9 character plaintext results in 3 chunks of 3 characters",
94
+ "property": "ciphertext",
95
+ "plaintext": "This is fun!",
96
+ "expected": "tsf hiu isn"
97
+ },
98
+ {
99
+ "description": "54 character plaintext results in 7 chunks, the last two padded with spaces",
100
+ "property": "ciphertext",
101
+ "plaintext": "If man was meant to stay on the ground, god would have given us roots.",
102
+ "expected": "imtgdvs fearwer mayoogo anouuio ntnnlvt wttddes aohghn sseoau "
103
+ }
104
+ ]
105
+ }
106
+ ]
97
107
  }
@@ -1,67 +1,81 @@
1
1
  {
2
- "square_of_sum": {
3
- "description": ["Square the sum of the numbers up to the given number"],
4
- "cases": [
5
- {
6
- "description": "square of sum 5",
7
- "number": 5,
8
- "expected": 225
9
- },
10
- {
11
- "description": "square of sum 10",
12
- "number": 10,
13
- "expected": 3025
14
- },
15
- {
16
- "description": "square of sum 100",
17
- "number": 100,
18
- "expected": 25502500
19
- }
20
- ]
2
+ "exercise": "difference-of-squares",
3
+ "version": "1.0.0",
4
+ "cases": [
5
+ {
6
+ "description": "Square the sum of the numbers up to the given number",
7
+ "cases": [
8
+ {
9
+ "description": "square of sum 5",
10
+ "property": "squareOfSum",
11
+ "number": 5,
12
+ "expected": 225
13
+ },
14
+ {
15
+ "description": "square of sum 10",
16
+ "property": "squareOfSum",
17
+ "number": 10,
18
+ "expected": 3025
19
+ },
20
+ {
21
+ "description": "square of sum 100",
22
+ "property": "squareOfSum",
23
+ "number": 100,
24
+ "expected": 25502500
25
+ }
26
+ ]
21
27
  },
22
- "sum_of_squares": {
23
- "description": ["Sum the squares of the numbers up to the given number"],
24
- "cases": [
25
- {
26
- "description": "sum of squares 5",
27
- "number": 5,
28
- "expected": 55
29
- },
30
- {
31
- "description": "sum of squares 10",
32
- "number": 10,
33
- "expected": 385
34
- },
35
- {
36
- "description": "sum of squares 100",
37
- "number": 100,
38
- "expected": 338350
39
- }
40
- ]
28
+ {
29
+ "description": "Sum the squares of the numbers up to the given number",
30
+ "cases": [
31
+ {
32
+ "description": "sum of squares 5",
33
+ "property": "sumOfSquares",
34
+ "number": 5,
35
+ "expected": 55
36
+ },
37
+ {
38
+ "description": "sum of squares 10",
39
+ "property": "sumOfSquares",
40
+ "number": 10,
41
+ "expected": 385
42
+ },
43
+ {
44
+ "description": "sum of squares 100",
45
+ "property": "sumOfSquares",
46
+ "number": 100,
47
+ "expected": 338350
48
+ }
49
+ ]
41
50
  },
42
- "difference_of_squares": {
43
- "description": ["Subtract sum of squares from square of sums"],
44
- "cases": [
45
- {
46
- "description": "difference of squares 0",
47
- "number": 0,
48
- "expected": 0
49
- },
50
- {
51
- "description": "difference of squares 5",
52
- "number": 5,
53
- "expected": 170
54
- },
55
- {
56
- "description": "difference of squares 10",
57
- "number": 10,
58
- "expected": 2640
59
- },
60
- {
61
- "description": "difference of squares 100",
62
- "number": 100,
63
- "expected": 25164150
64
- }
65
- ]
51
+ {
52
+ "description": "Subtract sum of squares from square of sums",
53
+ "cases": [
54
+ {
55
+ "description": "difference of squares 0",
56
+ "property": "differenceOfSquares",
57
+ "number": 0,
58
+ "expected": 0
59
+ },
60
+ {
61
+ "description": "difference of squares 5",
62
+ "property": "differenceOfSquares",
63
+ "number": 5,
64
+ "expected": 170
65
+ },
66
+ {
67
+ "description": "difference of squares 10",
68
+ "property": "differenceOfSquares",
69
+ "number": 10,
70
+ "expected": 2640
71
+ },
72
+ {
73
+ "description": "difference of squares 100",
74
+ "property": "differenceOfSquares",
75
+ "number": 100,
76
+ "expected": 25164150
77
+ }
78
+ ]
66
79
  }
80
+ ]
67
81
  }
@@ -1,69 +1,77 @@
1
1
  {
2
- "transform": {
3
- "#": [
4
- "Note: The expected input data for these tests should have",
2
+ "exercise": "etl",
3
+ "version": "1.0.0",
4
+ "cases": [
5
+ {
6
+ "comments": [
7
+ "Note: The expected input data for these tests should have",
5
8
  "integer keys (not stringified numbers as shown in the JSON below",
6
9
  "Unless the language prohibits that, please implement these tests",
7
10
  "such that keys are integers. e.g. in JavaScript, it might look ",
8
11
  "like `transform( { 1: ['A'] } );`"
9
- ],
10
- "description": "transforms the a set of scrabble data previously indexed by the tile score to a set of data indexed by the tile letter",
11
- "cases": [
12
- {
13
- "description": "a single letter",
14
- "input": {
15
- "1": ["A"]
12
+ ],
13
+ "description": "transforms the a set of scrabble data previously indexed by the tile score to a set of data indexed by the tile letter",
14
+ "cases": [
15
+ {
16
+ "description": "a single letter",
17
+ "property": "transform",
18
+ "input": {
19
+ "1": ["A"]
20
+ },
21
+ "expected": {
22
+ "a": 1
23
+ }
16
24
  },
17
- "expected": {
18
- "a" : 1
19
- }
20
- },
21
- {
22
- "description": "single score with multiple letters",
23
- "input": {
24
- "1": ["A", "E", "I", "O", "U" ]
25
- },
26
- "expected": {
27
- "a" : 1,
28
- "e" : 1,
29
- "i" : 1,
30
- "o" : 1,
31
- "u" : 1
32
- }
33
- },
34
- {
35
- "description": "multiple scores with multiple letters",
36
- "input": {
37
- "1": ["A", "E"],
38
- "2": ["D", "G"]
25
+ {
26
+ "description": "single score with multiple letters",
27
+ "property": "transform",
28
+ "input": {
29
+ "1": ["A", "E", "I", "O", "U"]
30
+ },
31
+ "expected": {
32
+ "a": 1,
33
+ "e": 1,
34
+ "i": 1,
35
+ "o": 1,
36
+ "u": 1
37
+ }
39
38
  },
40
- "expected": {
41
- "a" : 1,
42
- "d" : 2,
43
- "e" : 1,
44
- "g" : 2
45
- }
46
- },
47
- {
48
- "description": "multiple scores with differing numbers of letters",
49
- "input": {
50
- "1": [ "A", "E", "I", "O", "U", "L", "N", "R", "S", "T" ],
51
- "2": [ "D", "G" ],
52
- "3": [ "B", "C", "M", "P" ],
53
- "4": [ "F", "H", "V", "W", "Y" ],
54
- "5": [ "K" ],
55
- "8": [ "J", "X" ],
56
- "10": [ "Q", "Z" ]
39
+ {
40
+ "description": "multiple scores with multiple letters",
41
+ "property": "transform",
42
+ "input": {
43
+ "1": ["A", "E"],
44
+ "2": ["D", "G"]
45
+ },
46
+ "expected": {
47
+ "a": 1,
48
+ "d": 2,
49
+ "e": 1,
50
+ "g": 2
51
+ }
57
52
  },
58
- "expected": {
59
- "a": 1, "b": 3, "c": 3, "d": 2, "e": 1,
60
- "f": 4, "g": 2, "h": 4, "i": 1, "j": 8,
61
- "k": 5, "l": 1, "m": 3, "n": 1, "o": 1,
62
- "p": 3, "q": 10, "r": 1, "s": 1, "t": 1,
63
- "u": 1, "v": 4, "w": 4, "x": 8, "y": 4,
64
- "z": 10
53
+ {
54
+ "description": "multiple scores with differing numbers of letters",
55
+ "property": "transform",
56
+ "input": {
57
+ "1": ["A", "E", "I", "O", "U", "L", "N", "R", "S", "T"],
58
+ "2": ["D", "G"],
59
+ "3": ["B", "C", "M", "P"],
60
+ "4": ["F", "H", "V", "W", "Y"],
61
+ "5": ["K"],
62
+ "8": ["J", "X"],
63
+ "10": ["Q", "Z"]
64
+ },
65
+ "expected": {
66
+ "a": 1, "b": 3, "c": 3, "d": 2, "e": 1,
67
+ "f": 4, "g": 2, "h": 4, "i": 1, "j": 8,
68
+ "k": 5, "l": 1, "m": 3, "n": 1, "o": 1,
69
+ "p": 3, "q": 10, "r": 1, "s": 1, "t": 1,
70
+ "u": 1, "v": 4, "w": 4, "x": 8, "y": 4,
71
+ "z": 10
72
+ }
65
73
  }
66
- }
67
- ]
68
- }
74
+ ]
75
+ }
76
+ ]
69
77
  }