trackler 2.1.0.33 → 2.1.0.34

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/lib/trackler/version.rb +1 -1
  3. data/tracks/bash/config.json +39 -20
  4. data/tracks/bash/{SETUP.md → docs/EXERCISE_README_INSERT.md} +0 -0
  5. data/tracks/bash/exercises/difference-of-squares/difference_of_squares_test.sh +71 -0
  6. data/tracks/bash/exercises/difference-of-squares/example.sh +25 -0
  7. data/tracks/clojurescript/config.json +0 -5
  8. data/tracks/clojurescript/{exercises/TRACK_HINTS.md → docs/EXERCISE_README_INSERT.md} +0 -0
  9. data/tracks/coffeescript/config.json +63 -26
  10. data/tracks/coffeescript/{SETUP.md → docs/EXERCISE_README_INSERT.md} +4 -2
  11. data/tracks/coffeescript/exercises/luhn/luhn_test.spec.coffee +2 -2
  12. data/tracks/coffeescript/exercises/palindrome-products/palindrome_products_test.spec.coffee +1 -1
  13. data/tracks/crystal/config.json +27 -10
  14. data/tracks/dlang/config.json +2 -3
  15. data/tracks/dlang/{SETUP.md → docs/EXERCISE_README_INSERT.md} +0 -0
  16. data/tracks/haxe/config.json +7 -2
  17. data/tracks/haxe/{SETUP.md → docs/EXERCISE_README_INSERT.md} +0 -0
  18. data/tracks/java/{exercises/_template → _template}/build.gradle +0 -0
  19. data/tracks/java/{exercises/_template → _template}/src/example/java/.keep +0 -0
  20. data/tracks/java/{exercises/_template → _template}/src/main/java/.keep +0 -0
  21. data/tracks/java/{exercises/_template → _template}/src/test/java/.keep +0 -0
  22. data/tracks/java/config.json +201 -77
  23. data/tracks/julia/config.json +1 -7
  24. data/tracks/kotlin/{exercises/_template → _template}/build.gradle +0 -0
  25. data/tracks/kotlin/{exercises/_template → _template}/src/example/kotlin/.keep +0 -0
  26. data/tracks/kotlin/{exercises/_template → _template}/src/main/kotlin/.keep +0 -0
  27. data/tracks/kotlin/{exercises/_template → _template}/src/test/kotlin/.keep +0 -0
  28. data/tracks/mips/config.json +42 -14
  29. data/tracks/mips/{SETUP.md → docs/EXERCISE_README_INSERT.md} +0 -0
  30. data/tracks/nasm/config.json +1 -0
  31. data/tracks/nasm/{SETUP.md → docs/EXERCISE_README_INSERT.md} +0 -0
  32. data/tracks/nasm/exercises/.keep +0 -2
  33. data/tracks/nim/config.json +6 -0
  34. data/tracks/nim/{SETUP.md → docs/EXERCISE_README_INSERT.md} +0 -0
  35. data/tracks/nim/exercises/raindrops/example.nim +18 -0
  36. data/tracks/nim/exercises/raindrops/raindrops_test.nim +51 -0
  37. data/tracks/ocaml/config.json +97 -30
  38. data/tracks/perl5/config.json +186 -66
  39. data/tracks/perl5/{SETUP.md → docs/EXERCISE_README_INSERT.md} +0 -0
  40. data/tracks/perl6/bin/README.md +16 -6
  41. data/tracks/perl6/bin/exercise-gen.pl6 +21 -6
  42. data/tracks/perl6/{SETUP.md → docs/EXERCISE_README_INSERT.md} +0 -0
  43. data/tracks/perl6/exercises/accumulate/example.yaml +10 -0
  44. data/tracks/perl6/exercises/all-your-base/all-your-base.t +1 -0
  45. data/tracks/perl6/exercises/all-your-base/example.yaml +49 -0
  46. data/tracks/perl6/exercises/allergies/Allergies.pm6 +1 -1
  47. data/tracks/perl6/exercises/allergies/example.yaml +21 -0
  48. data/tracks/perl6/exercises/anagram/example.yaml +19 -0
  49. data/tracks/perl6/exercises/atbash-cipher/AtbashCipher.pm6 +1 -1
  50. data/tracks/perl6/exercises/atbash-cipher/example.yaml +15 -0
  51. data/tracks/perl6/exercises/bob/Example.pm6 +4 -0
  52. data/tracks/perl6/exercises/bob/example.yaml +24 -0
  53. data/tracks/perl6/exercises/clock/clock.t +1 -0
  54. data/tracks/perl6/exercises/clock/example.yaml +17 -0
  55. data/tracks/perl6/exercises/flatten-array/example.yaml +17 -0
  56. data/tracks/perl6/exercises/grade-school/example.yaml +22 -0
  57. data/tracks/perl6/exercises/grains/example.yaml +13 -0
  58. data/tracks/perl6/exercises/hello-world/Example.pm6 +9 -0
  59. data/tracks/perl6/exercises/hello-world/example.yaml +21 -0
  60. data/tracks/perl6/exercises/leap/Example.pm6 +1 -1
  61. data/tracks/perl6/exercises/leap/Leap.pm6 +1 -1
  62. data/tracks/perl6/exercises/leap/example.yaml +15 -0
  63. data/tracks/perl6/exercises/linked-list/LinkedList.pm6 +1 -1
  64. data/tracks/perl6/exercises/linked-list/example.yaml +51 -0
  65. data/tracks/perl6/exercises/linked-list/linked-list.t +0 -1
  66. data/tracks/perl6/exercises/luhn/example.yaml +19 -0
  67. data/tracks/perl6/exercises/phone-number/{PhoneNumber.pm6 → Phone.pm6} +0 -0
  68. data/tracks/perl6/exercises/phone-number/example.yaml +10 -0
  69. data/tracks/perl6/exercises/raindrops/example.yaml +15 -0
  70. data/tracks/perl6/exercises/rna-transcription/example.yaml +10 -0
  71. data/tracks/perl6/exercises/robot-name/example.yaml +24 -0
  72. data/tracks/perl6/exercises/robot-name/robot-name.t +4 -0
  73. data/tracks/perl6/exercises/scrabble-score/example.yaml +21 -0
  74. data/tracks/perl6/exercises/space-age/example.yaml +52 -0
  75. data/tracks/perl6/exercises/word-count/example.yaml +9 -0
  76. data/tracks/perl6/exercises/wordy/example.yaml +20 -0
  77. data/tracks/perl6/templates/module.mustache +4 -0
  78. data/tracks/perl6/templates/test.mustache +2 -1
  79. data/tracks/plsql/config.json +30 -10
  80. data/tracks/plsql/{SETUP.md → docs/EXERCISE_README_INSERT.md} +0 -0
  81. data/tracks/pony/config.json +0 -6
  82. data/tracks/pony/{SETUP.md → docs/EXERCISE_README_INSERT.md} +0 -0
  83. data/tracks/powershell/config.json +6 -2
  84. data/tracks/powershell/{SETUP.md → docs/EXERCISE_README_INSERT.md} +0 -0
  85. data/tracks/python/config.json +101 -39
  86. data/tracks/r/config.json +0 -4
  87. data/tracks/ruby/config.json +84 -6
  88. data/tracks/ruby/{exercises/TRACK_HINTS.md → docs/EXERCISE_README_INSERT.md} +0 -0
  89. data/tracks/tcl/config.json +1 -0
  90. data/tracks/tcl/{SETUP.md → docs/EXERCISE_README_INSERT.md} +0 -0
  91. data/tracks/tcl/exercises/.keep +0 -2
  92. data/tracks/teco/config.json +0 -4
  93. data/tracks/teco/{SETUP.md → docs/EXERCISE_README_INSERT.md} +0 -0
  94. data/tracks/vbnet/config.json +1 -0
  95. data/tracks/vbnet/{SETUP.md → docs/EXERCISE_README_INSERT.md} +0 -0
  96. data/tracks/vimscript/config.json +64 -19
  97. data/tracks/vimscript/{TRACK_HINTS.md → docs/EXERCISE_README_INSERT.md} +0 -0
  98. data/tracks/vimscript/exercises/beer-song/beer_song.vader +50 -0
  99. data/tracks/vimscript/exercises/beer-song/beer_song.vim +24 -0
  100. data/tracks/vimscript/exercises/beer-song/example.vim +21 -0
  101. metadata +37 -29
