trackler 2.2.1.80 → 2.2.1.81

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/lib/trackler/version.rb +1 -1
  3. data/problem-specifications/exercises/bob/canonical-data.json +76 -26
  4. data/problem-specifications/exercises/isbn-verifier/canonical-data.json +9 -1
  5. data/problem-specifications/exercises/luhn/canonical-data.json +40 -14
  6. data/tracks/bash/CONTRIBUTING.md +3 -3
  7. data/tracks/bash/exercises/error-handling/README.md +15 -0
  8. data/tracks/bash/exercises/hello-world/{HINTS.md → .meta/hints.md} +1 -1
  9. data/tracks/csharp/config.json +24 -0
  10. data/tracks/csharp/exercises/binary/Binary.cs +9 -0
  11. data/tracks/csharp/exercises/binary/Binary.csproj +17 -0
  12. data/tracks/csharp/exercises/binary/BinaryTest.cs +94 -0
  13. data/tracks/csharp/exercises/binary/Example.cs +24 -0
  14. data/tracks/csharp/exercises/binary/README.md +41 -0
  15. data/tracks/csharp/exercises/hexadecimal/Example.cs +41 -0
  16. data/tracks/csharp/exercises/hexadecimal/Hexadecimal.cs +9 -0
  17. data/tracks/csharp/exercises/hexadecimal/Hexadecimal.csproj +17 -0
  18. data/tracks/csharp/exercises/hexadecimal/HexadecimalTest.cs +65 -0
  19. data/tracks/csharp/exercises/hexadecimal/README.md +20 -0
  20. data/tracks/csharp/exercises/octal/Example.cs +24 -0
  21. data/tracks/csharp/exercises/octal/Octal.cs +9 -0
  22. data/tracks/csharp/exercises/octal/Octal.csproj +17 -0
  23. data/tracks/csharp/exercises/octal/OctalTest.cs +88 -0
  24. data/tracks/csharp/exercises/octal/README.md +55 -0
  25. data/tracks/csharp/exercises/trinary/Example.cs +24 -0
  26. data/tracks/csharp/exercises/trinary/README.md +34 -0
  27. data/tracks/csharp/exercises/trinary/Trinary.cs +9 -0
  28. data/tracks/csharp/exercises/trinary/Trinary.csproj +17 -0
  29. data/tracks/csharp/exercises/trinary/TrinaryTest.cs +70 -0
  30. data/tracks/delphi/exercises/isbn-verifier/uTestISBNVerifier.pas +12 -0
  31. data/tracks/fsharp/config.json +21 -1
  32. data/tracks/fsharp/exercises/binary/Binary.fs +3 -0
  33. data/tracks/fsharp/exercises/binary/Binary.fsproj +23 -0
  34. data/tracks/fsharp/exercises/binary/BinaryTest.fs +67 -0
  35. data/tracks/fsharp/exercises/binary/Example.fs +13 -0
  36. data/tracks/fsharp/exercises/binary/Program.fs +1 -0
  37. data/tracks/fsharp/exercises/binary/README.md +35 -0
  38. data/tracks/fsharp/exercises/hexadecimal/Example.fs +14 -0
  39. data/tracks/fsharp/exercises/hexadecimal/Hexadecimal.fs +3 -0
  40. data/tracks/fsharp/exercises/hexadecimal/Hexadecimal.fsproj +23 -0
  41. data/tracks/fsharp/exercises/hexadecimal/HexadecimalTest.fs +47 -0
  42. data/tracks/fsharp/exercises/hexadecimal/Program.fs +1 -0
  43. data/tracks/fsharp/exercises/hexadecimal/README.md +14 -0
  44. data/tracks/fsharp/exercises/octal/Example.fs +10 -0
  45. data/tracks/fsharp/exercises/octal/Octal.fs +3 -0
  46. data/tracks/fsharp/exercises/octal/Octal.fsproj +23 -0
  47. data/tracks/fsharp/exercises/octal/OctalTest.fs +59 -0
  48. data/tracks/fsharp/exercises/octal/Program.fs +1 -0
  49. data/tracks/fsharp/exercises/octal/README.md +49 -0
  50. data/tracks/fsharp/exercises/transpose/TrinaryTest.fs +24 -0
  51. data/tracks/fsharp/exercises/trinary/Example.fs +13 -0
  52. data/tracks/fsharp/exercises/trinary/Program.fs +1 -0
  53. data/tracks/fsharp/exercises/trinary/README.md +28 -0
  54. data/tracks/fsharp/exercises/trinary/Trinary.fs +3 -0
  55. data/tracks/fsharp/exercises/trinary/Trinary.fsproj +23 -0
  56. data/tracks/fsharp/exercises/trinary/TrinaryTest.fs +51 -0
  57. data/tracks/lua/config.json +6 -1
  58. data/tracks/lua/exercises/accumulate/accumulate_spec.lua +27 -0
  59. data/tracks/lua/exercises/accumulate/example.lua +7 -0
  60. data/tracks/python/config.json +10 -0
  61. data/tracks/python/exercises/reverse-string/README.md +9 -0
  62. data/tracks/python/exercises/reverse-string/example.py +2 -0
  63. data/tracks/python/exercises/reverse-string/reverse_string.py +2 -0
  64. data/tracks/python/exercises/reverse-string/reverse_string_test.py +26 -0
  65. metadata +55 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 582c0a5b8961156545ee85e7cbc19dc370564915
