trackler 2.0.6.30 → 2.0.6.31

Sign up to get free protection for your applications and to get access to all the features.
Files changed (148) hide show
  1. checksums.yaml +4 -4
  2. data/common/exercises/beer-song/canonical-data.json +49 -0
  3. data/common/exercises/food-chain/description.md +1 -2
  4. data/common/exercises/list-ops/canonical-data.json +147 -0
  5. data/lib/trackler/version.rb +1 -1
  6. data/tracks/erlang/README.md +2 -3
  7. data/tracks/erlang/exercises/accumulate/include/exercism.hrl +5 -0
  8. data/tracks/erlang/exercises/accumulate/src/example.erl +4 -1
  9. data/tracks/erlang/exercises/accumulate/test/accumulate_tests.erl +2 -3
  10. data/tracks/erlang/exercises/allergies/include/exercism.hrl +5 -0
  11. data/tracks/erlang/exercises/allergies/src/example.erl +4 -1
  12. data/tracks/erlang/exercises/allergies/test/allergies_tests.erl +2 -3
  13. data/tracks/erlang/exercises/anagram/include/exercism.hrl +5 -0
  14. data/tracks/erlang/exercises/anagram/src/example.erl +4 -1
  15. data/tracks/erlang/exercises/anagram/test/anagram_tests.erl +2 -3
  16. data/tracks/erlang/exercises/atbash-cipher/include/exercism.hrl +5 -0
  17. data/tracks/erlang/exercises/atbash-cipher/src/example.erl +4 -1
  18. data/tracks/erlang/exercises/atbash-cipher/test/atbash_cipher_tests.erl +2 -3
  19. data/tracks/erlang/exercises/bank-account/include/exercism.hrl +5 -0
  20. data/tracks/erlang/exercises/bank-account/src/example.erl +5 -1
  21. data/tracks/erlang/exercises/bank-account/test/bank_account_tests.erl +2 -2
  22. data/tracks/erlang/exercises/beer-song/include/exercism.hrl +5 -0
  23. data/tracks/erlang/exercises/beer-song/src/example.erl +5 -1
  24. data/tracks/erlang/exercises/beer-song/test/beer_song_tests.erl +2 -2
  25. data/tracks/erlang/exercises/binary/include/exercism.hrl +5 -0
  26. data/tracks/erlang/exercises/binary/src/example.erl +4 -1
  27. data/tracks/erlang/exercises/binary/test/binary_string_tests.erl +2 -2
  28. data/tracks/erlang/exercises/bob/include/exercism.hrl +5 -0
  29. data/tracks/erlang/exercises/bob/src/example.erl +6 -1
  30. data/tracks/erlang/exercises/bob/test/bob_tests.erl +2 -3
  31. data/tracks/erlang/exercises/circular-buffer/include/exercism.hrl +5 -0
  32. data/tracks/erlang/exercises/circular-buffer/src/example.erl +4 -1
  33. data/tracks/erlang/exercises/circular-buffer/test/circular_buffer_tests.erl +2 -2
  34. data/tracks/erlang/exercises/clock/include/exercism.hrl +5 -0
  35. data/tracks/erlang/exercises/clock/src/example.erl +9 -3
  36. data/tracks/erlang/exercises/clock/test/clock_tests.erl +2 -2
  37. data/tracks/erlang/exercises/difference-of-squares/include/exercism.hrl +5 -0
  38. data/tracks/erlang/exercises/difference-of-squares/src/example.erl +4 -1
  39. data/tracks/erlang/exercises/difference-of-squares/test/difference_of_squares_tests.erl +2 -2
  40. data/tracks/erlang/exercises/etl/include/exercism.hrl +5 -0
  41. data/tracks/erlang/exercises/etl/src/example.erl +6 -1
  42. data/tracks/erlang/exercises/etl/test/etl_tests.erl +2 -2
  43. data/tracks/erlang/exercises/gigasecond/include/exercism.hrl +5 -0
  44. data/tracks/erlang/exercises/gigasecond/src/example.erl +4 -1
  45. data/tracks/erlang/exercises/gigasecond/test/gigasecond_tests.erl +2 -2
  46. data/tracks/erlang/exercises/grade-school/include/exercism.hrl +5 -0
  47. data/tracks/erlang/exercises/grade-school/src/example.erl +4 -1
  48. data/tracks/erlang/exercises/grade-school/test/grade_school_tests.erl +2 -2
  49. data/tracks/erlang/exercises/grains/include/exercism.hrl +5 -0
  50. data/tracks/erlang/exercises/grains/src/example.erl +4 -1
  51. data/tracks/erlang/exercises/grains/test/grains_tests.erl +2 -2
  52. data/tracks/erlang/exercises/hamming/include/exercism.hrl +5 -0
  53. data/tracks/erlang/exercises/hamming/src/example.erl +4 -1
  54. data/tracks/erlang/exercises/hamming/test/hamming_tests.erl +2 -2
  55. data/tracks/erlang/exercises/hello-world/include/exercism.hrl +5 -0
  56. data/tracks/erlang/exercises/hello-world/src/example.erl +4 -1
  57. data/tracks/erlang/exercises/hello-world/test/hello_world_tests.erl +2 -2
  58. data/tracks/erlang/exercises/largest-series-product/include/exercism.hrl +5 -0
  59. data/tracks/erlang/exercises/largest-series-product/src/example.erl +3 -1
  60. data/tracks/erlang/exercises/largest-series-product/test/largest_series_product_tests.erl +2 -2
  61. data/tracks/erlang/exercises/leap/include/exercism.hrl +5 -0
  62. data/tracks/erlang/exercises/leap/src/example.erl +6 -1
  63. data/tracks/erlang/exercises/leap/test/leap_tests.erl +2 -2
  64. data/tracks/erlang/exercises/luhn/include/exercism.hrl +5 -0
  65. data/tracks/erlang/exercises/luhn/src/example.erl +6 -1
  66. data/tracks/erlang/exercises/luhn/test/luhn_tests.erl +2 -2
  67. data/tracks/erlang/exercises/meetup/include/exercism.hrl +5 -0
  68. data/tracks/erlang/exercises/meetup/src/example.erl +6 -1
  69. data/tracks/erlang/exercises/meetup/test/meetup_tests.erl +2 -2
  70. data/tracks/erlang/exercises/nucleotide-count/include/exercism.hrl +5 -0
  71. data/tracks/erlang/exercises/nucleotide-count/src/example.erl +4 -1
  72. data/tracks/erlang/exercises/nucleotide-count/test/dna_tests.erl +2 -2
  73. data/tracks/erlang/exercises/parallel-letter-frequency/include/exercism.hrl +5 -0
  74. data/tracks/erlang/exercises/parallel-letter-frequency/src/example.erl +3 -1
  75. data/tracks/erlang/exercises/parallel-letter-frequency/test/parallel_letter_frequency_tests.erl +2 -2
  76. data/tracks/erlang/exercises/phone-number/include/exercism.hrl +5 -0
  77. data/tracks/erlang/exercises/phone-number/src/example.erl +4 -1
  78. data/tracks/erlang/exercises/phone-number/test/phone_tests.erl +2 -2
  79. data/tracks/erlang/exercises/rna-transcription/include/exercism.hrl +5 -0
  80. data/tracks/erlang/exercises/rna-transcription/src/example.erl +6 -1
  81. data/tracks/erlang/exercises/rna-transcription/test/rna_transcription_tests.erl +2 -2
  82. data/tracks/erlang/exercises/robot-simulator/include/exercism.hrl +5 -0
  83. data/tracks/erlang/exercises/robot-simulator/src/example.erl +12 -1
  84. data/tracks/erlang/exercises/robot-simulator/test/robot_simulator_tests.erl +2 -2
  85. data/tracks/erlang/exercises/roman-numerals/include/exercism.hrl +5 -0
  86. data/tracks/erlang/exercises/roman-numerals/src/example.erl +6 -1
  87. data/tracks/erlang/exercises/roman-numerals/test/roman_numerals_tests.erl +2 -2
  88. data/tracks/erlang/exercises/scrabble-score/include/exercism.hrl +5 -0
  89. data/tracks/erlang/exercises/scrabble-score/src/example.erl +4 -1
  90. data/tracks/erlang/exercises/scrabble-score/test/scrabble_score_tests.erl +2 -2
  91. data/tracks/erlang/exercises/series/include/exercism.hrl +5 -0
  92. data/tracks/erlang/exercises/series/src/example.erl +3 -1
  93. data/tracks/erlang/exercises/series/test/series_tests.erl +2 -2
  94. data/tracks/erlang/exercises/space-age/include/exercism.hrl +5 -0
  95. data/tracks/erlang/exercises/space-age/src/example.erl +6 -1
  96. data/tracks/erlang/exercises/space-age/test/space_age_tests.erl +2 -2
  97. data/tracks/erlang/exercises/strain/include/exercism.hrl +5 -0
  98. data/tracks/erlang/exercises/strain/src/example.erl +4 -1
  99. data/tracks/erlang/exercises/strain/test/strain_tests.erl +2 -2
  100. data/tracks/erlang/exercises/sum-of-multiples/include/exercism.hrl +5 -0
  101. data/tracks/erlang/exercises/sum-of-multiples/src/example.erl +6 -1
  102. data/tracks/erlang/exercises/sum-of-multiples/test/sum_of_multiples_tests.erl +2 -2
  103. data/tracks/erlang/exercises/triangle/include/exercism.hrl +5 -0
  104. data/tracks/erlang/exercises/triangle/src/example.erl +4 -1
  105. data/tracks/erlang/exercises/triangle/test/triangle_tests.erl +2 -2
  106. data/tracks/erlang/exercises/trinary/include/exercism.hrl +5 -0
  107. data/tracks/erlang/exercises/trinary/src/example.erl +4 -1
  108. data/tracks/erlang/exercises/trinary/test/trinary_tests.erl +2 -2
  109. data/tracks/erlang/exercises/word-count/include/exercism.hrl +5 -0
  110. data/tracks/erlang/exercises/word-count/src/example.erl +6 -1
  111. data/tracks/erlang/exercises/word-count/test/word_count_tests.erl +2 -2
  112. data/tracks/erlang/exercises/zipper/include/exercism.hrl +5 -0
  113. data/tracks/erlang/exercises/zipper/src/example.erl +4 -5
  114. data/tracks/erlang/exercises/zipper/test/zipper_tests.erl +2 -2
  115. data/tracks/go/exercises/pangram/pangram_test.go +9 -1
  116. data/tracks/java/.travis.yml +8 -0
  117. data/tracks/java/README.md +1 -1
  118. data/tracks/julia/config.json +11 -1
  119. data/tracks/julia/exercises/sieve/example.jl +15 -0
  120. data/tracks/julia/exercises/sieve/runtests.jl +37 -0
  121. data/tracks/julia/exercises/sieve/sieve.jl +3 -0
  122. data/tracks/objective-c/circle.yml +6 -0
  123. data/tracks/ocaml/SETUP.md +1 -13
  124. data/tracks/ocaml/exercises/atbash-cipher/test.ml +38 -29
  125. data/tracks/ocaml/tools/test-generator/src/codegen.ml +4 -3
  126. data/tracks/ocaml/tools/test-generator/src/controller.ml +1 -1
  127. data/tracks/ocaml/tools/test-generator/src/model.ml +16 -33
  128. data/tracks/ocaml/tools/test-generator/src/parser.ml +2 -35
  129. data/tracks/ocaml/tools/test-generator/src/special_cases.ml +36 -23
  130. data/tracks/ocaml/tools/test-generator/templates/anagram/template.ml +1 -1
  131. data/tracks/ocaml/tools/test-generator/templates/atbash-cipher/template.ml +24 -0
  132. data/tracks/ocaml/tools/test-generator/templates/bob/template.ml +1 -1
  133. data/tracks/ocaml/tools/test-generator/templates/bracket-push/template.ml +1 -1
  134. data/tracks/ocaml/tools/test-generator/templates/hamming/template.ml +1 -1
  135. data/tracks/ocaml/tools/test-generator/templates/hello-world/template.ml +1 -1
  136. data/tracks/ocaml/tools/test-generator/templates/luhn/template.ml +1 -1
  137. data/tracks/ocaml/tools/test-generator/templates/pangram/template.ml +1 -1
  138. data/tracks/ocaml/tools/test-generator/templates/raindrops/template.ml +1 -1
  139. data/tracks/ocaml/tools/test-generator/templates/word-count/template.ml +1 -1
  140. data/tracks/ocaml/tools/test-generator/test/codegen_test.ml +5 -3
  141. data/tracks/ocaml/tools/test-generator/test/model_test.ml +2 -20
  142. data/tracks/ocaml/tools/test-generator/test/parser_test.ml +10 -19
  143. data/tracks/ocaml/tools/test-generator/test/special_cases_test.ml +7 -6
  144. data/tracks/perl6/config.json +5 -0
  145. data/tracks/perl6/exercises/hello-world/Example.pm +5 -0
  146. data/tracks/perl6/exercises/hello-world/HelloWorld.pm6 +15 -0
  147. data/tracks/perl6/exercises/hello-world/hello-world.t +32 -0
  148. metadata +12 -2
