trackler 2.2.1.66 → 2.2.1.67

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/lib/trackler/version.rb +1 -1
  3. data/problem-specifications/README.md +1 -0
  4. data/tracks/bash/exercises/anagram/anagram_tests.sh +16 -0
  5. data/tracks/bash/exercises/bob/bob_test.sh +28 -0
  6. data/tracks/bash/exercises/difference-of-squares/difference_of_squares_test.sh +3 -0
  7. data/tracks/bash/exercises/error-handling/error_handling_test.sh +5 -0
  8. data/tracks/bash/exercises/gigasecond/gigasecond_test.sh +10 -0
  9. data/tracks/bash/exercises/hamming/hamming_test.sh +15 -0
  10. data/tracks/bash/exercises/leap/leap_test.sh +10 -0
  11. data/tracks/bash/exercises/nucleotide-count/nucleotide_count_test.sh +4 -0
  12. data/tracks/bash/exercises/pangram/pangram_tests.sh +9 -0
  13. data/tracks/bash/exercises/phone-number/phone_number_tests.sh +13 -1
  14. data/tracks/bash/exercises/raindrops/raindrops_test.sh +16 -0
  15. data/tracks/bash/exercises/rna-transcription/rna_transcription_test.sh +8 -0
  16. data/tracks/bash/exercises/two-fer/two_fer_test.sh +3 -0
  17. data/tracks/bash/exercises/word-count/word_count_test.sh +9 -1
  18. data/tracks/c/exercises/hello-world/src/hello_world.c +0 -2
  19. data/tracks/c/exercises/sieve/test/test_sieve.c +13 -16
  20. data/tracks/erlang/config.json +4 -4
  21. data/tracks/fsharp/config.json +12 -0
  22. data/tracks/fsharp/exercises/Exercises.sln +6 -0
  23. data/tracks/fsharp/exercises/rotational-cipher/Example.fs +29 -0
  24. data/tracks/fsharp/exercises/rotational-cipher/Program.fs +1 -0
  25. data/tracks/fsharp/exercises/rotational-cipher/README.md +29 -0
  26. data/tracks/fsharp/exercises/rotational-cipher/RotationalCipher.fs +3 -0
  27. data/tracks/fsharp/exercises/rotational-cipher/RotationalCipher.fsproj +23 -0
  28. data/tracks/fsharp/exercises/rotational-cipher/RotationalCipherTest.fs +49 -0
  29. data/tracks/fsharp/generators/Generators.fs +3 -0
  30. data/tracks/go/exercises/grains/.meta/gen.go +99 -0
  31. data/tracks/go/exercises/grains/cases_test.go +64 -0
  32. data/tracks/go/exercises/grains/grains_test.go +4 -20
  33. data/tracks/go/exercises/space-age/space_age_test.go +3 -1
  34. data/tracks/java/config.json +12 -0
  35. data/tracks/java/exercises/beer-song/.meta/src/reference/java/BeerSong.java +4 -4
  36. data/tracks/java/exercises/diamond/src/main/java/DiamondPrinter.java +9 -0
  37. data/tracks/java/exercises/isbn-verifier/.meta/src/reference/java/IsbnVerifier.java +35 -0
  38. data/tracks/java/exercises/isbn-verifier/.meta/version +1 -0
  39. data/tracks/java/exercises/isbn-verifier/README.md +53 -0
  40. data/tracks/java/exercises/isbn-verifier/build.gradle +18 -0
  41. data/tracks/java/exercises/isbn-verifier/src/main/java/IsbnVerifier.java +7 -0
  42. data/tracks/java/exercises/isbn-verifier/src/test/java/IsbnVerifierTest.java +94 -0
  43. data/tracks/java/exercises/isogram/src/main/java/IsogramChecker.java +7 -0
  44. data/tracks/java/exercises/saddle-points/src/main/java/Matrix.java +13 -0
  45. data/tracks/java/exercises/settings.gradle +1 -0
  46. data/tracks/kotlin/config.json +1 -1
  47. data/tracks/ocaml/exercises/all-your-base/example.ml +1 -1
  48. data/tracks/ocaml/exercises/all-your-base/test.ml +9 -9
  49. data/tracks/perl6/config.json +1 -1
  50. data/tracks/perl6/docs/SNIPPET.txt +2 -2
  51. data/tracks/perl6/exercises/anagram/Anagram.pm6 +4 -1
  52. data/tracks/perl6/exercises/anagram/Example.pm6 +4 -15
  53. data/tracks/perl6/exercises/anagram/anagram.t +2 -2
  54. data/tracks/perl6/exercises/anagram/example.yaml +7 -15
  55. data/tracks/php/config.json +12 -0
  56. data/tracks/php/exercises/run-length-encoding/README.md +42 -0
  57. data/tracks/php/exercises/run-length-encoding/example.php +60 -0
  58. data/tracks/php/exercises/run-length-encoding/run-length-encoding.php +20 -0
  59. data/tracks/php/exercises/run-length-encoding/run-length-encoding_test.php +65 -0
  60. data/tracks/purescript/.travis.yml +1 -1
  61. data/tracks/purescript/bin/test.sh +9 -2
  62. data/tracks/python/config.json +7 -16
  63. data/tracks/r/exercises/hello-world/test_hello-world.R +0 -8
  64. data/tracks/racket/config.json +1 -1
  65. data/tracks/swift/config.json +12 -2
  66. data/tracks/swift/exercises/diamond/Package.swift +5 -0
  67. data/tracks/swift/exercises/diamond/README.md +64 -0
  68. data/tracks/swift/exercises/diamond/Sources/Diamond.swift +1 -0
  69. data/tracks/swift/exercises/diamond/Sources/DiamondExample.swift +30 -0
  70. data/tracks/swift/exercises/diamond/Tests/DiamondTests/DiamondTests.swift +98 -0
  71. data/tracks/swift/exercises/diamond/Tests/LinuxMain.swift +6 -0
  72. metadata +29 -8
  73. data/tracks/java/exercises/diamond/src/main/java/.keep +0 -0
  74. data/tracks/java/exercises/isogram/src/main/java/.keep +0 -0
  75. data/tracks/python/exercises/parallel-letter-frequency/README.md +0 -24
  76. data/tracks/python/exercises/parallel-letter-frequency/example.py +0 -56
  77. data/tracks/python/exercises/parallel-letter-frequency/parallel_letter_frequency.py +0 -2
  78. data/tracks/python/exercises/parallel-letter-frequency/parallel_letter_frequency_test.py +0 -61