4
- data.tar.gz: ebeb707368c2348f2a72b0189bafc75c6ec1cb6a
3
+ metadata.gz: 67d0e697aee437549490f2f2fa2317d50c6928c9
4
+ data.tar.gz: 3c8676d47566866f6c39a3b8a40d62d22b61dfce
5
5
  SHA512:
6
- metadata.gz: 638585faba47d4309f8daa4c251787f9d5dde9462220f4c39b6a1e698cccce4570e154ff31b6e8ba1ed5e511593326fa4518ad9860047b684b6cbbf6bfe718ca
7
- data.tar.gz: e1a7752908c91664d717d7303b1b9fe4ed130b34a2262010c29d83a243c99ed394d536a849fa2f6dd67f8f0e323bffdcce0fb5e03578439b163ad4212eb3defb
6
+ metadata.gz: d20743d31dae794881a3465cd25511a31be7061dc41c022479d5b1ad90dd87eb3fd76c7eb9c024ec72a31b4a475758a7a7c80727c44ee3da8d7d3eaf84fd26fb
7
+ data.tar.gz: 335ed690b69a16707ac760378e2edcfe159c77edc1a6fe1ca438e11fa285f47da5a60dbe1e7f80958a6ff94aa9950ee87cc426df202c60f6c06bf99562351463
@@ -1,3 +1,3 @@
1
1
  module Trackler
2
- VERSION = "2.2.1.80"
2
+ VERSION = "2.2.1.81"
3
3
  end