@@ -109,7 +109,7 @@
109
109
  "control-flow (conditionals)"
110
110
  ]
111
111
  },
112
- {
112
+ {
113
113
  "slug": "atbash-cipher",
114
114
  "difficulty": 1,
115
115
  "topics": [
@@ -240,12 +240,6 @@
240
240
  ],
241
241
  "deprecated": [
242
242
 
243
- ],
244
- "ignored": [
245
- "bin",
246
- "img",
247
- "docs",
248
- "juliamnt"
249
243
  ],
250
244
  "foregone": [
251
245
 
@@ -18,72 +18,100 @@
18
18
  {
19
19
  "difficulty": 1,
20
20
  "slug": "binary",
21
- "topics": []
21
+ "topics": [
22
+
23
+ ]
22
24
  },
23
25
  {
24
26
  "difficulty": 1,
25
27
  "slug": "octal",
26
- "topics": []
28
+ "topics": [
29
+
30
+ ]
27
31
  },
28
32
  {
29
33
  "difficulty": 1,
30
34
  "slug": "trinary",
31
- "topics": []
35
+ "topics": [
36
+
37
+ ]
32
38
  },
33
39
  {
34
40
  "difficulty": 1,
35
41
  "slug": "hexadecimal",
36
- "topics": []
42
+ "topics": [
43
+
44
+ ]
37
45
  },
38
46
  {
39
47
  "difficulty": 1,
40
48
  "slug": "leap",
41
- "topics": []
49
+ "topics": [
50
+
51
+ ]
42
52
  },
43
53
  {
44
54
  "difficulty": 1,
45
55
  "slug": "difference-of-squares",
46
- "topics": []
56
+ "topics": [
57
+
58
+ ]
47
59
  },
48
60
  {
49
61
  "difficulty": 1,
50
62
  "slug": "hamming",
51
- "topics": []
63
+ "topics": [
64
+
65
+ ]
52
66
  },
53
67
  {
54
68
  "difficulty": 1,
55
69
  "slug": "rna-transcription",
56
- "topics": []
70
+ "topics": [
71
+
72
+ ]
57
73
  },
58
74
  {
59
75
  "difficulty": 1,
60
76
  "slug": "isogram",
61
- "topics": []
77
+ "topics": [
78
+
79
+ ]
62
80
  },
63
81
  {
64
82
  "difficulty": 1,
65
83
  "slug": "triangle",
66
- "topics": []
84
+ "topics": [
85
+
86
+ ]
67
87
  },
68
88
  {
69
89
  "difficulty": 1,
70
90
  "slug": "atbash-cipher",
71
- "topics": []
91
+ "topics": [
92
+
93
+ ]
72
94
  },
73
95
  {
74
96
  "difficulty": 1,
75
97
  "slug": "scrabble-score",
76
- "topics": []
98
+ "topics": [
99
+
100
+ ]
77
101
  },
78
102
  {
79
103
  "difficulty": 1,
80
104
  "slug": "raindrops",
81
- "topics": []
105
+ "topics": [
106
+
107
+ ]
82
108
  },
83
109
  {
84
110
  "difficulty": 1,
85
111
  "slug": "nth-prime",
86
- "topics": []
112
+ "topics": [
113
+
114
+ ]
87
115
  }
88
116
  ]
89
117
  }
@@ -9,6 +9,7 @@
9
9
  ],