@@ -1,2 +0,0 @@
1
- def calculate(text_input):
2
- pass
@@ -1,61 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- from collections import Counter
3
- import unittest
4
-
5
- from parallel_letter_frequency import calculate
6
-
7
-
8
- class ParallelLetterFrequencyTest(unittest.TestCase):
9
- def test_one_letter(self):
10
- actual = calculate(['a'])
11
- expected = {'a': 1}
12
- self.assertDictEqual(actual, expected)
13
-
14
- def test_case_insensitivity(self):
15
- actual = calculate(['aA'])
16
- expected = {'a': 2}
17
- self.assertDictEqual(actual, expected)
18
-
19
- def test_numbers(self):
20
- actual = calculate(['012', '345', '6789'])
21
- expected = {}
22
- self.assertDictEqual(actual, expected)
23
-
24
- def test_punctuations(self):
25
- actual = calculate(['[]\;,', './{}|', ':"<>?'])
26
- expected = {}
27
- self.assertDictEqual(actual, expected)
28
-
29
- def test_whitespaces(self):
30
- actual = calculate([' ', '\t ', '\n\n'])
31
- expected = {}
32
- self.assertDictEqual(actual, expected)
33
-
34
- def test_repeated_string_with_known_frequencies(self):
35
- letter_frequency = 3
36
- text_input = 'abc\n' * letter_frequency
37
- actual = calculate(text_input.split('\n'))
38
- expected = {'a': letter_frequency, 'b': letter_frequency,
39
- 'c': letter_frequency}
40
- self.assertDictEqual(actual, expected)
41
-
42
- def test_multiline_text(self):
43
- text_input = "3 Quotes from Excerism Homepage:\n" + \
44
- "\tOne moment you feel like you're\n" + \
45
- "getting it. The next moment you're\n" + \
46
- "stuck.\n" + \
47
- "\tYou know what it’s like to be fluent.\n" + \
48
- "Suddenly you’re feeling incompetent\n" + \
49
- "and clumsy.\n" + \
50
- "\tHaphazard, convoluted code is\n" + \
51
- "infuriating, not to mention costly. That\n" + \
52
- "slapdash explosion of complexity is an\n" + \
53
- "expensive yak shave waiting to\n" + \
54
- "happen."
55
- actual = calculate(text_input.split('\n'))
56
- expected = Counter([x for x in text_input.lower() if x.isalpha()])
57
- self.assertDictEqual(actual, expected)
58
-
59
-
60
- if __name__ == '__main__':
61
- unittest.main()