@@ -0,0 +1,5 @@
1
+ unit module HelloWorld:ver<1>;
2
+
3
+ sub hello (Str $name? --> Str:D) is export {
4
+ 'Hello, ' ~ ($name ?? $name !! 'World') ~ '!'
5
+ }
@@ -0,0 +1,15 @@
1
+ #`(
2
+ This is a 'stub' file. It's a little start on your solution.
3
+ It is not a complete solution though; you will have to write some code.
4
+
5
+ The ':ver<>' adverb defines the version of a module or class.
6
+ The version is checked in the test suite to ensure the exercise
7
+ and test suite line up. If the test is updated, it will indicate
8
+ to others who test your code that some tests may no longer pass.
9
+ )
10
+ unit module HelloWorld:ver<1>;
11
+
12
+ sub hello ($name?) is export {
13
+ # Write your solution to pass the test suite here.
14
+ # Be sure to remove all stock comments once you are done!
15
+ }
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/env perl6
2
+ use v6;
3
+ use Test;
4
+ use lib IO::Path.new($?FILE).parent.path;
5
+
6
+ my $exercise = 'HelloWorld';
7
+ my $version = v1;
8
+ my $module = %*ENV<EXERCISM> ?? 'Example' !! $exercise;
9
+ plan 6;
10
+
11
+ use-ok $module or bail-out;
12
+ require ::($module);
13
+ if ::($exercise).^ver !~~ $version {
14
+ warn "\nExercise version mismatch. Further tests may fail!"
15
+ ~ "\n$exercise is $(::($exercise).^ver.gist). "
16
+ ~ "Test is $($version.gist).\n";
17
+ bail-out 'Example version must match test version.' if %*ENV<EXERCISM>;
18
+ }
19
+
20
+ my @subs;
21
+ BEGIN { @subs = <&hello> };
22
+ subtest 'Subroutine(s)', {
23
+ plan 1;
24
+ eval-lives-ok "use $module; ::('$_').defined or die '$_ is not defined.'", $_ for @subs;
25
+ } or bail-out 'All subroutines must be defined and exported.';
26
+ require ::($module) @subs.eager;
27
+
28
+ is hello, 'Hello, World!', 'No argument';
29
+ is ''.&hello, 'Hello, World!', 'Empty string';
30
+ todo 'optional test', 2 unless %*ENV<EXERCISM>;
31
+ is 'Camelia'.&hello, 'Hello, Camelia!', 'Camelia';
32
+ is '楽土'.&hello, 'Hello, 楽土!', 'Rakudo';
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.0.6.30
4
+ version: 2.0.6.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katrina Owen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-03 00:00:00.000000000 Z
11
+ date: 2017-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip
@@ -135,6 +135,7 @@ files:
135
135
  - common/exercises/atbash-cipher/metadata.yml
