trackler 2.0.6.12 → 2.0.6.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/lib/trackler/version.rb +1 -1
  3. data/tracks/c/docs/ABOUT.md +5 -0
  4. data/tracks/c/docs/INSTALLATION.md +5 -6
  5. data/tracks/c/docs/LEARNING.md +34 -0
  6. data/tracks/c/docs/RESOURCES.md +3 -0
  7. data/tracks/csharp/config.json +9 -0
  8. data/tracks/csharp/exercises/pov/Example.cs +125 -0
  9. data/tracks/csharp/exercises/pov/PovTest.cs +160 -0
  10. data/tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs +12 -6
  11. data/tracks/go/exercises/meetup/cases_test.go +0 -0
  12. data/tracks/go/exercises/raindrops/cases_test.go +0 -0
  13. data/tracks/go/exercises/rna-transcription/cases_test.go +0 -0
  14. data/tracks/go/exercises/roman-numerals/cases_test.go +0 -0
  15. data/tracks/go/exercises/word-count/cases_test.go +0 -0
  16. data/tracks/go/gen/gen.go +1 -1
  17. data/tracks/java/docs/MAINTAINING.md +11 -6
  18. data/tracks/java/exercises/meetup/src/test/java/MeetupTest.java +91 -91
  19. data/tracks/java/exercises/settings.gradle +1 -0
  20. data/tracks/kotlin/config.json +2 -1
  21. data/tracks/kotlin/exercises/_template/build.gradle +1 -1
  22. data/tracks/kotlin/exercises/accumulate/build.gradle +1 -1
  23. data/tracks/kotlin/exercises/acronym/build.gradle +1 -1
  24. data/tracks/kotlin/exercises/allergies/build.gradle +1 -1
  25. data/tracks/kotlin/exercises/anagram/build.gradle +1 -1
  26. data/tracks/kotlin/exercises/atbash-cipher/build.gradle +1 -1
  27. data/tracks/kotlin/exercises/beer-song/build.gradle +1 -1
  28. data/tracks/kotlin/exercises/binary-search/build.gradle +1 -1
  29. data/tracks/kotlin/exercises/binary/build.gradle +1 -1
  30. data/tracks/kotlin/exercises/bob/build.gradle +1 -1
  31. data/tracks/kotlin/exercises/bracket-push/build.gradle +1 -1
  32. data/tracks/kotlin/exercises/change/build.gradle +1 -1
  33. data/tracks/kotlin/exercises/difference-of-squares/build.gradle +1 -1
  34. data/tracks/kotlin/exercises/etl/build.gradle +1 -1
  35. data/tracks/kotlin/exercises/flatten-array/build.gradle +1 -1
  36. data/tracks/kotlin/exercises/gigasecond/build.gradle +1 -1
  37. data/tracks/kotlin/exercises/grade-school/build.gradle +1 -1
  38. data/tracks/kotlin/exercises/hamming/build.gradle +1 -1
  39. data/tracks/kotlin/exercises/hello-world/build.gradle +1 -1
  40. data/tracks/kotlin/exercises/hexadecimal/build.gradle +1 -1
  41. data/tracks/kotlin/exercises/isogram/build.gradle +1 -1
  42. data/tracks/kotlin/exercises/largest-series-product/build.gradle +1 -1
  43. data/tracks/kotlin/exercises/leap/build.gradle +1 -1
  44. data/tracks/kotlin/exercises/linked-list/build.gradle +1 -1
  45. data/tracks/kotlin/exercises/luhn/build.gradle +1 -1
  46. data/tracks/kotlin/exercises/nth-prime/build.gradle +1 -1
  47. data/tracks/kotlin/exercises/nucleotide-count/build.gradle +1 -1
  48. data/tracks/kotlin/exercises/pangram/build.gradle +1 -1
  49. data/tracks/kotlin/exercises/pascals-triangle/build.gradle +1 -1
  50. data/tracks/kotlin/exercises/phone-number/build.gradle +1 -1
  51. data/tracks/kotlin/exercises/pig-latin/build.gradle +1 -1
  52. data/tracks/kotlin/exercises/raindrops/build.gradle +1 -1
  53. data/tracks/kotlin/exercises/rna-transcription/build.gradle +1 -1
  54. data/tracks/kotlin/exercises/rna-transcription/src/example/kotlin/RnaTranscription.kt +9 -12
  55. data/tracks/kotlin/exercises/rna-transcription/src/main/kotlin/RnaTranscription.kt +9 -0
  56. data/tracks/kotlin/exercises/rna-transcription/src/test/kotlin/RnaTranscriptionTest.kt +6 -6
  57. data/tracks/kotlin/exercises/robot-name/build.gradle +1 -1
  58. data/tracks/kotlin/exercises/roman-numerals/build.gradle +1 -1
  59. data/tracks/kotlin/exercises/scrabble-score/build.gradle +1 -1
  60. data/tracks/kotlin/exercises/series/build.gradle +1 -1
  61. data/tracks/kotlin/exercises/sieve/build.gradle +1 -1
  62. data/tracks/kotlin/exercises/simple-cipher/build.gradle +1 -1
  63. data/tracks/kotlin/exercises/space-age/build.gradle +1 -1
  64. data/tracks/kotlin/exercises/strain/build.gradle +1 -1
  65. data/tracks/kotlin/exercises/word-count/build.gradle +1 -1
  66. data/tracks/lua/exercises/circular-buffer/circular-buffer_spec.lua +1 -1
  67. data/tracks/pascal/docs/INSTALLATION.md +7 -5
  68. data/tracks/pascal/docs/TESTS.md +4 -0
  69. data/tracks/php/config.json +9 -0
  70. data/tracks/php/exercises/ocr-numbers/example.php +113 -0
  71. data/tracks/php/exercises/ocr-numbers/ocr-numbers_test.php +222 -0
  72. metadata +10 -3
  73. data/tracks/kotlin/exercises/rna-transcription/src/main/kotlin/.keep +0 -0
