trackler 2.2.1.158 → 2.2.1.159

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/.gitmodules +3 -0
  3. data/lib/trackler/version.rb +1 -1
  4. data/tracks/csharp/config/maintainers.json +31 -31
  5. data/tracks/csharp/config.json +13 -1
  6. data/tracks/pharo/.git +1 -0
  7. data/tracks/pharo/.gitignore +4 -0
  8. data/tracks/pharo/.travis.yml +5 -0
  9. data/tracks/pharo/LICENSE +21 -0
  10. data/tracks/pharo/README.md +67 -0
  11. data/tracks/pharo/bin/fetch-configlet +32 -0
  12. data/tracks/pharo/config/exercise-readme-insert.md +0 -0
  13. data/tracks/pharo/config/exercise_readme.go.tmpl +16 -0
  14. data/tracks/pharo/config/maintainers.json +4 -0
  15. data/tracks/pharo/config.json +11 -0
  16. data/tracks/pharo/docs/ABOUT.md +0 -0
  17. data/tracks/pharo/docs/INSTALLATION.md +0 -0
  18. data/tracks/pharo/docs/LEARNING.md +0 -0
  19. data/tracks/pharo/docs/RESOURCES.md +0 -0
  20. data/tracks/pharo/docs/TESTS.md +0 -0
  21. data/tracks/pharo/img/.keep +0 -0
  22. data/tracks/reasonml/.gitignore +3 -0
  23. data/tracks/reasonml/README.md +15 -8
  24. data/tracks/reasonml/config.json +36 -1
  25. data/tracks/reasonml/docs/ABOUT.md +5 -0
  26. data/tracks/reasonml/docs/INSTALLATION.md +10 -0
  27. data/tracks/reasonml/docs/LEARNING.md +4 -0
  28. data/tracks/reasonml/docs/RESOURCES.md +4 -0
  29. data/tracks/reasonml/docs/TESTS.md +3 -0
  30. data/tracks/reasonml/exercises/hello-world/README.md +28 -5
  31. data/tracks/reasonml/exercises/leap/README.md +13 -0
  32. data/tracks/reasonml/exercises/leap/__tests__/Leap_test.re +17 -0
  33. data/tracks/reasonml/exercises/leap/bsconfig.json +30 -0
  34. data/tracks/reasonml/exercises/leap/package.json +20 -0
  35. data/tracks/reasonml/exercises/leap/src/Leap.re +4 -0
  36. data/tracks/reasonml/exercises/space-age/__tests__/Space_age_test.re +29 -0
  37. data/tracks/reasonml/exercises/space-age/bsconfig.json +30 -0
  38. data/tracks/reasonml/exercises/space-age/package.json +20 -0
  39. data/tracks/reasonml/exercises/space-age/src/Space_age.re +26 -0
  40. metadata +27 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b019b44614dd8458a6088690169a84299df130ff
4
- data.tar.gz: 0a622165cb86a6b6c703b5e662e73c3e8ab31599
3
+ metadata.gz: 21d78b4998f8a8d146fc2c917c14fe03645df2b1
4
+ data.tar.gz: e830ff4276ca670309f473284796e56010d8048c
5
5
  SHA512:
6
- metadata.gz: 7196c114c4b5606872ce6da898d557622c437b433fc2b503c84c9b647d93e62baa44357e6251493cf779e3b595ce38179f23e54c487731ad1cce056199ec11f4
7
- data.tar.gz: 729f6daa031098a10aed27b29fab879165e2550b2b7b3330b6ced4fa481ca77959b9da6f8c3d6d16318eb99c11c34405601bb930292effd6d08b36efd1013219
6
+ metadata.gz: ad7e3b7721cc77a3041aa4ef066a218b94e34aab5441ea1cee58e6de2ac69b3e05a0922c9dde8bd4159905a20cba6819b5926331d0fb79707252a6ca2ec3a0e5
7
+ data.tar.gz: 0314be406d9973d06f87922fd77e40fa4a2ebf1b4b84daf48bd7b7db834b682d5075dffe79a9913f2571b177666c28b83b1cc08409adabd9e9bd0a25e7946cb8
data/.gitmodules CHANGED
@@ -178,3 +178,6 @@
178
178
  [submodule "tracks/reasonml"]
179
179
  path = tracks/reasonml
180
180
  url = https://github.com/exercism/reasonml