@@ -1,155 +1,205 @@
1
1
  {
2
2
  "exercise": "bob",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "cases": [
5
5
  {
6
6
  "description": "stating something",
7
7
  "property": "response",
8
- "input": "Tom-ay-to, tom-aaaah-to.",
8
+ "input": {
9
+ "heyBob": "Tom-ay-to, tom-aaaah-to."
10
+ },
9
11
  "expected": "Whatever."
10
12
  },
11
13
  {
12
14
  "description": "shouting",
13
15
  "property": "response",
14
- "input": "WATCH OUT!",
16
+ "input": {
17
+ "heyBob": "WATCH OUT!"
18
+ },
15
19
  "expected": "Whoa, chill out!"
16
20
  },
17
21
  {
18
22
  "description": "shouting gibberish",
19
23
  "property": "response",
20
- "input": "FCECDFCAAB",
24
+ "input": {
25
+ "heyBob": "FCECDFCAAB"
26
+ },
21
27
  "expected": "Whoa, chill out!"
22
28
  },
23
29
  {
24
30
  "description": "asking a question",
25
31
  "property": "response",
26
- "input": "Does this cryogenic chamber make me look fat?",
32
+ "input": {
33
+ "heyBob": "Does this cryogenic chamber make me look fat?"
34
+ },
27
35
  "expected": "Sure."
28
36
  },
29
37
  {
30
38
  "description": "asking a numeric question",
31
39
  "property": "response",
32
- "input": "You are, what, like 15?",
40
+ "input": {
41
+ "heyBob": "You are, what, like 15?"
42
+ },
33
43
  "expected": "Sure."
34
44
  },
35
45
  {
36
46
  "description": "asking gibberish",
37
47
  "property": "response",
38
- "input": "fffbbcbeab?",
48
+ "input": {
49
+ "heyBob": "fffbbcbeab?"
50
+ },
39
51
  "expected": "Sure."
40
52
  },
41
53
  {
42
54
  "description": "talking forcefully",
43
55
  "property": "response",
44
- "input": "Let's go make out behind the gym!",
56
+ "input": {
57
+ "heyBob": "Let's go make out behind the gym!"
58
+ },
45
59
  "expected": "Whatever."
46
60
  },
47
61
  {
48
62
  "description": "using acronyms in regular speech",
49
63
  "property": "response",
50
- "input": "It's OK if you don't want to go to the DMV.",
64
+ "input": {
65
+ "heyBob": "It's OK if you don't want to go to the DMV."
66
+ },
51
67
  "expected": "Whatever."
52
68
  },
53
69
  {
54
70
  "description": "forceful question",
55
71
  "property": "response",
56
- "input": "WHAT THE HELL WERE YOU THINKING?",
72
+ "input": {
73
+ "heyBob": "WHAT THE HELL WERE YOU THINKING?"
74
+ },
57
75
  "expected": "Calm down, I know what I'm doing!"
58
76
  },
59
77
  {
60
78
  "description": "shouting numbers",
61
79
  "property": "response",
62
- "input": "1, 2, 3 GO!",
80
+ "input": {
81
+ "heyBob": "1, 2, 3 GO!"
82
+ },
63
83
  "expected": "Whoa, chill out!"
64
84
  },
65
85
  {
66
86
  "description": "only numbers",
67
87
  "property": "response",
68
- "input": "1, 2, 3",
88
+ "input": {
89
+ "heyBob": "1, 2, 3"
90
+ },
69
91
  "expected": "Whatever."
70
92
  },
71
93
  {
72
94
  "description": "question with only numbers",
73
95
  "property": "response",
74
- "input": "4?",
96
+ "input": {
97
+ "heyBob": "4?"
98
+ },
75
99
  "expected": "Sure."
76
100
  },
77
101
  {
78
102
  "description": "shouting with special characters",
79
103
  "property": "response",
80
- "input": "ZOMG THE %^*@#$(*^ ZOMBIES ARE COMING!!11!!1!",
104
+ "input": {
105
+ "heyBob": "ZOMG THE %^*@#$(*^ ZOMBIES ARE COMING!!11!!1!"
106
+ },
81
107
  "expected": "Whoa, chill out!"
82
108
  },
83
109
  {
84
110
  "description": "shouting with no exclamation mark",
85
111
  "property": "response",
86
- "input": "I HATE YOU",
112
+ "input": {
113
+ "heyBob": "I HATE YOU"
114
+ },
87
115
  "expected": "Whoa, chill out!"
88
116
  },
89
117
  {
90
118
  "description": "statement containing question mark",
91
119
  "property": "response",
92
- "input": "Ending with ? means a question.",
120
+ "input": {
121
+ "heyBob": "Ending with ? means a question."
122
+ },
93
123
  "expected": "Whatever."
94
124
  },
95
125
  {
96
126
  "description": "non-letters with question",
97
127
  "property": "response",
98
- "input": ":) ?",
128
+ "input": {
129
+ "heyBob": ":) ?"
130
+ },
99
131
  "expected": "Sure."
100
132
  },
101
133
  {
102
134
  "description": "prattling on",
103
135
  "property": "response",
104
- "input": "Wait! Hang on. Are you going to be OK?",
136
+ "input": {
137
+ "heyBob": "Wait! Hang on. Are you going to be OK?"
138
+ },
105
139
  "expected": "Sure."
106
140
  },
107
141
  {
108
142
  "description": "silence",
109
143
  "property": "response",
110
- "input": "",
144
+ "input": {
145
+ "heyBob": ""
146
+ },
111
147
  "expected": "Fine. Be that way!"
112
148
  },
113
149
  {
114
150
  "description": "prolonged silence",
115
151
  "property": "response",
116
- "input": " ",
152
+ "input": {
153
+ "heyBob": " "
154
+ },
117
155
  "expected": "Fine. Be that way!"
118
156
  },
119
157
  {
120
158
  "description": "alternate silence",
121
159
  "property": "response",
122
- "input": "\t\t\t\t\t\t\t\t\t\t",
160
+ "input": {
161
+ "heyBob": "\t\t\t\t\t\t\t\t\t\t"
162
+ },
123
163
  "expected": "Fine. Be that way!"
124
164
  },
125
165
  {
126
166
  "description": "multiple line question",
127
167
  "property": "response",
128
- "input": "\nDoes this cryogenic chamber make me look fat?\nno",
168
+ "input": {
169
+ "heyBob": "\nDoes this cryogenic chamber make me look fat?\nno"
170
+ },
129
171
  "expected": "Whatever."
130
172
  },
131
173
  {
132
174
  "description": "starting with whitespace",
133
175
  "property": "response",
134
- "input": " hmmmmmmm...",
176
+ "input": {
177
+ "heyBob": " hmmmmmmm..."
178
+ },
135
179
  "expected": "Whatever."
136
180
  },
137
181
  {
138
182
  "description": "ending with whitespace",
139
183
  "property": "response",
140
- "input": "Okay if like my spacebar quite a bit? ",
184
+ "input": {
185
+ "heyBob": "Okay if like my spacebar quite a bit? "
186
+ },
141
187
  "expected": "Sure."
142
188
  },
143
189
  {
144
190
  "description": "other whitespace",
145
191
  "property": "response",
146
- "input": "\n\r \t",
192
+ "input": {
193
+ "heyBob": "\n\r \t"
194
+ },
147
195
  "expected": "Fine. Be that way!"
148
196
  },
149
197
  {
150
198
  "description": "non-question ending with whitespace",
151
199
  "property": "response",
152
- "input": "This is a statement ending with whitespace ",
200
+ "input": {
201
+ "heyBob": "This is a statement ending with whitespace "
202
+ },
153
203
  "expected": "Whatever."
154
204
  }
155
205
  ]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "exercise": "isbn-verifier",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "comments": [
5
5
  "An expected value of true indicates a valid ISBN-10, ",
6
6
  "whereas false means the ISBN-10 is invalid."
@@ -109,6 +109,14 @@
109
109
  "isbn": "3-598-21515-X"
110
110
  },
111
111
  "expected": false
112
+ },
113
+ {
114
+ "description": "empty isbn",
115
+ "property": "isValid",
116
+ "input": {
117
+ "isbn": ""
118
+ },
119
+ "expected": false
112
120
  }
