trackler 1.0.0 → 1.0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (288) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +7 -0
  3. data/CHANGELOG.md +9 -1
  4. data/README.md +10 -0
  5. data/common/CONTRIBUTING.md +50 -2
  6. data/common/exercises/alphametics/canonical-data.json +10 -10
  7. data/common/exercises/markdown/canonical-data.json +4 -4
  8. data/common/exercises/pov/canonical-data.json +356 -0
  9. data/lib/trackler/version.rb +1 -1
  10. data/trackler.gemspec +1 -2
  11. data/tracks/c/config.json +11 -1
  12. data/tracks/c/exercises/binary-search/makefile +16 -0
  13. data/tracks/c/exercises/binary-search/src/example.c +21 -0
  14. data/tracks/c/exercises/binary-search/src/example.h +8 -0
  15. data/tracks/c/exercises/binary-search/test/test_binary_search.c +99 -0
  16. data/tracks/c/exercises/binary-search/test/vendor/unity.c +1300 -0
  17. data/tracks/c/exercises/binary-search/test/vendor/unity.h +274 -0
  18. data/tracks/c/exercises/binary-search/test/vendor/unity_internals.h +701 -0
  19. data/tracks/clojure/config.json +3 -2
  20. data/tracks/clojure/exercises/bank-account/project.clj +4 -0
  21. data/tracks/clojure/exercises/bank-account/src/example.clj +17 -0
  22. data/tracks/clojure/exercises/bank-account/test/bank_account_test.clj +44 -0
  23. data/tracks/clojure/exercises/isogram/project.clj +4 -0
  24. data/tracks/clojure/exercises/isogram/src/example.clj +5 -0
  25. data/tracks/clojure/exercises/isogram/test/isogram_test.clj +17 -0
  26. data/tracks/csharp/config.json +27 -87
  27. data/tracks/csharp/exercises/exercises.csproj +265 -1
  28. data/tracks/csharp/exercises/grep/Example.cs +114 -0
  29. data/tracks/csharp/exercises/grep/GrepTest.cs +376 -0
  30. data/tracks/csharp/exercises/paket.references +2 -1
  31. data/tracks/csharp/exercises/poker/Example.cs +96 -0
  32. data/tracks/csharp/exercises/poker/PokerTest.cs +171 -0
  33. data/tracks/csharp/exercises/sgf-parsing/Example.cs +61 -0
  34. data/tracks/csharp/exercises/sgf-parsing/SgfParsing.cs +13 -0
  35. data/tracks/csharp/exercises/sgf-parsing/SgfParsingTest.cs +158 -0
  36. data/tracks/csharp/paket.dependencies +2 -1
  37. data/tracks/csharp/paket.lock +72 -0
  38. data/tracks/ecmascript/exercises/simple-cipher/simple-cipher.spec.js +1 -1
  39. data/tracks/elisp/config.json +6 -1
  40. data/tracks/elisp/exercises/etl/etl-test.el +90 -0
  41. data/tracks/elisp/exercises/etl/etl.el +9 -0
  42. data/tracks/elisp/exercises/etl/example.el +22 -0
  43. data/tracks/elisp/exercises/nucleotide-count/example.el +19 -0
  44. data/tracks/elisp/exercises/nucleotide-count/nucleotide-count-test.el +34 -0
  45. data/tracks/elisp/exercises/nucleotide-count/nucleotide-count.el +9 -0
  46. data/tracks/elisp/exercises/perfect-numbers/example.el +28 -0
  47. data/tracks/elisp/exercises/perfect-numbers/perfect-numbers-test.el +24 -0
  48. data/tracks/elisp/exercises/perfect-numbers/perfect-numbers.el +10 -0
  49. data/tracks/elisp/exercises/roman-numerals/example.el +36 -0
  50. data/tracks/elisp/exercises/roman-numerals/roman-numerals-test.el +30 -0
  51. data/tracks/elisp/exercises/roman-numerals/roman-numerals.el +10 -0
  52. data/tracks/elisp/exercises/word-count/example.el +18 -0
  53. data/tracks/elisp/exercises/word-count/word-count-test.el +64 -0
  54. data/tracks/elisp/exercises/word-count/word-count.el +9 -0
  55. data/tracks/elixir/README.md +4 -4
  56. data/tracks/elixir/SETUP.md +3 -3
  57. data/tracks/elixir/docs/TESTS.md +3 -3
  58. data/tracks/elixir/exercises/accumulate/accumulate_test.exs +7 -7
  59. data/tracks/elixir/exercises/acronym/acronym_test.exs +5 -5
  60. data/tracks/elixir/exercises/allergies/allergies_test.exs +13 -13
  61. data/tracks/elixir/exercises/anagram/anagram_test.exs +12 -12
  62. data/tracks/elixir/exercises/atbash-cipher/atbash_cipher_test.exs +9 -9
  63. data/tracks/elixir/exercises/bank-account/bank_account_test.exs +5 -5
  64. data/tracks/elixir/exercises/beer-song/beer_song_test.exs +6 -6
  65. data/tracks/elixir/exercises/binary-search/binary_search_test.exs +7 -7
  66. data/tracks/elixir/exercises/binary/binary_test.exs +13 -13
  67. data/tracks/elixir/exercises/bob/bob_test.exs +15 -15
  68. data/tracks/elixir/exercises/bowling/bowling_test.exs +18 -18
  69. data/tracks/elixir/exercises/bracket-push/bracket_push_test.exs +12 -12
  70. data/tracks/elixir/exercises/change/change_test.exs +7 -7
  71. data/tracks/elixir/exercises/connect/connect_test.exs +9 -9
  72. data/tracks/elixir/exercises/crypto-square/crypto_square_test.exs +7 -7
  73. data/tracks/elixir/exercises/custom-set/custom_set_test.exs +11 -11
  74. data/tracks/elixir/exercises/diamond/diamond_test.exs +4 -4
  75. data/tracks/elixir/exercises/difference-of-squares/difference_of_squares_test.exs +10 -10
  76. data/tracks/elixir/exercises/dot-dsl/dot_dsl_test.exs +17 -17
  77. data/tracks/elixir/exercises/etl/etl_test.exs +5 -5
  78. data/tracks/elixir/exercises/flatten-array/flatten_array_test.exs +6 -6
  79. data/tracks/elixir/exercises/forth/forth_test.exs +16 -16
  80. data/tracks/elixir/exercises/gigasecond/gigasecond_test.exs +5 -5
  81. data/tracks/elixir/exercises/grade-school/grade_school_test.exs +6 -6
  82. data/tracks/elixir/exercises/grains/grains_test.exs +9 -9
  83. data/tracks/elixir/exercises/hamming/hamming_test.exs +6 -6
  84. data/tracks/elixir/exercises/hello-world/hello_world_test.exs +3 -3
  85. data/tracks/elixir/exercises/hexadecimal/hexadecimal_test.exs +11 -11
  86. data/tracks/elixir/exercises/isogram/isogram_test.exs +10 -10
  87. data/tracks/elixir/exercises/kindergarten-garden/garden_test.exs +7 -7
  88. data/tracks/elixir/exercises/largest-series-product/largest_series_product_test.exs +17 -17
  89. data/tracks/elixir/exercises/leap/leap_test.exs +5 -5
  90. data/tracks/elixir/exercises/list-ops/list_ops_test.exs +26 -26
  91. data/tracks/elixir/exercises/luhn/luhn_test.exs +7 -7
  92. data/tracks/elixir/exercises/markdown/markdown_test.exs +10 -10
  93. data/tracks/elixir/exercises/meetup/meetup_test.exs +92 -92
  94. data/tracks/elixir/exercises/minesweeper/minesweeper_test.exs +8 -8
  95. data/tracks/elixir/exercises/nth-prime/nth_prime_test.exs +6 -6
  96. data/tracks/elixir/exercises/nucleotide-count/example.exs +0 -5
  97. data/tracks/elixir/exercises/nucleotide-count/nucleotide_count_test.exs +7 -7
  98. data/tracks/elixir/exercises/palindrome-products/palindrome_products_test.exs +6 -6
  99. data/tracks/elixir/exercises/pangram/pangram_test.exs +11 -11
  100. data/tracks/elixir/exercises/parallel-letter-frequency/parallel_letter_frequency_test.exs +10 -10
  101. data/tracks/elixir/exercises/pascals-triangle/pascals_triangle_test.exs +7 -7
  102. data/tracks/elixir/exercises/phone-number/phone_number_test.exs +10 -10
  103. data/tracks/elixir/exercises/prime-factors/prime_factors_test.exs +13 -13
  104. data/tracks/elixir/exercises/pythagorean-triplet/pythagorean_triplet_test.exs +8 -8
  105. data/tracks/elixir/exercises/queen-attack/queen_attack_test.exs +16 -16
  106. data/tracks/elixir/exercises/rail-fence-cipher/rail_fence_cipher_test.exs +13 -13
  107. data/tracks/elixir/exercises/raindrops/raindrops_test.exs +17 -17
  108. data/tracks/elixir/exercises/rna-transcription/rna_transcription_test.exs +6 -6
  109. data/tracks/elixir/exercises/robot-simulator/robot_simulator_test.exs +6 -6
  110. data/tracks/elixir/exercises/roman-numerals/roman_numerals_test.exs +19 -19
  111. data/tracks/elixir/exercises/run-length-encoding/rle_test.exs +6 -6
  112. data/tracks/elixir/exercises/saddle-points/saddle_points_test.exs +11 -11
  113. data/tracks/elixir/exercises/scrabble-score/scrabble_score_test.exs +9 -9
  114. data/tracks/elixir/exercises/sieve/sieve_test.exs +3 -3
  115. data/tracks/elixir/exercises/space-age/space_age_test.exs +9 -9
  116. data/tracks/elixir/exercises/sublist/sublist_test.exs +20 -20
  117. data/tracks/elixir/exercises/sum-of-multiples/sum_of_multiples_test.exs +11 -11
  118. data/tracks/elixir/exercises/test_helper.exs +1 -1
  119. data/tracks/elixir/exercises/triangle/triangle_test.exs +16 -16
  120. data/tracks/elixir/exercises/word-count/word_count_test.exs +9 -9
  121. data/tracks/elixir/exercises/wordy/wordy_test.exs +16 -16
  122. data/tracks/elixir/exercises/zipper/zipper_test.exs +13 -13
  123. data/tracks/fsharp/build.fsx +2 -7
  124. data/tracks/fsharp/config.json +0 -104
  125. data/tracks/fsharp/exercises/grep/GrepTest.fs +7 -1
  126. data/tracks/go/config.json +1 -0
  127. data/tracks/go/exercises/acronym/acronym_test.go +36 -0
  128. data/tracks/go/exercises/acronym/example.go +21 -0
  129. data/tracks/go/exercises/palindrome-products/example.go +2 -0
  130. data/tracks/go/exercises/palindrome-products/palindrome_products_test.go +10 -0
  131. data/tracks/go/exercises/phone-number/example.go +2 -0
  132. data/tracks/go/exercises/phone-number/phone_number_test.go +44 -27
  133. data/tracks/go/exercises/robot-simulator/defs.go +6 -6
  134. data/tracks/go/exercises/robot-simulator/example.go +22 -22
  135. data/tracks/go/exercises/robot-simulator/robot_simulator_step2_test.go +28 -28
  136. data/tracks/go/exercises/robot-simulator/robot_simulator_step3_test.go +75 -76
  137. data/tracks/go/exercises/robot-simulator/robot_simulator_test.go +10 -4
  138. data/tracks/haskell/exercises/anagram/HINTS.md +22 -0
  139. data/tracks/haskell/exercises/anagram/package.yaml +3 -0
  140. data/tracks/haskell/exercises/anagram/src/Example.hs +10 -7
  141. data/tracks/haskell/exercises/anagram/test/Tests.hs +9 -3
  142. data/tracks/haskell/exercises/beer-song/HINTS.md +18 -0
  143. data/tracks/haskell/exercises/beer-song/src/Beer.hs +301 -3
  144. data/tracks/haskell/exercises/beer-song/src/Example.hs +5 -3
  145. data/tracks/haskell/exercises/beer-song/test/Tests.hs +332 -23
  146. data/tracks/haskell/exercises/crypto-square/src/CryptoSquare.hs +3 -17
  147. data/tracks/haskell/exercises/crypto-square/src/Example.hs +12 -20
  148. data/tracks/haskell/exercises/crypto-square/test/Tests.hs +46 -86
  149. data/tracks/haskell/exercises/leap/HINTS.md +11 -0
  150. data/tracks/haskell/exercises/leap/src/LeapYear.hs +1 -0
  151. data/tracks/java/exercises/pangram/src/test/java/PangramTest.java +34 -4
  152. data/tracks/lua/exercises/pov/pov_spec.lua +0 -13
  153. data/tracks/mips/docs/ABOUT.md +1 -1
  154. data/tracks/objective-c/config.json +225 -0
  155. data/tracks/objective-c/exercises/largest-series-product/LargestSeriesProductExample.h +8 -0
  156. data/tracks/objective-c/exercises/largest-series-product/LargestSeriesProductExample.m +63 -0
  157. data/tracks/objective-c/exercises/largest-series-product/LargestSeriesProductTest.m +84 -0
  158. data/tracks/objective-c/xcodeProject/ObjectiveC.xcodeproj/project.pbxproj +18 -0
  159. data/tracks/ocaml/.travis-ci.sh +23 -0
  160. data/tracks/ocaml/.travis.yml +5 -1
  161. data/tracks/ocaml/Makefile +41 -0
  162. data/tracks/ocaml/config.json +18 -0
  163. data/tracks/ocaml/exercises/anagram/Makefile +1 -0
  164. data/tracks/ocaml/exercises/beer-song/Makefile +1 -0
  165. data/tracks/ocaml/exercises/beer-song/{beer.mli → beer_song.mli} +0 -0
  166. data/tracks/ocaml/exercises/beer-song/example.ml +1 -1
  167. data/tracks/ocaml/exercises/beer-song/test.ml +7 -6
  168. data/tracks/ocaml/exercises/bob/Makefile +1 -0
  169. data/tracks/ocaml/exercises/bowling/Makefile +1 -0
  170. data/tracks/ocaml/exercises/custom-set/Makefile +1 -0
  171. data/tracks/ocaml/exercises/difference-of-squares/.merlin +5 -0
  172. data/tracks/ocaml/exercises/difference-of-squares/Makefile +11 -0
  173. data/tracks/ocaml/exercises/difference-of-squares/difference_of_squares.mli +8 -0
  174. data/tracks/ocaml/exercises/difference-of-squares/example.ml +21 -0
  175. data/tracks/ocaml/exercises/difference-of-squares/test.ml +32 -0
  176. data/tracks/ocaml/exercises/grade-school/Makefile +1 -0
  177. data/tracks/ocaml/exercises/grade-school/{school.mli → grade_school.mli} +0 -0
  178. data/tracks/ocaml/exercises/grade-school/test.ml +27 -27
  179. data/tracks/ocaml/exercises/hamming/Makefile +1 -0
  180. data/tracks/ocaml/exercises/hangman/Makefile +1 -0
  181. data/tracks/ocaml/exercises/hello-world/Makefile +1 -1
  182. data/tracks/ocaml/exercises/hello-world/{hello.ml → hello_world.ml} +0 -0
  183. data/tracks/ocaml/exercises/hello-world/{hello.mli → hello_world.mli} +0 -0
  184. data/tracks/ocaml/exercises/hello-world/test.ml +1 -1
  185. data/tracks/ocaml/exercises/hexadecimal/Makefile +1 -0
  186. data/tracks/ocaml/exercises/leap/Makefile +1 -1
  187. data/tracks/ocaml/exercises/list-ops/Makefile +1 -0
  188. data/tracks/ocaml/exercises/luhn/Makefile +1 -0
  189. data/tracks/ocaml/exercises/minesweeper/Makefile +1 -0
  190. data/tracks/ocaml/exercises/nucleotide-count/Makefile +1 -0
  191. data/tracks/ocaml/exercises/nucleotide-count/{dna.mli → nucleotide_count.mli} +0 -0
  192. data/tracks/ocaml/exercises/nucleotide-count/test.ml +7 -7
  193. data/tracks/ocaml/exercises/phone-number/Makefile +1 -0
  194. data/tracks/ocaml/exercises/phone-number/{phone.mli → phone_number.mli} +0 -0
  195. data/tracks/ocaml/exercises/phone-number/test.ml +10 -10
  196. data/tracks/ocaml/exercises/point-mutations/Makefile +8 -0
  197. data/tracks/ocaml/exercises/point-mutations/example.ml +0 -0
  198. data/tracks/ocaml/exercises/prime-factors/Makefile +1 -0
  199. data/tracks/ocaml/exercises/raindrops/.merlin +5 -0
  200. data/tracks/ocaml/exercises/raindrops/Makefile +11 -0
  201. data/tracks/ocaml/exercises/raindrops/example.ml +11 -0
  202. data/tracks/ocaml/exercises/raindrops/raindrops.mli +7 -0
  203. data/tracks/ocaml/exercises/raindrops/test.ml +48 -0
  204. data/tracks/ocaml/exercises/rna-transcription/Makefile +1 -0
  205. data/tracks/ocaml/exercises/rna-transcription/{dna.mli → rna_transcription.mli} +0 -0
  206. data/tracks/ocaml/exercises/rna-transcription/test.ml +6 -6
  207. data/tracks/ocaml/exercises/roman-numerals/Makefile +1 -0
  208. data/tracks/ocaml/exercises/say/.gitignore +1 -0
  209. data/tracks/ocaml/exercises/say/.merlin +5 -0
  210. data/tracks/ocaml/exercises/say/Makefile +11 -0
  211. data/tracks/ocaml/exercises/say/example.ml +52 -0
  212. data/tracks/ocaml/exercises/say/say.mli +8 -0
  213. data/tracks/ocaml/exercises/say/test.ml +65 -0
  214. data/tracks/ocaml/exercises/space-age/Makefile +1 -0
  215. data/tracks/ocaml/exercises/word-count/Makefile +1 -0
  216. data/tracks/ocaml/exercises/word-count/example.ml +1 -1
  217. data/tracks/ocaml/exercises/zipper/HINT.md +5 -6
  218. data/tracks/ocaml/exercises/zipper/Makefile +1 -0
  219. data/tracks/ocaml/exercises/zipper/example.ml +2 -2
  220. data/tracks/ocaml/exercises/zipper/tree.ml +1 -1
  221. data/tracks/php/config.json +7 -1
  222. data/tracks/php/exercises/variable-length-quantity/example.php +56 -0
  223. data/tracks/php/exercises/variable-length-quantity/variable-length-quantity_test.php +149 -0
  224. data/tracks/python/config.json +1 -1
  225. data/tracks/ruby/.rubocop.yml +1915 -26
  226. data/tracks/ruby/bin/generate-acronym +7 -0
  227. data/tracks/ruby/bin/generate-nth-prime +7 -0
  228. data/tracks/ruby/config.json +482 -0
  229. data/tracks/ruby/exercises/acronym/.version +1 -0
  230. data/tracks/ruby/exercises/acronym/acronym_test.rb +45 -21
  231. data/tracks/ruby/exercises/acronym/example.rb +1 -1
  232. data/tracks/ruby/exercises/acronym/example.tt +19 -0
  233. data/tracks/ruby/exercises/anagram/anagram_test.rb +1 -1
  234. data/tracks/ruby/exercises/nth-prime/.version +1 -0
  235. data/tracks/ruby/exercises/nth-prime/example.rb +4 -0
  236. data/tracks/ruby/exercises/nth-prime/example.tt +23 -0
  237. data/tracks/ruby/exercises/nth-prime/nth_prime_test.rb +33 -10
  238. data/tracks/ruby/exercises/raindrops/.version +1 -1
  239. data/tracks/ruby/exercises/raindrops/example.rb +1 -1
  240. data/tracks/ruby/exercises/raindrops/raindrops_test.rb +20 -5
  241. data/tracks/ruby/lib/acronym_cases.rb +19 -0
  242. data/tracks/ruby/lib/generator.rb +3 -2
  243. data/tracks/ruby/lib/nth_prime_cases.rb +23 -0
  244. data/tracks/ruby/lib/raindrop_cases.rb +1 -1
  245. data/tracks/rust/README.md +1 -1
  246. data/tracks/scala/exercises/leap/src/test/scala/leap_test.scala +10 -0
  247. data/tracks/scala/exercises/prime-factors/example.scala +2 -5
  248. data/tracks/scala/exercises/prime-factors/src/test/scala/primefactors_test.scala +11 -13
  249. data/tracks/scheme/{anagram → exercises/anagram}/anagram-test.scm +0 -0
  250. data/tracks/scheme/{anagram → exercises/anagram}/anagram.scm +0 -0
  251. data/tracks/scheme/{anagram → exercises/anagram}/example.scm +0 -0
  252. data/tracks/scheme/{bob → exercises/bob}/bob-test.scm +0 -0
  253. data/tracks/scheme/{bob → exercises/bob}/bob.scm +0 -0
  254. data/tracks/scheme/{bob → exercises/bob}/example.scm +0 -0
  255. data/tracks/scheme/{difference-of-squares → exercises/difference-of-squares}/difference-of-squares-test.scm +0 -0
  256. data/tracks/scheme/{difference-of-squares → exercises/difference-of-squares}/example.scm +0 -0
  257. data/tracks/scheme/{difference-of-squares → exercises/difference-of-squares}/squares.scm +0 -0
  258. data/tracks/scheme/{grains → exercises/grains}/example.scm +0 -0
  259. data/tracks/scheme/{grains → exercises/grains}/grains-test.scm +0 -0
  260. data/tracks/scheme/{grains → exercises/grains}/grains.scm +0 -0
  261. data/tracks/scheme/{hamming → exercises/hamming}/example.scm +0 -0
  262. data/tracks/scheme/{hamming → exercises/hamming}/hamming-test.scm +0 -0
  263. data/tracks/scheme/{hamming → exercises/hamming}/hamming.scm +0 -0
  264. data/tracks/scheme/{hello-world → exercises/hello-world}/example.scm +0 -0
  265. data/tracks/scheme/{hello-world → exercises/hello-world}/hello-world-test.scm +0 -0
  266. data/tracks/scheme/{hello-world → exercises/hello-world}/hello-world.scm +0 -0
  267. data/tracks/scheme/{leap → exercises/leap}/example.scm +0 -0
  268. data/tracks/scheme/{leap → exercises/leap}/leap-test.scm +0 -0
  269. data/tracks/scheme/{leap → exercises/leap}/leap-year.scm +0 -0
  270. data/tracks/scheme/{list-ops → exercises/list-ops}/example.scm +0 -0
  271. data/tracks/scheme/{list-ops → exercises/list-ops}/list-ops-test.scm +0 -0
  272. data/tracks/scheme/{list-ops → exercises/list-ops}/list-ops.scm +0 -0
  273. data/tracks/scheme/{nucleotide-count → exercises/nucleotide-count}/example.scm +0 -0
  274. data/tracks/scheme/{nucleotide-count → exercises/nucleotide-count}/nucleotide-count-test.scm +0 -0
  275. data/tracks/scheme/{nucleotide-count → exercises/nucleotide-count}/nucleotide-count.scm +0 -0
  276. data/tracks/scheme/{phone-number → exercises/phone-number}/example.scm +0 -0
  277. data/tracks/scheme/{phone-number → exercises/phone-number}/phone-number-test.scm +0 -0
  278. data/tracks/scheme/{phone-number → exercises/phone-number}/phone-number.scm +0 -0
  279. data/tracks/scheme/{raindrops → exercises/raindrops}/example.scm +0 -0
  280. data/tracks/scheme/{raindrops → exercises/raindrops}/raindrops-test.scm +0 -0
  281. data/tracks/scheme/{raindrops → exercises/raindrops}/raindrops.scm +0 -0
  282. data/tracks/scheme/{rna-transcription → exercises/rna-transcription}/dna.scm +0 -0
  283. data/tracks/scheme/{rna-transcription → exercises/rna-transcription}/example.scm +0 -0
  284. data/tracks/scheme/{rna-transcription → exercises/rna-transcription}/rna-transcription-test.scm +0 -0
  285. data/tracks/scheme/{robot-name → exercises/robot-name}/example.scm +0 -0
  286. data/tracks/scheme/{robot-name → exercises/robot-name}/robot-name-test.scm +0 -0
  287. data/tracks/scheme/{robot-name → exercises/robot-name}/robot.scm +0 -0
  288. metadata +125 -64
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4b23dd6d96d001e37102ef1f796528b111256b51
4
- data.tar.gz: bf6b9e323fcaaa809ee4be715908cc058ccc474a
3
+ metadata.gz: a340d68c1e7151758d18f1d5374de489565c7243
4
+ data.tar.gz: 97d055586fb1a486a35f63c0a3d56bf0d31efb6e
5
5
  SHA512:
