trackler 2.0.8.16 → 2.0.8.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (28) hide show
  1. checksums.yaml +4 -4
  2. data/common/exercises/alphametics/canonical-data.json +100 -44
  3. data/common/exercises/anagram/canonical-data.json +3 -3
  4. data/common/exercises/beer-song/canonical-data.json +75 -47
  5. data/common/exercises/binary-search/canonical-data.json +86 -74
  6. data/common/exercises/bowling/canonical-data.json +1 -1
  7. data/common/exercises/bracket-push/canonical-data.json +15 -0
  8. data/common/exercises/circular-buffer/canonical-data.json +16 -1
  9. data/common/exercises/connect/canonical-data.json +19 -7
  10. data/common/exercises/custom-set/canonical-data.json +287 -246
  11. data/common/exercises/dominoes/canonical-data.json +125 -111
  12. data/common/exercises/flatten-array/canonical-data.json +35 -28
  13. data/common/exercises/food-chain/canonical-data.json +196 -182
  14. data/common/exercises/gigasecond/canonical-data.json +51 -41
  15. data/common/exercises/isogram/canonical-data.json +59 -38
  16. data/common/exercises/pangram/canonical-data.json +69 -47
  17. data/common/exercises/perfect-numbers/canonical-data.json +3 -3
  18. data/common/exercises/phone-number/canonical-data.json +74 -55
  19. data/common/exercises/sum-of-multiples/canonical-data.json +88 -62
  20. data/lib/trackler/version.rb +1 -1
  21. data/tracks/elixir/docs/INSTALLATION.md +2 -0
  22. data/tracks/elixir/docs/LEARNING.md +2 -0
  23. data/tracks/elixir/docs/RESOURCES.md +8 -0
  24. data/tracks/groovy/docs/ABOUT.md +1 -1
  25. data/tracks/groovy/docs/LEARNING.md +5 -4
  26. data/tracks/groovy/docs/RESOURCES.md +8 -1
  27. data/tracks/rust/exercises/hello-world/GETTING_STARTED.md +29 -97
  28. metadata +1 -1
@@ -1,64 +1,90 @@
1
1
  {
2
- "cases": [
3
- {
4
- "factors": [3, 5],
5
- "limit": 1,
6
- "expected": 0
7
- },
8
- {
9
- "factors": [3, 5],
10
- "limit": 4,
11
- "expected": 3
12
- },
13
- {
14
- "factors": [3, 5],
15
- "limit": 10,
16
- "expected": 23
17
- },
18
- {
19
- "factors": [3, 5],
20
- "limit": 100,
21
- "expected": 2318
22
- },
23
- {
24
- "factors": [3, 5],
25
- "limit": 1000,
26
- "expected": 233168
27
- },
28
- {
29
- "factors": [7, 13, 17],
30
- "limit": 20,
31
- "expected": 51
32
- },
33
- {
34
- "factors": [4, 6],
35
- "limit": 15,
36
- "expected": 30
37
- },
38
- {
39
- "factors": [5, 6, 8],
40
- "limit": 150,
41
- "expected": 4419
42
- },
43
- {
44
- "factors": [5, 25],
45
- "limit": 51,
46
- "expected": 275
47
- },
48
- {
49
- "factors": [43, 47],
50
- "limit": 10000,
51
- "expected": 2203160
52
- },
53
- {
54
- "factors": [1],
55
- "limit": 100,
56
- "expected": 4950
57
- },
58
- {
59
- "factors": [],
60
- "limit": 10000,
61
- "expected": 0
62
- }
63
- ]
2
+ "exercise": "sum-of-multiples",
3
+ "version": "1.0.0",
4
+ "cases": [
5
+ {
6
+ "description": "multiples of 3 or 5 up to 1",
7
+ "property": "sum",
8
+ "factors": [3, 5],
9
+ "limit": 1,
10
+ "expected": 0
11
+ },
12
+ {
13
+ "description": "multiples of 3 or 5 up to 4",
14
+ "property": "sum",
15
+ "factors": [3, 5],
16
+ "limit": 4,
17
+ "expected": 3
18
+ },
19
+ {
20
+ "description": "multiples of 3 or 5 up to 10",
21
+ "property": "sum",
22
+ "factors": [3, 5],
23
+ "limit": 10,
24
+ "expected": 23
25
+ },
26
+ {
27
+ "description": "multiples of 3 or 5 up to 100",
28
+ "property": "sum",
29
+ "factors": [3, 5],
30
+ "limit": 100,
31
+ "expected": 2318
32
+ },
33
+ {
34
+ "description": "multiples of 3 or 5 up to 1000",
35
+ "property": "sum",
36
+ "factors": [3, 5],
37
+ "limit": 1000,
38
+ "expected": 233168
39
+ },
40
+ {
41
+ "description": "multiples of 7, 13 or 17 up to 20",
42
+ "property": "sum",
43
+ "factors": [7, 13, 17],
44
+ "limit": 20,
45
+ "expected": 51
46
+ },
47
+ {
48
+ "description": "multiples of 4 or 6 up to 15",
49
+ "property": "sum",
50
+ "factors": [4, 6],
51
+ "limit": 15,
52
+ "expected": 30
53
+ },
54
+ {
55
+ "description": "multiples of 5, 6 or 8 up to 150",
56
+ "property": "sum",
57
+ "factors": [5, 6, 8],
58
+ "limit": 150,
59
+ "expected": 4419
60
+ },
61
+ {
62
+ "description": "multiples of 5 or 25 up to 51",
63
+ "property": "sum",
64
+ "factors": [5, 25],
65
+ "limit": 51,
66
+ "expected": 275
67
+ },
68
+ {
69
+ "description": "multiples of 43 or 47 up to 10000",
70
+ "property": "sum",
71
+ "factors": [43, 47],
72
+ "limit": 10000,
73
+ "expected": 2203160
74
+ },
75
+ {
76
+ "description": "multiples of 1 up to 100",
77
+ "property": "sum",
78
+ "factors": [1],
79
+ "limit": 100,
80
+ "expected": 4950
81
+ },
82
+ {
83
+ "description": "multiples of an empty list up to 10000",
84
+ "property": "sum",
85
+ "factors": [],
86
+ "limit": 10000,
87
+ "expected": 0
88
+ }
89
+ ]
64
90
  }
