trackler 2.0.6.37 → 2.0.6.38

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0851a1075b06ef0bcf3a59ba9ffa6072f1df8b44
4
- data.tar.gz: f890063e05af38c4a48d0d0fd1d9c8e2632418d3
3
+ metadata.gz: 248c2fada6c072524d6f49e9867d79e3483bd780
4
+ data.tar.gz: 0c7576bdecdfc841c8ccaf4cb9c39627569ae0b2
5
5
  SHA512:
6
- metadata.gz: e6462d9ecac9f0af0664b798ee4dc9b65f0da97eeac0d8cf4a64e854a381909931cd150dd7605d1b80091ef249656e05598e32eed9f45bfdad7ac80d8bf90717
7
- data.tar.gz: bf00c473405dfb45099e1d259a1687cd93f0f9d01eb473e62d292ef8bb2c3068a3a744a92bedb759d42ae21db2822632ad4b5053bccdf6de72828f8aa3b842a2
6
+ metadata.gz: 8c7c5fbeaea2f63469a4c077c320754574125757a9da00bbc1ce60373714c902c2d773c7769643d30bcbf50d4eece38aea870ccdd0df2e9b383f90b9090a3071
7
+ data.tar.gz: 82442653f46de01734769c231a99cc3faae5740620eeaa864b194146412a5f389daee84d46679025b82b7b7adb7fa83cde7accfa2785d3a7924135650ffd3ac0
@@ -1,12 +1,9 @@
1
- The square of the sum of the first ten natural numbers is,
1
+ The square of the sum of the first ten natural numbers is
2
+ (1 + 2 + ... + 10)² = 55² = 3025.
2
3
 
3
- (1 + 2 + ... + 10)**2 = 55**2 = 3025
4
-
5
- The sum of the squares of the first ten natural numbers is,
6
-
7
- 1**2 + 2**2 + ... + 10**2 = 385
4
+ The sum of the squares of the first ten natural numbers is
5
+ 1² + 2² + ... + 10² = 385.
8
6
 
9
7
  Hence the difference between the square of the sum of the first
10
- ten natural numbers and the sum of the squares is 2640:
11
-
12
- 3025 - 385 = 2640
8
+ ten natural numbers and the sum of the squares of the first ten
9
+ natural numbers is 3025 - 385 = 2640.
@@ -1,52 +1,61 @@
1
1
  {
2
- "#": [
3
- "The tests deliberately check that single characters are encoded without count."
4
- ],
5
- "cases": [
6
- {
7
- "description": "encode empty string",
8
- "input": "",
9
- "expected": ""
10
- },
11
- {
12
- "description": "encode single characters only",
13
- "input": "XYZ",
14
- "expected": "XYZ"
15
- },
16
- {
17
- "description": "decode empty string",
18
- "input": "",
19
- "expected": ""
20
- },
21
- {
22
- "description": "decode single characters only",
23
- "input": "XYZ",
24
- "expected": "XYZ"
25
- },
26
- {
27
- "description": "encode simple",
28
- "input": "AABBBCCCC",
29
- "expected": "2A3B4C"
30
- },
31
- {
32
- "description": "decode simple",
33
- "input": "2A3B4C",
34
- "expected": "AABBBCCCC"
35
- },
36
- {
37
- "description": "encode with single values",
38
- "input": "WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWB",
39
- "expected": "12WB12W3B24WB"
40
- },
41
- {
42
- "description": "decode with single values",
43
- "input": "12WB12W3B24WB",
44
- "expected": "WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWB"
45
- },
46
- {
47
- "description": "decode(encode(...)) combination",
48
- "input": "zzz ZZ zZ",
49
- "expected": "zzz ZZ zZ"
50
- }
51
- ]
2
+ "encode": {
3
+ "description": "run-length encode a string",
4
+ "cases": [
5
+ {
6
+ "description": "empty string",
7
+ "input": "",
8
+ "expected": ""
9
+ },
10
+ {
11
+ "description": "single characters only are encoded without count",
12
+ "input": "XYZ",
13
+ "expected": "XYZ"
14
+ },
15
+ {
16
+ "description": "string with no single characters",
17
+ "input": "AABBBCCCC",
18
+ "expected": "2A3B4C"
19
+ },
20
+ {
21
+ "description": "single characters mixed with repeated characters",
22
+ "input": "WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWB",
23
+ "expected": "12WB12W3B24WB"
24
+ }
25
+ ]
26
+ },
27
+ "decode": {
28
+ "description": "run-length decode a string",
29
+ "cases": [
30
+ {
31
+ "description": "empty string",
32
+ "input": "",
33
+ "expected": ""
34
+ },
35
+ {
36
+ "description": "single characters only",
37
+ "input": "XYZ",
38
+ "expected": "XYZ"
39
+ },
40
+ {
41
+ "description": "string with no single characters",
42
+ "input": "2A3B4C",
43
+ "expected": "AABBBCCCC"
44
+ },
45
+ {
46
+ "description": "single characters with repeated characters",
47
+ "input": "12WB12W3B24WB",
48
+ "expected": "WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWB"
49
+ }
50
+ ]
51
+ },
52
+ "consistency": {
53
+ "cases": [
54
+ {
55
+ "description": "encode followed by decode gives original string",
56
+ "input": "zzz ZZ zZ",
57
+ "expected": "zzz ZZ zZ"
58
+ }
59
+ ]
60
+ }
52
61
  }
@@ -1,3 +1,3 @@
1
1
  module Trackler
2
- VERSION = "2.0.6.37"
2
+ VERSION = "2.0.6.38"
3
3
  end