6
- metadata.gz: 381862c5404053b02a6402aeefe0de75fb886144cade20b4b8acc058e820947326cb6b384039a5c39fe1d55d12a6f5c7a17a0f8eddf4956da9bcd95bd9603e8a
7
- data.tar.gz: 43cf11d486b318fac0b6502e628cf41f955d160c602aa08bb4a57dae8a2480eb03b8fc5f9c2222593e73794a056e63d4b26b73b2fcbc393dd0692d6f51b58e8c
6
+ metadata.gz: 787c7c324f3537c1f8ac7ff1549421ad78d63ad9f258bbecb8689fc13c3da4ee8de73c21835280ac9359bdde8f8777bc270dff03fee532c62576e41e243bf45f
7
+ data.tar.gz: 9bc618ceac0fb5d66caf5874e89f9bbbe398edf6e7a19e7f9de0a26c38fecf2d866020b4a7b2bafb3c8a29e15238cd2e480ff81e44ca1babfa3da8883a4a6a09
@@ -0,0 +1,7 @@
1
+ language: ruby
2
+ sudo: false
3
+ rvm:
4
+ - 2.2.5
5
+ script:
6
+ - bundle install
7
+ - rake test
@@ -1,6 +1,14 @@
1
1
  # Change log
2
2
 