10
10
  "ignored": [
11
11
  "bin",
12
+ "docs",
12
13
  "img"
13
14
  ],
14
15
  "foregone": [
@@ -1,2 +0,0 @@
1
- As of [issue 3336](https://github.com/exercism/exercism.io/issues/3336),
2
- all exercises should go into the exercises directory.
@@ -8,6 +8,7 @@
8
8
 
9
9
  ],
10
10
  "ignored": [
11
+ "docs",
11
12
  "_test"
12
13
  ],
13
14
  "foregone": [
@@ -78,6 +79,11 @@
78
79
  "difficulty": 1,
79
80
  "slug": "difference-of-squares",
80
81
  "topics": []
82
+ },
83
+ {
84
+ "difficulty": 1,
85
+ "slug": "raindrops",
86
+ "topics": []
81
87
  }
82
88
  ]
83
89
  }
@@ -0,0 +1,18 @@
1
+ import strutils
2
+
3
+ proc convert*(sound: int): string =
4
+ var raindrops = ""
5
+
6
+ if (sound mod 3) == 0:
7
+ raindrops.add("Pling")
8
+
9
+ if (sound mod 5) == 0:
10
+ raindrops.add("Plang")
11
+
12
+ if (sound mod 7) == 0:
13
+ raindrops.add("Plong")
14
+
15
+ if len(raindrops) > 0:
16
+ raindrops
17
+ else:
18
+ intToStr(sound)
@@ -0,0 +1,51 @@
1
+ import tables
2
+ import unittest
3
+ import raindrops
4
+
5
+ test "convert 1":
6
+ check convert(1) == "1"
7
+
8
+ test "convert 3":
9
+ check convert(3) == "Pling"
10
+
11
+ test "convert 5":
12
+ check convert(5) == "Plang"
13
+
14
+ test "convert 7":
15
+ check convert(7) == "Plong"
16
+
17
+ test "convert 6":
18
+ check convert(6) == "Pling"
19
+
20
+ test "convert 9":
21
+ check convert(9) == "Pling"
22
+
23
+ test "convert 10":
24
+ check convert(10) == "Plang"
25
+
26
+ test "convert 14":
27
+ check convert(14) == "Plong"
28
+
29
+ test "convert 15":
30
+ check convert(15) == "PlingPlang"
31
+
32
+ test "convert 21":
33
+ check convert(21) == "PlingPlong"
34
+
35
+ test "convert 25":
36
+ check convert(25) == "Plang"
37
+
38
+ test "convert 35":
39
+ check convert(35) == "PlangPlong"
40
+
41
+ test "convert 49":
42
+ check convert(49) == "Plong"
43
+
44
+ test "convert 52":
45
+ check convert(52) == "52"
46
+
47
+ test "convert 105":
48
+ check convert(105) == "PlingPlangPlong"
49
+
50
+ test "convert 12121":
51
+ check convert(12121) == "12121"
@@ -30,7 +30,9 @@
30
30
  {
31
31
  "slug": "raindrops",
32
32
  "difficulty": 2,
33
- "topics": []
33
+ "topics": [
34
+
35
+ ]
34
36
  },
