trackler 2.2.1.76 → 2.2.1.77
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/problem-specifications/exercises/beer-song/canonical-data.json +33 -17
- data/problem-specifications/exercises/binary-search/canonical-data.json +41 -21
- data/problem-specifications/exercises/book-store/canonical-data.json +58 -30
- data/problem-specifications/exercises/two-fer/metadata.yml +1 -1
- data/tracks/bash/config.json +35 -13
- data/tracks/bash/exercises/acronym/README.md +27 -0
- data/tracks/bash/exercises/acronym/acronym.sh +18 -0
- data/tracks/bash/exercises/acronym/acronym_tests.sh +43 -0
- data/tracks/bash/exercises/acronym/example.sh +18 -0
- data/tracks/bash/exercises/armstrong-numbers/README.md +20 -0
- data/tracks/bash/exercises/armstrong-numbers/armstrong_numbers_test.sh +58 -0
- data/tracks/bash/exercises/armstrong-numbers/example.sh +19 -0
- data/tracks/clojure/config.json +8 -0
- data/tracks/clojure/exercises/two-fer/README.md +19 -0
- data/tracks/clojure/exercises/two-fer/project.clj +4 -0
- data/tracks/clojure/exercises/two-fer/src/example.clj +5 -0
- data/tracks/clojure/exercises/two-fer/src/two_fer.clj +5 -0
- data/tracks/clojure/exercises/two-fer/test/two_fer_test.clj +12 -0
- data/tracks/common-lisp/docs/INSTALLATION.md +26 -0
- data/tracks/go/exercises/kindergarten-garden/kindergarten_garden_test.go +1 -1
- data/tracks/go/exercises/reverse-string/reverse_string_test.go +8 -0
- data/tracks/java/config.json +34 -11
- data/tracks/java/exercises/armstrong-numbers/.meta/src/reference/java/ArmstrongNumbers.java +20 -0
- data/tracks/java/exercises/armstrong-numbers/.meta/version +1 -0
- data/tracks/java/exercises/armstrong-numbers/README.md +30 -0
- data/tracks/java/exercises/armstrong-numbers/build.gradle +18 -0
- data/tracks/java/exercises/armstrong-numbers/src/main/java/ArmstrongNumbers.java +9 -0
- data/tracks/java/exercises/armstrong-numbers/src/test/java/ArmstrongNumbersTest.java +80 -0
- data/tracks/java/exercises/proverb/.meta/src/reference/java/Proverb.java +19 -0
- data/tracks/java/exercises/proverb/README.md +29 -0
- data/tracks/java/exercises/proverb/build.gradle +18 -0
- data/tracks/java/exercises/proverb/src/main/java/Proverb.java +11 -0
- data/tracks/java/exercises/proverb/src/test/java/ProverbTest.java +80 -0
- data/tracks/java/exercises/settings.gradle +2 -0
- data/tracks/perl6/config.json +1 -1
- data/tracks/python/exercises/alphametics/example.py +168 -90
- data/tracks/swift/config.json +16 -0
- data/tracks/swift/exercises/list-ops/Package.swift +5 -0
- data/tracks/swift/exercises/list-ops/README.md +16 -0
- data/tracks/swift/exercises/list-ops/Sources/ListOps.swift +1 -0
- data/tracks/swift/exercises/list-ops/Sources/ListOpsExample.swift +81 -0
- data/tracks/swift/exercises/list-ops/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/list-ops/Tests/ListOpsTests/ListOpsTests.swift +110 -0
- metadata +31 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3da6a850390bdbe8037da25408699c986444008c
|
4
|
+
data.tar.gz: 9d76e2252a450507df607663a2247737af897deb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a61be70536d4c202b42e48b50b5e43ac99e7af60ec9d6b776825af83a146f22f64d71f0be5cd6d95dd1c1f47f8285ce60569ae99b3293ddfa92505f6ebe98558
|
7
|
+
data.tar.gz: eae0a204221616c6d66d209c1096fd88aaee9326953beb440d90a2a53e386fd3e76dfe96b4f2f7ab5d64a703f4be03e78d7fb35e4f24e701cea7a80d66e8a12e
|
data/lib/trackler/version.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"exercise": "beer-song",
|
3
|
-
"version": "2.
|
3
|
+
"version": "2.1.0",
|
4
4
|
"cases": [
|
5
5
|
{
|
6
6
|
"description": "verse",
|
@@ -11,8 +11,10 @@
|
|
11
11
|
{
|
12
12
|
"description": "first generic verse",
|
13
13
|
"property": "recite",
|
14
|
-
"
|
15
|
-
|
14
|
+
"input": {
|
15
|
+
"startBottles": 99,
|
16
|
+
"takeDown": 1
|
17
|
+
},
|
16
18
|
"expected": [
|
17
19
|
"99 bottles of beer on the wall, 99 bottles of beer.",
|
18
20
|
"Take one down and pass it around, 98 bottles of beer on the wall."
|
@@ -21,8 +23,10 @@
|
|
21
23
|
{
|
22
24
|
"description": "last generic verse",
|
23
25
|
"property": "recite",
|
24
|
-
"
|
25
|
-
|
26
|
+
"input": {
|
27
|
+
"startBottles": 3,
|
28
|
+
"takeDown": 1
|
29
|
+
},
|
26
30
|
"expected": [
|
27
31
|
"3 bottles of beer on the wall, 3 bottles of beer.",
|
28
32
|
"Take one down and pass it around, 2 bottles of beer on the wall."
|
@@ -31,8 +35,10 @@
|
|
31
35
|
{
|
32
36
|
"description": "verse with 2 bottles",
|
33
37
|
"property": "recite",
|
34
|
-
"
|
35
|
-
|
38
|
+
"input": {
|
39
|
+
"startBottles": 2,
|
40
|
+
"takeDown": 1
|
41
|
+
},
|
36
42
|
"expected": [
|
37
43
|
"2 bottles of beer on the wall, 2 bottles of beer.",
|
38
44
|
"Take one down and pass it around, 1 bottle of beer on the wall."
|
@@ -41,8 +47,10 @@
|
|
41
47
|
{
|
42
48
|
"description": "verse with 1 bottle",
|
43
49
|
"property": "recite",
|
44
|
-
"
|
45
|
-
|
50
|
+
"input": {
|
51
|
+
"startBottles": 1,
|
52
|
+
"takeDown": 1
|
53
|
+
},
|
46
54
|
"expected": [
|
47
55
|
"1 bottle of beer on the wall, 1 bottle of beer.",
|
48
56
|
"Take it down and pass it around, no more bottles of beer on the wall."
|
@@ -51,8 +59,10 @@
|
|
51
59
|
{
|
52
60
|
"description": "verse with 0 bottles",
|
53
61
|
"property": "recite",
|
54
|
-
"
|
55
|
-
|
62
|
+
"input": {
|
63
|
+
"startBottles": 0,
|
64
|
+
"takeDown": 1
|
65
|
+
},
|
56
66
|
"expected": [
|
57
67
|
"No more bottles of beer on the wall, no more bottles of beer.",
|
58
68
|
"Go to the store and buy some more, 99 bottles of beer on the wall."
|
@@ -71,8 +81,10 @@
|
|
71
81
|
{
|
72
82
|
"description": "first two verses",
|
73
83
|
"property": "recite",
|
74
|
-
"
|
75
|
-
|
84
|
+
"input": {
|
85
|
+
"startBottles": 99,
|
86
|
+
"takeDown": 2
|
87
|
+
},
|
76
88
|
"expected": [
|
77
89
|
"99 bottles of beer on the wall, 99 bottles of beer.",
|
78
90
|
"Take one down and pass it around, 98 bottles of beer on the wall.",
|
@@ -84,8 +96,10 @@
|
|
84
96
|
{
|
85
97
|
"description": "last three verses",
|
86
98
|
"property": "recite",
|
87
|
-
"
|
88
|
-
|
99
|
+
"input": {
|
100
|
+
"startBottles": 2,
|
101
|
+
"takeDown": 3
|
102
|
+
},
|
89
103
|
"expected": [
|
90
104
|
"2 bottles of beer on the wall, 2 bottles of beer.",
|
91
105
|
"Take one down and pass it around, 1 bottle of beer on the wall.",
|
@@ -100,8 +114,10 @@
|
|
100
114
|
{
|
101
115
|
"description": "all verses",
|
102
116
|
"property": "recite",
|
103
|
-
"
|
104
|
-
|
117
|
+
"input": {
|
118
|
+
"startBottles": 99,
|
119
|
+
"takeDown": 100
|
120
|
+
},
|
105
121
|
"expected": [
|
106
122
|
"99 bottles of beer on the wall, 99 bottles of beer.",
|
107
123
|
"Take one down and pass it around, 98 bottles of beer on the wall.",
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"exercise": "binary-search",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.1.0",
|
4
4
|
"comments": [
|
5
5
|
"Here -1 is used to indicate that the value is not included in the array.",
|
6
6
|
"It should be replaced with the respective expression that is idiomatic",
|
@@ -19,71 +19,91 @@
|
|
19
19
|
{
|
20
20
|
"description": "finds a value in an array with one element",
|
21
21
|
"property": "find",
|
22
|
-
"
|
23
|
-
|
22
|
+
"input": {
|
23
|
+
"array": [6],
|
24
|
+
"value": 6
|
25
|
+
},
|
24
26
|
"expected": 0
|
25
27
|
},
|
26
28
|
{
|
27
29
|
"description": "finds a value in the middle of an array",
|
28
30
|
"property": "find",
|
29
|
-
"
|
30
|
-
|
31
|
+
"input": {
|
32
|
+
"array": [1, 3, 4, 6, 8, 9, 11],
|
33
|
+
"value": 6
|
34
|
+
},
|
31
35
|
"expected": 3
|
32
36
|
},
|
33
37
|
{
|
34
38
|
"description": "finds a value at the beginning of an array",
|
35
39
|
"property": "find",
|
36
|
-
"
|
37
|
-
|
40
|
+
"input": {
|
41
|
+
"array": [1, 3, 4, 6, 8, 9, 11],
|
42
|
+
"value": 1
|
43
|
+
},
|
38
44
|
"expected": 0
|
39
45
|
},
|
40
46
|
{
|
41
47
|
"description": "finds a value at the end of an array",
|
42
48
|
"property": "find",
|
43
|
-
"
|
44
|
-
|
49
|
+
"input": {
|
50
|
+
"array": [1, 3, 4, 6, 8, 9, 11],
|
51
|
+
"value": 11
|
52
|
+
},
|
45
53
|
"expected": 6
|
46
54
|
},
|
47
55
|
{
|
48
56
|
"description": "finds a value in an array of odd length",
|
49
57
|
"property": "find",
|
50
|
-
"
|
51
|
-
|
58
|
+
"input": {
|
59
|
+
"array": [1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 634],
|
60
|
+
"value": 144
|
61
|
+
},
|
52
62
|
"expected": 9
|
53
63
|
},
|
54
64
|
{
|
55
65
|
"description": "finds a value in an array of even length",
|
56
66
|
"property": "find",
|
57
|
-
"
|
58
|
-
|
67
|
+
"input": {
|
68
|
+
"array": [1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377],
|
69
|
+
"value": 21
|
70
|
+
},
|
59
71
|
"expected": 5
|
60
72
|
},
|
61
73
|
{
|
62
74
|
"description": "identifies that a value is not included in the array",
|
63
75
|
"property": "find",
|
64
|
-
"
|
65
|
-
|
76
|
+
"input": {
|
77
|
+
"array": [1, 3, 4, 6, 8, 9, 11],
|
78
|
+
"value": 7
|
79
|
+
},
|
66
80
|
"expected": -1
|
67
81
|
},
|
68
82
|
{
|
69
83
|
"description": "a value smaller than the array's smallest value is not included",
|
70
84
|
"property": "find",
|
71
|
-
"
|
72
|
-
|
85
|
+
"input": {
|
86
|
+
"array": [1, 3, 4, 6, 8, 9, 11],
|
87
|
+
"value": 0
|
88
|
+
},
|
73
89
|
"expected": -1
|
74
90
|
},
|
75
91
|
{
|
76
92
|
"description": "a value larger than the array's largest value is not included",
|
77
93
|
"property": "find",
|
78
|
-
"
|
79
|
-
|
94
|
+
"input": {
|
95
|
+
"array": [1, 3, 4, 6, 8, 9, 11],
|
96
|
+
"value": 13
|
97
|
+
},
|
80
98
|
"expected": -1
|
81
99
|
},
|
82
100
|
{
|
83
101
|
"description": "nothing is included in an empty array",
|
84
102
|
"property": "find",
|
85
|
-
"
|
86
|
-
|
103
|
+
"input": {
|
104
|
+
"array": [],
|
105
|
+
"value": 1
|
106
|
+
},
|
87
107
|
"expected": -1
|
88
108
|
}
|
89
109
|
]
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"exercise": "book-store",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.2.0",
|
4
4
|
"cases": [
|
5
5
|
{
|
6
6
|
"description": "Return the total basket price after applying the best discount.",
|
@@ -13,102 +13,130 @@
|
|
13
13
|
{
|
14
14
|
"property": "total",
|
15
15
|
"description": "Only a single book",
|
16
|
-
"
|
17
|
-
"
|
16
|
+
"comments": ["Suggested grouping, [[1]]."],
|
17
|
+
"input": {
|
18
|
+
"basket": [1]
|
19
|
+
},
|
18
20
|
"expected": 8.00
|
19
21
|
},
|
20
22
|
{
|
21
23
|
"property": "total",
|
22
24
|
"description": "Two of the same book",
|
23
|
-
"
|
24
|
-
"
|
25
|
+
"comments": ["Suggested grouping, [[2],[2]]."],
|
26
|
+
"input": {
|
27
|
+
"basket": [2,2]
|
28
|
+
},
|
25
29
|
"expected": 16.00
|
26
30
|
},
|
27
31
|
{
|
28
32
|
"property": "total",
|
29
33
|
"description": "Empty basket",
|
30
|
-
"
|
31
|
-
"
|
34
|
+
"comments": ["Suggested grouping, []."],
|
35
|
+
"input": {
|
36
|
+
"basket": []
|
37
|
+
},
|
32
38
|
"expected": 0.00
|
33
39
|
},
|
34
40
|
{
|
35
41
|
"property": "total",
|
36
42
|
"description": "Two different books",
|
37
|
-
"
|
38
|
-
"
|
43
|
+
"comments": ["Suggested grouping, [[1,2]]."],
|
44
|
+
"input": {
|
45
|
+
"basket": [1,2]
|
46
|
+
},
|
39
47
|
"expected": 15.20
|
40
48
|
},
|
41
49
|
{
|
42
50
|
"property": "total",
|
43
51
|
"description": "Three different books",
|
44
|
-
"
|
45
|
-
"
|
52
|
+
"comments": ["Suggested grouping, [[1,2,3]]."],
|
53
|
+
"input": {
|
54
|
+
"basket": [1,2,3]
|
55
|
+
},
|
46
56
|
"expected": 21.60
|
47
57
|
},
|
48
58
|
{
|
49
59
|
"property": "total",
|
50
60
|
"description": "Four different books",
|
51
|
-
"
|
52
|
-
"
|
61
|
+
"comments": ["Suggested grouping, [[1,2,3,4]]."],
|
62
|
+
"input": {
|
63
|
+
"basket": [1,2,3,4]
|
64
|
+
},
|
53
65
|
"expected": 25.60
|
54
66
|
},
|
55
67
|
{
|
56
68
|
"property": "total",
|
57
69
|
"description": "Five different books",
|
58
|
-
"
|
59
|
-
"
|
70
|
+
"comments": ["Suggested grouping, [[1,2,3,4,5]]."],
|
71
|
+
"input": {
|
72
|
+
"basket": [1,2,3,4,5]
|
73
|
+
},
|
60
74
|
"expected": 30.00
|
61
75
|
},
|
62
76
|
{
|
63
77
|
"property": "total",
|
64
78
|
"description": "Two groups of four is cheaper than group of five plus group of three",
|
65
|
-
"
|
66
|
-
"
|
79
|
+
"comments": ["Suggested grouping, [[1,2,3,4],[1,2,3,5]]."],
|
80
|
+
"input": {
|
81
|
+
"basket": [1,1,2,2,3,3,4,5]
|
82
|
+
},
|
67
83
|
"expected": 51.20
|
68
84
|
},
|
69
85
|
{
|
70
86
|
"property": "total",
|
71
87
|
"description": "Group of four plus group of two is cheaper than two groups of three",
|
72
|
-
"
|
73
|
-
"
|
88
|
+
"comments": ["Suggested grouping, [[1,2,3,4],[1,2]]."],
|
89
|
+
"input": {
|
90
|
+
"basket": [1,1,2,2,3,4]
|
91
|
+
},
|
74
92
|
"expected": 40.80
|
75
93
|
},
|
76
94
|
{
|
77
95
|
"property": "total",
|
78
96
|
"description": "Two each of first 4 books and 1 copy each of rest",
|
79
|
-
"
|
80
|
-
"
|
97
|
+
"comments": ["Suggested grouping, [[1,2,3,4,5],[1,2,3,4]]."],
|
98
|
+
"input": {
|
99
|
+
"basket": [1,1,2,2,3,3,4,4,5]
|
100
|
+
},
|
81
101
|
"expected": 55.60
|
82
102
|
},
|
83
103
|
{
|
84
104
|
"property": "total",
|
85
105
|
"description": "Two copies of each book",
|
86
|
-
"
|
87
|
-
"
|
106
|
+
"comments": ["Suggested grouping, [[1,2,3,4,5],[1,2,3,4,5]]."],
|
107
|
+
"input": {
|
108
|
+
"basket": [1,1,2,2,3,3,4,4,5,5]
|
109
|
+
},
|
88
110
|
"expected": 60.00
|
89
111
|
},
|
90
112
|
{
|
91
113
|
"property": "total",
|
92
114
|
"description": "Three copies of first book and 2 each of remaining",
|
93
|
-
"
|
94
|
-
"
|
115
|
+
"comments": ["Suggested grouping, [[1,2,3,4,5],[1,2,3,4,5],[1]]."],
|
116
|
+
"input": {
|
117
|
+
"basket": [1,1,2,2,3,3,4,4,5,5,1]
|
118
|
+
},
|
95
119
|
"expected": 68.00
|
96
120
|
},
|
97
121
|
{
|
98
122
|
"property": "total",
|
99
123
|
"description": "Three each of first 2 books and 2 each of remaining books",
|
100
|
-
"
|
101
|
-
"
|
124
|
+
"comments": ["Suggested grouping, [[1,2,3,4,5],[1,2,3,4,5],[1,2]]."],
|
125
|
+
"input": {
|
126
|
+
"basket": [1,1,2,2,3,3,4,4,5,5,1,2]
|
127
|
+
},
|
102
128
|
"expected": 75.20
|
103
129
|
},
|
104
130
|
{
|
105
131
|
"property": "total",
|
106
132
|
"description": "Four groups of four are cheaper than two groups each of five and three",
|
107
|
-
"
|
108
|
-
"
|
133
|
+
"comments": ["Suggested grouping, [[1,2,3,4],[1,2,3,5],[1,2,3,4],[1,2,3,5]]."],
|
134
|
+
"input": {
|
135
|
+
"basket": [1,1,2,2,3,3,4,5,1,1,2,2,3,3,4,5]
|
136
|
+
},
|
109
137
|
"expected": 102.4
|
110
138
|
}
|
111
139
|
]
|
112
140
|
}
|
113
141
|
]
|
114
|
-
}
|
142
|
+
}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
---
|
2
2
|
blurb: 'Create a sentence of the form "One for X, one for me."'
|
3
|
-
source: "This is an exercise to introduce users to basic programming constructs, just after
|
3
|
+
source: "This is an exercise to introduce users to basic programming constructs, just after Hello World."
|
4
4
|
source_url: "https://en.wikipedia.org/wiki/Two-fer"
|
data/tracks/bash/config.json
CHANGED
@@ -43,6 +43,17 @@
|
|
43
43
|
"uuid": "e24451fd-761d-4d20-81d9-e470486ec44a"
|
44
44
|
},
|
45
45
|
{
|
46
|
+
"core": false,
|
47
|
+
"difficulty": 1,
|
48
|
+
"slug": "acronym",
|
49
|
+
"topics": [
|
50
|
+
"string_transformation",
|
51
|
+
"input_validation"
|
52
|
+
],
|
53
|
+
"unlocked_by": null,
|
54
|
+
"uuid": "5812c10a-aee1-11e7-add7-ef139384f6eb"
|
55
|
+
},
|
56
|
+
{
|
46
57
|
"core": false,
|
47
58
|
"difficulty": 1,
|
48
59
|
"slug": "raindrops",
|
@@ -76,6 +87,17 @@
|
|
76
87
|
],
|
77
88
|
"uuid": "b2b4ee35-108f-45ce-b294-c10d332e5579"
|
78
89
|
},
|
90
|
+
{
|
91
|
+
"core": false,
|
92
|
+
"difficulty": 2,
|
93
|
+
"slug": "armstrong-numbers",
|
94
|
+
"topics": [
|
95
|
+
"integers",
|
96
|
+
"mathematics"
|
97
|
+
],
|
98
|
+
"unlocked_by": null,
|
99
|
+
"uuid": "302b7e1a-4cf6-47d4-8048-b675f667fc98"
|
100
|
+
},
|
79
101
|
{
|
80
102
|
"core": true,
|
81
103
|
"difficulty": 2,
|
@@ -162,18 +184,6 @@
|
|
162
184
|
"unlocked_by": "pangram",
|
163
185
|
"uuid": "9f9a1a49-472f-4a39-aa28-6aa17eeebdc7"
|
164
186
|
},
|
165
|
-
{
|
166
|
-
"core": false,
|
167
|
-
"difficulty": 5,
|
168
|
-
"slug": "atbash-cipher",
|
169
|
-
"topics": [
|
170
|
-
"cryptography",
|
171
|
-
"pattern_matching",
|
172
|
-
"strings"
|
173
|
-
],
|
174
|
-
"unlocked_by": "hamming",
|
175
|
-
"uuid": "03808072-0228-6580-7a9b-cc709a8a5b8c0e600b9"
|
176
|
-
},
|
177
187
|
{
|
178
188
|
"core": false,
|
179
189
|
"difficulty": 2,
|
@@ -186,8 +196,20 @@
|
|
186
196
|
],
|
187
197
|
"unlocked_by": "leap",
|
188
198
|
"uuid": "496e130a-063a-6380-19dc-179f05534717226bca1"
|
199
|
+
},
|
200
|
+
{
|
201
|
+
"core": false,
|
202
|
+
"difficulty": 5,
|
203
|
+
"slug": "atbash-cipher",
|
204
|
+
"topics": [
|
205
|
+
"cryptography",
|
206
|
+
"pattern_matching",
|
207
|
+
"strings"
|
208
|
+
],
|
209
|
+
"unlocked_by": "hamming",
|
210
|
+
"uuid": "03808072-0228-6580-7a9b-cc709a8a5b8c0e600b9"
|
189
211
|
}
|
190
|
-
|
212
|
+
],
|
191
213
|
"foregone": [],
|
192
214
|
"language": "Bash"
|
193
215
|
}
|