136
136
  - common/exercises/bank-account/description.md
137
137
  - common/exercises/bank-account/metadata.yml
138
+ - common/exercises/beer-song/canonical-data.json
138
139
  - common/exercises/beer-song/description.md
139
140
  - common/exercises/beer-song/metadata.yml
140
141
  - common/exercises/binary-search-tree/description.md
@@ -246,6 +247,7 @@ files:
246
247
  - common/exercises/lens-person/metadata.yml
247
248
  - common/exercises/linked-list/description.md
248
249
  - common/exercises/linked-list/metadata.yml
250
+ - common/exercises/list-ops/canonical-data.json
249
251
  - common/exercises/list-ops/description.md
250
252
  - common/exercises/list-ops/metadata.yml
251
253
  - common/exercises/luhn/canonical-data.json
@@ -4289,6 +4291,9 @@ files:
4289
4291
  - tracks/julia/exercises/secret-handshake/example.jl
4290
4292
  - tracks/julia/exercises/secret-handshake/runtests.jl
4291
4293
  - tracks/julia/exercises/secret-handshake/secret-handshake.jl
4294
+ - tracks/julia/exercises/sieve/example.jl
4295
+ - tracks/julia/exercises/sieve/runtests.jl
4296
+ - tracks/julia/exercises/sieve/sieve.jl
4292
4297
  - tracks/julia/exercises/trinary/example.jl
