trackler 2.2.1.114 → 2.2.1.115
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/delphi/config.json +1 -1
- data/tracks/perl6/bin/README.md +9 -8
- data/tracks/perl6/bin/exercise-gen.pl6 +16 -6
- data/tracks/perl6/config.json +1 -1
- data/tracks/perl6/lib/Exercism/Generator.pm6 +13 -11
- data/tracks/typescript/config.json +2 -4
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a973bc08e042be7c0a98c8daa57f0f81d5ff009c
|
|
4
|
+
data.tar.gz: f0ed6e91cf8aec9a4b45324e38f482cbf46e3c03
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 52b97d29dcfe66c8569302a2a89532164f00c37353749cb3181e6a99f88430fffae43afaf825f2e4a7399a2a437af37d1dd4e66046031bed5490e83a6a35a3b2
|
|
7
|
+
data.tar.gz: ebbb7a299f91d23a101d0a7b9a6794fac451addfc67a2e983916b5e54b641372aa5426290e6b4f92dbc9077cd62b2a39aae0b1f089650d25711d192cd3cb4b4c
|
data/lib/trackler/version.rb
CHANGED
data/tracks/delphi/config.json
CHANGED
data/tracks/perl6/bin/README.md
CHANGED
|
@@ -23,18 +23,19 @@ modules:
|
|
|
23
23
|
- use: Data::Dump
|
|
24
24
|
- use: Foo::Bar
|
|
25
25
|
methods: 'foo bar'
|
|
26
|
-
tests:
|
|
26
|
+
tests: |-
|
|
27
27
|
ok my-subroutine, 'Perl 6 code here';
|
|
28
28
|
pass;
|
|
29
29
|
|
|
30
30
|
unit: module
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
31
|
+
examples:
|
|
32
|
+
base: |-
|
|
33
|
+
sub my-subroutine is export {
|
|
34
|
+
True;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
class MyClass is export {
|
|
38
|
+
}
|
|
38
39
|
```
|
|
39
40
|
|
|
40
41
|
You must have `Template::Mustache` and `YAML::Parser::LibYAML` to run `exercise-gen.pl6`.
|
|
@@ -62,14 +62,24 @@ sub generate ($exercise) {
|
|
|
62
62
|
print "Generating $exercise... ";
|
|
63
63
|
|
|
64
64
|
given Exercism::Generator.new: :$exercise, data => yaml-parse $yaml-file.absolute {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
65
|
+
my $testfile = $exercise-dir.add("$exercise.t");
|
|
66
|
+
$testfile.spurt: .test;
|
|
67
|
+
$testfile.chmod: 0o755;
|
|
68
|
+
|
|
70
69
|
$exercise-dir.add("{.data<exercise>}.pm6").spurt: .stub;
|
|
70
|
+
|
|
71
71
|
$exercise-dir.add('.meta/solutions').mkdir;
|
|
72
|
-
|
|
72
|
+
for .examples.pairs -> $example {
|
|
73
|
+
if $example.key ~~ 'base' {
|
|
74
|
+
$exercise-dir.add(".meta/solutions/{.data<exercise>}.pm6").spurt: $example.value;
|
|
75
|
+
try nqp::symlink("../../$_", ~$exercise-dir.add(".meta/solutions/$_")) given $testfile.basename;
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
$exercise-dir.add(".meta/solutions/{$example.key}").mkdir;
|
|
79
|
+
$exercise-dir.add(".meta/solutions/{$example.key}/{.data<exercise>}.pm6").spurt: $example.value;
|
|
80
|
+
try nqp::symlink("../../../$_", ~$exercise-dir.add(".meta/solutions/{$example.key}/$_")) given $testfile.basename;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
73
83
|
}
|
|
74
84
|
|
|
75
85
|
given $base-dir.add('bin/configlet') {
|
data/tracks/perl6/config.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"active": true,
|
|
5
5
|
"blurb": "Forget everything you know or think you know about Perl. Perl 6 is a production ready new emerging language that is highly expressive, feature-packed and optimized for fun.",
|
|
6
6
|
"test_pattern": ".*\\.t$",
|
|
7
|
-
"solution_pattern": "\\.meta/solutions
|
|
7
|
+
"solution_pattern": "\\.meta/solutions/.+\\.pm6$",
|
|
8
8
|
"foregone": [
|
|
9
9
|
|
|
10
10
|
],
|
|
@@ -14,24 +14,26 @@ submethod TWEAK {
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
method cdata {
|
|
17
|
+
method cdata (--> Str:D) {
|
|
18
18
|
%!data<cdata><json> ?? %!data<cdata><json> !! '';
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
method test {
|
|
22
|
-
self!render
|
|
21
|
+
method test (--> Str:D) {
|
|
22
|
+
self!render;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
method stub {
|
|
26
|
-
self!render
|
|
25
|
+
method stub (--> Str:D) {
|
|
26
|
+
self!render: %!data<stub> || '';
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
method
|
|
30
|
-
|
|
29
|
+
method examples (--> Hash()) {
|
|
30
|
+
return %!data<examples>
|
|
31
|
+
?? %!data<examples>.map: {.key => self!render: .value}
|
|
32
|
+
!! base => self!render: %!data<example>;
|
|
31
33
|
}
|
|
32
34
|
|
|
33
|
-
method !render (
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
method !render (Str $module_file? --> Str:D) {
|
|
36
|
+
Template::Mustache.render(
|
|
37
|
+
$base-dir.add("templates/{$module_file.defined ?? 'module' !! 'test'}.mustache").slurp, %(|%!data, :$module_file)
|
|
38
|
+
);
|
|
37
39
|
}
|
|
@@ -238,7 +238,6 @@
|
|
|
238
238
|
"integers",
|
|
239
239
|
"mathematics"
|
|
240
240
|
],
|
|
241
|
-
"unlocked_by": "bob",
|
|
242
241
|
"uuid": "4ecf9470-a959-11e7-abc4-cec278b6b50a"
|
|
243
242
|
},
|
|
244
243
|
{
|
|
@@ -253,7 +252,6 @@
|
|
|
253
252
|
"matrices",
|
|
254
253
|
"text_formatting"
|
|
255
254
|
],
|
|
256
|
-
"unlocked_by": "prime-factors",
|
|
257
255
|
"uuid": "167ec8f2-a206-4a7e-999d-7dbfc136a9fe"
|
|
258
256
|
},
|
|
259
257
|
{
|
|
@@ -367,7 +365,7 @@
|
|
|
367
365
|
"control_flow_loops",
|
|
368
366
|
"recursion"
|
|
369
367
|
],
|
|
370
|
-
"unlocked_by": "
|
|
368
|
+
"unlocked_by": "binary-search",
|
|
371
369
|
"uuid": "b912fe4f-c505-4bac-8029-76412644375b"
|
|
372
370
|
},
|
|
373
371
|
{
|
|
@@ -652,7 +650,7 @@
|
|
|
652
650
|
"uuid": "10edb37d-cf5d-443a-bb4c-8831a3986b61"
|
|
653
651
|
},
|
|
654
652
|
{
|
|
655
|
-
"core":
|
|
653
|
+
"core": true,
|
|
656
654
|
"difficulty": 5,
|
|
657
655
|
"slug": "rational-numbers",
|
|
658
656
|
"topics": [
|