181
+ [submodule "tracks/pharo"]
182
+ path = tracks/pharo
183
+ url = https://github.com/exercism/pharo
@@ -1,3 +1,3 @@
1
1
  module Trackler
2
- VERSION = "2.2.1.158"
2
+ VERSION = "2.2.1.159"
3
3
  end
@@ -2,64 +2,64 @@
2
2
  "docs_url": "https://github.com/exercism/docs/blob/master/maintaining-a-track/maintainer-configuration.md",
3
3
  "maintainers": [
4
4
  {
5
- "alumnus": false,
6
- "avatar_url": null,
7
- "bio": null,
8
5
  "github_username": "ErikSchierboom",
6
+ "alumnus": false,
7
+ "show_on_website": true,
8
+ "name": "Erik Schierboom",
9
9
  "link_text": "My blog",
10
10
  "link_url": "http://www.erikschierboom.com/",
11
- "name": "Erik Schierboom",
12
- "show_on_website": true
11
+ "avatar_url": null,
12
+ "bio": null
13
13
  },
14
14
  {
15
- "alumnus": false,
16
- "avatar_url": null,
17
- "bio": null,
18
15
  "github_username": "burtlo",
16
+ "alumnus": false,
17
+ "show_on_website": false,
18
+ "name": null,
19
19
  "link_text": null,
20
20
  "link_url": null,
21
- "name": null,
22
- "show_on_website": false
21
+ "avatar_url": null,
22
+ "bio": null
23
23
  },
24
24
  {
25
- "alumnus": false,
26
- "avatar_url": null,
27
- "bio": null,
28
25
  "github_username": "bressain",
26
+ "alumnus": false,
27
+ "show_on_website": false,
28
+ "name": null,
29
29
  "link_text": null,
30
30
  "link_url": null,
31
- "name": null,
32
- "show_on_website": false
31
+ "avatar_url": null,
32
+ "bio": null
33
33
  },
34
34
  {
35
- "alumnus": false,
36
- "avatar_url": null,
37
- "bio": null,
38
35
  "github_username": "jwood803",
36
+ "alumnus": false,
37
+ "show_on_website": false,
38
+ "name": null,
39
39
  "link_text": null,
40
40
  "link_url": null,
41
- "name": null,
42
- "show_on_website": false
41
+ "avatar_url": null,
42
+ "bio": null
43
43
  },
44
44
  {
45
- "alumnus": false,
46
- "avatar_url": null,
47
- "bio": "I stumbled upon this site when I was trying to learn about functional programming and F#. Little did I know, I'd wind up becoming a contributor and learning a whole lot more than what I originally intended to. I had never contributed to an open source project before, and it's been a very rewarding experience.",
48
45
  "github_username": "robkeim",
46
+ "alumnus": false,
47
+ "show_on_website": true,
48
+ "name": "Rob Keim",
49
49
  "link_text": null,
50
50
  "link_url": null,
51
- "name": "Rob Keim",
52
- "show_on_website": true
51
+ "avatar_url": null,
52
+ "bio": "I stumbled upon this site when I was trying to learn about functional programming and F#. Little did I know, I'd wind up becoming a contributor and learning a whole lot more than what I originally intended to. I had never contributed to an open source project before, and it's been a very rewarding experience."
53
53
  },
54
54
  {
55
- "alumnus": false,
56
- "avatar_url": null,
57
- "bio": "I am a software engineer with a passion for testing and C#. If you have any questions about the C# track or the language in general, feel free to ask; I'd love to hear them.",
58
55
  "github_username": "jpreese",
56
+ "alumnus": false,
57
+ "show_on_website": true,
58
+ "name": "John Reese",
59
59
  "link_text": "I sometimes write about stuff",
60
60
  "link_url": "http://www.reesespieces.io/",
61
- "name": "John Reese",
62
- "show_on_website": true
61
+ "avatar_url": null,
62
+ "bio": "I am a software engineer with a passion for testing and C#. If you have any questions about the C# track or the language in general, feel free to ask; I'd love to hear them."
63
63
  }
64
64
  ]
65
- }
65
+ }
@@ -1285,25 +1285,37 @@
1285
1285
  "slug": "binary",
1286
1286
  "uuid": "cef7deef-54ce-4201-b263-7cd2098533f8",
1287
1287
  "core": false,