113
121
  ]
114
122
  }
@@ -1,83 +1,109 @@
1
1
  {
2
2
  "exercise": "luhn",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "cases": [
5
5
  {
6
6
  "description": "single digit strings can not be valid",
7
7
  "property": "valid",
8
- "input": "1",
8
+ "input": {
9
+ "value": "1"
10
+ },
9
11
  "expected": false
10
12
  },
11
13
  {
12
14
  "description": "a single zero is invalid",
13
15
  "property": "valid",
14
- "input": "0",
16
+ "input": {
17
+ "value": "0"
18
+ },
15
19
  "expected": false
16
20
  },
17
21
  {
18
22
  "description": "a simple valid SIN that remains valid if reversed",
19
23
  "property": "valid",
20
- "input": "059",
24
+ "input": {
25
+ "value": "059"
26
+ },
21
27
  "expected": true
22
28
  },
23
29
  {
24
30
  "description": "a simple valid SIN that becomes invalid if reversed",
25
31
  "property": "valid",
26
- "input": "59",
32
+ "input": {
33
+ "value": "59"
34
+ },
27
35
  "expected": true
28
36
  },
29
37
  {
30
38
  "description": "a valid Canadian SIN",
31
39
  "property": "valid",
32
- "input": "055 444 285",
40
+ "input": {
41
+ "value": "055 444 285"
42
+ },
33
43
  "expected": true
34
44
  },
35
45
  {
36
46
  "description": "invalid Canadian SIN",
37
47
  "property": "valid",
38
- "input": "055 444 286",
48
+ "input": {
49
+ "value": "055 444 286"
50
+ },
39
51
  "expected": false
40
52
  },
41
53
  {
42
54
  "description": "invalid credit card",
43
55
  "property": "valid",
44
- "input": "8273 1232 7352 0569",
56
+ "input": {
57
+ "value": "8273 1232 7352 0569"
58
+ },
45
59
  "expected": false
46
60
  },
47
61
  {
48
62
  "description": "valid strings with a non-digit included become invalid",
49
63
  "property": "valid",
50
- "input": "055a 444 285",
64
+ "input": {
65
+ "value": "055a 444 285"
66
+ },
51
67
  "expected": false
52
68
  },
53
69
  {
54
70
  "description": "valid strings with punctuation included become invalid",
55
71
  "property": "valid",
56
- "input": "055-444-285",
72
+ "input": {
73
+ "value": "055-444-285"
74
+ },
57
75
  "expected": false
58
76
  },
59
77
  {
60
78
  "description": "valid strings with symbols included become invalid",
61
79
  "property": "valid",
62
- "input": "055£ 444$ 285",
80
+ "input": {
81
+ "value": "055£ 444$ 285"
82
+ },
63
83
  "expected": false
64
84
  },
65
85
  {
66
86
  "description": "single zero with space is invalid",
67
87
  "property": "valid",
68
- "input": " 0",
88
+ "input": {
89
+ "value": " 0"
90
+ },
69
91
  "expected": false
70
92
  },
71
93
  {
72
94
  "description": "more than a single zero is valid",
73
95
  "property": "valid",
74
- "input": "0000 0",
96
+ "input": {
97
+ "value": "0000 0"
98
+ },
75
99
  "expected": true
76
100
  },
77
101
  {
78
102
  "description": "input digit 9 is correctly converted to output digit 9",
79
103
  "property": "valid",
80
- "input": "091",
104
+ "input": {
105
+ "value": "091"
106
+ },
81
107
  "expected": true
82
108
  }
83
109
  ]
@@ -93,7 +93,7 @@ Once your tests and example are complete, rename `<your-exercise>.sh` to `exampl
93
93
 
94
94
  Exercism makes heavy use of configuration files to automate things. Now that you're done with your solution, you can add your problem to `bash/config.json`. Check out the [configuration description](https://github.com/exercism/docs/blob/master/language-tracks/configuration/exercises.md) in the Exercism docs for more info on each item.
95
95
 
96
- ```json
96
+ ```javascript
97
97
  // config.json
98
98
  {
99
99
  "exercises": [
@@ -144,7 +144,7 @@ There are two ways to create the README: generate it via the configlet, or manua
144
144
 
145
145
  #### Using the Configlet
146
146
 
147
- The configlet has a generate command that uses Go templating and pulls from the repository's `config` directory as well as each exercise's `.meta` directory. Learn more in the [configlet docs](https://github.com/exercism/configlet). You should just be able to run:
147
+ The configlet has a generate command that uses Go templating and pulls from the repository's `config` directory as well as each exercise's `.meta` directory. For example, any necessary `hints.md` should be put in `.meta` so configlet may pull it in. Learn more in the [configlet docs](https://github.com/exercism/configlet). You should just be able to run:
148
148
 
149
149
  ```bash
150
150
  $ bin/configlet generate <your-exercise>
@@ -196,4 +196,4 @@ $ git push --force-with-lease origin <your-branch-name>
196
196
 
197
197
  ![Create pull request](img/create-pr.png)
198
198
 
199
- Good luck, happy scripting, and thanks for your help!
199
+ Good luck, happy scripting, and thanks for your help!
@@ -0,0 +1,15 @@
1
+ # Error-handling
2
+
3
+ Implement various kinds of error handling and resource management.
4
+
5
+ An important point of programming is how to handle errors and close resources even if errors occur.
6
+
7
+ This exercise requires you to handle various errors. Because error handling is rather programming language specific you'll have to refer to the tests for your track to see what's exactly required.
8
+
9
+ Run the tests with:
10
+
11
+ bats error_handling_test.sh
12
+
13
+ ## Submitting Incomplete Solutions
14
+ It's possible to submit an incomplete solution so you can see how others have completed the exercise.
15
+
@@ -13,7 +13,7 @@ can get the tests to pass on your machine, we are doing great.
13
13
 
14
14
  ## Installation
15
15
 
16
- As I said above, if you are on a unix-like OS (Mac OS X, Linux, Solaris,
16
+ As mentioned above, if you are on a unix-like OS (Mac OS X, Linux, Solaris,
17
17
  etc), you probably already have bash.
18
18
 
19
19
  ## Testing