@@ -1,3 +1,3 @@
1
1
  module Trackler
2
- VERSION = "2.0.8.16"
2
+ VERSION = "2.0.8.17"
3
3
  end
@@ -1,3 +1,5 @@
1
1
  ### Installation
2
2
 
3
3
  Detailed installation instructions can be found at [http://elixir-lang.org/install.html](http://elixir-lang.org/install.html).
4
+
5
+ Help can be found on [Exercism's BEAM Gitter channel](https://gitter.im/exercism/xerlang)
@@ -8,3 +8,5 @@ Exercism provides exercises and feedback but can be difficult to jump into for t
8
8
  * [Etudes for Elixir](http://chimera.labs.oreilly.com/books/1234000001642), by J. David Eisenberg (exercise companion for Intro to Elixir)
9
9
  * [Elixir School](https://elixirschool.com)
10
10
  * [Elixir Examples](https://elixir-examples.github.io/)
11
+ * [Exercism's BEAM Gitter channel](https://gitter.im/exercism/xerlang)
12
+ * [Elixir Forum](https://elixirforum.com/)
@@ -17,3 +17,11 @@
17
17
  ## Slack
18
18
 
19
19
  * [Request an Invite](https://elixir-slackin.herokuapp.com/)
20
+
21
+ ## Exercism's BEAM Gitter Channel
22
+
23
+ * [Gitter channel](https://gitter.im/exercism/xerlang)
24
+
25
+ ## Elixir Forum
26
+
27
+ * [Elixir Forum](https://elixirforum.com/)
@@ -2,7 +2,7 @@
2
2
 
3
3
  Groovy is aimed at improving developer productivity thanks to a concise, easy to learn syntax. It facilitates scripting, Domain-Specific Language authoring, runtime and compile-time meta-programming, and functional programming.
4
4
 
5
- It allows access to the entire ecosystem of Java libraries, integrates seamlessly with Java applications.
5
+ It allows access to the entire ecosystem of Java libraries, and integrates seamlessly with Java applications.
6
6
 
7
7
  It can be used as a simple scripting language or added to complicated Java frameworks. It powers technologies like Gradle, Spock, Ratpack, Grails, and scripting in Jenkins.
8
8
 
@@ -1,16 +1,17 @@
1
1
  Interested in getting started with Groovy, or learning more while you work on exercises?
2
2
 
3
- Try out Groovy
3
+ Try out Groovy with
4
4
 
5
- * [in a browser](https://www.jdoodle.com/execute-groovy-online)
6
- * opening the [Groovy Console](http://groovy-lang.org/groovyconsole.html) with `groovyConsole`
7
- * opening the [Groovy Shell](http://groovy-lang.org/groovyconsole.html) with `groovysh`
5
+ * [a browser using an online interpreter](https://www.jdoodle.com/execute-groovy-online)
6
+ * [the Groovy Console](http://groovy-lang.org/groovyconsole.html) by typing `groovyConsole` at a command line
7
+ * [the Groovy Shell](http://groovy-lang.org/groovyconsole.html) by typing `groovysh` at a command line
8
8
 
9
9
  Take a quick tour of Groovy with
10
10
 
11
11
  * Tim Rows' [Groovy Tutorial for Java Developers](https://www.timroes.de/2015/06/27/groovy-tutorial-for-java-developers/) is equally good for non-Java developers
12
12
  * [Learn X in Y minutes, Where X=Groovy ](https://learnxinyminutes.com/docs/groovy/)
13
13
  * SmartThings' [Groovy Basics](http://docs.smartthings.com/en/latest/getting-started/groovy-basics.html)
14
+ * a few of JDriven's [online Groovy Koans](http://www.groovy-koans.org/)
14
15
 
15
16
  Dive deeper with
16
17
 
@@ -5,12 +5,19 @@
5
5
  * the official [Groovy Language Documentation](http://docs.groovy-lang.org/docs/latest/html/documentation/)
6
6
  * Apache's [Groovy Documentation](http://www.groovy-lang.org/documentation.html), including the great [Learn Groovy](http://www.groovy-lang.org/learn.html) section
7
7
 
8
- # Tools
8
+ ## Tools
9
9
 
10
10
  * [SDKman](http://sdkman.io/)
11
11
  * [Groovy Eclipse](https://github.com/groovy/groovy-eclipse/wiki)
12
12
  * [IntelliJ Idea](https://www.jetbrains.com/idea/download/)
13
13
 
14
+ ## Technologies
15
+
16
+ * [Gradle](https://gradle.org/), One Build Tool to Rule Them All
17
+ * [Spock](http://spockframework.org/), The Next Generation of JVM language testing
18
+ * [Ratpack](https://ratpack.io/), mini microservices with martinis
19
+ * [Grails](https://grails.org/), "You must choose, but choose wisely."
20
+
14
21
  ## Collaboration
15
22
 
16
23
  * the [Groovy Community](http://www.groovy-lang.org/community.html) entry of the Groovy Language Documentation
@@ -18,141 +18,73 @@ Run the test suite. It can be run with `cargo`, which is installed with rust.
18
18
  $ cargo test
19
19
  ```
20
20
 
21
- This will fail, complaining that `hello-world` could not compile.
21
+ This will compile the `hello-world` crate and run the test, which fails.
22
22
 
23
- To fix this, create a new directory called `src`.
24
- Create a new file called, `lib.rs`, inside the `src` directory.
25
-
26
- ## Step 2
27
-
28
- Run the test again. It will give you a new error, another compile error.
29
- Our `lib.rs` does not contain any code, specifically the `hello()`
30
- function that our test is looking for.
31
-
32
- ### Fixing the Error
33
-
34
- To fix it, open up the `src/lib.rs` file and add the following code:
35
-
36
- ```rust
37
- pub fn hello(name: Option<&str>) -> String {
38
- "".to_string()
39
- }
40
23
  ```
41
-
42
- Our test is looking for the `hello()` function from the `hello_world`
43
- crate. `lib.rs`, by default, is our crate root and our test
44
- is looking for the `hello()` function there.
45
-
46
- The code we are adding to `lib.rs` defines a public function (`pub fn`) that is called "hello".
47
- The function accepts a `name` as an optional argument (`Option`).
48
- The function returns a `String`.
49
- We start by returning an empty string (`"".to_string()`).
50
-
51
- ## Step 3
52
-
53
- Run the test again.
54
-
55
- This time, code compilation will pass and we receive actual test failures.
56
-
57
- ```
58
- running 3 tests
59
- test test_other_same_name ... ignored
60
- test test_sample_name ... ignored
61
- test test_no_name ... FAILED
24
+ running 1 test
25
+ test test_hello_world ... FAILED
62
26
 
63
27
  failures:
64
28
 
65
- ---- test_no_name stdout ----
66
- thread 'test_no_name' panicked at 'assertion failed: `(left == right)`
67
- (left: `"Hello, World!"`, right: `""`)', tests/hello-world.rs:5
68
-
29
+ ---- test_hello_world stdout ----
30
+ thread 'test_hello_world' panicked at 'assertion failed: `(left == right)`
31
+ (left: `"Hello, World!"`, right: `"Goodbye, World!"`)', tests/hello-world.rs:5
69
32
 
70
33
  failures:
71
- test_no_name
34
+ test_hello_world
72
35
 
73
- test result: FAILED. 0 passed; 1 failed; 2 ignored; 0 measured
36
+ test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured
74
37
  ```
75
38
 
76
39
  ### Understanding Test Failures
77
40
 
78
- Only one of the tests runs (`test_no_name`) and it fails. The other
79
- tests are ignored (more on that later).
80
-
81
- The `test_no_name` failure states that it is expecting the value,
82
- `"Hello, World!"`, to be returned from `hello("")`.
41
+ The `test_hello_world` failure states that it is expecting the value,
42
+ `"Hello, World!"`, to be returned from `hello()`.
83
43
  The left side of the assertion (at line 5) should be equal to the right side.
84
44
 
85
45
  ```
86
- ---- test_no_name stdout ----
87
- thread 'test_no_name' panicked at 'assertion failed: `(left == right)`
88
- (left: `"Hello, World!"`, right: `""`)', tests/hello-world.rs:5
46
+ ---- test_hello_world stdout ----
47
+ thread 'test_hello_world' panicked at 'assertion failed: `(left == right)`
48
+ (left: `"Hello, World!"`, right: `"Goodbye, World!"`)', tests/hello-world.rs:5
89
49
  ```
90
50
 
91
- To fix it, let's return `"Hello, World!"`, instead of an empty string
92
- (`""`) inside our `hello` function.
51
+ ### Fixing the Error
52
+
53
+ To fix it, open up `src/lib.rs` and change the `hello` function to return
54
+ `"Hello, World!"` instead of `"Goodbye, World!"`.
93
55
 
94
56
  ```rust
95
- pub fn hello(name: Option<&str>) -> String {
96
- "Hello, World!".to_string()
57
+ pub fn hello() -> &'static str {
58
+ "Hello, World!"
97
59
  }
98
60
  ```
99
61
 
100
- ## Step 4
62
+ ## Step 2
101
63
 
102
64
  Run the test again. This time, it will pass.
103
65
 
104
66
  ```
105
- running 3 tests
106
- test test_other_same_name ... ignored
107
- test test_sample_name ... ignored
108
- test test_no_name ... ok
109
-
110
- test result: ok. 1 passed; 0 failed; 2 ignored; 0 measured
111
-
112
- Doc-tests hello-world
113
-
114
67
  running 0 tests
115
68
 
116
69
  test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured
117
- ```
118
-
119
- You may have noticed compiler warnings earlier:
120
70
 
121
- ```
122
- Compiling hello-world v0.0.0
123
- (file:////exercism/exercises/rust/hello-world)
124
- src/lib.rs:1:14: 1:18 warning: unused variable: `name`, #[warn(unused_variables)] on by default
125
- src/lib.rs:1 pub fn hello(name: Option<&str>) -> String {
126
- ^~~~
127
- ```
128
-
129
- Our `hello` function does not use the `name` argument so the
130
- compiler is letting us know that we could potentially remove the
131
- argument from our function (it likes "clean code").
132
-
133
- As we make the rest of the tests pass, we will find that we need the `name`
134
- argument, so don't delete it.
135
-
136
- Activate the next test. Open the `tests/hello-world.rs` file.
137
- Delete the `#[ignore]` line for the `test_sample_name` test.
71
+ Running target/debug/deps/hello_world-bd1f06dc726ef14f
138
72
 
139
- ## Step 5
73
+ running 1 test
74
+ test test_hello_world ... ok
140
75
 
141
- Run the test suite again. Read the test failure and make the test pass.
76
+ test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured
142
77
 
143
- As a reminder, the [rust book](http://doc.rust-lang.org/stable/book/README.html)
144
- is a good reference for understanding rust.
145
- The cargo output may also have hints to help you, depending on the errors you get.
146
- For example, `rustc --explain E0425` will explain unresolved name errors.
78
+ Doc-tests hello-world
147
79
 
148
- ## Wash, Rinse, Repeat
80
+ running 0 tests
149
81
 
150
- Delete one `#[ignore]` at a time, and make each test pass before you move to
151
- the next one.
82
+ test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured
83
+ ```
152
84
 
153
85
  ## Submit
154
86
 
155
- When everything is passing, you can submit your code with the following
87
+ Once the test is passing, you can submit your code with the following
156
88
  command:
157
89
 
158
90
  ```
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trackler
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.8.16
4
+ version: 2.0.8.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katrina Owen