@@ -43,7 +43,7 @@ problem description.
43
43
  - If you already have a fix for it you may [write a pull request](#writing-a-pull-request).
44
44
 
45
45
  #### Reviewing issues and pull requests
46
- If you have a dedicated opinion you are welcome to [write a comment](https://help.github.com/articles/commenting-on-a-pull-request/) for an [issue](https://github.com/exercism/xhaskell/issue) or a [pull request](https://github.com/exercism/xhaskell/pull).
46
+ If you have a dedicated opinion you are welcome to [write a comment](https://help.github.com/articles/commenting-on-a-pull-request/) for an [issue](https://github.com/exercism/xhaskell/issues) or a [pull request](https://github.com/exercism/xhaskell/pulls).
47
47
  Please be detailed and include reasons, links or arguments to support your opinion.
48
48
 
49
49
  #### Porting exercises
@@ -107,10 +107,10 @@ format that has all dependencies and build instructions for an exercise.
107
107
  - `test/Tests.hs` is the [test suite](#test-suite).
108
108
 
109
109
  ### Writing an issue
110
- To report a bug you should [create an issue](https://help.github.com/articles/creating-an-issue/) [here](https://github.com/exercism/xhaskell/issue).
110
+ To report a bug you should [create an issue](https://help.github.com/articles/creating-an-issue/) [here](https://github.com/exercism/xhaskell/issues).
111
111
 
112
112
  ### Writing a pull request
113
- To fix a bug you should [create a pull request from a fork](https://help.github.com/articles/creating-a-pull-request-from-a-fork/) [here](https://github.com/exercism/xhaskell/pull). See also [here](https://github.com/exercism/x-common/blob/master/CONTRIBUTING.md#git-basics) for more information.
113
+ To fix a bug you should [create a pull request from a fork](https://help.github.com/articles/creating-a-pull-request-from-a-fork/) [here](https://github.com/exercism/xhaskell/pulls). See also [here](https://github.com/exercism/x-common/blob/master/CONTRIBUTING.md#git-basics) for more information.
114
114
 
115
115
  ### Development Dependencies
116
116
  You should have [Stack](http://docs.haskellstack.org/) installed in your system to make contributing to this repository easier.
@@ -1,3 +1,3 @@
1
1
  module Binary (toDecimal) where
2
2
 
3
- toDecimal = error "You need to implement this function."
3
+ toDecimal xs = error "You need to implement this function."
@@ -1,4 +1,4 @@
1
1
  module Bob (responseFor) where
2
2
 
3
3
  responseFor :: String -> String
4
- responseFor = error "You need to implement this function."
4
+ responseFor xs = error "You need to implement this function."
@@ -1,4 +1,4 @@
1
1
  module DNA (toRNA) where
2
2
 
3
3
  toRNA :: String -> Maybe String
4
- toRNA = error "You need to implement this function."
4
+ toRNA xs = error "You need to implement this function."
@@ -1,7 +1,7 @@
1
1
  ## Hints
2
2
 
3
3
  In this exercise, we provided the definition of the
4
- [algebric data data](http://learnyouahaskell.com/making-our-own-types-and-typeclasses)
4
+ [algebric data type](http://learnyouahaskell.com/making-our-own-types-and-typeclasses)
5
5
  named `Planet`.
6
6
  You need to implement the `ageOn` function, that calculates how many
7
7
  years old someone would be on a `Planet`, given an age in seconds.
@@ -1,7 +1,7 @@
1
1
  module Strain (keep, discard) where
2
2
 
3
3
  discard :: (a -> Bool) -> [a] -> [a]
4
- discard = error "You need to implement this function."
4
+ discard p xs = error "You need to implement this function."
5
5
 
6
6
  keep :: (a -> Bool) -> [a] -> [a]
7
- keep = error "You need to implement this function."
7
+ keep p xs = error "You need to implement this function."
@@ -35,7 +35,7 @@ let decode_tests = [
35
35
  ]
36
36
 
37
37
  let different_block_size_test = [
38
- "encode mindblowingly with a different block size">::
38
+ "encode mindblowingly with a different block size" >::
39
39
  ae "n r m w y o l d r m t o b" (encode ~block_size:1 "mindblowingly");
40
40
  ]
41
41
 
@@ -10,6 +10,8 @@ let tests = [
10
10
  assert_valid false "1";
11
11
  "A single zero is invalid" >::
12
12
  assert_valid false "0";
13
+ "simple valid sin" >::
14
+ assert_valid true " 5 9 ";
13
15
  "valid Canadian SIN" >::
14
16
  assert_valid true "046 454 286";
15
17
  "invalid Canadian SIN" >::
@@ -18,6 +20,18 @@ let tests = [
18
20
  assert_valid false "8273 1232 7352 0569";
19
21
  "valid strings with a non-digit added become invalid" >::
20
22
  assert_valid false "046a 454 286";
23
+ "punctuation is not allowed" >::
24
+ assert_valid false "055-444-285";
25
+ "symbols are not allowed" >::
26
+ assert_valid false "055\194\163 444$ 285";
27
+ "single zero with space is invalid" >::
28
+ assert_valid false " 0";
29
+ "lots of zeros are valid" >::
30
+ assert_valid true " 00000";
31
+ "another valid sin" >::
32
+ assert_valid true "055 444 285";
33
+ "nine doubled is nine" >::
34
+ assert_valid true "091";
21
35
  ]
22
36
 
23
37
  let () =
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trackler
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.6.37
4
+ version: 2.0.6.38
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katrina Owen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-11 00:00:00.000000000 Z
11
+ date: 2017-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip