trackler 2.1.0.41 → 2.1.0.42

Sign up to get free protection for your applications and to get access to all the features.
Files changed (124) hide show
  1. checksums.yaml +4 -4
  2. data/fixtures/tracks/fake/docs/STRAY.md +1 -0
  3. data/lib/trackler/doc_file.rb +88 -0
  4. data/lib/trackler/track.rb +6 -40
  5. data/lib/trackler/version.rb +1 -1
  6. data/tracks/bash/README.md +2 -2
  7. data/tracks/bash/config.json +1 -1
  8. data/tracks/c/README.md +1 -1
  9. data/tracks/c/config.json +1 -1
  10. data/tracks/ceylon/README.md +4 -4
  11. data/tracks/ceylon/config.json +1 -1
  12. data/tracks/clojure/README.org +3 -3
  13. data/tracks/clojure/config.json +1 -1
  14. data/tracks/cpp/README.md +2 -2
  15. data/tracks/cpp/config.json +1 -1
  16. data/tracks/cpp/docs/INSTALLATION.md +2 -2
  17. data/tracks/crystal/config.json +1 -1
  18. data/tracks/csharp/config.json +1 -1
  19. data/tracks/delphi/README.md +2 -2
  20. data/tracks/delphi/config.json +1 -1
  21. data/tracks/delphi/exercises/bowling/uBowlingTests.pas +14 -14
  22. data/tracks/ecmascript/config.json +1 -1
  23. data/tracks/elisp/README.org +4 -4
  24. data/tracks/elisp/config.json +1 -1
  25. data/tracks/elixir/README.md +3 -3
  26. data/tracks/elixir/config.json +1 -1
  27. data/tracks/erlang/README.md +2 -2
  28. data/tracks/erlang/config.json +2 -2
  29. data/tracks/factor/README.md +9 -9
  30. data/tracks/factor/config.json +1 -1
  31. data/tracks/fsharp/config.json +1 -1
  32. data/tracks/go/README.md +16 -16
  33. data/tracks/go/config.json +1 -1
  34. data/tracks/go/exercises/gigasecond/gigasecond_test.go +2 -2
  35. data/tracks/go/gen/gen.go +2 -2
  36. data/tracks/haskell/.gitignore +1 -1
  37. data/tracks/haskell/README.md +12 -8
  38. data/tracks/haskell/config.json +1 -1
  39. data/tracks/haskell/docs/EXERCISE_README_INSERT.md +1 -1
  40. data/tracks/idris/README.md +1 -1
  41. data/tracks/idris/config.json +1 -1
  42. data/tracks/java/POLICIES.md +7 -7
  43. data/tracks/java/README.md +7 -7
  44. data/tracks/java/bin/journey-test.sh +1 -1
  45. data/tracks/java/config.json +1 -1
  46. data/tracks/java/docs/MAINTAINING.md +3 -20
  47. data/tracks/java/docs/TESTS.md +3 -3
  48. data/tracks/java/exercises/all-your-base/src/test/java/BaseConverterTest.java +23 -20
  49. data/tracks/java/exercises/hello-world/GETTING_STARTED.md +1 -1
  50. data/tracks/java/exercises/hello-world/TUTORIAL.md +2 -2
  51. data/tracks/javascript/config.json +1 -1
  52. data/tracks/julia/.travis.yml +0 -2
  53. data/tracks/julia/config.json +9 -0
  54. data/tracks/julia/exercises/custom-set/example.jl +1 -1
  55. data/tracks/julia/exercises/luhn/example.jl +1 -1
  56. data/tracks/julia/exercises/robot-name/HINTS.md +17 -0
  57. data/tracks/julia/exercises/robot-name/example.jl +14 -0
  58. data/tracks/julia/exercises/robot-name/robot-name.jl +8 -0
  59. data/tracks/julia/exercises/robot-name/runtests.jl +69 -0
  60. data/tracks/kotlin/README.md +7 -7
  61. data/tracks/kotlin/config.json +1 -1
  62. data/tracks/kotlin/docs/TESTS.md +3 -3
  63. data/tracks/kotlin/exercises/hello-world/GETTING_STARTED.md +1 -1
  64. data/tracks/kotlin/exercises/hello-world/TUTORIAL.md +1 -1
  65. data/tracks/lfe/README.md +2 -2
  66. data/tracks/lfe/config.json +1 -1
  67. data/tracks/lisp/README.md +1 -1
  68. data/tracks/lisp/config.json +2 -2
  69. data/tracks/lua/README.md +9 -9
  70. data/tracks/lua/config.json +1 -1
  71. data/tracks/lua/exercises/hamming/hamming_spec.lua +15 -7
  72. data/tracks/lua/exercises/raindrops/raindrops_spec.lua +46 -14
  73. data/tracks/mips/config.json +1 -1
  74. data/tracks/objective-c/Dangerfile +1 -1
  75. data/tracks/objective-c/README.md +1 -1
  76. data/tracks/objective-c/config.json +1 -1
  77. data/tracks/ocaml/README.md +2 -2
  78. data/tracks/ocaml/config.json +1 -1
  79. data/tracks/ocaml/docs/EXERCISE_README_INSERT.md +1 -1
  80. data/tracks/ocaml/tools/test-generator/README.md +2 -2
  81. data/tracks/perl5/README.md +1 -1
  82. data/tracks/perl5/config.json +1 -1
  83. data/tracks/perl6/README.md +2 -2
  84. data/tracks/perl6/config.json +1 -1
  85. data/tracks/perl6/exercises/all-your-base/all-your-base.t +43 -32
  86. data/tracks/perl6/exercises/all-your-base/example.yaml +19 -9
  87. data/tracks/php/config.json +1 -1
  88. data/tracks/pony/README.md +2 -2
  89. data/tracks/pony/config.json +1 -1
  90. data/tracks/powershell/README.md +1 -1
  91. data/tracks/powershell/config.json +1 -1
  92. data/tracks/purescript/README.md +5 -5
  93. data/tracks/purescript/config.json +1 -1
  94. data/tracks/r/README.md +3 -3
  95. data/tracks/r/config.json +1 -1
  96. data/tracks/racket/README.md +2 -2
  97. data/tracks/racket/config.json +1 -1
  98. data/tracks/ruby/README.md +9 -9
  99. data/tracks/ruby/config.json +1 -1
  100. data/tracks/rust/config.json +1 -1
  101. data/tracks/rust/exercises/gigasecond/src/lib.rs +7 -0
  102. data/tracks/rust/exercises/protein-translation/example.rs +11 -22
  103. data/tracks/rust/exercises/protein-translation/tests/proteins.rs +56 -36
  104. data/tracks/scala/config.json +1 -1
  105. data/tracks/scala/exercises/all-your-base/src/test/scala/AllYourBaseTest.scala +46 -64
  106. data/tracks/scala/exercises/rna-transcription/example.scala +1 -3
  107. data/tracks/scala/exercises/rna-transcription/src/test/scala/RnaTranscriptionTest.scala +19 -23
  108. data/tracks/scala/exercises/scrabble-score/example.scala +2 -2
  109. data/tracks/scala/exercises/scrabble-score/src/test/scala/ScrabbleScoreTest.scala +37 -16
  110. data/tracks/scala/testgen/src/main/scala/AllYourBaseTestGenerator.scala +32 -42
  111. data/tracks/scala/testgen/src/main/scala/RnaTranscriptionTestGenerator.scala +34 -0
  112. data/tracks/scala/testgen/src/main/scala/ScrabbleScoreTestGenerator.scala +15 -0
  113. data/tracks/sml/README.md +1 -3
  114. data/tracks/sml/config.json +1 -1
  115. data/tracks/sml/docs/EXERCISE_README_INSERT.md +1 -1
  116. data/tracks/swift/config.json +1 -1
  117. data/tracks/typescript/README.md +1 -1
  118. data/tracks/typescript/config.json +1 -1
  119. data/tracks/vimscript/README.md +5 -5
  120. data/tracks/vimscript/config.json +8 -1
  121. data/tracks/vimscript/exercises/largest-series-product/example.vim +31 -0
  122. data/tracks/vimscript/exercises/largest-series-product/largest_series_product.vader +95 -0
  123. data/tracks/vimscript/exercises/largest-series-product/largest_series_product.vim +17 -0
  124. metadata +13 -2