3
- The Trackler gem follows [semantic versioning](http://semver.org/).
3
+ The Trackler gem almost follows [semantic versioning](http://semver.org/).
4
+
5
+ We've added a forth level, which tracks content. It gets bumped each time we
6
+ update the submodules.
7
+
8
+ 1 . 0 . 0 . 0
9
+ MAJOR MINOR PATCH CONTENT
10
+
11
+ The changelog will not be updated for content updates.
4
12
 
5
13
  ----------------
6
14
 
data/README.md CHANGED
@@ -74,6 +74,16 @@ See CONTRIBUTING.md for details.
74
74
 
75
75
  This is an extraction from https://github.com/exercism/x-api.
76
76
 
77
+ ## Publishing
78
+
79
+ Owners of the gem can publish it to rubygems like this:
80
+
81
+ ```
82
+ gem build trackler.gemspec
83
+ gem install --local trackler-$VERSION.gem
84
+ gem push trackler-$VERSION.gem
85
+ ```
86
+
77
87
  ## License
78
88
 
79
89
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
@@ -33,7 +33,9 @@ themselves. There are other guides about contributing to other parts of the Exer
33
33
  * [Implementing a Completely New Exercise](#implementing-a-completely-new-exercise)
34
34
  * [Improving Consistency By Extracting Shared Test Data](#improving-consistency-by-extracting-shared-test-data)
35
35
  * [Writing a New Test Suite Generator](#writing-a-new-test-suite-generator)
36
+ * [Track Anatomy](#track-anatomy)
36
37
  * [Starting a New Track](#starting-a-new-track)
38
+ * [Beta-Testing a Language Track](#beta-testing-a-language-track)
37
39
  * [Maintaining a Track](#maintaining-a-track)
38
40
  * [Useful Tidbits](#useful-tidbits)
39
41
  * [Exercise Versioning](#exercise-versioning)
@@ -193,7 +195,7 @@ test suite](#updating-an-exercise-test-suite).
193
195
  If you want to add a new test or change some inputs or outputs, then the change
194
196
  needs to be made in the [exercism/x-common repository](https://github.com/exercism/x-common),
195
197
  not directly to the test suite itself.
196
-
198
+
197
199
  Find the JSON file for the problem in question. For example, if you want to change
198
200
  the Clock problem, then look for `exercises/clock/canonical-data.json`.
199
201
 
@@ -382,6 +384,52 @@ TODO: elaborate.
382
384
 
383
385
  TODO: elaborate.
384
386
 
387
+ ## Track Anatomy
388
+
389
+ Each track should have the following structure:
390
+
391
+ ```bash
392
+ ├── .gitignore
393
+ ├── .travis.yml
394
+ ├── LICENSE
395
+ ├── README.md
396
+ ├── SETUP.md
397
+ ├── bin
398
+ │   └── fetch-configlet
399
+ ├── config.json
400
+ ├── docs
401
+ │   ├── ABOUT.md
402
+ │   ├── INSTALLATION.md
403
+ │   ├── LEARNING.md
404
+ │   ├── RESOURCES.md
405
+ │   └── TESTS.md
406
+ └── exercises
407
+ └── hello-world
408
+ ├── hello-world_example.file
409
+ ├── hello-world.file
410
+ └── hello-world_test.file
411
+ ```
412
+
413
+ The example template for a track can be found at [x-template](https://github.com/exercism/x-template).
414
+
415
+ * `LICENSE` - The MIT License (MIT)
416
+ * `README.md` - a thorough explanation of how to contribute to the track.
417
+ * `SETUP.md` - this should contain any track specific, problem agnostic information that will be included in the README.md of every exercise when fetched. Include information on how to run tests, how to get help, etc.
418
+ * `bin` - scripts and other files related to running the track's tests, etc.
419
+ * `config.json` - the track-level configuration. It contains configuration for which exercises (and in which order) are a part of the track, which exercises are deprecated, the track id, name of the language, and the location of the repository. Optionally, it may include a regex to recognize what files are part of the test suite (usually `/test/i`, but sometimes `/spec/i` or other things). If the test pattern is not included, then `/test/i` is assumed.
420
+ * `docs` - the documentation for the track.These files are served to the exercism.io help site via the x-api. It should contain at minimum:
421
+
422
+ - `INSTALLATION.md` - about how to get the track's language set up locally.
423
+ - `TESTS.md` - how to run the tests for the track's individual exercises.
424
+
425
+ Some nice to haves:
426
+
427
+ - `ABOUT.md` - a short, friendly blurb about the track's language. What types of problems does it solve really well? What is it typically used for?
428
+ - `LEARNING.md` - a few notes about where people might want to go to learn the track's language from scratch. These are the the resources you need only when first getting up to speed with a language (tutorials, blog posts, etc.).
429
+ - `RESOURCES.md` - references and other useful resources. These resources are those that would commonly be used by a developer on an ongoing basis (core language docs, api docs, etc.).
430
+
431
+ * `exercises` - all exercises for the track should live in subdirectories of this directory. Each exercise should have a test file, an example file that should pass all tests, and a template file that is a stub to help the user get started with the exercise. The example file should be used for the CI build.
432
+
385
433
  ## Starting a New Track
386
434
 
387
435
  If you're interested in adding problems for a language that we don't yet have,
@@ -396,7 +444,7 @@ In order to launch the track needs:
396
444
  - A handful of people who can check in regularly and provide feedback on solutions.
397
445
  - Documentation in `docs/` for how to get started / run the tests
398
446
 
399
- Description of what is required for `docs/` can be found in the [x-api CONTRIBUTING guide](https://github.com/exercism/x-api/blob/master/CONTRIBUTING.md#track-anatomy)
447
+ Description of what is required for `docs/` can be found in the [Track Anatomy](#track-anatomy).
400
448
 
401
449
  Once that is in place, the repository needs to be added as a submodule to
402
450
  [exercism/x-api](https://github.com/exercism/x-api/tree/master/tracks), and
@@ -12,16 +12,6 @@
12
12
  "puzzle": "SEND + MORE == MONEY",
13
13
  "expected": { "S": 9, "E": 5, "N": 6, "D": 7, "M": 1, "O": 0, "R": 8, "Y": 2 }
14
14
  },
15
- {
16
- "description": "solve puzzle with multiplication",
17
- "puzzle": "IF * DR == DORI",
18
- "expected": { "I": 8, "F": 2, "D": 3, "R": 9, "O": 1 }
19
- },
20
- {
21
- "description": "solve puzzle with exponents",
22
- "puzzle": "PI * R ^ 2 == AREA",
23
- "expected": { "P": 9, "I": 6, "R": 7, "A": 4, "E": 0 }
24
- },
25
15
  {
26
16
  "description": "solution must have unique value for each letter",
27
17
  "puzzle": "A == B",
@@ -31,6 +21,16 @@
31
21
  "description": "leading zero solution is invalid",
32
22
  "puzzle": "ACA + DD == BD",
33
23
  "expected": null
24
+ },
25
+ {
26
+ "description": "solve puzzle with four words",
27
+ "puzzle": "HE + SEES + THE == LIGHT",
28
+ "expected": { "E": 4, "G": 2, "H": 5, "I": 0, "L": 1, "S": 9, "T": 7 }
29
+ },
30
+ {
31
+ "description": "solve puzzle with many words",
32
+ "puzzle": "AND + A + STRONG + OFFENSE + AS + A + GOOD = DEFENSE",
33
+ "expected": { "A": 5, "D": 3, "E": 4, "F": 7, "G": 8, "N": 0, "O": 2, "R": 1, "S": 6, "T": 9 }
34
34
  }
35
35
  ]
36
36
  }
@@ -21,17 +21,17 @@
21
21
  {
22
22
  "description": "parsing italics",
23
23
  "input": "_This will be italic_",
24
- "expected": "<p><i>This will be italic</i></p>"
24
+ "expected": "<p><em>This will be italic</em></p>"
25
25
  },
26
26
  {
27
27
  "description": "parsing bold text",
28
28
  "input": "__This will be bold__",
29
- "expected": "<p><em>This will be bold</em></p>"
29
+ "expected": "<p><strong>This will be bold</strong></p>"
30
30
  },
31
31
  {
32
32
  "description": "mixed normal, italics and bold text",
33
33
  "input": "This will _be_ __mixed__",
34
- "expected": "<p>This will <i>be</i> <em>mixed</em></p>"
34
+ "expected": "<p>This will <em>be</em> <strong>mixed</strong></p>"
35
35
  },
36
36
  {
37
37
  "description": "with h1 header level",
@@ -56,7 +56,7 @@
56
56
  {
57
57
  "description": "With a little bit of everything",
58
58
  "input": "# Header!\n* __Bold Item__\n* _Italic Item_",
59
- "expected": "<h1>Header!</h1><ul><li><em>Bold Item</em></li><li><i>Italic Item</i></li></ul>"
59
+ "expected": "<h1>Header!</h1><ul><li><strong>Bold Item</strong></li><li><em>Italic Item</em></li></ul>"
60
60
  }
61
61
  ]
62
62
  }
@@ -0,0 +1,356 @@
1
+ {
2
+ "from_pov": {
3
+ "description": [
4
+ "Reroot a tree so that its root is the specified node.",
5
+ "In this way, the tree is presented from the point of view of the specified node.",
6
+ "The input trees used here are those in the `trees` section of this file.",
7
+ "",
8
+ "If appropriate for your track, you may test that the input tree is not modified.",
9
+ "",
10
+ "Note that when rerooting upon a target node that has both parents and children,",
11
+ "it does not matter whether the former parent comes before or after the former children.",
12
+ "Please account for this when checking correctness of the resulting trees.",
13
+ "One suggested method is to only check two things:",
14
+ "1) The root of the returned tree is the root that was passed in to from_pov.",
15
+ "2) The sorted edge list of the returned tree is the same as the sorted edge list of the expected tree."
16
+ ],
17
+ "cases": [
18
+ {
19
+ "description": "Results in the same tree if the input tree is a singleton",
20
+ "tree": "singleton",
21
+ "from": "x",
22
+ "expected": {
23
+ "label": "x"
24
+ }
25
+ },
26
+ {
27
+ "description": "Can reroot a tree with a parent and one sibling",
28
+ "tree": "simple",
29
+ "from": "x",
30
+ "expected": {
31
+ "label": "x",
32
+ "children": [
33
+ {
34
+ "label": "parent",
35
+ "children": [
36
+ {
37
+ "label": "sibling"
38
+ }
39
+ ]
40
+ }
41
+ ]
42
+ }
43
+ },
44
+ {
45
+ "description": "Can reroot a tree with a parent and many siblings",
46
+ "tree": "large_flat",
47
+ "from": "x",
48
+ "expected": {
49
+ "label": "x",
50
+ "children": [
51
+ {
52
+ "label": "parent",
53
+ "children": [
54
+ {
55
+ "label": "a"
56
+ },
57
+ {
58
+ "label": "b"
59
+ },
60
+ {
61
+ "label": "c"
62
+ }
63
+ ]
64
+ }
65
+ ]
66
+ }
67
+ },
68
+ {
69
+ "description": "Can reroot a tree with new root deeply nested in tree",
70
+ "tree": "deeply_nested",
71
+ "from": "x",
72
+ "expected": {
73
+ "label": "x",
74
+ "children": [
75
+ {
76
+ "label": "level-3",
77
+ "children": [
78
+ {
79
+ "label": "level-2",
80
+ "children": [
81
+ {
82
+ "label": "level-1",
83
+ "children": [
84
+ {
85
+ "label": "level-0"
86
+ }
87
+ ]
88
+ }
89
+ ]
90
+ }
91
+ ]
92
+ }
93
+ ]
94
+ }
95
+ },
96
+ {
97
+ "description": "Moves children of the new root to same level as former parent",
98
+ "tree": "kids",
99
+ "from": "x",
100
+ "expected": {
101
+ "label": "x",
102
+ "children": [
103
+ {
104
+ "label": "kid-0"
105
+ },
106
+ {
107
+ "label": "kid-1"
108
+ },
109
+ {
110
+ "label": "parent"
111
+ }
112
+ ]
113
+ }
114
+ },
115
+ {
116
+ "description": "Can reroot a complex tree with cousins",
117
+ "tree": "cousins",
118
+ "from": "x",
119
+ "expected": {
120
+ "label": "x",
121
+ "children": [
122
+ {
123
+ "label": "kid-1"
124
+ },
125
+ {
126
+ "label": "kid-0"
127
+ },
128
+ {
129
+ "label": "parent",
130
+ "children": [
131
+ {
132
+ "label": "sibling-0"
133
+ },
134
+ {
135
+ "label": "sibling-1"
136
+ },
137
+ {
138
+ "label": "grandparent",
139
+ "children": [
140
+ {
141
+ "label": "uncle",
142
+ "children": [
143
+ {
144
+ "label": "cousin-0"
145
+ },
146
+ {
147
+ "label": "cousin-1"
148
+ }
149
+ ]
150
+ }
151
+ ]
152
+ }
153
+ ]
154
+ }
155
+ ]
156
+ }
157
+ },
158
+ {
159
+ "description": "Errors if target does not exist in a singleton tree",
160
+ "tree": "singleton",
161
+ "from": "nonexistent",
162
+ "expected": null
163
+ },
164
+ {
165
+ "description": "Errors if target does not exist in a large tree",
166
+ "tree": "cousins",
167
+ "from": "nonexistent",
168
+ "expected": null
169
+ }
170
+ ]
171
+ },
172
+ "path_to": {
173
+ "description": [
174
+ "Given two nodes, find the path between them.",
175
+ "A typical implementation would first reroot the tree on one of the two nodes.",
176
+ "",
177
+ "If appropriate for your track, you may test that the input tree is not modified.",
178
+ "",
179
+ "The trees used here are those in the `trees` section of this file."
180
+ ],
181
+ "cases": [
182
+ {
183
+ "description": "Can find path to parent",
184
+ "from": "x",
185
+ "to": "parent",
186
+ "tree": "simple",
187
+ "expected": [
188
+ "x",
189
+ "parent"
190
+ ]
191
+ },
192
+ {
193
+ "description": "Can find path to sibling",
194
+ "from": "x",
195
+ "to": "b",
196
+ "tree": "large_flat",
197
+ "expected": [
198
+ "x",
199
+ "parent",
200
+ "b"
201
+ ]
202
+ },
203
+ {
204
+ "description": "Can find path to cousin",
205
+ "from": "x",
206
+ "to": "cousin-1",
207
+ "tree": "cousins",
208
+ "expected": [
209
+ "x",
210
+ "parent",
211
+ "grandparent",
212
+ "uncle",
213
+ "cousin-1"
214
+ ]
215
+ },
216
+ {
217
+ "description": "Can find path from nodes other than x",
218
+ "from": "kid-1",
219
+ "to": "cousin-0",
220
+ "tree": "cousins",
221
+ "expected": [
222
+ "kid-1",
223
+ "x",
224
+ "parent",
225
+ "grandparent",
226
+ "uncle",
227
+ "cousin-0"
228
+ ]
229
+ },
230
+ {
231
+ "description": "Errors if destination does not exist",
232
+ "from": "x",
233
+ "to": "nonexistent",
234
+ "tree": "cousins",
235
+ "expected": null
236
+ },
237
+ {
238
+ "description": "Errors if source does not exist",
239
+ "from": "nonexistent",
240
+ "to": "x",
241
+ "tree": "cousins",
242
+ "expected": null
243
+ }
244
+ ]
245
+ },
246
+ "trees": {
247
+ "singleton": {
248
+ "label": "x"
249
+ },
250
+ "simple": {
251
+ "label": "parent",
252
+ "children": [
253
+ {
254
+ "label": "x"
255
+ },
256
+ {
257
+ "label": "sibling"
258
+ }
259
+ ]
260
+ },
261
+ "large_flat": {
262
+ "label": "parent",
263
+ "children": [
264
+ {
265
+ "label": "a"
266
+ },
267
+ {
268
+ "label": "x"
269
+ },
270
+ {
271
+ "label": "b"
272
+ },
273
+ {
274
+ "label": "c"
275
+ }
276
+ ]
277
+ },
278
+ "deeply_nested": {
279
+ "label": "level-0",
280
+ "children": [
281
+ {
282
+ "label": "level-1",
283
+ "children": [
284
+ {
285
+ "label": "level-2",
286
+ "children": [
287
+ {
288
+ "label": "level-3",
289
+ "children": [
290
+ {
291
+ "label": "x"
292
+ }
293
+ ]
294
+ }
295
+ ]
296
+ }
297
+ ]
298
+ }
299
+ ]
300
+ },
301
+ "kids": {
302
+ "label": "parent",
303
+ "children": [
304
+ {
305
+ "label": "x",
306
+ "children": [
307
+ {
308
+ "label": "kid-0"
309
+ },
310
+ {
311
+ "label": "kid-1"
312
+ }
313
+ ]
314
+ }
315
+ ]
316
+ },
317
+ "cousins": {
318
+ "label": "grandparent",
319
+ "children": [
320
+ {
321
+ "label": "parent",
322
+ "children": [
323
+ {
324
+ "label": "x",
325
+ "children": [
326
+ {
327
+ "label": "kid-0"
328
+ },
329
+ {
330
+ "label": "kid-1"
331
+ }
332
+ ]
333
+ },
334
+ {
335
+ "label": "sibling-0"
336
+ },
337
+ {
338
+ "label": "sibling-1"
339
+ }
340
+ ]
341
+ },
342
+ {
343
+ "label": "uncle",
344
+ "children": [
345
+ {
346
+ "label": "cousin-0"
347
+ },
348
+ {
349
+ "label": "cousin-1"
350
+ }
351
+ ]
352
+ }
353
+ ]
354
+ }
355
+ }
356
+ }