35
37
  {
36
38
  "slug": "difference-of-squares",
@@ -78,7 +80,7 @@
78
80
  "slug": "anagram",
79
81
  "difficulty": 3,
80
82
  "topics": [
81
- "Strings"
83
+ "Strings"
82
84
  ]
83
85
  },
84
86
  {
@@ -92,142 +94,207 @@
92
94
  {
93
95
  "slug": "triangle",
94
96
  "difficulty": 3,
95
- "topics": ["Mathematics"]
97
+ "topics": [
98
+ "Mathematics"
99
+ ]
96
100
  },
97
101
  {
98
102
  "slug": "pangram",
99
103
  "difficulty": 3,
100
- "topics": ["Strings"]
104
+ "topics": [
105
+ "Strings"
106
+ ]
101
107
  },
102
108
  {
103
109
  "slug": "acronym",
104
110
  "difficulty": 3,
105
- "topics": ["Strings"]
111
+ "topics": [
112
+ "Strings"
113
+ ]
106
114
  },
107
115
  {
108
116
  "slug": "all-your-base",
109
117
  "difficulty": 4,
110
- "topics": ["Mathematics"]
118
+ "topics": [
119
+ "Mathematics"
120
+ ]
111
121
  },
112
122
  {
113
123
  "slug": "bracket-push",
114
124
  "difficulty": 4,
115
- "topics": ["Stacks"]
125
+ "topics": [
126
+ "Stacks"
127
+ ]
116
128
  },
117
129
  {
118
130
  "slug": "luhn",
119
131
  "difficulty": 4,
120
- "topics": ["Arithmetic"]
132
+ "topics": [
133
+ "Arithmetic"
134
+ ]
121
135
  },
122
136
  {
123
137
  "slug": "binary-search",
124
138
  "difficulty": 4,
125
- "topics": ["Search", "Algorithms", "Arrays"]
139
+ "topics": [
140
+ "Search",
141
+ "Algorithms",
142
+ "Arrays"
143
+ ]
126
144
  },
127
145
  {
128
146
  "slug": "phone-number",
129
147
  "difficulty": 4,
130
- "topics": ["Strings"]
148
+ "topics": [
149
+ "Strings"
150
+ ]
131
151
  },
132
152
  {
133
153
  "slug": "word-count",
134
154
  "difficulty": 4,
135
- "topics": ["Strings", "Counting"]
155
+ "topics": [
156
+ "Strings",
157
+ "Counting"
158
+ ]
136
159
  },
137
160
  {
138
161
  "slug": "beer-song",
139
162
  "difficulty": 4,
140
- "topics": ["Strings"]
163
+ "topics": [
164
+ "Strings"
165
+ ]
141
166
  },
142
167
  {
143
168
  "slug": "run-length-encoding",
144
169
  "difficulty": 5,
145
- "topics": ["Algorithms", "Transforming"]
170
+ "topics": [
171
+ "Algorithms",
172
+ "Transforming"
173
+ ]
146
174
  },
147
175
  {
148
176
  "slug": "roman-numerals",
149
177
  "difficulty": 5,
150
- "topics": ["Strings"]
178
+ "topics": [
179
+ "Strings"
180
+ ]
151
181
  },
152
182
  {
153
183
  "slug": "prime-factors",
154
184
  "difficulty": 5,
155
- "topics": ["Mathematics", "Algorithms"]
185
+ "topics": [
186
+ "Mathematics",
187
+ "Algorithms"
188
+ ]
156
189
  },
157
190
  {
158
191
  "slug": "say",
159
192
  "difficulty": 5,
160
- "topics": ["Strings"]
193
+ "topics": [
194
+ "Strings"
195
+ ]
161
196
  },
162
197
  {
163
198
  "slug": "robot-name",
164
199
  "difficulty": 6,
165
- "topics": ["Randomness", "Mutable state"]
200
+ "topics": [
201
+ "Randomness",
202
+ "Mutable state"
203
+ ]
166
204
  },
167
205
  {
168
206
  "slug": "change",
169
207
  "difficulty": 6,
170
- "topics": ["Dynamic Programming", "Algorithms"]
208
+ "topics": [
209
+ "Dynamic Programming",
210
+ "Algorithms"
211
+ ]
171
212
  },
172
213
  {
173
214
  "slug": "list-ops",
174
215
  "difficulty": 6,
175
- "topics": ["Functional programming"]
216
+ "topics": [
217
+ "Functional programming"
218
+ ]
176
219
  },
177
220
  {
178
221
  "slug": "atbash-cipher",
179
222
  "difficulty": 7,
180
- "topics": ["Transforming"]
223
+ "topics": [
224
+ "Transforming"
225
+ ]
181
226
  },
182
227
  {
183
228
  "slug": "minesweeper",
184
229
  "difficulty": 7,
185
- "topics": ["Transforming", "Arrays"]
230
+ "topics": [
231
+ "Transforming",
232
+ "Arrays"
233
+ ]
186
234
  },
187
235
  {
188
236
  "slug": "bowling",
189
237
  "difficulty": 7,
190
- "topics": ["Algorithms"]
238
+ "topics": [
239
+ "Algorithms"
240
+ ]
191
241
  },
192
242
  {
193
243
  "slug": "dominoes",
194
244
  "difficulty": 7,
195
- "topics": ["Algorithms", "Search"]
245
+ "topics": [
246
+ "Algorithms",
247
+ "Search"
248
+ ]
196
249
  },
197
250
  {
198
251
  "slug": "custom-set",
199
252
  "difficulty": 8,
200
- "topics": ["Functional programming"]
253
+ "topics": [
254
+ "Functional programming"
255
+ ]
201
256
  },
202
257
  {
203
258
  "slug": "connect",
204
259
  "difficulty": 8,
205
- "topics": ["Search"]
260
+ "topics": [
261
+ "Search"
262
+ ]
206
263
  },
207
264
  {
208
265
  "slug": "meetup",
209
266
  "difficulty": 9,
210
- "topics": ["Dates"]
267
+ "topics": [
268
+ "Dates"
269
+ ]
211
270
  },
212
271
  {
213
272
  "slug": "forth",
214
273
  "difficulty": 9,
215
- "topics": ["Interpreters"]
274
+ "topics": [
275
+ "Interpreters"
276
+ ]
216
277
  },
217
278
  {
218
279
  "slug": "zipper",
219
280
  "difficulty": 10,
220
- "topics": ["Functional programming"]
281
+ "topics": [
282
+ "Functional programming"
283
+ ]
221
284
  },
222
285
  {
223
286
  "slug": "react",
224
287
  "difficulty": 10,
225
- "topics": ["Reactive programming"]
288
+ "topics": [
289
+ "Reactive programming"
290
+ ]
226
291
  },
227
292
  {
228
293
  "slug": "hangman",
229
294
  "difficulty": 10,
230
- "topics": ["Reactive programming"]
295
+ "topics": [
296
+ "Reactive programming"
297
+ ]
231
298
  }
232
299
  ],
233
300
  "deprecated": [