@@ -6,6 +6,7 @@ include 'anagram'
6
6
  include 'atbash-cipher'
7
7
  include 'beer-song'
8
8
  include 'binary'
9
+ include 'binary-search'
9
10
  include 'binary-search-tree'
10
11
  include 'bob'
11
12
  include 'bracket-push'
@@ -11,7 +11,8 @@
11
11
  "bin",
12
12
  ".gradle",
13
13
  "docs",
14
- "img"
14
+ "img",
15
+ "build"
15
16
  ],
16
17
  "foregone": [
17
18
 
@@ -1,5 +1,5 @@
1
1
  buildscript {
2
- ext.kotlin_version = '1.0.2'
2
+ ext.kotlin_version = '1.0.6'
3
3
  repositories {
4
4
  mavenCentral()
5
5
  }
@@ -1,5 +1,5 @@
1
1
  buildscript {
2
- ext.kotlin_version = '1.0.2'
2
+ ext.kotlin_version = '1.0.6'
3
3
  repositories {
4
4
  mavenCentral()
5
5
  }
@@ -1,5 +1,5 @@
1
1
  buildscript {
2
- ext.kotlin_version = '1.0.2'
2
+ ext.kotlin_version = '1.0.6'
3
3
  repositories {
4
4
  mavenCentral()
5
5
  }
@@ -1,5 +1,5 @@
1
1
  buildscript {
2
- ext.kotlin_version = '1.0.2'
2
+ ext.kotlin_version = '1.0.6'
3
3
  repositories {
4
4
  mavenCentral()
5
5
  }
@@ -1,5 +1,5 @@
1
1
  buildscript {
2
- ext.kotlin_version = '1.0.2'
2
+ ext.kotlin_version = '1.0.6'
3
3
  repositories {
4
4
  mavenCentral()
5
5
  }
@@ -1,5 +1,5 @@
1
1
  buildscript {
2
- ext.kotlin_version = '1.0.2'
2
+ ext.kotlin_version = '1.0.6'
3
3
  repositories {
4
4
  mavenCentral()
5
5
  }
@@ -1,5 +1,5 @@
1
1
  buildscript {
2
- ext.kotlin_version = '1.0.2'
2
+ ext.kotlin_version = '1.0.6'
3
3
  repositories {
4
4
  mavenCentral()
5
5
  }
@@ -1,5 +1,5 @@
1
1
  buildscript {
2
- ext.kotlin_version = '1.0.2'
2
+ ext.kotlin_version = '1.0.6'
3
3
  repositories {
4
4
  mavenCentral()
5
5
  }
@@ -1,5 +1,5 @@
1
1
  buildscript {
2
- ext.kotlin_version = '1.0.2'
2
+ ext.kotlin_version = '1.0.6'
3
3
  repositories {
4
4
  mavenCentral()
5
5
  }
@@ -1,5 +1,5 @@
1
1
  buildscript {
2
- ext.kotlin_version = '1.0.2'
2
+ ext.kotlin_version = '1.0.6'
3
3
  repositories {
4
4
  mavenCentral()
5
5
  }
@@ -1,5 +1,5 @@
1
1
  buildscript {
2
- ext.kotlin_version = '1.0.2'
2
+ ext.kotlin_version = '1.0.6'
3
3
  repositories {
4
4
  mavenCentral()
5
5
  }
@@ -1,5 +1,5 @@
1
1
  buildscript {
2
- ext.kotlin_version = '1.0.2'
2
+ ext.kotlin_version = '1.0.6'
3
3
  repositories {
4
4
  mavenCentral()
5
5
  }
@@ -1,5 +1,5 @@
1
1
  buildscript {
2
- ext.kotlin_version = '1.0.2'
2
+ ext.kotlin_version = '1.0.6'
3
3
  repositories {
4
4
  mavenCentral()
5
5
  }
@@ -1,5 +1,5 @@
1
1
  buildscript {
2
- ext.kotlin_version = '1.0.2'
2
+ ext.kotlin_version = '1.0.6'
3
3
  repositories {
4
4
  mavenCentral()
5
5
  }
@@ -1,5 +1,5 @@
1
1
  buildscript {
2
- ext.kotlin_version = '1.0.2'
2
+ ext.kotlin_version = '1.0.6'
3
3
  repositories {
4
4
  mavenCentral()
5
5
  }
@@ -1,5 +1,5 @@
1
1
  buildscript {
2
- ext.kotlin_version = '1.0.2'
2
+ ext.kotlin_version = '1.0.6'
3
3
  repositories {
4
4
  mavenCentral()
5
5
  }
@@ -1,5 +1,5 @@
1
1
  buildscript {
2
- ext.kotlin_version = '1.0.2'
2
+ ext.kotlin_version = '1.0.6'
3
3
  repositories {
4
4
  mavenCentral()
5
5
  }
@@ -1,5 +1,5 @@
1
1
  buildscript {
2
- ext.kotlin_version = '1.0.2'
2
+ ext.kotlin_version = '1.0.6'
3
3
  repositories {
4
4
  mavenCentral()
5
5
  }
@@ -1,5 +1,5 @@
1
1
  buildscript {
2
- ext.kotlin_version = '1.0.2'
2
+ ext.kotlin_version = '1.0.6'
3
3
  repositories {
4
4
  mavenCentral()
5
5
  }
@@ -1,5 +1,5 @@
1
1
  buildscript {
2
- ext.kotlin_version = '1.0.2'
2
+ ext.kotlin_version = '1.0.6'
3
3
  repositories {
4
4
  mavenCentral()
5
5
  }
@@ -1,5 +1,5 @@
1
1
  buildscript {
2
- ext.kotlin_version = '1.0.2'
2
+ ext.kotlin_version = '1.0.6'
3
3
  repositories {
4
4
  mavenCentral()
5
5
  }
@@ -1,5 +1,5 @@
1
1
  buildscript {
2
- ext.kotlin_version = '1.0.2'
2
+ ext.kotlin_version = '1.0.6'
3
3
  repositories {
4
4
  mavenCentral()
5
5
  }
@@ -1,5 +1,5 @@
1
1
  buildscript {
2
- ext.kotlin_version = '1.0.2'
2
+ ext.kotlin_version = '1.0.6'
3
3
  repositories {
4
4
  mavenCentral()
5
5
  }
@@ -1,5 +1,5 @@
1
1
  buildscript {
2
- ext.kotlin_version = '1.0.2'
2
+ ext.kotlin_version = '1.0.6'
3
3
  repositories {
4
4
  mavenCentral()
5
5
  }
@@ -1,5 +1,5 @@
1
1
  buildscript {
2
- ext.kotlin_version = '1.0.2'
2
+ ext.kotlin_version = '1.0.6'
3
3
  repositories {
4
4
  mavenCentral()
5
5
  }
@@ -1,5 +1,5 @@
1
1
  buildscript {
2
- ext.kotlin_version = '1.0.2'
2
+ ext.kotlin_version = '1.0.6'
3
3
  repositories {
4
4
  mavenCentral()
5
5
  }
@@ -1,5 +1,5 @@
1
1
  buildscript {
2
- ext.kotlin_version = '1.0.2'
2
+ ext.kotlin_version = '1.0.6'
3
3
  repositories {
4
4
  mavenCentral()
5
5
  }
@@ -1,5 +1,5 @@
1
1
  buildscript {
2
- ext.kotlin_version = '1.0.2'
2
+ ext.kotlin_version = '1.0.6'
3
3
  repositories {
4
4
  mavenCentral()
5
5
  }
@@ -1,5 +1,5 @@
1
1
  buildscript {
2
- ext.kotlin_version = '1.0.2'
2
+ ext.kotlin_version = '1.0.6'
3
3
  repositories {
4
4
  mavenCentral()
5
5
  }
@@ -1,5 +1,5 @@
1
1
  buildscript {
2
- ext.kotlin_version = '1.0.2'
2
+ ext.kotlin_version = '1.0.6'
3
3
  repositories {
4
4
  mavenCentral()
5
5
  }
@@ -1,5 +1,5 @@
1
1
  buildscript {
2
- ext.kotlin_version = '1.0.2'
2
+ ext.kotlin_version = '1.0.6'
3
3
  repositories {
4
4
  mavenCentral()
5
5
  }
@@ -1,5 +1,5 @@
1
1
  buildscript {
2
- ext.kotlin_version = '1.0.2'
2
+ ext.kotlin_version = '1.0.6'
3
3
  repositories {
4
4
  mavenCentral()
5
5
  }
@@ -1,5 +1,5 @@
1
1
  buildscript {
2
- ext.kotlin_version = '1.0.2'
2
+ ext.kotlin_version = '1.0.6'
3
3
  repositories {
4
4
  mavenCentral()
5
5
  }
@@ -1,12 +1,9 @@
1
- object RnaTranscription {
2
-
3
- fun ofDna(strand: String) = strand.map {
4
- when (it) {
5
- 'A' -> 'U'
6
- 'G' -> 'C'
7
- 'C' -> 'G'
8
- 'T' -> 'A'
9
- else -> it
10
- }
11
- }.joinToString("")
12
- }
1
+ fun transcribeToRna(dna: String): String = dna.map { nucleotide ->
2
+ when (nucleotide) {
3
+ 'A' -> 'U'
4
+ 'G' -> 'C'
5
+ 'C' -> 'G'
6
+ 'T' -> 'A'
7
+ else -> nucleotide
8
+ }
9
+ }.joinToString("")
@@ -0,0 +1,9 @@
1
+ /*
2
+ In Kotlin functions can be declared at top level in a file, meaning
3
+ you do not need to create a class to hold a function, like languages
4
+ such as Java, C# or Scala.
5
+
6
+ http://kotlinlang.org/docs/reference/functions.html#function-scope
7
+ */
8
+
9
+ fun transcribeToRna(dna: String): String = ""
@@ -5,31 +5,31 @@ class RnaTranscriptionTest {
5
5
 
6
6
  @Test
7
7
  fun emptyDnaIsEmptyRna() {
8
- Assert.assertEquals("", RnaTranscription.ofDna(""));
8
+ Assert.assertEquals("", transcribeToRna(""));
9
9
  }
10
10
 
11
11
  @Test
12
12
  fun cytosineIsGuanine() {
13
- Assert.assertEquals("G", RnaTranscription.ofDna("C"));
13
+ Assert.assertEquals("G", transcribeToRna("C"));
14
14
  }
15
15
 
16
16
  @Test
17
17
  fun guanineIsCytosine() {
18
- Assert.assertEquals("C", RnaTranscription.ofDna("G"));
18
+ Assert.assertEquals("C", transcribeToRna("G"));
19
19
  }
20
20
 
21
21
  @Test
22
22
  fun thymineIsAdenine() {
23
- Assert.assertEquals("A", RnaTranscription.ofDna("T"));
23
+ Assert.assertEquals("A", transcribeToRna("T"));
24
24
  }
25
25
 
26
26
  @Test
27
27
  fun adenineIsUracil() {
28
- Assert.assertEquals("U", RnaTranscription.ofDna("A"));
28
+ Assert.assertEquals("U", transcribeToRna("A"));
29
29
  }
30
30
 
31
31
  @Test
32
32
  fun rnaTranscription() {
33
- Assert.assertEquals("UGCACCAGAAUU", RnaTranscription.ofDna("ACGTGGTCTTAA"));
33
+ Assert.assertEquals("UGCACCAGAAUU", transcribeToRna("ACGTGGTCTTAA"));
34
34
  }
35
35
  }
@@ -1,5 +1,5 @@
1
1
  buildscript {
2
- ext.kotlin_version = '1.0.2'
2
+ ext.kotlin_version = '1.0.6'
3
3
  repositories {
4
4
  mavenCentral()
5
5
  }
@@ -1,5 +1,5 @@
1
1
  buildscript {
2
- ext.kotlin_version = '1.0.2'
2
+ ext.kotlin_version = '1.0.6'
3
3
  repositories {
4
4
  mavenCentral()
5
5
  }
@@ -1,5 +1,5 @@
1
1
  buildscript {
2
- ext.kotlin_version = '1.0.2'
2
+ ext.kotlin_version = '1.0.6'
3
3
  repositories {
4
4
  mavenCentral()
5
5
  }
@@ -1,5 +1,5 @@
1
1
  buildscript {
2
- ext.kotlin_version = '1.0.2'
2
+ ext.kotlin_version = '1.0.6'
3
3
  repositories {
4
4
  mavenCentral()
5
5
  }
@@ -1,5 +1,5 @@
1
1
  buildscript {
2
- ext.kotlin_version = '1.0.2'
2
+ ext.kotlin_version = '1.0.6'
3
3
  repositories {
4
4
  mavenCentral()
5
5
  }
@@ -1,5 +1,5 @@
1
1
  buildscript {
2
- ext.kotlin_version = '1.0.2'
2
+ ext.kotlin_version = '1.0.6'
3
3
  repositories {
4
4
  mavenCentral()
5
5
  }
@@ -1,5 +1,5 @@
1
1
  buildscript {
2
- ext.kotlin_version = '1.0.2'
2
+ ext.kotlin_version = '1.0.6'
3
3
  repositories {
4
4
  mavenCentral()
5
5
  }
@@ -1,5 +1,5 @@
1
1
  buildscript {
2
- ext.kotlin_version = '1.0.2'
2
+ ext.kotlin_version = '1.0.6'
3
3
  repositories {
4
4
  mavenCentral()
5
5
  }
@@ -1,5 +1,5 @@
1
1
  buildscript {
2
- ext.kotlin_version = '1.0.2'
2
+ ext.kotlin_version = '1.0.6'
3
3
  repositories {
4
4
  mavenCentral()
5
5
  }
@@ -54,7 +54,7 @@ describe('circular-buffer', function()
54
54
 
55
55
  it('writes of nil do not occupy buffer', function()
56
56
  local buffer = CircularBuffer:new(3)
57
- buffer.write(nil)
57
+ buffer:write(nil)
58
58
  for i = 1, 3 do
59
59
  buffer:write(tostring(i))
60
60
  end