trackler 2.2.1.1 → 2.2.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/trackler/version.rb +1 -1
- data/tracks/erlang/config/maintainers.json +29 -0
- data/tracks/go/config.json +11 -8
- data/tracks/haskell/config/maintainers.json +44 -0
- data/tracks/java/docs/TESTS.md +3 -3
- data/tracks/javascript/config.json +14 -3
- data/tracks/javascript/exercises/sublist/README.md +50 -0
- data/tracks/javascript/exercises/sublist/example.js +31 -0
- data/tracks/javascript/exercises/sublist/sublist.spec.js +126 -0
- data/tracks/pony/README.md +1 -1
- data/tracks/pony/config.json +0 -2
- data/tracks/pony/config/exercise_readme.go.tmpl +16 -0
- data/tracks/pony/exercises/anagram/README.md +13 -0
- data/tracks/pony/exercises/atbash-cipher/README.md +34 -0
- data/tracks/pony/exercises/beer-song/README.md +327 -0
- data/tracks/pony/exercises/bob/README.md +18 -0
- data/tracks/pony/exercises/difference-of-squares/README.md +19 -0
- data/tracks/pony/exercises/hamming/README.md +42 -0
- data/tracks/pony/exercises/hello-world/README.md +21 -0
- data/tracks/pony/exercises/leap/README.md +33 -0
- data/tracks/pony/exercises/pascals-triangle/README.md +21 -0
- data/tracks/pony/exercises/rna-transcription/README.md +25 -0
- data/tracks/pony/exercises/roman-numerals/README.md +49 -0
- data/tracks/ruby/config.json +13 -0
- data/tracks/ruby/config/maintainers.json +64 -0
- data/tracks/ruby/exercises/rotational-cipher/.meta/.version +1 -0
- data/tracks/ruby/exercises/rotational-cipher/.meta/generator/rotational_cipher_case.rb +9 -0
- data/tracks/ruby/exercises/rotational-cipher/.meta/solutions/rotational_cipher.rb +53 -0
- data/tracks/ruby/exercises/rotational-cipher/rotational_cipher_test.rb +77 -0
- metadata +24 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3460c4854b0b5a786a64101a2f58df547f5823f5
|
4
|
+
data.tar.gz: adf79c90fe9ab7f504196911f62c4590b8354881
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab8eb54d3b072d1f3821f9e4ea3694499498bea1b8680639c0c3c01a1e2d4dfa24849f1aea7f695a22a5caf871c369cb9126e30fed1d50842ae95e840e850a81
|
7
|
+
data.tar.gz: 2717972c9833a923d7899e8a32f7573d9b6b311a355e14d15a6d55e4b34d4af3b65d78bfb51860cddabdd7d3f602674e5646bfd6312b8c4b3f9def3d0d38aa31
|
data/lib/trackler/version.rb
CHANGED
@@ -0,0 +1,29 @@
|
|
1
|
+
{
|
2
|
+
"maintainers": [
|
3
|
+
{
|
4
|
+
"github_username": "xymbol",
|
5
|
+
"show_on_website": false,
|
6
|
+
"alumnus": false,
|
7
|
+
"name": null,
|
8
|
+
"bio": null,
|
9
|
+
"link_text": null,
|
10
|
+
"link_url": null,
|
11
|
+
"avatar_url": null
|
12
|
+
},
|
13
|
+
{
|
14
|
+
"github_username": "etrepum",
|
15
|
+
"show_on_website": false,
|
16
|
+
"alumnus": true
|
17
|
+
},
|
18
|
+
{
|
19
|
+
"github_username": "NobbZ",
|
20
|
+
"show_on_website": false,
|
21
|
+
"alumnus": false,
|
22
|
+
"name": null,
|
23
|
+
"bio": null,
|
24
|
+
"link_text": null,
|
25
|
+
"link_url": null,
|
26
|
+
"avatar_url": null
|
27
|
+
}
|
28
|
+
]
|
29
|
+
}
|
data/tracks/go/config.json
CHANGED
@@ -15,10 +15,7 @@
|
|
15
15
|
"unlocked_by": null,
|
16
16
|
"difficulty": 1,
|
17
17
|
"topics": [
|
18
|
-
"
|
19
|
-
"Optional values",
|
20
|
-
"Strings",
|
21
|
-
"Text formatting"
|
18
|
+
"Strings"
|
22
19
|
]
|
23
20
|
},
|
24
21
|
{
|
@@ -354,9 +351,13 @@
|
|
354
351
|
"slug": "food-chain",
|
355
352
|
"core": false,
|
356
353
|
"unlocked_by": null,
|
357
|
-
"difficulty":
|
354
|
+
"difficulty": 4,
|
358
355
|
"topics": [
|
359
|
-
|
356
|
+
"Control-flow (conditionals)",
|
357
|
+
"Control-flow (loops)",
|
358
|
+
"Recursion",
|
359
|
+
"Strings",
|
360
|
+
"Text Formatting"
|
360
361
|
]
|
361
362
|
},
|
362
363
|
{
|
@@ -364,9 +365,11 @@
|
|
364
365
|
"slug": "largest-series-product",
|
365
366
|
"core": false,
|
366
367
|
"unlocked_by": null,
|
367
|
-
"difficulty":
|
368
|
+
"difficulty": 3,
|
368
369
|
"topics": [
|
369
|
-
|
370
|
+
"Integers",
|
371
|
+
"Sequences",
|
372
|
+
"Algorithms"
|
370
373
|
]
|
371
374
|
},
|
372
375
|
{
|
@@ -0,0 +1,44 @@
|
|
1
|
+
{
|
2
|
+
"maintainers": [
|
3
|
+
{
|
4
|
+
"github_username": "etrepum",
|
5
|
+
"show_on_website": false,
|
6
|
+
"alumnus": true,
|
7
|
+
"name": null,
|
8
|
+
"bio": null,
|
9
|
+
"link_text": null,
|
10
|
+
"link_url": null,
|
11
|
+
"avatar_url": null
|
12
|
+
},
|
13
|
+
{
|
14
|
+
"github_username": "petertseng",
|
15
|
+
"show_on_website": false,
|
16
|
+
"alumnus": false,
|
17
|
+
"name": null,
|
18
|
+
"bio": null,
|
19
|
+
"link_text": null,
|
20
|
+
"link_url": null,
|
21
|
+
"avatar_url": null
|
22
|
+
},
|
23
|
+
{
|
24
|
+
"github_username": "abo64",
|
25
|
+
"show_on_website": false,
|
26
|
+
"alumnus": false,
|
27
|
+
"name": null,
|
28
|
+
"bio": null,
|
29
|
+
"link_text": null,
|
30
|
+
"link_url": null,
|
31
|
+
"avatar_url": null
|
32
|
+
},
|
33
|
+
{
|
34
|
+
"github_username": "rbasso",
|
35
|
+
"show_on_website": false,
|
36
|
+
"alumnus": false,
|
37
|
+
"name": null,
|
38
|
+
"bio": null,
|
39
|
+
"link_text": null,
|
40
|
+
"link_url": null,
|
41
|
+
"avatar_url": null
|
42
|
+
}
|
43
|
+
]
|
44
|
+
}
|
data/tracks/java/docs/TESTS.md
CHANGED
@@ -37,7 +37,7 @@ Choose your operating system:
|
|
37
37
|
C:\Users\JohnDoe>gradle test
|
38
38
|
```
|
39
39
|
*(Don't worry about the tests failing, at first, this is how you begin each exercise.)*
|
40
|
-
5. Solve the exercise. Find and work through the `
|
40
|
+
5. Solve the exercise. Find and work through the `TUTORIAL.md` guide ([view on GitHub](https://github.com/exercism/java/blob/master/exercises/hello-world/TUTORIAL.md)).
|
41
41
|
|
42
42
|
|
43
43
|
Good luck! Have fun!
|
@@ -70,7 +70,7 @@ If you get stuck, at any point, don't forget to reach out for [help](http://exer
|
|
70
70
|
$ gradle test
|
71
71
|
```
|
72
72
|
*(Don't worry about the tests failing, at first, this is how you begin each exercise.)*
|
73
|
-
4. Solve the exercise. Find and work through the `
|
73
|
+
4. Solve the exercise. Find and work through the `TUTORIAL.md` guide ([view on GitHub](https://github.com/exercism/java/blob/master/exercises/hello-world/TUTORIAL.md)).
|
74
74
|
|
75
75
|
Good luck! Have fun!
|
76
76
|
|
@@ -102,7 +102,7 @@ If you get stuck, at any point, don't forget to reach out for [help](http://exer
|
|
102
102
|
$ gradle test
|
103
103
|
```
|
104
104
|
*(Don't worry about the tests failing, at first, this is how you begin each exercise.)*
|
105
|
-
4. Solve the exercise. Find and work through the `
|
105
|
+
4. Solve the exercise. Find and work through the `TUTORIAL.md` guide ([view on GitHub](https://github.com/exercism/java/blob/master/exercises/hello-world/TUTORIAL.md)).
|
106
106
|
|
107
107
|
Good luck! Have fun!
|
108
108
|
|
@@ -188,6 +188,17 @@
|
|
188
188
|
"Integers"
|
189
189
|
]
|
190
190
|
},
|
191
|
+
{
|
192
|
+
"uuid": "4a83a72c-db0a-45b6-b77c-1949cb24fbae",
|
193
|
+
"slug": "sublist",
|
194
|
+
"difficulty": 4,
|
195
|
+
"core": false,
|
196
|
+
"unlocked_by": "linked-list",
|
197
|
+
"topics": [
|
198
|
+
"Lists",
|
199
|
+
"Arrays"
|
200
|
+
]
|
201
|
+
},
|
191
202
|
{
|
192
203
|
"uuid": "b668e11a-a8ce-4e94-ba68-3a1f0fa3f6c8",
|
193
204
|
"slug": "space-age",
|
@@ -310,7 +321,7 @@
|
|
310
321
|
"uuid": "f1943e87-182a-44f5-a885-3d68a0c0a0dc",
|
311
322
|
"slug": "circular-buffer",
|
312
323
|
"core": false,
|
313
|
-
"unlocked_by":
|
324
|
+
"unlocked_by": "linked-list",
|
314
325
|
"difficulty": 8,
|
315
326
|
"topics": [
|
316
327
|
"Control flow (conditionals)",
|
@@ -690,7 +701,7 @@
|
|
690
701
|
"uuid": "5991c379-f033-4b46-9702-6b7fd03640e8",
|
691
702
|
"slug": "binary-search",
|
692
703
|
"core": false,
|
693
|
-
"unlocked_by":
|
704
|
+
"unlocked_by": "linked-list",
|
694
705
|
"difficulty": 7,
|
695
706
|
"topics": [
|
696
707
|
"Control flow (conditionals)",
|
@@ -1018,7 +1029,7 @@
|
|
1018
1029
|
"uuid": "c21ab6e8-b845-49d0-a2f6-1c89c7a07626",
|
1019
1030
|
"slug": "simple-linked-list",
|
1020
1031
|
"core": false,
|
1021
|
-
"unlocked_by":
|
1032
|
+
"unlocked_by": "linked-list",
|
1022
1033
|
"difficulty": 8,
|
1023
1034
|
"topics": [
|
1024
1035
|
"Arrays",
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# Sublist
|
2
|
+
|
3
|
+
Given two lists determine if the first list is contained within the second
|
4
|
+
list, if the second list is contained within the first list, if both lists are
|
5
|
+
contained within each other or if none of these are true.
|
6
|
+
|
7
|
+
Specifically, a list A is a sublist of list B if by dropping 0 or more elements
|
8
|
+
from the front of B and 0 or more elements from the back of B you get a list
|
9
|
+
that's completely equal to A.
|
10
|
+
|
11
|
+
Examples:
|
12
|
+
|
13
|
+
* A = [1, 2, 3], B = [1, 2, 3, 4, 5], A is a sublist of B
|
14
|
+
* A = [3, 4, 5], B = [1, 2, 3, 4, 5], A is a sublist of B
|
15
|
+
* A = [3, 4], B = [1, 2, 3, 4, 5], A is a sublist of B
|
16
|
+
* A = [1, 2, 3], B = [1, 2, 3], A is equal to B
|
17
|
+
* A = [1, 2, 3, 4, 5], B = [2, 3, 4], A is a superlist of B
|
18
|
+
* A = [1, 2, 4], B = [1, 2, 3, 4, 5], A is not a superlist of, sublist of or equal to B
|
19
|
+
|
20
|
+
## Setup
|
21
|
+
|
22
|
+
Go through the setup instructions for ECMAScript to
|
23
|
+
install the necessary dependencies:
|
24
|
+
|
25
|
+
http://exercism.io/languages/ecmascript
|
26
|
+
|
27
|
+
## Requirements
|
28
|
+
|
29
|
+
Install assignment dependencies:
|
30
|
+
|
31
|
+
```bash
|
32
|
+
$ npm install -g jasmine
|
33
|
+
```
|
34
|
+
|
35
|
+
## Making the test suite pass
|
36
|
+
|
37
|
+
Execute the tests with:
|
38
|
+
|
39
|
+
```bash
|
40
|
+
$ jasmine sublist.spec.js
|
41
|
+
```
|
42
|
+
|
43
|
+
In the test suites all tests but the first have been skipped.
|
44
|
+
|
45
|
+
Once you get a test passing, you can enable the next one by
|
46
|
+
changing `xit` to `it`.
|
47
|
+
|
48
|
+
|
49
|
+
## Submitting Incomplete Solutions
|
50
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,31 @@
|
|
1
|
+
function List(list) {
|
2
|
+
this.list = list || [];
|
3
|
+
|
4
|
+
return {
|
5
|
+
list: this.list,
|
6
|
+
compare: function(other){
|
7
|
+
return {
|
8
|
+
'-1': isSublist(other.list, this.list)
|
9
|
+
? 'SUBLIST'
|
10
|
+
: 'UNEQUAL',
|
11
|
+
'0': isSublist(other.list, this.list)
|
12
|
+
? 'EQUAL'
|
13
|
+
: 'UNEQUAL',
|
14
|
+
'1': isSublist(this.list, other.list)
|
15
|
+
? 'SUPERLIST'
|
16
|
+
: 'UNEQUAL'
|
17
|
+
}[lengthDiff(this, other)];
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
22
|
+
function lengthDiff(one, two){
|
23
|
+
return String(Math.sign(one.list.length - two.list.length));
|
24
|
+
}
|
25
|
+
|
26
|
+
function isSublist(one, two){
|
27
|
+
return one.join().match(two.join());
|
28
|
+
}
|
29
|
+
|
30
|
+
|
31
|
+
module.exports = List;
|
@@ -0,0 +1,126 @@
|
|
1
|
+
var List = require('./sublist');
|
2
|
+
|
3
|
+
|
4
|
+
describe('sublist', function() {
|
5
|
+
|
6
|
+
it('two empty lists are equal', function() {
|
7
|
+
var listOne = new List();
|
8
|
+
var listTwo = new List();
|
9
|
+
|
10
|
+
expect(listOne.compare(listTwo)).toEqual('EQUAL');
|
11
|
+
});
|
12
|
+
|
13
|
+
xit('an empty list is a sublist of a non-empty list', function() {
|
14
|
+
var listOne = new List();
|
15
|
+
var listTwo = new List([1, 2, 3]);
|
16
|
+
|
17
|
+
expect(listOne.compare(listTwo)).toEqual('SUBLIST');
|
18
|
+
});
|
19
|
+
|
20
|
+
xit('non empty list contains empty list', function() {
|
21
|
+
var listOne = new List([1, 2, 3]);
|
22
|
+
var listTwo = new List();
|
23
|
+
|
24
|
+
expect(listOne.compare(listTwo)).toEqual('SUPERLIST');
|
25
|
+
});
|
26
|
+
|
27
|
+
xit('a non-empty list equals itself', function() {
|
28
|
+
var listOne = new List([1, 2, 3]);
|
29
|
+
var listTwo = new List([1, 2, 3]);
|
30
|
+
|
31
|
+
expect(listOne.compare(listTwo)).toEqual('EQUAL');
|
32
|
+
});
|
33
|
+
|
34
|
+
xit('two different lists are unequal', function() {
|
35
|
+
var listOne = new List([1, 2, 3]);
|
36
|
+
var listTwo = new List([2, 3, 4]);
|
37
|
+
|
38
|
+
expect(listOne.compare(listTwo)).toEqual('UNEQUAL');
|
39
|
+
});
|
40
|
+
|
41
|
+
xit('false start', function() {
|
42
|
+
var listOne = new List([1, 2, 5]);
|
43
|
+
var listTwo = new List([0, 1, 2, 3, 1, 2, 5, 6]);
|
44
|
+
|
45
|
+
expect(listOne.compare(listTwo)).toEqual('SUBLIST');
|
46
|
+
|
47
|
+
});
|
48
|
+
|
49
|
+
xit('consecutive', function() {
|
50
|
+
var listOne = new List([1, 1, 2]);
|
51
|
+
var listTwo = new List([0, 1, 1, 1, 2, 1, 2]);
|
52
|
+
|
53
|
+
expect(listOne.compare(listTwo)).toEqual('SUBLIST');
|
54
|
+
});
|
55
|
+
|
56
|
+
xit('sublist at start', function() {
|
57
|
+
var listOne = new List([0, 1, 2]);
|
58
|
+
var listTwo = new List([0, 1, 2, 3, 4, 5]);
|
59
|
+
|
60
|
+
expect(listOne.compare(listTwo)).toEqual('SUBLIST');
|
61
|
+
});
|
62
|
+
|
63
|
+
xit('sublist in middle', function() {
|
64
|
+
var listOne = new List([2, 3, 4]);
|
65
|
+
var listTwo = new List([0, 1, 2, 3, 4, 5]);
|
66
|
+
|
67
|
+
expect(listOne.compare(listTwo)).toEqual('SUBLIST');
|
68
|
+
});
|
69
|
+
|
70
|
+
xit('sublist at end', function() {
|
71
|
+
var listOne = new List([3, 4, 5]);
|
72
|
+
var listTwo = new List([0, 1, 2, 3, 4, 5]);
|
73
|
+
|
74
|
+
expect(listOne.compare(listTwo)).toEqual('SUBLIST');
|
75
|
+
});
|
76
|
+
|
77
|
+
xit('at start of superlist', function() {
|
78
|
+
var listOne = new List([0, 1, 2, 3, 4, 5]);
|
79
|
+
var listTwo = new List([0, 1, 2]);
|
80
|
+
|
81
|
+
expect(listOne.compare(listTwo)).toEqual('SUPERLIST');
|
82
|
+
});
|
83
|
+
|
84
|
+
xit('in middle of superlist', function() {
|
85
|
+
var listOne = new List([0, 1, 2, 3, 4, 5]);
|
86
|
+
var listTwo = new List([2, 3]);
|
87
|
+
|
88
|
+
expect(listOne.compare(listTwo)).toEqual('SUPERLIST');
|
89
|
+
});
|
90
|
+
|
91
|
+
xit('at end of superlist', function() {
|
92
|
+
var listOne = new List([0, 1, 2, 3, 4, 5]);
|
93
|
+
var listTwo = new List([3, 4, 5]);
|
94
|
+
|
95
|
+
expect(listOne.compare(listTwo)).toEqual('SUPERLIST');
|
96
|
+
});
|
97
|
+
|
98
|
+
xit('first list missing element from second list', function() {
|
99
|
+
var listOne = new List([1, 3]);
|
100
|
+
var listTwo = new List([1, 2, 3]);
|
101
|
+
|
102
|
+
expect(listOne.compare(listTwo)).toEqual('UNEQUAL');
|
103
|
+
});
|
104
|
+
|
105
|
+
xit('second list missing element from first list', function() {
|
106
|
+
var listOne = new List([1, 2, 3]);
|
107
|
+
var listTwo = new List([1, 3]);
|
108
|
+
|
109
|
+
expect(listOne.compare(listTwo)).toEqual('UNEQUAL');
|
110
|
+
});
|
111
|
+
|
112
|
+
xit('order matters to a list', function() {
|
113
|
+
var listOne = new List([1, 2, 3]);
|
114
|
+
var listTwo = new List([3, 2, 1]);
|
115
|
+
|
116
|
+
expect(listOne.compare(listTwo)).toEqual('UNEQUAL');
|
117
|
+
});
|
118
|
+
|
119
|
+
xit('same digits but different numbers', function() {
|
120
|
+
var listOne = new List([1, 0, 1]);
|
121
|
+
var listTwo = new List([10, 1]);
|
122
|
+
|
123
|
+
expect(listOne.compare(listTwo)).toEqual('UNEQUAL');
|
124
|
+
});
|
125
|
+
|
126
|
+
});
|
data/tracks/pony/README.md
CHANGED
@@ -6,7 +6,7 @@ Exercism exercises in Pony.
|
|
6
6
|
|
7
7
|
## Contributing Guide
|
8
8
|
|
9
|
-
Please see the [contributing guide](https://github.com/exercism/
|
9
|
+
Please see the [contributing guide](https://github.com/exercism/docs/blob/master/contributing-to-language-tracks/README.md).
|
10
10
|
|
11
11
|
|
12
12
|
### Pony icon
|
data/tracks/pony/config.json
CHANGED
@@ -0,0 +1,16 @@
|
|
1
|
+
# {{ .Spec.Name }}
|
2
|
+
|
3
|
+
{{ .Spec.Description -}}
|
4
|
+
{{- with .Hints }}
|
5
|
+
{{ . }}
|
6
|
+
{{ end }}
|
7
|
+
{{- with .TrackInsert }}
|
8
|
+
{{ . }}
|
9
|
+
{{ end }}
|
10
|
+
{{- with .Spec.Credits -}}
|
11
|
+
## Source
|
12
|
+
|
13
|
+
{{ . }}
|
14
|
+
{{ end }}
|
15
|
+
## Submitting Incomplete Solutions
|
16
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|