1288
+ "unlocked_by": null,
1289
+ "difficulty": 0,
1290
+ "topics": null,
1288
1291
  "deprecated": true
1289
1292
  },
1290
1293
  {
1291
1294
  "slug": "trinary",
1292
1295
  "uuid": "c7dd8467-87e2-4997-a96e-a04cb8b891e8",
1293
1296
  "core": false,
1297
+ "unlocked_by": null,
1298
+ "difficulty": 0,
1299
+ "topics": null,
1294
1300
  "deprecated": true
1295
1301
  },
1296
1302
  {
1297
1303
  "slug": "octal",
1298
1304
  "uuid": "c8555f37-9976-4f52-a5db-6a680ec8d53b",
1299
1305
  "core": false,
1306
+ "unlocked_by": null,
1307
+ "difficulty": 0,
1308
+ "topics": null,
1300
1309
  "deprecated": true
1301
1310
  },
1302
1311
  {
1303
1312
  "slug": "hexadecimal",
1304
1313
  "uuid": "5d30c5a0-0f69-4b79-8c7e-3b1fe6a5707f",
1305
1314
  "core": false,
1315
+ "unlocked_by": null,
1316
+ "difficulty": 0,
1317
+ "topics": null,
1306
1318
  "deprecated": true
1307
1319
  }
1308
1320
  ]