4293
4298
  - tracks/julia/exercises/trinary/runtests.jl
4294
4299
  - tracks/julia/exercises/trinary/trinary.jl
@@ -5093,6 +5098,7 @@ files:
5093
5098
  - tracks/objective-c/README.md
5094
5099
  - tracks/objective-c/SETUP.md
5095
5100
  - tracks/objective-c/bin/fetch-configlet
5101
+ - tracks/objective-c/circle.yml
5096
5102
  - tracks/objective-c/config.json
5097
5103
  - tracks/objective-c/docs/ABOUT.md
5098
5104
  - tracks/objective-c/docs/INSTALLATION.md
@@ -5424,6 +5430,7 @@ files:
5424
5430
  - tracks/ocaml/tools/test-generator/src/utils.ml
5425
5431
  - tracks/ocaml/tools/test-generator/templates/all-your-base/template.ml
5426
5432
  - tracks/ocaml/tools/test-generator/templates/anagram/template.ml
5433
+ - tracks/ocaml/tools/test-generator/templates/atbash-cipher/template.ml
5427
5434
  - tracks/ocaml/tools/test-generator/templates/bob/template.ml
5428
5435
  - tracks/ocaml/tools/test-generator/templates/bracket-push/template.ml
5429
5436
  - tracks/ocaml/tools/test-generator/templates/difference-of-squares/template.ml
@@ -5641,6 +5648,9 @@ files:
5641
5648
  - tracks/perl6/exercises/grade-school/grade-school.t
5642
5649
  - tracks/perl6/exercises/grains/Example.pm
5643
5650
  - tracks/perl6/exercises/grains/grains.t
5651
+ - tracks/perl6/exercises/hello-world/Example.pm
5652
+ - tracks/perl6/exercises/hello-world/HelloWorld.pm6
5653
+ - tracks/perl6/exercises/hello-world/hello-world.t
5644
5654
  - tracks/perl6/exercises/leap/Example.pm
5645
5655
  - tracks/perl6/exercises/leap/leap.t
5646
5656
  - tracks/perl6/exercises/phone-number/Example.pm