trackler 2.2.1.147 → 2.2.1.148
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/crystal/Makefile +1 -1
- data/tracks/crystal/exercises/acronym/spec/acronym_spec.cr +2 -6
- data/tracks/crystal/exercises/binary/spec/binary_spec.cr +1 -1
- data/tracks/crystal/exercises/difference-of-squares/spec/difference_of_squares_spec.cr +10 -14
- data/tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr +29 -9
- data/tracks/crystal/generator/src/generators/acronym.cr +1 -1
- data/tracks/crystal/generator/src/generators/binary.cr +1 -1
- data/tracks/crystal/generator/src/generators/difference_of_squares.cr +6 -7
- data/tracks/crystal/generator/src/generators/run_length_encoding.cr +20 -10
- data/tracks/csharp/config.json +477 -477
- data/tracks/elixir/exercises/largest-series-product/example.exs +1 -1
- data/tracks/elm/exercises/phone-number/PhoneNumber.elm +1 -6
- data/tracks/elm/exercises/phone-number/tests/Tests.elm +22 -37
- data/tracks/elm/exercises/run-length-encoding/tests/Tests.elm +55 -31
- data/tracks/fsharp/generators/Exercise.fs +27 -6
- data/tracks/fsharp/generators/Generators.fs +37 -45
- data/tracks/fsharp/generators/Templates.fs +15 -44
- data/tracks/haskell/.travis.yml +1 -0
- data/tracks/haskell/bin/check-configlet-fmt.sh +42 -0
- data/tracks/haskell/config/maintainers.json +13 -13
- data/tracks/haskell/config.json +212 -250
- data/tracks/java/exercises/sublist/.meta/version +1 -1
- data/tracks/java/exercises/word-search/.meta/version +1 -1
- data/tracks/nim/config.json +10 -0
- data/tracks/nim/exercises/reverse-string/README.md +13 -0
- data/tracks/nim/exercises/reverse-string/example.nim +4 -0
- data/tracks/nim/exercises/reverse-string/reverse_string_test.nim +20 -0
- data/tracks/objective-c/config.json +10 -0
- data/tracks/objective-c/exercises/reverse-string/README.md +34 -0
- data/tracks/objective-c/exercises/reverse-string/ReverseStringExample.h +7 -0
- data/tracks/objective-c/exercises/reverse-string/ReverseStringExample.m +22 -0
- data/tracks/objective-c/exercises/reverse-string/ReverseStringTest.m +51 -0
- data/tracks/objective-c/xcodeProject/ObjectiveC.xcodeproj/project.pbxproj +18 -0
- data/tracks/objective-c/xcodeProject/ObjectiveC.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- data/tracks/ruby/config/maintainers.json +25 -25
- data/tracks/ruby/config.json +203 -371
- data/tracks/ruby/exercises/bob/.meta/.version +1 -1
- data/tracks/ruby/exercises/bob/.meta/generator/bob_case.rb +3 -2
- data/tracks/ruby/exercises/bob/.meta/solutions/bob.rb +3 -1
- data/tracks/ruby/exercises/bob/README.md +2 -0
- data/tracks/ruby/exercises/bob/bob_test.rb +27 -27
- data/tracks/ruby/exercises/hamming/RUNNING_TESTS.md +1 -1
- data/tracks/rust/.travis.yml +1 -0
- data/tracks/rust/_test/check-configlet-fmt.sh +37 -0
- data/tracks/rust/config/maintainers.json +23 -23
- data/tracks/rust/config.json +246 -246
- metadata +12 -3
- data/tracks/elm/exercises/run-length-encoding/RunLengthEncodingPropertyChecks.elm +0 -63
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.1.0
|
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.2.0
|
data/tracks/nim/config.json
CHANGED
@@ -219,6 +219,16 @@
|
|
219
219
|
"topics": [
|
220
220
|
"strings"
|
221
221
|
]
|
222
|
+
},
|
223
|
+
{
|
224
|
+
"uuid": "f572ed7b-a1e7-47ab-a9c3-71ba988d3699",
|
225
|
+
"slug": "reverse-string",
|
226
|
+
"core": false,
|
227
|
+
"unlocked_by": null,
|
228
|
+
"difficulty": 1,
|
229
|
+
"topics": [
|
230
|
+
"strings"
|
231
|
+
]
|
222
232
|
}
|
223
233
|
]
|
224
234
|
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# Reverse String
|
2
|
+
|
3
|
+
Reverse a string
|
4
|
+
|
5
|
+
For example:
|
6
|
+
input: "cool"
|
7
|
+
output: "looc"
|
8
|
+
## Source
|
9
|
+
|
10
|
+
Introductory challenge to reverse an input string [https://medium.freecodecamp.org/how-to-reverse-a-string-in-javascript-in-3-different-ways-75e4763c68cb](https://medium.freecodecamp.org/how-to-reverse-a-string-in-javascript-in-3-different-ways-75e4763c68cb)
|
11
|
+
|
12
|
+
## Submitting Incomplete Solutions
|
13
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import unittest
|
2
|
+
|
3
|
+
import reverse_string
|
4
|
+
|
5
|
+
suite "Reverse String":
|
6
|
+
|
7
|
+
test "empty string":
|
8
|
+
check reverse("") == ""
|
9
|
+
|
10
|
+
test "a word":
|
11
|
+
check reverse("robot") == "tobor"
|
12
|
+
|
13
|
+
test "a capitalized word":
|
14
|
+
check reverse("Ramen") == "nemaR"
|
15
|
+
|
16
|
+
test "a sentence with punctuation":
|
17
|
+
check reverse("I'm hungry!") == "!yrgnuh m'I"
|
18
|
+
|
19
|
+
test "a palindrome":
|
20
|
+
check reverse("racecar") == "racecar"
|
@@ -64,6 +64,16 @@
|
|
64
64
|
"unlocked_by": null,
|
65
65
|
"uuid": "30cfe053-ef80-42c8-b196-3a05f61e0190"
|
66
66
|
},
|
67
|
+
{
|
68
|
+
"core": false,
|
69
|
+
"difficulty": 1,
|
70
|
+
"slug": "reverse-string",
|
71
|
+
"topics": [
|
72
|
+
"strings"
|
73
|
+
],
|
74
|
+
"unlocked_by": null,
|
75
|
+
"uuid": "f90558fe-43a3-44e5-b720-edc664b7dc5f"
|
76
|
+
},
|
67
77
|
{
|
68
78
|
"core": false,
|
69
79
|
"difficulty": 1,
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# Reverse String
|
2
|
+
|
3
|
+
Reverse a string.
|
4
|
+
|
5
|
+
For example: input: "cool" output: "looc"
|
6
|
+
|
7
|
+
## Setup
|
8
|
+
|
9
|
+
There are two different methods of getting set up to run the tests with Objective-C:
|
10
|
+
|
11
|
+
- Create an Xcode project with a test target which will run the tests.
|
12
|
+
- Use the ruby gem `objc` as a test runner utility.
|
13
|
+
|
14
|
+
Both are described in more detail here: http://exercism.io/languages/objective-c
|
15
|
+
|
16
|
+
### Submitting Exercises
|
17
|
+
|
18
|
+
When submitting an exercise, make sure your solution file is in the same directory as the test code.
|
19
|
+
|
20
|
+
The submit command will look something like:
|
21
|
+
|
22
|
+
```shell
|
23
|
+
exercism submit <path-to-exercism-workspace>/objective-c/robot-name/RobotName.m
|
24
|
+
```
|
25
|
+
|
26
|
+
You can find the Exercism workspace by running `exercism debug` and looking for the line beginning
|
27
|
+
with Workspace.
|
28
|
+
|
29
|
+
## Source
|
30
|
+
|
31
|
+
A debugging session with Paul Blackwell at gSchool. [http://gschool.it](http://gschool.it)
|
32
|
+
|
33
|
+
## Submitting Incomplete Solutions
|
34
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,22 @@
|
|
1
|
+
#import <Foundation/Foundation.h>
|
2
|
+
#import "ReverseStringExample.h"
|
3
|
+
|
4
|
+
@implementation NSString (ReverseString)
|
5
|
+
|
6
|
+
-(NSString*)reverseString {
|
7
|
+
|
8
|
+
NSMutableString *mutableString = [NSMutableString string];
|
9
|
+
|
10
|
+
for(int i=(int)(self.length) - 1;i >= 0;i--) {
|
11
|
+
|
12
|
+
unichar characterAtIndex = [self characterAtIndex:i];
|
13
|
+
|
14
|
+
[mutableString appendFormat:@"%C",characterAtIndex];
|
15
|
+
|
16
|
+
}
|
17
|
+
|
18
|
+
return [NSString stringWithString:mutableString];
|
19
|
+
|
20
|
+
}
|
21
|
+
|
22
|
+
@end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
#import <XCTest/XCTest.h>
|
2
|
+
|
3
|
+
#if __has_include("ReverseStringExample.h")
|
4
|
+
# import "ReverseStringExample.h"
|
5
|
+
# else
|
6
|
+
# import "ReverseString.h"
|
7
|
+
#endif
|
8
|
+
|
9
|
+
@interface ReverseStringTest : XCTestCase
|
10
|
+
|
11
|
+
@end
|
12
|
+
|
13
|
+
@implementation ReverseStringTest
|
14
|
+
|
15
|
+
-(void)testReverseEmptyString {
|
16
|
+
|
17
|
+
NSString *inputString = [NSString string];
|
18
|
+
NSString *expectedOutput = [NSString string];
|
19
|
+
XCTAssertEqualObjects(expectedOutput, [inputString reverseString]);
|
20
|
+
}
|
21
|
+
|
22
|
+
-(void)testReverseWord {
|
23
|
+
|
24
|
+
NSString *inputString = @"robot";
|
25
|
+
NSString *expectedOutput = @"tobor";
|
26
|
+
XCTAssertEqualObjects(expectedOutput,[inputString reverseString]);
|
27
|
+
}
|
28
|
+
|
29
|
+
-(void)testReverseCapitalisedWord {
|
30
|
+
|
31
|
+
NSString *inputString = @"Ramen";
|
32
|
+
NSString *expectedOutput = @"nemaR";
|
33
|
+
XCTAssertEqualObjects(expectedOutput, [inputString reverseString]);
|
34
|
+
|
35
|
+
}
|
36
|
+
|
37
|
+
-(void)testReverseSentenceWithPunctuation {
|
38
|
+
|
39
|
+
NSString *inputString = @"I'm hungry!";
|
40
|
+
NSString *expectedOutput = @"!yrgnuh m'I";
|
41
|
+
XCTAssertEqualObjects(expectedOutput, [inputString reverseString]);
|
42
|
+
}
|
43
|
+
|
44
|
+
-(void)testReversePalindrome {
|
45
|
+
|
46
|
+
NSString *inputString = @"racecar";
|
47
|
+
NSString *expectedOutput = @"racecar";
|
48
|
+
XCTAssertEqualObjects(expectedOutput, [inputString reverseString]);
|
49
|
+
}
|
50
|
+
|
51
|
+
@end
|
@@ -55,6 +55,8 @@
|
|
55
55
|
A097D4101E363C2700EAF2C2 /* BracketPushTest.m in Sources */ = {isa = PBXBuildFile; fileRef = A097D40E1E363C2700EAF2C2 /* BracketPushTest.m */; };
|
56
56
|
A09A4C031E38761A00FEFB7A /* FlattenArrayExample.m in Sources */ = {isa = PBXBuildFile; fileRef = A09A4C021E38761A00FEFB7A /* FlattenArrayExample.m */; };
|
57
57
|
A09A4C051E38763300FEFB7A /* FlattenArrayTest.m in Sources */ = {isa = PBXBuildFile; fileRef = A09A4C041E38763300FEFB7A /* FlattenArrayTest.m */; };
|
58
|
+
A09C1763208F0D0A003CE51F /* ReverseStringExample.m in Sources */ = {isa = PBXBuildFile; fileRef = A09C1762208F0D0A003CE51F /* ReverseStringExample.m */; };
|
59
|
+
A09C1765208F0D65003CE51F /* ReverseStringTest.m in Sources */ = {isa = PBXBuildFile; fileRef = A09C1764208F0D65003CE51F /* ReverseStringTest.m */; };
|
58
60
|
A0BBFCBF1E37719800230071 /* SublistExample.m in Sources */ = {isa = PBXBuildFile; fileRef = A0BBFCBE1E37719800230071 /* SublistExample.m */; };
|
59
61
|
A0BBFCC31E37728100230071 /* SublistTest.m in Sources */ = {isa = PBXBuildFile; fileRef = A0BBFCC21E37728100230071 /* SublistTest.m */; };
|
60
62
|
A0CFCBF82056956B00DFE959 /* StrainExample.m in Sources */ = {isa = PBXBuildFile; fileRef = A0CFCBF52056956A00DFE959 /* StrainExample.m */; };
|
@@ -173,6 +175,9 @@
|
|
173
175
|
A09A4C011E38761A00FEFB7A /* FlattenArrayExample.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FlattenArrayExample.h; path = "../../exercises/flatten-array/FlattenArrayExample.h"; sourceTree = "<group>"; };
|
174
176
|
A09A4C021E38761A00FEFB7A /* FlattenArrayExample.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FlattenArrayExample.m; path = "../../exercises/flatten-array/FlattenArrayExample.m"; sourceTree = "<group>"; };
|
175
177
|
A09A4C041E38763300FEFB7A /* FlattenArrayTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FlattenArrayTest.m; path = "../../exercises/flatten-array/FlattenArrayTest.m"; sourceTree = "<group>"; };
|
178
|
+
A09C1761208F0D0A003CE51F /* ReverseStringExample.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ReverseStringExample.h; path = "../../exercises/reverse-string/ReverseStringExample.h"; sourceTree = "<group>"; };
|
179
|
+
A09C1762208F0D0A003CE51F /* ReverseStringExample.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = ReverseStringExample.m; path = "../../exercises/reverse-string/ReverseStringExample.m"; sourceTree = "<group>"; };
|
180
|
+
A09C1764208F0D65003CE51F /* ReverseStringTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = ReverseStringTest.m; path = "../../exercises/reverse-string/ReverseStringTest.m"; sourceTree = "<group>"; };
|
176
181
|
A0BBFCBD1E37719800230071 /* SublistExample.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SublistExample.h; path = ../../exercises/sublist/SublistExample.h; sourceTree = "<group>"; };
|
177
182
|
A0BBFCBE1E37719800230071 /* SublistExample.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SublistExample.m; path = ../../exercises/sublist/SublistExample.m; sourceTree = "<group>"; };
|
178
183
|
A0BBFCC21E37728100230071 /* SublistTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SublistTest.m; path = ../../exercises/sublist/SublistTest.m; sourceTree = "<group>"; };
|
@@ -313,6 +318,7 @@
|
|
313
318
|
E9E8B6F41D519E270012F12C /* PhoneNumber */,
|
314
319
|
E90343B32041F93F006F1833 /* PrimeFactors */,
|
315
320
|
E9381D491D8F293C003F22A1 /* Raindrops */,
|
321
|
+
A09C1760208F0C50003CE51F /* ReverseString */,
|
316
322
|
6F409F8B1F0DBD1500217758 /* RNATranscription */,
|
317
323
|
E9E8B6F51D519E2E0012F12C /* RobotName */,
|
318
324
|
E9FDCA161D540793004EE8DB /* RomanNumerals */,
|
@@ -382,6 +388,16 @@
|
|
382
388
|
name = BracketPush;
|
383
389
|
sourceTree = "<group>";
|
384
390
|
};
|
391
|
+
A09C1760208F0C50003CE51F /* ReverseString */ = {
|
392
|
+
isa = PBXGroup;
|
393
|
+
children = (
|
394
|
+
A09C1761208F0D0A003CE51F /* ReverseStringExample.h */,
|
395
|
+
A09C1762208F0D0A003CE51F /* ReverseStringExample.m */,
|
396
|
+
A09C1764208F0D65003CE51F /* ReverseStringTest.m */,
|
397
|
+
);
|
398
|
+
name = ReverseString;
|
399
|
+
sourceTree = "<group>";
|
400
|
+
};
|
385
401
|
A0BBFCBC1E37703D00230071 /* Sublist */ = {
|
386
402
|
isa = PBXGroup;
|
387
403
|
children = (
|
@@ -968,6 +984,7 @@
|
|
968
984
|
1EFACAA81CCCAF3D006F2E69 /* EtlTest.m in Sources */,
|
969
985
|
A097D40F1E363C2700EAF2C2 /* BracketPushExample.m in Sources */,
|
970
986
|
A0CFCBF82056956B00DFE959 /* StrainExample.m in Sources */,
|
987
|
+
A09C1763208F0D0A003CE51F /* ReverseStringExample.m in Sources */,
|
971
988
|
E947A4E01D81FE3A00633720 /* TriangleTest.m in Sources */,
|
972
989
|
1EFACAA91CCCAF3D006F2E69 /* GradeSchoolExample.m in Sources */,
|
973
990
|
1EFACABA1CCCAF3D006F2E69 /* SpaceAgeTest.m in Sources */,
|
@@ -1008,6 +1025,7 @@
|
|
1008
1025
|
1EFACAAF1CCCAF3D006F2E69 /* LeapExample.m in Sources */,
|
1009
1026
|
E9386EF01E0B694D0009A414 /* AtbashCipherTest.m in Sources */,
|
1010
1027
|
E9340D08201975E5009FDEF4 /* CollatzConjectureTest.m in Sources */,
|
1028
|
+
A09C1765208F0D65003CE51F /* ReverseStringTest.m in Sources */,
|
1011
1029
|
E9C1C0251D9D99620015E86E /* SecretHandshakeTest.m in Sources */,
|
1012
1030
|
6F409F8D1F0DBF0A00217758 /* RNATranscriptionTest.m in Sources */,
|
1013
1031
|
E969939A1DF60E5F009EA223 /* TransposeTest.m in Sources */,
|
@@ -1,64 +1,64 @@
|
|
1
1
|
{
|
2
2
|
"maintainers": [
|
3
3
|
{
|
4
|
-
"github_username": "kotp",
|
5
|
-
"show_on_website": false,
|
6
4
|
"alumnus": false,
|
7
|
-
"
|
5
|
+
"avatar_url": null,
|
8
6
|
"bio": null,
|
7
|
+
"github_username": "kotp",
|
9
8
|
"link_text": null,
|
10
9
|
"link_url": null,
|
11
|
-
"
|
10
|
+
"name": null,
|
11
|
+
"show_on_website": false
|
12
12
|
},
|
13
13
|
{
|
14
|
-
"github_username": "bernardoamc",
|
15
|
-
"show_on_website": false,
|
16
14
|
"alumnus": false,
|
17
|
-
"
|
15
|
+
"avatar_url": null,
|
18
16
|
"bio": null,
|
17
|
+
"github_username": "bernardoamc",
|
19
18
|
"link_text": null,
|
20
19
|
"link_url": null,
|
21
|
-
"
|
20
|
+
"name": null,
|
21
|
+
"show_on_website": false
|
22
22
|
},
|
23
23
|
{
|
24
|
-
"github_username": "tommyschaefer",
|
25
|
-
"show_on_website": false,
|
26
24
|
"alumnus": false,
|
27
|
-
"
|
25
|
+
"avatar_url": null,
|
28
26
|
"bio": null,
|
27
|
+
"github_username": "tommyschaefer",
|
29
28
|
"link_text": null,
|
30
29
|
"link_url": null,
|
31
|
-
"
|
30
|
+
"name": null,
|
31
|
+
"show_on_website": false
|
32
32
|
},
|
33
33
|
{
|
34
|
-
"github_username": "hilary",
|
35
|
-
"show_on_website": false,
|
36
34
|
"alumnus": false,
|
37
|
-
"
|
35
|
+
"avatar_url": null,
|
38
36
|
"bio": null,
|
37
|
+
"github_username": "hilary",
|
39
38
|
"link_text": null,
|
40
39
|
"link_url": null,
|
41
|
-
"
|
40
|
+
"name": null,
|
41
|
+
"show_on_website": false
|
42
42
|
},
|
43
43
|
{
|
44
|
-
"github_username": "bmulvihill",
|
45
|
-
"show_on_website": false,
|
46
44
|
"alumnus": false,
|
47
|
-
"
|
45
|
+
"avatar_url": null,
|
48
46
|
"bio": null,
|
47
|
+
"github_username": "bmulvihill",
|
49
48
|
"link_text": null,
|
50
49
|
"link_url": null,
|
51
|
-
"
|
50
|
+
"name": null,
|
51
|
+
"show_on_website": false
|
52
52
|
},
|
53
53
|
{
|
54
|
-
"github_username": "Insti",
|
55
|
-
"show_on_website": false,
|
56
54
|
"alumnus": false,
|
57
|
-
"
|
55
|
+
"avatar_url": null,
|
58
56
|
"bio": null,
|
57
|
+
"github_username": "Insti",
|
59
58
|
"link_text": null,
|
60
59
|
"link_url": null,
|
61
|
-
"
|
60
|
+
"name": null,
|
61
|
+
"show_on_website": false
|
62
62
|
}
|
63
63
|
]
|
64
|
-
}
|
64
|
+
}
|