1309
- }
1321
+ }
data/tracks/pharo/.git ADDED
@@ -0,0 +1 @@
1
+ gitdir: ../../.git/modules/tracks/pharo
@@ -0,0 +1,4 @@
1
+ *.swp
2
+ .DS_Store
3
+ bin/configlet
4
+ bin/configlet.exe
@@ -0,0 +1,5 @@
1
+ language: bash
2
+
3
+ script:
4
+ - bin/fetch-configlet
5
+ - bin/configlet lint --track TRACK_ID .
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2018 Exercism, Inc
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,67 @@
1
+ # Exercism Pharo Track
2
+
3
+ ![build status](https://travis-ci.org/exercism/pharo.svg?branch=master)
4
+
5
+ Exercism exercises in Pharo.
6
+
7
+ ## Setup
8
+
9
+ The simplest way to install Pharo is ...
10
+
11
+ ## Contributing
12
+
13
+ Thank you so much for contributing! :tada:
14
+
15
+ Please read about how to [get involved in a track](https://github.com/exercism/docs/tree/master/contributing-to-language-tracks). Be sure to read the Exercism [Code of Conduct](https://github.com/exercism/exercism.io/blob/master/CODE_OF_CONDUCT.md).
16
+
17
+ We welcome pull requests of all kinds. No contribution is too small.
18
+
19
+ We encourage contributions that provide fixes and improvements to existing exercises. Please note that this track's exercises must conform to the Exercism-wide standards described in the [documentation](https://github.com/exercism/docs/tree/master/language-tracks/exercises). If you're unsure about how to make a change, then go ahead and open a GitHub issue, and we'll discuss it.
20
+
21
+ ## Exercise Tests
22
+
23
+ At the most basic level, Exercism is all about the tests. You can read more about how we think about test suites in [the Exercism documentation](https://github.com/exercism/docs/blob/master/language-tracks/exercises/anatomy/test-suites.md).
24
+
25
+ Test files should use the following format:
26
+
27
+ ```
28
+ # include the body of an example test
29
+ ```
30
+
31
+ ## Opening an Issue
32
+
33
+ If you plan to make significant or breaking changes, please open an issue so we can discuss it first. If this is a discussion that is relevant to more than just the Pharo track, please open an issue in [exercism/discussions](https://github.com/exercism/discussions/issues).
34
+
35
+ ## Submitting a Pull Request
36
+
37
+ Pull requests should be focused on a single exercise, issue, or conceptually cohesive change. Please refer to Exercism's [pull request guidelines](https://github.com/exercism/docs/blob/master/contributing/pull-request-guidelines.md).
38
+
39
+ Please follow the coding standards for Pharo. (If there is a formatter for the track's language, add instructions for using it here.)
40
+
41
+ ### Verifying Your Change
42
+
43
+ Before submitting your pull request, you'll want to verify the changes in two ways:
44
+
45
+ * Run all the tests for the Pharo exercises
46
+ * Run an Exercism-specific linter to verify the track
47
+
48
+ All the tests for Pharo exercises can be run from the top level of the repo with
49
+
50
+ ```
51
+ # add this command
52
+ ```
53
+
54
+ For the Exercism-specific linting, please see [the documentation](https://github.com/exercism/docs/blob/master/language-tracks/configuration/linting.md).
55
+
56
+ ## Contributing a New Exercise
57
+
58
+ Please see the documentation about [adding new exercises](https://github.com/exercism/docs/blob/master/you-can-help/make-up-new-exercises.md).
59
+
60
+ Note that:
61
+
62
+ - Each exercise must stand on its own. Do not reference files outside the exercise directory. They will not be included when the user fetches the exercise.
63
+ - Exercises should use only the Pharo core libraries.
64
+ - Exercises must conform to the Exercism-wide standards described in [the documentation](https://github.com/exercism/docs/tree/master/language-tracks/exercises).
65
+ - Each exercise should have a test suite, an example solution, a template file for the real implementation and ... (anything else that needs to go with each exercise for this track). The CI build expects files to be named using the following convention: (describe the Pharo convention for naming the various files that make up an exercise).
66
+ - Please do not commit any configuration files or directories inside the exercise other than ...
67
+ - Be sure to add it to the appropriate place in the `config.json` file.
@@ -0,0 +1,32 @@
1
+ #!/bin/bash
2
+
3
+ LATEST=https://github.com/exercism/configlet/releases/latest
4
+
5
+ OS=$(
6
+ case $(uname) in
7
+ (Darwin*)
8
+ echo "mac";;
9
+ (Linux*)
10
+ echo "linux";;
11
+ (Windows*)
12
+ echo "windows";;
13
+ (*)
14
+ echo "linux";;
15
+ esac)
16
+
17
+ ARCH=$(
18
+ case $(uname -m) in
19
+ (*64*)
20
+ echo 64bit;;
21
+ (*686*)
22
+ echo 32bit;;
23
+ (*386*)
24
+ echo 32bit;;
25
+ (*)
26
+ echo 64bit;;
27
+ esac)
28
+
29
+ VERSION="$(curl --head --silent $LATEST | awk -v FS=/ '/Location:/{print $NF}' | tr -d '\r')"
30
+ URL=https://github.com/exercism/configlet/releases/download/$VERSION/configlet-$OS-${ARCH}.tgz
31
+
32
+ curl -s --location $URL | tar xz -C bin/
File without changes
@@ -0,0 +1,16 @@
1
+ # {{ .Spec.Name }}
2
+
3
+ {{ .Spec.Description -}}
4
+ {{- with .Hints }}
5
+ {{ . }}
6
+ {{ end }}
7
+ {{- with .TrackInsert }}
8
+ {{ . }}
9
+ {{ end }}
10
+ {{- with .Spec.Credits -}}
11
+ ## Source
12
+
13
+ {{ . }}
14
+ {{ end }}
15
+ ## Submitting Incomplete Solutions
16
+ It's possible to submit an incomplete solution so you can see how others have completed the exercise.
@@ -0,0 +1,4 @@
1
+ {
2
+ "docs_url": "https://github.com/exercism/docs/blob/master/maintaining-a-track/maintainer-configuration.md",
3
+ "maintainers": []
4
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "track_id": "pharo",
3
+ "language": "Pharo",
4
+ "active": false,
5
+ "ignore_pattern": "[Ee]xample",
6
+ "solution_pattern": "[Ee]xample",
7
+ "test_pattern": "[Tt]est",
8
+ "foregone": [],
9
+ "exercises": null,
10
+ "deprecated": []
11
+ }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -3,3 +3,6 @@
3
3
  bin/configlet
4
4
  bin/configlet.exe
5
5
  .vscode
6
+ **/lib/
7
+ **/node_modules
8
+ **/*.bs.js
@@ -2,11 +2,10 @@
2
2
 
3
3
  ![build status](https://travis-ci.org/exercism/reasonml.svg?branch=master)
4
4
 
5
- Exercism exercises in ReasonML.
6
-
7
5
  ## Setup
8
6
 
9
- The simplest way to install ReasonML is ...
7
+ First install npm (Node Package Manager) - you can do that from this site: https://www.npmjs.com/get-npm
8
+ Follow the instructions under https://reasonml.github.io/docs/en/quickstart-javascript.html to install ReasonML.
10
9
 
11
10
  ## Contributing
12
11
 
@@ -25,8 +24,17 @@ At the most basic level, Exercism is all about the tests. You can read more abou
25
24
  Test files should use the following format:
26
25
 
27
26
  ```
28
- # include the body of an example test
29
- ```
27
+ open Jest;
28
+ open Expect;
29
+
30
+ describe("Leap", () => {
31
+ test("year not divisible by 4: common year", () =>
32
+ expect(Leap.is_leap_year(2015)) |> toBe(false)
33
+ );
34
+ test("year divisible by 4, not divisible by 100: leap year", () =>
35
+ expect(Leap.is_leap_year(1996)) |> toBe(true)
36
+ );
37
+ })```
30
38
 
31
39
  ## Opening an Issue
32
40
 
@@ -60,8 +68,7 @@ Please see the documentation about [adding new exercises](https://github.com/exe
60
68
  Note that:
61
69
 
62
70
  - Each exercise must stand on its own. Do not reference files outside the exercise directory. They will not be included when the user fetches the exercise.
63
- - Exercises should use only the ReasonML core libraries.
71
+ - Exercises may use any library subject to licensing restrictions, make sure dependencies are updated in the package.json file for the exercise.
64
72
  - Exercises must conform to the Exercism-wide standards described in [the documentation](https://github.com/exercism/docs/tree/master/language-tracks/exercises).
65
- - Each exercise should have a test suite, an example solution, a template file for the real implementation and ... (anything else that needs to go with each exercise for this track). The CI build expects files to be named using the following convention: (describe the ReasonML convention for naming the various files that make up an exercise).
66
- - Please do not commit any configuration files or directories inside the exercise other than ...
73
+ - Each exercise should have a test suite, an example solution, and build configuration files for node and Bucklescript. The CI build expects ReasonML files to be named ending in .re
67
74
  - Be sure to add it to the appropriate place in the `config.json` file.
@@ -6,6 +6,41 @@
6
6
  "solution_pattern": "[Ee]xample",
7
7
  "test_pattern": "[Tt]est",
8
8
  "foregone": [],
9
- "exercises": null,
9
+ "exercises": [
10
+ {
11
+ "core": false,
12
+ "difficulty": 1,
13
+ "slug": "hello-world",
14
+ "topics": [
15
+ "setting_up_reasonml_dev_environment",
16
+ "strings"
17
+ ],
18
+ "unlocked_by": null,
19
+ "uuid": "63d72b81-c7a4-4a94-8224-69f4c68cc374"
20
+ },
21
+ {
22
+ "core": false,
23
+ "difficulty": 1,
24
+ "slug": "leap",
25
+ "topics": [
26
+ "booleans",
27
+ "integers"
28
+ ],
29
+ "unlocked_by": null,
30
+ "uuid": "94d63245-0c40-40e4-952f-83ee4ef87b33"
31
+ },
32
+ {
33
+ "core": false,
34
+ "difficulty": 2,
35
+ "slug": "space-age",
36
+ "topics": [
37
+ "floating point arithmetic",
38
+ "enum types",
39
+ "fun expressions"
40
+ ],
41
+ "unlocked_by": null,
42
+ "uuid": "9e8b7922-fd95-4797-af1b-736a6179821d"
43
+ }
44
+ ],
10
45
  "deprecated": []
11
46
  }
@@ -0,0 +1,5 @@
1
+ [Reason](https://reasonml.github.io/) is a syntax and toolchain geared towards Javascript programmers, based on the functional language [OCaml](https://ocaml.org/)
2
+
3
+ Being statically typed, it is likely to be safer than Javascript, but has powerful type inference which means type annotations do not get in your way.
4
+
5
+ The Exercism exercises will compile directly to JS, but Reason can be compiled via the OCaml toolchain to native code, IoS, Android, and even [microcontrollers](http://www.algo-prog.info/ocapic/web/index.php?id=ocapic)
@@ -0,0 +1,10 @@
1
+ You will need the Node Package Manager (npm) to install Reason. Follow the instructions [here](https://www.npmjs.com/get-npm)
2
+
3
+ Once you have npm, install Reason by:
4
+ ```
5
+ npm install -g bs-platform
6
+ ```
7
+
8
+ Reason has integration for a number of editors, see [here](https://reasonml.github.io/docs/en/editor-plugins.html#officially-supported-editors)
9
+
10
+ Some command line tools (including a REPL allowing you to evaluate Reason expressions in a shell) can be found [here](https://github.com/reasonml/reason-cli)
@@ -0,0 +1,4 @@
1
+ Exercism provides exercises and feedback but can be difficult to jump into for those learning Reason for the first time. These resources can help you get started:
2
+
3
+ [Reason home page](https://reasonml.github.io/)
4
+ [Programmer blog](https://lucasmreis.github.io/blog/learning-reasonml-part-1/)
@@ -0,0 +1,4 @@
1
+ [Reason home page](https://reasonml.github.io/)
2
+ [Reason Standard Library API](https://reasonml.github.io/api/index.html)
3
+ [Programmer blog](https://lucasmreis.github.io/blog/learning-reasonml-part-1/)
4
+ [Editor plugins list](https://reasonml.github.io/docs/en/editor-plugins.html#officially-supported-editors)
@@ -0,0 +1,3 @@
1
+ npm is used to run the tests. Follow the instructions [here](https://www.npmjs.com/get-npm) to install npm.
2
+
3
+ Once you have fetched an exercise with ```exercism fetch reasonml```
@@ -1,15 +1,38 @@
1
- # Hello World in ReasonML
1
+ # Hello World
2
2
 
3
- First exercise in exercism's ReasonML track!
3
+ The classical introductory exercise. Just say "Hello, World!".
4
4
 
5
- # Build + Watch
5
+ ["Hello, World!"](http://en.wikipedia.org/wiki/%22Hello,_world!%22_program) is
6
+ the traditional first program for beginning programming in a new language
7
+ or environment.
6
8
 
9
+ The objectives are simple:
10
+
11
+ - Write a function that returns the string "Hello, World!".
12
+ - Run the test suite and make sure that it succeeds.
13
+ - Submit your solution and check it at the website.
14
+
15
+ If everything goes well, you will be ready to fetch your first real exercise.
16
+
17
+ ## Getting Started
18
+ For installation and learning resources, refer to the
19
+ [exercism help page](http://exercism.io/languages/reasonml).
20
+
21
+ ## Building and testing
22
+ You will need the node package manager (npm) installed - download from [here](https://www.npmjs.com/get-npm)
23
+ There is one time setup for each exercise, which may take a few minutes:
7
24
  ```
8
- npm start
25
+ npm install
9
26
  ```
10
27
 
11
- # Test + Watch
28
+ Open two shells, and in the first, start the build process.
29
+ ```
30
+ npm start
31
+ ```
12
32
 
33
+ In the second, start the tests running.
13
34
  ```
14
35
  npm test
15
36
  ```
37
+
38
+ As you edit the code, the two processes will continually rebuild and rerun the tests.
@@ -0,0 +1,13 @@
1
+ # Leap in ReasonML
2
+
3
+ # Build + Watch
4
+
5
+ ```
6
+ npm start
7
+ ```
8
+
9
+ # Test + Watch
10
+
11
+ ```
12
+ npm test
13
+ ```
@@ -0,0 +1,17 @@
1
+ open Jest;
2
+ open Expect;
3
+
4
+ describe("Leap", () => {
5
+ test("year not divisible by 4: common year", () =>
6
+ expect(Leap.is_leap_year(2015)) |> toBe(false)
7
+ );
8
+ test("year divisible by 4, not divisible by 100: leap year", () =>
9
+ expect(Leap.is_leap_year(1996)) |> toBe(true)
10
+ );
11
+ test("year divisible by 100, not divisible by 400: common year", () =>
12
+ expect(Leap.is_leap_year(2100)) |> toBe(false)
13
+ );
14
+ test("year divisible by 400: leap year", () =>
15
+ expect(Leap.is_leap_year(2000)) |> toBe(true)
16
+ );
17
+ })
@@ -0,0 +1,30 @@
1
+ // This is the configuration file used by BuckleScript's build system bsb. Its documentation lives here: http://bucklescript.github.io/bucklescript/docson/#build-schema.json
2
+ // BuckleScript comes with its own parser for bsconfig.json, which is normal JSON, with the extra support of comments and trailing commas.
3
+ {
4
+ "name": "leap",
5
+ "version": "0.1.0",
6
+ "sources": [
7
+ {
8
+ "dir" : "src",
9
+ "subdirs" : true
10
+ },
11
+ {
12
+ "dir": "__tests__",
13
+ "type": "dev"
14
+ }
15
+ ],
16
+ "package-specs": {
17
+ "module": "commonjs",
18
+ "in-source": true
19
+ },
20
+ "suffix": ".bs.js",
21
+ "bs-dependencies": [
22
+ // add your dependencies here. You'd usually install them normally through `npm install my-dependency`. If my-dependency has a bsconfig.json too, then everything will work seamlessly.
23
+ ],
24
+ "bs-dev-dependencies": ["@glennsl/bs-jest"],
25
+ "warnings": {
26
+ "error" : "+101"
27
+ },
28
+ "namespace": true,
29
+ "refmt": 3
30
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "leap",
3
+ "version": "0.1.0",
4
+ "scripts": {
5
+ "build": "bsb -make-world",
6
+ "start": "bsb -make-world -w",
7
+ "clean": "bsb -clean-world",
8
+ "test": "jest --watchAll",
9
+ "test:ci": "jest --ci --bail --no-cache"
10
+ },
11
+ "keywords": [
12
+ "BuckleScript"
13
+ ],
14
+ "author": "",
15
+ "license": "MIT",
16
+ "devDependencies": {
17
+ "@glennsl/bs-jest": "^0.4.2",
18
+ "bs-platform": "^3.1.5"
19
+ }
20
+ }
@@ -0,0 +1,4 @@
1
+ let is_leap_year = (year) => {
2
+ year mod 400 == 0 || (year mod 4 == 0 && year mod 100 != 0);
3
+ }
4
+
@@ -0,0 +1,29 @@
1
+ open Jest;
2
+ open Expect;
3
+
4
+ describe("Space Age", () => {
5
+ test("age on Earth", () =>
6
+ expect(Space_age.age_on(Earth, 1000000000.0)) |> toBeSoCloseTo(31.69, ~digits=2)
7
+ );
8
+ test("age on Mercury", () =>
9
+ expect(Space_age.age_on(Mercury, 2134835688.0)) |> toBeSoCloseTo(280.88, ~digits=2)
10
+ );
11
+ test("age on Venus", () =>
12
+ expect(Space_age.age_on(Venus, 189839836.0)) |> toBeSoCloseTo(9.78, ~digits=2)
13
+ );
14
+ test("age on Mars", () =>
15
+ expect(Space_age.age_on(Mars, 2329871239.0)) |> toBeSoCloseTo(39.25, ~digits=2)
16
+ );
17
+ test("age on Jupiter", () =>
18
+ expect(Space_age.age_on(Jupiter, 901876382.0)) |> toBeSoCloseTo(2.41, ~digits=2)
19
+ );
20
+ test("age on Saturn", () =>
21
+ expect(Space_age.age_on(Saturn, 3000000000.0)) |> toBeSoCloseTo(3.23, ~digits=2)
22
+ );
23
+ test("age on Uranus", () =>
24
+ expect(Space_age.age_on(Uranus, 3210123456.0)) |> toBeSoCloseTo(1.21, ~digits=2)
25
+ );
26
+ test("age on Neptune", () =>
27
+ expect(Space_age.age_on(Neptune, 8210123456.0)) |> toBeSoCloseTo(1.58, ~digits=2)
28
+ );
29
+ })
@@ -0,0 +1,30 @@
1
+ // This is the configuration file used by BuckleScript's build system bsb. Its documentation lives here: http://bucklescript.github.io/bucklescript/docson/#build-schema.json
2
+ // BuckleScript comes with its own parser for bsconfig.json, which is normal JSON, with the extra support of comments and trailing commas.
3
+ {
4
+ "name": "leap",
5
+ "version": "0.1.0",
6
+ "sources": [
7
+ {
8
+ "dir" : "src",
9
+ "subdirs" : true
10
+ },
11
+ {
12
+ "dir": "__tests__",
13
+ "type": "dev"
14
+ }
15
+ ],
16
+ "package-specs": {
17
+ "module": "commonjs",
18
+ "in-source": true
19
+ },
20
+ "suffix": ".bs.js",
21
+ "bs-dependencies": [
22
+ // add your dependencies here. You'd usually install them normally through `npm install my-dependency`. If my-dependency has a bsconfig.json too, then everything will work seamlessly.
23
+ ],
24
+ "bs-dev-dependencies": ["@glennsl/bs-jest"],
25
+ "warnings": {
26
+ "error" : "+101"
27
+ },
28
+ "namespace": true,
29
+ "refmt": 3
30
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "leap",
3
+ "version": "0.1.0",
4
+ "scripts": {
5
+ "build": "bsb -make-world",
6
+ "start": "bsb -make-world -w",
7
+ "clean": "bsb -clean-world",
8
+ "test": "jest --watchAll",
9
+ "test:ci": "jest --ci --bail --no-cache"
10
+ },
11
+ "keywords": [
12
+ "BuckleScript"
13
+ ],
14
+ "author": "",
15
+ "license": "MIT",
16
+ "devDependencies": {
17
+ "@glennsl/bs-jest": "^0.4.2",
18
+ "bs-platform": "^3.1.5"
19
+ }
20
+ }
@@ -0,0 +1,26 @@
1
+ type planet =
2
+ | Mercury
3
+ | Venus
4
+ | Earth
5
+ | Mars
6
+ | Jupiter
7
+ | Saturn
8
+ | Neptune
9
+ | Uranus;
10
+
11
+ let earth_years = (seconds) => seconds /. 31557600.0;
12
+
13
+ let rel_years =
14
+ fun
15
+ | Mercury => 0.2408467
16
+ | Venus => 0.61519726
17
+ | Earth => 1.
18
+ | Mars => 1.8808158
19
+ | Jupiter => 11.862615
20
+ | Saturn => 29.447498
21
+ | Uranus => 84.016846
22
+ | Neptune => 164.79132;
23
+
24
+ let age_on = (planet, seconds) => {
25
+ earth_years(seconds) /. rel_years(planet)
26
+ };
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.2.1.158
4
+ version: 2.2.1.159
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katrina Owen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-09 00:00:00.000000000 Z
11
+ date: 2018-06-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip
@@ -11109,6 +11109,22 @@ files:
11109
11109
  - tracks/perl6/t/generated-tests.t
11110
11110
  - tracks/perl6/templates/module.mustache
11111
11111
  - tracks/perl6/templates/test.mustache
11112
+ - tracks/pharo/.git
11113
+ - tracks/pharo/.gitignore
11114
+ - tracks/pharo/.travis.yml
11115
+ - tracks/pharo/LICENSE
11116
+ - tracks/pharo/README.md
11117
+ - tracks/pharo/bin/fetch-configlet
11118
+ - tracks/pharo/config.json
11119
+ - tracks/pharo/config/exercise-readme-insert.md
11120
+ - tracks/pharo/config/exercise_readme.go.tmpl
11121
+ - tracks/pharo/config/maintainers.json
11122
+ - tracks/pharo/docs/ABOUT.md
11123
+ - tracks/pharo/docs/INSTALLATION.md
11124
+ - tracks/pharo/docs/LEARNING.md
11125
+ - tracks/pharo/docs/RESOURCES.md
11126
+ - tracks/pharo/docs/TESTS.md
11127
+ - tracks/pharo/img/.keep
11112
11128
  - tracks/php/.editorconfig
11113
11129
  - tracks/php/.git
11114
11130
  - tracks/php/.gitignore
@@ -12507,6 +12523,15 @@ files:
12507
12523
  - tracks/reasonml/exercises/hello-world/package-lock.json
12508
12524
  - tracks/reasonml/exercises/hello-world/package.json
12509
12525
  - tracks/reasonml/exercises/hello-world/src/HelloWorld.re
12526
+ - tracks/reasonml/exercises/leap/README.md
12527
+ - tracks/reasonml/exercises/leap/__tests__/Leap_test.re
12528
+ - tracks/reasonml/exercises/leap/bsconfig.json
12529
+ - tracks/reasonml/exercises/leap/package.json
12530
+ - tracks/reasonml/exercises/leap/src/Leap.re
12531
+ - tracks/reasonml/exercises/space-age/__tests__/Space_age_test.re
12532
+ - tracks/reasonml/exercises/space-age/bsconfig.json
12533
+ - tracks/reasonml/exercises/space-age/package.json
12534
+ - tracks/reasonml/exercises/space-age/src/Space_age.re
12510
12535
  - tracks/reasonml/img/.keep
12511
12536
  - tracks/ruby/.git
12512
12537
  - tracks/ruby/.github/stale.yml