@@ -1,7 +1,7 @@
1
1
  function luhn(id::AbstractString)
2
2
  id = split(replace(id, ' ', ""), "")
3
3
  length(id) < 2 && return false
4
- all(isdigit, id) || return false
4
+ all(all(isdigit, s) for s in id) || return false
5
5
 
6
6
  numbers = Int[]
7
7
  for val in id
@@ -0,0 +1,17 @@
1
+ This exercise introduces work with Julia's [type system](http://docs.julialang.org/en/stable/manual/types/)
2
+ and random [numbers](http://docs.julialang.org/en/stable/stdlib/numbers/).
3
+
4
+ Let's create a structure that will describe our robots
5
+ and then use it to create new instances and to work with them.
6
+
7
+ Generate the robot's name using randomness and don't worry about
8
+ collisions, tests sometimes will fail and that's alright.
9
+
10
+ Resetting the robot to the factory settings is like a surgery,
11
+ so we declare a method that will reset the robot's settings.
12
+ Take a note that skeleton method reset! has an exclamation mark suffix
13
+ meaning that the method changes given argument's contents.
14
+
15
+ Futhermore, experiment with testing and check out the situations when
16
+ there are lots of collisions (like when you generate name one thousand times).
17
+
@@ -0,0 +1,14 @@
1
+ # http://docs.julialang.org/en/stable/stdlib/numbers/#random-numbers
2
+
3
+ new_name() = join(map(x->Char(x), rand(65:90, 2))) * repr(rand(100:999))
4
+
5
+ mutable struct Robot
6
+ name::AbstractString
7
+
8
+ Robot() = new(new_name())
9
+ end
10
+
11
+ function reset!(instance::Robot)
12
+ instance.name = new_name()
13
+ instance
14
+ end
@@ -0,0 +1,8 @@
1
+ type Robot
2
+
3
+ end
4
+
5
+ function reset!(instance::Robot)
6
+
7
+ end
8
+
@@ -0,0 +1,69 @@
1
+ using Base.Test
2
+
3
+ include("robot-name.jl")
4
+
5
+ # Random names means a risk of collisions.
6
+ history = []
7
+
8
+ isname(x) = ismatch(r"^[A-Z]{2}[0-9]{3}$", x)
9
+
10
+ @testset "one robot" begin
11
+ r1 = Robot()
12
+ push!(history, r1.name)
13
+
14
+ @testset "name of robot is valid" begin
15
+ @test isname(r1.name)
16
+ end
17
+
18
+ @testset "names of robot instance are valid and unique in history" for i=1:100
19
+ reset!(r1)
20
+ @test isname(r1.name)
21
+ @test !in(r1.name, history)
22
+ push!(history, r1.name)
23
+ end
24
+ end
25
+
26
+ @testset "two robots" begin
27
+ r2 = Robot()
28
+ r3 = Robot()
29
+
30
+ @testset "names of robots are valid" begin
31
+ @test isname(r2.name)
32
+ @test isname(r3.name)
33
+ end
34
+
35
+ @testset "names of robots are not equal" begin
36
+ @test r2.name != r3.name
37
+ end
38
+
39
+ @testset "names of both robots are unique in history" begin
40
+ @test !in(r2.name, history)
41
+ @test !in(r3.name, history)
42
+ end
43
+
44
+ push!(history, r2.name)
45
+ push!(history, r3.name)
46
+ end
47
+
48
+ @testset "many robots" begin
49
+ robots = []
50
+
51
+ for i=1:10
52
+ push!(robots, Robot())
53
+
54
+ @testset "name of robot is valid and unique in history" begin
55
+ @test isname(robots[i].name)
56
+ @test !in(robots[i].name, history)
57
+ end
58
+
59
+ push!(history, robots[i].name)
60
+ end
61
+
62
+ @testset "fresh names of reset robots are valid and unique in history" for r in robots
63
+ reset!(r)
64
+ @test isname(r.name)
65
+ @test !in(r.name, history)
66
+ push!(history, r.name)
67
+ end
68
+ end
69
+
@@ -1,4 +1,4 @@
1
- # xkotlin [![Build Status](https://travis-ci.org/exercism/xkotlin.svg?branch=master)](https://travis-ci.org/exercism/xkotlin)
1
+ # kotlin [![Build Status](https://travis-ci.org/exercism/kotlin.svg?branch=master)](https://travis-ci.org/exercism/kotlin)
2
2
 
3
3
  Source for Exercism Exercises in Kotlin.
4
4
 
@@ -32,13 +32,13 @@ To submit a fix for an existing exercise or port an exercise to Kotlin with the
32
32
  1. **Ensure you have the basic Java tooling installed:** JDK 1.8+, an editor and Gradle 2.x.
33
33
 
34
34
  (see [exercism.io: Installing Kotlin](http://exercism.io/languages/kotlin/installing))
35
- - **Setup a branch on a fork of [exercism/xkotlin](https://github.com/exercism/xkotlin) on your computer.**
35
+ - **Setup a branch on a fork of [exercism/kotlin](https://github.com/exercism/kotlin) on your computer.**
36
36
 
37
37
  See [GitHub Help: Forking](https://help.github.com/articles/fork-a-repo/). Use those instructions (in conjunction with [Exercism Contributing Guide](https://github.com/exercism/x-common/blob/master/CONTRIBUTING.md#git-basics)) to:
38
38
  * "fork" a repository on GitHub;
39
39
  - install `git`;
40
40
  - "clone" a copy of your fork;
41
- - configure an "upstream remote" (in this case, `exercism/xkotlin`);
41
+ - configure an "upstream remote" (in this case, `exercism/kotlin`);
42
42
  - create a branch to house your work
43
43
  - **Write the codes.** Do your work on that branch you just created.
44
44
 
@@ -59,8 +59,8 @@ To submit a fix for an existing exercise or port an exercise to Kotlin with the
59
59
 
60
60
  There are two objectives to the design of this build:
61
61
 
62
- 1. when a problem is built from within the xkotlin repo (i.e. when you, the contributor, are developing the exercise), the tests run against the "example" code;
63
- 2. when a problem is built outside the xkotlin repo (when a participant is solving the exercise), the tests run against the "main" code.
62
+ 1. when a problem is built from within the kotlin repo (i.e. when you, the contributor, are developing the exercise), the tests run against the "example" code;
63
+ 2. when a problem is built outside the kotlin repo (when a participant is solving the exercise), the tests run against the "main" code.
64
64
 
65
65
  This repo is a multi-project gradle build.
66
66
 
@@ -109,10 +109,10 @@ and if you review the logs of your x-api, you'll find:
109
109
  2015-09-06 15:21:01 - JSON::GeneratorError - source sequence is illegal/malformed utf-8:
110
110
  ```
111
111
 
112
- This is because some files generated by the build can't be served from the x-api. This is by design: the CLI does not serve binaries. To fix this, simply make sure you do a clean in your `xkotlin` repo before you fetch:
112
+ This is because some files generated by the build can't be served from the x-api. This is by design: the CLI does not serve binaries. To fix this, simply make sure you do a clean in your `kotlin` repo before you fetch:
113
113
 
114
114
  ```
115
- cd ~/workspace/exercism/xkotlin/exercises
115
+ cd ~/workspace/exercism/kotlin/exercises
116
116
  gradle clean
117
117
  cd ~/workspace/exercism/exercises
118
118
  exercism fetch kotlin bob
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "slug": "kotlin",
3
3
  "language": "Kotlin",
4
- "repository": "https://github.com/exercism/xkotlin",
4
+ "repository": "https://github.com/exercism/kotlin",
5
5
  "active": true,
6
6
  "deprecated": [
7
7
  "accumulate",
@@ -37,7 +37,7 @@ Choose your operating system:
37
37
  C:\Users\JohnDoe>gradle test
38
38
  ```
39
39
  *(Don't worry about the tests failing, at first, this is how you begin each exercise.)*
40
- 5. Solve the exercise. Find and work through the `GETTING_STARTED.md` guide ([view on GitHub](https://github.com/exercism/xkotlin/blob/master/exercises/hello-world/GETTING_STARTED.md)).
40
+ 5. Solve the exercise. Find and work through the `GETTING_STARTED.md` guide ([view on GitHub](https://github.com/exercism/kotlin/blob/master/exercises/hello-world/GETTING_STARTED.md)).
41
41
 
42
42
 
43
43
  Good luck! Have fun!
@@ -70,7 +70,7 @@ If you get stuck, at any point, don't forget to reach out for [help](http://exer
70
70
  $ gradle test
71
71
  ```
72
72
  *(Don't worry about the tests failing, at first, this is how you begin each exercise.)*
73
- 4. Solve the exercise. Find and work through the `GETTING_STARTED.md` guide ([view on GitHub](https://github.com/exercism/xkotlin/blob/master/exercises/hello-world/GETTING_STARTED.md)).
73
+ 4. Solve the exercise. Find and work through the `GETTING_STARTED.md` guide ([view on GitHub](https://github.com/exercism/kotlin/blob/master/exercises/hello-world/GETTING_STARTED.md)).
74
74
 
75
75
  Good luck! Have fun!
76
76
 
@@ -102,7 +102,7 @@ If you get stuck, at any point, don't forget to reach out for [help](http://exer
102
102
  $ gradle test
103
103
  ```
104
104
  *(Don't worry about the tests failing, at first, this is how you begin each exercise.)*
105
- 4. Solve the exercise. Find and work through the `GETTING_STARTED.md` guide ([view on GitHub](https://github.com/exercism/xkotlin/blob/master/exercises/hello-world/GETTING_STARTED.md)).
105
+ 4. Solve the exercise. Find and work through the `GETTING_STARTED.md` guide ([view on GitHub](https://github.com/exercism/kotlin/blob/master/exercises/hello-world/GETTING_STARTED.md)).
106
106
 
107
107
  Good luck! Have fun!
108
108
 
@@ -5,7 +5,7 @@ This guide picks-up where [Running the Tests (in Kotlin)](http://exercism.io/lan
5
5
  left off. If you haven't reviewed those instructions, do so now.
6
6
 
7
7
  Need more information? A **step-by-step tutorial** is available in this directory at TUTORIAL.md or you can read
8
- the [HTML version](https://github.com/exercism/xkotlin/blob/master/exercises/hello-world/TUTORIAL.md).
8
+ the [HTML version](https://github.com/exercism/kotlin/blob/master/exercises/hello-world/TUTORIAL.md).
9
9
 
10
10
  The following instructions work equally well on Windows, Mac OS X and Linux.
11
11
 
@@ -1,5 +1,5 @@
1
1
  NOTE: You can also view the HTML version of this file here:
2
- https://github.com/exercism/xkotlin/blob/master/exercises/hello-world/TUTORIAL.md
2
+ https://github.com/exercism/kotlin/blob/master/exercises/hello-world/TUTORIAL.md
3
3
 
4
4
  * [Solving "Hello, World!"](#solving-hello-world)
5
5
  * [Reading Gradle output](#reading-gradle-output)
data/tracks/lfe/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # xLFE
2
- [![Build Status](https://travis-ci.org/exercism/xlfe.svg?branch=master)](https://travis-ci.org/exercism/xlfe)
3
- [![Build status](https://ci.appveyor.com/api/projects/status/2i4og4ghwwlynx29/branch/master?svg=true)](https://ci.appveyor.com/project/yurrriq/xlfe/branch/master)
2
+ [![Build Status](https://travis-ci.org/exercism/lfe.svg?branch=master)](https://travis-ci.org/exercism/lfe)
3
+ [![Build status](https://ci.appveyor.com/api/projects/status/2i4og4ghwwlynx29/branch/master?svg=true)](https://ci.appveyor.com/project/yurrriq/lfe/branch/master)
4
4
 
5
5
  Exercism problems in Lisp Flavoured Erlang.
6
6
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "slug": "lfe",
3
3
  "language": "Lisp Flavoured Erlang (LFE)",
4
- "repository": "https://github.com/exercism/xlfe",
4
+ "repository": "https://github.com/exercism/lfe",
5
5
  "active": true,
6
6
  "deprecated": [
7
7
  "accumulate"
@@ -1,6 +1,6 @@
1
1
  # xLisp
2
2
 
3
- [![Build Status](https://travis-ci.org/exercism/xlisp.svg)](https://travis-ci.org/exercism/xlisp)
3
+ [![Build Status](https://travis-ci.org/exercism/common-lisp.svg)](https://travis-ci.org/exercism/common-lisp)
4
4
 
5
5
  Exercism exercises in Lisp
6
6
 
@@ -1,7 +1,7 @@
1
1
  {
2
- "slug": "lisp",
2
+ "slug": "common-lisp",
3
3
  "language": "Common Lisp",
4
- "repository": "https://github.com/exercism/xlisp",
4
+ "repository": "https://github.com/exercism/common-lisp",
5
5
  "active": true,
6
6
  "exercises": [
7
7
  {
data/tracks/lua/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # xLua
1
+ # Lua
2
2
 
3
- [![Build Status](https://travis-ci.org/exercism/xlua.svg?branch=master)](https://travis-ci.org/exercism/xlua)
3
+ [![Build Status](https://travis-ci.org/exercism/lua.svg?branch=master)](https://travis-ci.org/exercism/lua)
4
4
 
5
5
  Exercism exercises in Lua
6
6
 
@@ -10,15 +10,15 @@ Install Lua, Luarocks, and the Busted testing framework according to the
10
10
  [installation instructions][1] for your platform.
11
11
 
12
12
  To contribute a patch you will need a GitHub account and you will need to fork
13
- the *exercism/xlua* repo to your account.
14
- Clone your fork with the command: `git clone https://github.com/<your_username>/xlua`.
15
- Create your patch and open a pull request to the exercism/xlua repo.
13
+ the *exercism/lua* repo to your account.
14
+ Clone your fork with the command: `git clone https://github.com/<your_username>/lua`.
15
+ Create your patch and open a pull request to the exercism/lua repo.
16
16
 
17
17
  See the GitHub Help for [forking a repo][2] and [creating a pull request][3]
18
18
  if you are unfamiliar with this process.
19
19
 
20
20
  To contribute a new exercise, create a folder named after the exercise within the
21
- *xlua/exercises* directory. Create your files for a new test, test class and the implementation.
21
+ *lua/exercises* directory. Create your files for a new test, test class and the implementation.
22
22
 
23
23
  For example, for the [Bob][4] exercise:
24
24
 
@@ -33,7 +33,7 @@ Run the test
33
33
 
34
34
  $ busted .
35
35
 
36
- Rename *bob.lua* to *example.lua*, and add the exercise to the [xlua/config.json][5] file.
36
+ Rename *bob.lua* to *example.lua*, and add the exercise to the [lua/config.json][5] file.
37
37
 
38
38
  $ tree bob
39
39
  bob
@@ -59,8 +59,8 @@ The Lua icon is inspired by the [Lua logo][9], which was designed by Alexandre N
59
59
  [1]: http://exercism.io/languages/lua/installing
60
60
  [2]: https://help.github.com/articles/fork-a-repo/
61
61
  [3]: https://help.github.com/articles/creating-a-pull-request/
62
- [4]: https://github.com/exercism/xlua/tree/master/exercises/bob
63
- [5]: https://github.com/exercism/xlua/blob/master/config.json
62
+ [4]: https://github.com/exercism/lua/tree/master/exercises/bob
63
+ [5]: https://github.com/exercism/lua/blob/master/config.json
64
64
  [6]: https://github.com/exercism/docs/tree/master/contributing-to-language-tracks
65
65
  [7]: https://github.com/exercism/docs/blob/master/contributing-to-language-tracks/pull-request-guidelines.md
66
66
  [8]: http://exercism.io/languages/lua/resources
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "slug": "lua",
3
3
  "language": "Lua",
4
- "repository": "https://github.com/exercism/xlua",
4
+ "repository": "https://github.com/exercism/lua",
5
5
  "active": true,
6
6
  "test_pattern": ".*spec[.]lua$",
7
7
  "exercises": [
@@ -1,7 +1,7 @@
1
1
  local compute = require('hamming').compute
2
2
 
3
3
  describe('hamming', function ()
4
- it('no difference between identical strands', function ()
4
+ it('identical strands', function ()
5
5
  assert.are.equal(0, compute('A', 'A'))
6
6
  end)
7
7
 
@@ -9,22 +9,26 @@ describe('hamming', function ()
9
9
  assert.are.equal(0, compute('GGACTGA', 'GGACTGA'))
10
10
  end)
11
11
 
12
- it('complete hamming distance of for single nucleotide strand', function ()
12
+ it('complete distance in single nucleotide strands', function ()
13
13
  assert.are.equal(1, compute('A', 'G'))
14
14
  end)
15
15
 
16
- it('complete hamming distance of for small strand', function ()
16
+ it('complete distance in small strands', function ()
17
17
  assert.are.equal(2, compute('AG', 'CT'))
18
18
  end)
19
19
 
20
- it('small hamming distance', function ()
20
+ it('small distance in small strands', function ()
21
21
  assert.are.equal(1, compute('AT', 'CT'))
22
22
  end)
23
23
 
24
- it('small hamming distance in longer strand', function ()
24
+ it('small distance', function ()
25
25
  assert.are.equal(1, compute('GGACG', 'GGTCG'))
26
26
  end)
27
27
 
28
+ it('small distance in long strands', function ()
29
+ assert.are.equal(2, compute('ACCAGGG', 'ACTATGG'))
30
+ end)
31
+
28
32
  it('non unique character in first strand', function ()
29
33
  assert.are.equal(1, compute('AGA', 'AGG'))
30
34
  end)
@@ -33,11 +37,15 @@ describe('hamming', function ()
33
37
  assert.are.equal(1, compute('AGG', 'AGA'))
34
38
  end)
35
39
 
36
- it('large hamming distance', function ()
40
+ it('same nucleotides in different positions', function ()
41
+ assert.are.equal(2, compute('TAG', 'GAT'))
42
+ end)
43
+
44
+ it('large distance', function ()
37
45
  assert.are.equal(4, compute('GATACA', 'GCATAA'))
38
46
  end)
39
47
 
40
- it('hamming distance in very long strand', function ()
48
+ it('large distance in off-by-one strand', function ()
41
49
  assert.are.equal(9, compute('GGACGGATTCTG', 'AGGACGGATTCT'))
42
50
  end)
43
51
 
@@ -1,43 +1,75 @@
1
1
  local raindrops = require('raindrops')
2
2
 
3
3
  describe('raindrops', function()
4
- it('should return the number as a string if it does not have 3, 5, or 7 as a prime factor', function()
4
+ it('the sound for 1 is 1', function()
5
5
  assert.equal('1', raindrops(1))
6
- assert.equal('2', raindrops(2))
7
- assert.equal('52', raindrops(52))
8
6
  end)
9
7
 
10
- it('should return "Pling" if the number has 3 as a prime factor', function()
8
+ it('the sound for 3 is Pling', function()
11
9
  assert.equal('Pling', raindrops(3))
10
+ end)
11
+
12
+ it('the sound for 5 is Plang', function()
13
+ assert.equal('Plang', raindrops(5))
14
+ end)
15
+
16
+ it('the sound for 7 is Plong', function()
17
+ assert.equal('Plong', raindrops(7))
18
+ end)
19
+
20
+ it('the sound for 6 is Pling as it has a factor 3', function()
12
21
  assert.equal('Pling', raindrops(6))
22
+ end)
23
+
24
+ it('2 to the power 3 does not make a raindrop sound as 3 is the exponent not the base', function()
25
+ assert.equal('8', raindrops(8))
26
+ end)
27
+
28
+ it('the sound for 9 is Pling as it has a factor 3', function()
13
29
  assert.equal('Pling', raindrops(9))
14
30
  end)
15
31
 
16
- it('should return "Plang" if the number has 5 as a prime factor', function()
17
- assert.equal('Plang', raindrops(5))
32
+ it('the sound for 10 is Plang as it has a factor 5', function()
18
33
  assert.equal('Plang', raindrops(10))
19
- assert.equal('Plang', raindrops(25))
20
34
  end)
21
35
 
22
- it('should return "Plong" if the number has 7 as a prime factor', function()
36
+ it('the sound for 14 is Plong as it has a factor 7', function()
23
37
  assert.equal('Plong', raindrops(7))
24
- assert.equal('Plong', raindrops(14))
25
- assert.equal('Plong', raindrops(49))
26
38
  end)
27
39
 
28
- it('should return "PlingPlang" if the number has both 3 and 5 as a prime factors', function()
40
+ it('the sound for 15 is PlingPlang as it has a factor 3 and 5', function()
29
41
  assert.equal('PlingPlang', raindrops(15))
30
42
  end)
31
43
 
32
- it('should return "PlingPlong" if the number has both 3 and 7 as a prime factors', function()
44
+ it('the sound for 21 is PlingPlong as it has factors 3 and 7', function()
33
45
  assert.equal('PlingPlong', raindrops(21))
34
46
  end)
35
47
 
36
- it('should return "PlangPlong" if the number has both 5 and 7 as a prime factors', function()
48
+ it('the sound for 25 is Plang as it has a factor 5', function()
49
+ assert.equal('Plang', raindrops(25))
50
+ end)
51
+
52
+ it('the sound for 27 is Pling as it has a factor 3', function()
53
+ assert.equal('Pling', raindrops(27))
54
+ end)
55
+
56
+ it('the sound for 35 is PlangPlong as it has factors 5 and 7', function()
37
57
  assert.equal('PlangPlong', raindrops(35))
38
58
  end)
39
59
 
40
- it('should return "PlingPlangPlong" if the number has 3, 5, and 7 as a prime factors', function()
60
+ it('the sound for 49 is Plong as it has a factor 7', function()
61
+ assert.equal('Plong', raindrops(49))
62
+ end)
63
+
64
+ it('the sound for 52 is 52', function()
65
+ assert.equal('52', raindrops(52))
66
+ end)
67
+
68
+ it('the sound for 105 is PlingPlangPlong as it has factors 3, 5 and 7', function()
41
69
  assert.equal('PlingPlangPlong', raindrops(105))
42
70
  end)
71
+
72
+ it('the sound for 3125 is Plang as it has a factor 5', function()
73
+ assert.equal('Plang', raindrops(3125))
74
+ end)
43
75
  end)
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "slug": "mips",
3
3
  "language": "MIPS Assembly",
4
- "repository": "https://github.com/exercism/xmips",
4
+ "repository": "https://github.com/exercism/mips",
5
5
  "active": true,
6
6
  "test_pattern": "runner.mips",
7
7
  "deprecated": [
@@ -31,7 +31,7 @@ json = JSON.parse contents
31
31
  violations = json["violation"]
32
32
  violations.each do |object|
33
33
  shortFile = object["path"]
34
- shortFile.sub! "/Users/travis/build/exercism/xobjective-c/", ''
34
+ shortFile.sub! "/Users/travis/build/exercism/objective-c/", ''
35
35
  shortFile = shortFile.to_s || ''
36
36
  msg = object["rule"].to_s || ''
37
37
  line = object["startLine"] || 1
@@ -1,4 +1,4 @@
1
- # xObjective-C
1
+ # Exercism Objective-C Track
2
2
 
3
3
  Exercism exercises in Objective-C
4
4
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "slug": "objective-c",
3
3
  "language": "Objective-C",
4
- "repository": "https://github.com/exercism/xobjective-c",
4
+ "repository": "https://github.com/exercism/objective-c",
5
5
  "active": true,
6
6
  "exercises": [
7
7
  {
@@ -19,7 +19,7 @@ opam install core ounit react
19
19
 
20
20
  ## Running Tests
21
21
 
22
- To run all the tests, type `make` from the top level xocaml directory.
22
+ To run all the tests, type `make` from the top level ocaml directory.
23
23
 
24
24
  To run tests for an individual exercise, `make test-assignment ASSIGNMENT=luhn`
25
25
 
@@ -60,7 +60,7 @@ is documentation [here](tools/test-generator/README.md).
60
60
 
61
61
  ## Feedback
62
62
 
63
- If you find this documentation is inaccurate or incomplete, or can be improved in any way, please don't hesitate to raise an [issue](https://github.com/exercism/xocaml/issues) or submit a pull request.
63
+ If you find this documentation is inaccurate or incomplete, or can be improved in any way, please don't hesitate to raise an [issue](https://github.com/exercism/ocaml/issues) or submit a pull request.
64
64
 
65
65
 
66
66
  ### OCaml icon
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "slug": "ocaml",
3
3
  "language": "OCaml",
4
- "repository": "https://github.com/exercism/xocaml",
4
+ "repository": "https://github.com/exercism/ocaml",
5
5
  "active": true,
6
6
  "exercises": [
7
7
  {
@@ -23,7 +23,7 @@ opam install utop
23
23
  Consult [utop](https://github.com/diml/utop/blob/master/README.md) for more detail.
24
24
 
25
25
  ## Feedback, Issues, Pull Requests
26
- The [exercism/xocaml](https://github.com/exercism/xocaml) repository on
26
+ The [exercism/ocaml](https://github.com/exercism/ocaml) repository on
27
27
  GitHub is the home for all of the Ocaml exercises.
28
28
 
29
29
  If you have feedback about an exercise, or want to help implementing a new
@@ -17,9 +17,9 @@ This will build and run the unit tests
17
17
  The test generator should be run whenever test canonical data is updated.
18
18
 
19
19
  You will need the latest version of x-common checked out locally, at the same level as your
20
- xocaml repo.
20
+ ocaml repo.
21
21
 
22
- Please note: running will overwrite tests in the xocaml/exercises folders (this is the default, there
22
+ Please note: running will overwrite tests in the ocaml/exercises folders (this is the default, there
23
23
  is a command line option to write the tests to a different folder - run test_gen.native --help).
24
24
 
25
25
  To run, type test_gen.native at the command line.
@@ -1,4 +1,4 @@
1
- # xPerl5
1
+ # Exercism Perl 5 Track
2
2
 
3
3
  [![Gitter](https://badges.gitter.im/exercism/xperl.svg)](https://gitter.im/exercism/xperl?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
4
4
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "slug": "perl5",
3
3
  "language": "Perl 5",
4
- "repository": "https://github.com/exercism/xperl5",
4
+ "repository": "https://github.com/exercism/perl5",
5
5
  "active": true,
6
6
  "test_pattern": ".*\\.t$",
7
7
  "deprecated": [
@@ -1,6 +1,6 @@
1
- # xPerl6
1
+ # Exercism Perl 6 Track
2
2
 
3
- [![Build Status](https://travis-ci.org/exercism/xperl6.svg?branch=master)](https://travis-ci.org/exercism/xperl6) [![Gitter](https://badges.gitter.im/exercism/xperl.svg)](https://gitter.im/exercism/xperl?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
3
+ [![Build Status](https://travis-ci.org/exercism/perl6.svg?branch=master)](https://travis-ci.org/exercism/perl6) [![Gitter](https://badges.gitter.im/exercism/perl.svg)](https://gitter.im/exercism/perl?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
4
4
 
5
5
  Exercism exercises in Perl 6
6
6
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "slug": "perl6",
3
3
  "language": "Perl 6",
4
- "repository": "https://github.com/exercism/xperl6",
4
+ "repository": "https://github.com/exercism/perl6",
5
5
  "checklist_issue": 30,
6
6
  "active": true,
7
7
  "test_pattern": ".*\\.t$",