trackler 2.1.0.24 → 2.1.0.25
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitmodules +3 -0
- data/CONTRIBUTING.md +5 -8
- data/README.md +7 -7
- data/common/CONTRIBUTING.md +0 -5
- data/common/exercises/accumulate/description.md +4 -1
- data/common/exercises/acronym/description.md +1 -1
- data/common/exercises/bank-account/description.md +2 -1
- data/common/exercises/book-store/description.md +2 -5
- data/common/exercises/bracket-push/description.md +2 -4
- data/common/exercises/change/description.md +2 -5
- data/common/exercises/circular-buffer/description.md +0 -2
- data/common/exercises/clock/description.md +0 -2
- data/common/exercises/collatz-conjecture/canonical-data.json +36 -0
- data/common/exercises/collatz-conjecture/description.md +25 -0
- data/common/exercises/collatz-conjecture/metadata.yml +4 -0
- data/common/exercises/counter/description.md +1 -2
- data/common/exercises/diamond/description.md +0 -4
- data/common/exercises/flatten-array/description.md +1 -1
- data/common/exercises/grade-school/description.md +2 -1
- data/common/exercises/grains/description.md +2 -1
- data/common/exercises/grep/description.md +3 -2
- data/common/exercises/kindergarten-garden/description.md +2 -1
- data/common/exercises/largest-series-product/description.md +2 -1
- data/common/exercises/matrix/description.md +2 -1
- data/common/exercises/nucleotide-codons/description.md +2 -1
- data/common/exercises/ocr-numbers/description.md +2 -1
- data/common/exercises/octal/description.md +3 -1
- data/common/exercises/pangram/description.md +2 -1
- data/common/exercises/perfect-numbers/description.md +2 -1
- data/common/exercises/poker/description.md +0 -2
- data/common/exercises/protein-translation/description.md +3 -2
- data/common/exercises/proverb/description.md +2 -1
- data/common/exercises/pythagorean-triplet/description.md +4 -2
- data/common/exercises/queen-attack/description.md +2 -1
- data/common/exercises/rectangles/description.md +1 -3
- data/common/exercises/rotational-cipher/description.md +0 -4
- data/common/exercises/scale-generator/description.md +0 -2
- data/common/exercises/secret-handshake/description.md +2 -2
- data/common/exercises/series/description.md +2 -1
- data/common/exercises/sieve/description.md +2 -1
- data/common/exercises/space-age/description.md +0 -2
- data/common/exercises/strain/description.md +4 -5
- data/common/exercises/sublist/description.md +3 -6
- data/common/exercises/sum-of-multiples/description.md +2 -1
- data/common/exercises/tournament/description.md +4 -3
- data/common/exercises/transpose/description.md +1 -3
- data/common/exercises/trinary/description.md +2 -1
- data/common/exercises/two-bucket/description.md +1 -3
- data/common/exercises/two-fer/canonical-data.json +24 -0
- data/common/exercises/two-fer/description.md +40 -0
- data/common/exercises/two-fer/metadata.yml +4 -0
- data/common/exercises/word-search/description.md +2 -4
- data/common/exercises/zebra-puzzle/description.md +1 -1
- data/lib/trackler.rb +10 -5
- data/lib/trackler/description.rb +2 -2
- data/lib/trackler/guaranteed_file.rb +15 -15
- data/lib/trackler/implementation.rb +5 -5
- data/lib/trackler/implementations.rb +2 -2
- data/lib/trackler/metadata.rb +2 -2
- data/lib/trackler/problem.rb +2 -96
- data/lib/trackler/problems.rb +3 -48
- data/lib/trackler/specification.rb +101 -0
- data/lib/trackler/specifications.rb +52 -0
- data/lib/trackler/track.rb +6 -4
- data/lib/trackler/version.rb +1 -1
- data/tracks/bash/LICENSE +21 -0
- data/tracks/bash/README.md +0 -5
- data/tracks/c/LICENSE +21 -0
- data/tracks/c/README.md +0 -5
- data/tracks/clojure/LICENSE +2 -2
- data/tracks/clojure/README.org +0 -5
- data/tracks/clojure/config.json +5 -0
- data/tracks/clojure/exercises/sublist/project.clj +4 -0
- data/tracks/clojure/exercises/sublist/src/example.clj +19 -0
- data/tracks/clojure/exercises/sublist/sublist.mustache +9 -0
- data/tracks/clojure/exercises/sublist/test/sublist_test.clj +40 -0
- data/tracks/cpp/LICENSE +2 -2
- data/tracks/cpp/README.md +0 -5
- data/tracks/csharp/LICENSE +2 -2
- data/tracks/csharp/README.md +0 -5
- data/tracks/delphi/LICENSE +2 -2
- data/tracks/delphi/README.md +0 -5
- data/tracks/ecmascript/LICENSE +2 -2
- data/tracks/ecmascript/README.md +0 -5
- data/tracks/elisp/.travis.yml +7 -3
- data/tracks/elisp/LICENSE +2 -2
- data/tracks/elisp/README.org +3 -6
- data/tracks/elisp/bin/test-examples +27 -0
- data/tracks/elisp/config.json +10 -0
- data/tracks/elisp/docs/LEARNING.org +0 -3
- data/tracks/elisp/exercises/grains/example.el +18 -0
- data/tracks/elisp/exercises/grains/grains-test.el +38 -0
- data/tracks/elisp/exercises/grains/grains.el +10 -0
- data/tracks/elisp/exercises/phone-number/example.el +34 -0
- data/tracks/elisp/exercises/phone-number/phone-number-test.el +43 -0
- data/tracks/elisp/exercises/phone-number/phone-number.el +9 -0
- data/tracks/elixir/LICENSE +2 -2
- data/tracks/elixir/README.md +0 -5
- data/tracks/elm/LICENSE +2 -2
- data/tracks/elm/README.md +0 -5
- data/tracks/erlang/LICENSE +2 -2
- data/tracks/erlang/README.md +0 -5
- data/tracks/erlang/SETUP.md +7 -0
- data/tracks/erlang/exercises/rotational-cipher/rebar.config +5 -5
- data/tracks/erlang/exercises/rotational-cipher/test/rotational_cipher_tests.erl +18 -18
- data/tracks/factor/LICENSE +2 -2
- data/tracks/fortran/.github/PULL_REQUEST_TEMPLATE.md +23 -0
- data/tracks/fortran/.gitignore +4 -0
- data/tracks/fortran/.travis.yml +17 -0
- data/tracks/fortran/LICENSE +21 -0
- data/tracks/fortran/Makefile +40 -0
- data/tracks/fortran/README.md +72 -0
- data/tracks/fortran/bin/fetch-configlet +32 -0
- data/tracks/fortran/config.json +32 -0
- data/tracks/{kotlin/SETUP.md → fortran/docs/ABOUT.md} +0 -0
- data/tracks/fortran/docs/INSTALLATION.md +0 -0
- data/tracks/fortran/docs/LEARNING.md +0 -0
- data/tracks/fortran/docs/RESOURCES.md +0 -0
- data/tracks/fortran/docs/TESTS.md +0 -0
- data/tracks/fortran/exercises/TRACK_HINTS.md +0 -0
- data/tracks/fortran/exercises/bob/bob.fun +114 -0
- data/tracks/fortran/exercises/bob/example.f90 +61 -0
- data/tracks/fortran/exercises/hello_world/example.f90 +9 -0
- data/tracks/fortran/exercises/hello_world/hello_world.fun +10 -0
- data/tracks/fortran/img/.keep +0 -0
- data/tracks/fsharp/LICENSE +2 -2
- data/tracks/fsharp/README.md +0 -5
- data/tracks/go/LICENSE +2 -2
- data/tracks/go/README.md +0 -5
- data/tracks/haskell/LICENSE +2 -2
- data/tracks/haskell/README.md +0 -5
- data/tracks/idris/LICENSE +2 -2
- data/tracks/idris/README.md +0 -5
- data/tracks/java/LICENSE +2 -2
- data/tracks/java/README.md +0 -7
- data/tracks/java/{SETUP.md → TRACK_HINTS.md} +0 -0
- data/tracks/java/config.json +5 -0
- data/tracks/java/exercises/_template/build.gradle +1 -0
- data/tracks/java/exercises/accumulate/build.gradle +1 -0
- data/tracks/java/exercises/acronym/build.gradle +1 -0
- data/tracks/java/exercises/all-your-base/build.gradle +1 -0
- data/tracks/java/exercises/allergies/build.gradle +1 -0
- data/tracks/java/exercises/anagram/build.gradle +1 -0
- data/tracks/java/exercises/atbash-cipher/build.gradle +1 -0
- data/tracks/java/exercises/beer-song/build.gradle +1 -0
- data/tracks/java/exercises/binary-search/build.gradle +1 -0
- data/tracks/java/exercises/binary/build.gradle +1 -0
- data/tracks/java/exercises/bob/build.gradle +1 -0
- data/tracks/java/exercises/book-store/build.gradle +1 -0
- data/tracks/java/exercises/bracket-push/build.gradle +1 -0
- data/tracks/java/exercises/change/build.gradle +1 -0
- data/tracks/java/exercises/clock/build.gradle +2 -1
- data/tracks/java/exercises/collatz-conjecture/build.gradle +18 -0
- data/tracks/java/exercises/collatz-conjecture/src/example/java/CollatzCalculator.java +19 -0
- data/tracks/java/exercises/collatz-conjecture/src/main/java/CollatzCalculator.java +7 -0
- data/tracks/java/exercises/collatz-conjecture/src/test/java/CollatzCalculatorTest.java +59 -0
- data/tracks/java/exercises/crypto-square/build.gradle +1 -0
- data/tracks/java/exercises/diamond/build.gradle +1 -0
- data/tracks/java/exercises/diamond/src/example/java/DiamondPrinter.java +4 -4
- data/tracks/java/exercises/diamond/src/test/java/DiamondPrinterTest.java +6 -2
- data/tracks/java/exercises/difference-of-squares/build.gradle +1 -0
- data/tracks/java/exercises/difference-of-squares/src/main/java/.keep +0 -0
- data/tracks/java/exercises/etl/build.gradle +1 -0
- data/tracks/java/exercises/flatten-array/build.gradle +1 -0
- data/tracks/java/exercises/gigasecond/build.gradle +1 -0
- data/tracks/java/exercises/grade-school/build.gradle +1 -0
- data/tracks/java/exercises/hamming/build.gradle +1 -0
- data/tracks/java/exercises/hexadecimal/build.gradle +1 -0
- data/tracks/java/exercises/isogram/build.gradle +1 -0
- data/tracks/java/exercises/kindergarten-garden/build.gradle +1 -0
- data/tracks/java/exercises/largest-series-product/build.gradle +1 -0
- data/tracks/java/exercises/linked-list/build.gradle +1 -0
- data/tracks/java/exercises/luhn/build.gradle +1 -0
- data/tracks/java/exercises/matrix/build.gradle +2 -1
- data/tracks/java/exercises/meetup/build.gradle +1 -0
- data/tracks/java/exercises/minesweeper/build.gradle +1 -0
- data/tracks/java/exercises/nth-prime/build.gradle +1 -0
- data/tracks/java/exercises/ocr-numbers/build.gradle +1 -0
- data/tracks/java/exercises/octal/build.gradle +1 -0
- data/tracks/java/exercises/pangram/build.gradle +1 -0
- data/tracks/java/exercises/pascals-triangle/build.gradle +1 -0
- data/tracks/java/exercises/perfect-numbers/build.gradle +1 -0
- data/tracks/java/exercises/phone-number/build.gradle +1 -0
- data/tracks/java/exercises/pig-latin/build.gradle +1 -0
- data/tracks/java/exercises/queen-attack/build.gradle +1 -0
- data/tracks/java/exercises/raindrops/build.gradle +1 -0
- data/tracks/java/exercises/rectangles/build.gradle +1 -0
- data/tracks/java/exercises/rna-transcription/build.gradle +1 -0
- data/tracks/java/exercises/robot-simulator/build.gradle +1 -0
- data/tracks/java/exercises/roman-numerals/build.gradle +1 -0
- data/tracks/java/exercises/run-length-encoding/build.gradle +1 -0
- data/tracks/java/exercises/saddle-points/build.gradle +1 -0
- data/tracks/java/exercises/scrabble-score/build.gradle +1 -0
- data/tracks/java/exercises/secret-handshake/build.gradle +1 -0
- data/tracks/java/exercises/series/build.gradle +1 -0
- data/tracks/java/exercises/settings.gradle +1 -0
- data/tracks/java/exercises/sieve/build.gradle +1 -0
- data/tracks/java/exercises/simple-cipher/build.gradle +1 -0
- data/tracks/java/exercises/simple-linked-list/build.gradle +1 -0
- data/tracks/java/exercises/space-age/build.gradle +1 -0
- data/tracks/java/exercises/strain/build.gradle +1 -0
- data/tracks/java/exercises/sublist/build.gradle +1 -0
- data/tracks/java/exercises/sum-of-multiples/build.gradle +1 -0
- data/tracks/java/exercises/triangle/build.gradle +1 -0
- data/tracks/java/exercises/trinary/build.gradle +1 -0
- data/tracks/java/exercises/twelve-days/build.gradle +2 -1
- data/tracks/java/exercises/word-count/build.gradle +1 -0
- data/tracks/java/exercises/wordy/build.gradle +1 -0
- data/tracks/javascript/LICENSE +2 -2
- data/tracks/javascript/README.md +0 -5
- data/tracks/julia/LICENSE +2 -2
- data/tracks/kotlin/LICENSE +2 -2
- data/tracks/kotlin/README.md +0 -7
- data/tracks/kotlin/TRACK_HINTS.md +1 -0
- data/tracks/kotlin/exercises/phone-number/src/example/kotlin/PhoneNumber.kt +1 -1
- data/tracks/kotlin/exercises/phone-number/src/test/kotlin/PhoneNumberTest.kt +7 -8
- data/tracks/kotlin/exercises/rna-transcription/src/test/kotlin/RnaTranscriptionTest.kt +6 -6
- data/tracks/lfe/LICENSE +2 -2
- data/tracks/lfe/README.md +0 -5
- data/tracks/lisp/LICENSE +2 -2
- data/tracks/lisp/README.md +0 -5
- data/tracks/lua/LICENSE +2 -2
- data/tracks/lua/README.md +0 -5
- data/tracks/mips/LICENSE +2 -2
- data/tracks/mips/README.md +0 -5
- data/tracks/objective-c/LICENSE +2 -2
- data/tracks/objective-c/README.md +0 -5
- data/tracks/ocaml/LICENSE +2 -2
- data/tracks/ocaml/README.md +0 -5
- data/tracks/ocaml/config.json +54 -25
- data/tracks/ocaml/exercises/forth/.merlin +5 -0
- data/tracks/ocaml/exercises/forth/Makefile +11 -0
- data/tracks/ocaml/exercises/forth/example.ml +89 -0
- data/tracks/ocaml/exercises/forth/forth.mli +1 -0
- data/tracks/ocaml/exercises/forth/test.ml +147 -0
- data/tracks/ocaml/exercises/react/.merlin +5 -0
- data/tracks/ocaml/exercises/react/HINT.md +3 -0
- data/tracks/ocaml/exercises/react/Makefile +11 -0
- data/tracks/ocaml/exercises/react/example.ml +106 -0
- data/tracks/ocaml/exercises/react/react.mli +26 -0
- data/tracks/ocaml/exercises/react/test.ml +157 -0
- data/tracks/ocaml/tools/test-generator/src/special_cases.ml +5 -2
- data/tracks/ocaml/tools/test-generator/templates/forth/template.ml +114 -0
- data/tracks/perl5/LICENSE +2 -2
- data/tracks/perl6/LICENSE +2 -2
- data/tracks/perl6/README.md +0 -5
- data/tracks/perl6/config.json +5 -0
- data/tracks/perl6/exercises/clock/Example.pm6 +2 -2
- data/tracks/perl6/exercises/flatten-array/Example.pm6 +13 -0
- data/tracks/perl6/exercises/flatten-array/FlattenArray.pm6 +4 -0
- data/tracks/perl6/exercises/flatten-array/example.yaml +6 -0
- data/tracks/perl6/exercises/flatten-array/flatten-array.t +80 -0
- data/tracks/php/LICENSE +2 -2
- data/tracks/php/README.md +0 -5
- data/tracks/powershell/.travis.yml +1 -0
- data/tracks/python/LICENSE +2 -2
- data/tracks/python/README.md +0 -5
- data/tracks/python/config.json +8 -0
- data/tracks/python/exercises/protein-translation/example.py +25 -0
- data/tracks/python/exercises/protein-translation/protein_translation.py +6 -0
- data/tracks/python/exercises/protein-translation/protein_translation_test.py +59 -0
- data/tracks/r/LICENSE +2 -2
- data/tracks/r/README.md +0 -5
- data/tracks/racket/LICENSE +2 -2
- data/tracks/racket/README.md +0 -5
- data/tracks/racket/config.json +5 -0
- data/tracks/racket/exercises/acronym/acronym-test.rkt +40 -0
- data/tracks/racket/exercises/acronym/acronym.rkt +3 -0
- data/tracks/racket/exercises/acronym/example.rkt +25 -0
- data/tracks/racket/exercises/grep/example.rkt +60 -26
- data/tracks/racket/exercises/grep/grep-test.rkt +154 -17
- data/tracks/racket/exercises/grep/grep.rkt +1 -18
- data/tracks/racket/exercises/grep/iliad.txt +9 -0
- data/tracks/racket/exercises/grep/midsummer-night.txt +7 -0
- data/tracks/racket/exercises/grep/paradise-lost.txt +8 -0
- data/tracks/ruby/README.md +4 -1
- data/tracks/ruby/exercises/acronym/.meta/.version +1 -1
- data/tracks/ruby/exercises/acronym/.meta/solutions/acronym.rb +1 -1
- data/tracks/ruby/exercises/acronym/acronym_test.rb +2 -7
- data/tracks/ruby/exercises/anagram/.meta/generator/anagram_case.rb +1 -1
- data/tracks/ruby/exercises/beer-song/.meta/generator/beer_song_case.rb +1 -1
- data/tracks/ruby/exercises/clock/.meta/generator/clock_case.rb +1 -1
- data/tracks/ruby/exercises/connect/.meta/generator/connect_case.rb +0 -3
- data/tracks/ruby/exercises/connect/.meta/generator/test_template.erb +1 -1
- data/tracks/ruby/exercises/difference-of-squares/.meta/.version +1 -1
- data/tracks/ruby/exercises/difference-of-squares/.meta/solutions/difference_of_squares.rb +1 -1
- data/tracks/ruby/exercises/difference-of-squares/difference_of_squares_test.rb +12 -17
- data/tracks/ruby/exercises/triangle/.meta/generator/triangle_case.rb +10 -2
- data/tracks/ruby/exercises/triangle/triangle_test.rb +17 -17
- data/tracks/ruby/exercises/wordy/.meta/generator/wordy_case.rb +1 -1
- data/tracks/ruby/lib/generator/case_values.rb +1 -1
- data/tracks/ruby/lib/generator/exercise_case.rb +16 -2
- data/tracks/ruby/lib/generator/exercise_case/assertion.rb +4 -4
- data/tracks/ruby/test/fixtures/xruby/exercises/alpha/.meta/generator/alpha_case.rb +1 -1
- data/tracks/ruby/test/generator/case_values_test.rb +28 -7
- data/tracks/ruby/test/generator/exercise_case/assertion_test.rb +7 -7
- data/tracks/ruby/test/generator/exercise_case_test.rb +21 -25
- data/tracks/ruby/test/wordy_cases_test.rb +4 -4
- data/tracks/rust/LICENSE +2 -2
- data/tracks/rust/README.md +0 -5
- data/tracks/rust/config.json +1 -0
- data/tracks/rust/exercises/etl/Cargo.toml +1 -1
- data/tracks/rust/exercises/etl/example.rs +2 -2
- data/tracks/rust/exercises/etl/tests/etl.rs +26 -32
- data/tracks/rust/exercises/forth/tests/forth.rs +20 -22
- data/tracks/rust/exercises/minesweeper/Cargo.toml +1 -1
- data/tracks/rust/exercises/minesweeper/example.rs +3 -0
- data/tracks/rust/exercises/minesweeper/tests/minesweeper.rs +44 -46
- data/tracks/rust/exercises/raindrops/Cargo.toml +1 -1
- data/tracks/rust/exercises/raindrops/tests/raindrops.rs +12 -0
- data/tracks/rust/exercises/rna-transcription/Cargo.toml +1 -1
- data/tracks/rust/exercises/rna-transcription/example.rs +13 -9
- data/tracks/rust/exercises/rna-transcription/tests/rna-transcription.rs +23 -5
- data/tracks/scala/LICENSE +2 -2
- data/tracks/scala/README.md +0 -5
- data/tracks/scheme/LICENSE +2 -2
- data/tracks/scheme/README.org +0 -6
- data/tracks/swift/Dangerfile +1 -1
- data/tracks/swift/LICENSE +2 -2
- data/tracks/swift/README.md +0 -6
- data/tracks/vbnet/.travis.yml +1 -0
- data/tracks/vimscript/.travis.yml +4 -0
- data/tracks/vimscript/.vintrc.yaml +5 -0
- data/tracks/vimscript/TRACK_HINTS.md +19 -1
- data/tracks/vimscript/bin/pre-push +18 -0
- data/tracks/vimscript/config.json +8 -1
- data/tracks/vimscript/docs/ABOUT.md +7 -6
- data/tracks/vimscript/docs/TESTS.md +4 -4
- data/tracks/vimscript/exercises/allergies/allergies.vader +68 -0
- data/tracks/vimscript/exercises/allergies/allergies.vim +29 -0
- data/tracks/vimscript/exercises/allergies/example.vim +23 -0
- data/tracks/vimscript/lib/generate.vim +89 -0
- metadata +81 -6
- data/tracks/java/exercises/difference-of-squares/src/main/java/DifferenceOfSquaresCalculator.java +0 -15
- data/tracks/ocaml/.vscode/launch.json +0 -13
data/tracks/csharp/README.md
CHANGED
@@ -11,8 +11,3 @@ Please see the [contributing guide](https://github.com/exercism/x-api/blob/maste
|
|
11
11
|
## Support
|
12
12
|
Need assitance? Check out our Gitter Channel at https://gitter.im/exercism/xcsharp where you can get support and ask questions related to the C# track.
|
13
13
|
|
14
|
-
## License
|
15
|
-
|
16
|
-
The MIT License (MIT)
|
17
|
-
|
18
|
-
Copyright (c) 2014 Katrina Owen, _@kytrinyx.com
|
data/tracks/delphi/LICENSE
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
|
1
|
+
MIT License
|
2
2
|
|
3
|
-
Copyright (c)
|
3
|
+
Copyright (c) 2017 Exercism, Inc
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
data/tracks/delphi/README.md
CHANGED
data/tracks/ecmascript/LICENSE
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
|
1
|
+
MIT License
|
2
2
|
|
3
|
-
Copyright (c)
|
3
|
+
Copyright (c) 2017 Exercism, Inc
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
data/tracks/ecmascript/README.md
CHANGED
@@ -36,8 +36,3 @@ Pass the exercise name to make script to run the tests for a specific exercise:
|
|
36
36
|
|
37
37
|
Please see the [contributing guide](https://github.com/exercism/x-api/blob/master/CONTRIBUTING.md#the-exercise-data)
|
38
38
|
|
39
|
-
## License
|
40
|
-
|
41
|
-
The MIT License (MIT)
|
42
|
-
|
43
|
-
Copyright (c) 2014 Katrina Owen, _@kytrinyx.com
|
data/tracks/elisp/.travis.yml
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
---
|
2
2
|
language: bash
|
3
|
+
before_install:
|
4
|
+
- sudo add-apt-repository -y ppa:cassou/emacs # Emacs 24.3
|
5
|
+
- sudo apt-get update
|
6
|
+
- sudo apt-get install -y emacs24-nox
|
3
7
|
script:
|
4
|
-
- bin/fetch-configlet
|
5
|
-
- bin/configlet .
|
6
|
-
|
8
|
+
- bin/fetch-configlet
|
9
|
+
- bin/configlet .
|
10
|
+
- bin/test-examples
|
data/tracks/elisp/LICENSE
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
|
1
|
+
MIT License
|
2
2
|
|
3
|
-
Copyright (c)
|
3
|
+
Copyright (c) 2017 Exercism, Inc
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
data/tracks/elisp/README.org
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
#+TITLE: xelisp
|
2
2
|
#+AUTHOR: Jason Lewis
|
3
3
|
|
4
|
+
#+ATTR_HTML: :alt Build Status
|
5
|
+
[[https://travis-ci.org/exercism/xelisp][https://api.travis-ci.org/exercism/xelisp.svg?branch=master]]
|
6
|
+
|
4
7
|
Exercism problems in Emacs Lisp.
|
5
8
|
|
6
9
|
** Contributing to The Emacs Lisp Track
|
@@ -26,12 +29,6 @@ request. You will need a GitHub account and you will need to fork
|
|
26
29
|
with the process.
|
27
30
|
|
28
31
|
|
29
|
-
** License
|
30
|
-
|
31
|
-
The MIT License (MIT)
|
32
|
-
|
33
|
-
Copyright (c) 2015 Katrina Owen, _@kytrinyx.com
|
34
|
-
|
35
32
|
*** GNU Emacs icon
|
36
33
|
The GNU Emacs icon was designed by Andrew Zhilin and is licensed under the Creative Commons Attribution-ShareAlike 3.0 License.
|
37
34
|
We have modified the GNU Emacs icon to create the Emacs Lisp icon for Exercism.
|
@@ -0,0 +1,27 @@
|
|
1
|
+
#! /usr/bin/env bash
|
2
|
+
|
3
|
+
if [[ ! -d "exercises" ]]; then
|
4
|
+
echo "exercises directory not found!"
|
5
|
+
exit 1
|
6
|
+
fi
|
7
|
+
|
8
|
+
cd ./exercises
|
9
|
+
|
10
|
+
for ex in *; do
|
11
|
+
err_cnt=0
|
12
|
+
impl="${ex}.el"
|
13
|
+
cd $ex
|
14
|
+
mv $impl "${impl}.tmp"
|
15
|
+
cp example.el $impl
|
16
|
+
emacs -batch -l ert -l "${ex}-test.el" -f ert-run-tests-batch-and-exit
|
17
|
+
let "err_cnt += $?"
|
18
|
+
mv "${impl}.tmp" $impl
|
19
|
+
cd -
|
20
|
+
done
|
21
|
+
|
22
|
+
if [ $err_cnt -ne 0 ]
|
23
|
+
then
|
24
|
+
exit 1
|
25
|
+
else
|
26
|
+
exit 0
|
27
|
+
fi
|
data/tracks/elisp/config.json
CHANGED
@@ -103,6 +103,16 @@
|
|
103
103
|
"difficulty": 1,
|
104
104
|
"slug": "nucleotide-count",
|
105
105
|
"topics": []
|
106
|
+
},
|
107
|
+
{
|
108
|
+
"difficulty": 1,
|
109
|
+
"slug": "phone-number",
|
110
|
+
"topics": []
|
111
|
+
},
|
112
|
+
{
|
113
|
+
"slug": "grains",
|
114
|
+
"difficulty": 1,
|
115
|
+
"topics": []
|
106
116
|
}
|
107
117
|
]
|
108
118
|
}
|
@@ -4,9 +4,6 @@ Well, you can start the tutoral by pressing =C-h t=, and that's not a bad place
|
|
4
4
|
to start. If you're completely new to Emacs, the [[http://batsov.com/prelude/][Emacs Prelude]] package offers a
|
5
5
|
nice set of sensible defaults and packages.
|
6
6
|
|
7
|
-
A guide I wrote a while ago for getting started with the editor (including
|
8
|
-
Prelude) can be found [[http://decomplecting.org/blog/2014/10/23/welcome-to-the-dark-side-switching-to-emacs/][here]].
|
9
|
-
|
10
7
|
The best documentation on Emacs Lisp is... shipped with Emacs itself!
|
11
8
|
|
12
9
|
From the [[http://www.emacswiki.org/emacs/EmacsLisp][EmacsWiki Entry]]:
|
@@ -0,0 +1,18 @@
|
|
1
|
+
;;; grains.el --- Grains exercise (exercism)
|
2
|
+
|
3
|
+
;;; Commentary:
|
4
|
+
|
5
|
+
;;; Code:
|
6
|
+
|
7
|
+
(require 'cl)
|
8
|
+
|
9
|
+
(defun square (n)
|
10
|
+
"Find the number of grains on square N."
|
11
|
+
(string-to-number (calc-eval (format "2^(%d - 1)" n))))
|
12
|
+
|
13
|
+
(defun total ()
|
14
|
+
"Find the total number of grains on the board."
|
15
|
+
(string-to-number (calc-eval "2^64 - 1")))
|
16
|
+
|
17
|
+
(provide 'grains)
|
18
|
+
;;; grains.el ends here
|
@@ -0,0 +1,38 @@
|
|
1
|
+
;;; grains-test.el --- Test for Grains (exercism)
|
2
|
+
|
3
|
+
;;; Commentary:
|
4
|
+
|
5
|
+
;;; Code:
|
6
|
+
|
7
|
+
(load-file "grains.el")
|
8
|
+
|
9
|
+
(ert-deftest square-1 ()
|
10
|
+
(should (equal 1 (square 1))))
|
11
|
+
|
12
|
+
(ert-deftest square-2 ()
|
13
|
+
(should (equal 2 (square 2))))
|
14
|
+
|
15
|
+
(ert-deftest square-3 ()
|
16
|
+
(should (equal 4 (square 3))))
|
17
|
+
|
18
|
+
(ert-deftest square-4 ()
|
19
|
+
(should (equal 8 (square 4))))
|
20
|
+
|
21
|
+
(ert-deftest square-16 ()
|
22
|
+
(should (equal 32768
|
23
|
+
(square 16))))
|
24
|
+
|
25
|
+
(ert-deftest square-32 ()
|
26
|
+
(should (equal 2147483648
|
27
|
+
(square 32))))
|
28
|
+
|
29
|
+
(ert-deftest square-64 ()
|
30
|
+
(should (equal 9223372036854775808
|
31
|
+
(square 64))))
|
32
|
+
|
33
|
+
(ert-deftest total-grains ()
|
34
|
+
(should (equal 18446744073709551615
|
35
|
+
(total))))
|
36
|
+
|
37
|
+
(provide 'grains-test.el)
|
38
|
+
;;; grains-test.el ends here.
|
@@ -0,0 +1,34 @@
|
|
1
|
+
;;; phone-number.el --- phone-number Exercise (exercism)
|
2
|
+
|
3
|
+
;;; Commentary:
|
4
|
+
|
5
|
+
;;; Code:
|
6
|
+
|
7
|
+
|
8
|
+
(defun numbers (num)
|
9
|
+
(let ((number (replace-regexp-in-string "[^0-9]+" "" num)))
|
10
|
+
(cond
|
11
|
+
((= (length number) 10) number)
|
12
|
+
((and (= (length number) 11)
|
13
|
+
(string-equal (substring number 0 1) "1")) (substring number 1))
|
14
|
+
(t "0000000000"))))
|
15
|
+
|
16
|
+
|
17
|
+
(defun area-code (num)
|
18
|
+
(substring (numbers num) 0 3))
|
19
|
+
|
20
|
+
|
21
|
+
(defun prefix (num)
|
22
|
+
(substring (numbers num) 3 6))
|
23
|
+
|
24
|
+
|
25
|
+
(defun line-number (num)
|
26
|
+
(substring (numbers num) 6))
|
27
|
+
|
28
|
+
|
29
|
+
(defun pprint (num)
|
30
|
+
(format "(%s) %s-%s" (area-code num) (prefix num) (line-number num)))
|
31
|
+
|
32
|
+
|
33
|
+
(provide 'phone-number)
|
34
|
+
;;; phone-number.el ends here
|
@@ -0,0 +1,43 @@
|
|
1
|
+
;;; phone-number-test.el --- Tests for phone-number (exercism)
|
2
|
+
|
3
|
+
;;; Commentary:
|
4
|
+
|
5
|
+
;;; Code:
|
6
|
+
|
7
|
+
(load-file "phone-number.el")
|
8
|
+
|
9
|
+
|
10
|
+
(ert-deftest cleans-number-test ()
|
11
|
+
(should (equal (numbers "(123) 456-7890") "1234567890")))
|
12
|
+
|
13
|
+
|
14
|
+
(ert-deftest cleans-numbers-with-dots-test ()
|
15
|
+
(should (equal (numbers "123.456.7890") "1234567890")))
|
16
|
+
|
17
|
+
|
18
|
+
(ert-deftest valid-when-11-digits-and-first-is-1-test ()
|
19
|
+
(should (equal (numbers "11234567890") "1234567890")))
|
20
|
+
|
21
|
+
|
22
|
+
(ert-deftest invalid-when-11-digits-test ()
|
23
|
+
(should (equal (numbers "21234567890") "0000000000")))
|
24
|
+
|
25
|
+
|
26
|
+
(ert-deftest invalid-when-9-digits-test ()
|
27
|
+
(should (equal (numbers "123456789") "0000000000")))
|
28
|
+
|
29
|
+
|
30
|
+
(ert-deftest area-code-test ()
|
31
|
+
(should (equal (area-code "1234567890") "123")))
|
32
|
+
|
33
|
+
|
34
|
+
(ert-deftest pprint-test ()
|
35
|
+
(should (equal (pprint "1234567890") "(123) 456-7890")))
|
36
|
+
|
37
|
+
|
38
|
+
(ert-deftest pprint-full-us-phone-number-test ()
|
39
|
+
(should (equal (pprint "11234567890") "(123) 456-7890")))
|
40
|
+
|
41
|
+
|
42
|
+
(provide 'phone-number)
|
43
|
+
;;; phone-number-test.el ends here
|
data/tracks/elixir/LICENSE
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
|
1
|
+
MIT License
|
2
2
|
|
3
|
-
Copyright (c)
|
3
|
+
Copyright (c) 2017 Exercism, Inc
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
data/tracks/elixir/README.md
CHANGED
@@ -76,8 +76,3 @@ All the tests for xElixir exercises can be run from the top level of the repo
|
|
76
76
|
with `$ mix test`. Please run this command before submitting your PR. Watch out
|
77
77
|
for and correct any compiler warnings you may have introduced.
|
78
78
|
|
79
|
-
## License
|
80
|
-
|
81
|
-
The MIT License (MIT)
|
82
|
-
|
83
|
-
Copyright (c) 2016 Katrina Owen, _@kytrinyx.com
|
data/tracks/elm/LICENSE
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
|
1
|
+
MIT License
|
2
2
|
|
3
|
-
Copyright (c)
|
3
|
+
Copyright (c) 2017 Exercism, Inc
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
data/tracks/elm/README.md
CHANGED
@@ -80,11 +80,6 @@ tests =
|
|
80
80
|
|
81
81
|
- If you are submitting a new exercise, be sure to add it to the appropriate place in the `config.json` file. Also, please run `bin/fetch-configlet && bin/configlet` to ensure the exercise is configured correctly.
|
82
82
|
|
83
|
-
## License
|
84
|
-
|
85
|
-
The MIT License (MIT)
|
86
|
-
|
87
|
-
Copyright (c) 2016 Katrina Owen, _@kytrinyx.com
|
88
83
|
|
89
84
|
### Elm icon
|
90
85
|
We were unable to find copyright information about the Elm logo, nor information about who designed it. Presumably Evan Czaplicki, creator of the Elm language, also made the logo, and holds copyright. It may also fall within the public domain, since it is a geometric shape. We've adapted the official Elm logo by changing the colors, which we believe falls under "fair use".
|
data/tracks/erlang/LICENSE
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
|
1
|
+
MIT License
|
2
2
|
|
3
|
-
Copyright (c)
|
3
|
+
Copyright (c) 2017 Exercism, Inc
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
data/tracks/erlang/README.md
CHANGED
data/tracks/erlang/SETUP.md
CHANGED
@@ -3,6 +3,13 @@
|
|
3
3
|
In order to run the tests, issue the following command from the exercise
|
4
4
|
directory:
|
5
5
|
|
6
|
+
For running the tests provided, `rebar3` is used as it is the official build and
|
7
|
+
dependency management tool for erlang now. Please refer to [the tracks installation
|
8
|
+
instructions](http://exercism.io/languages/erlang/installing) on how to do that.
|
9
|
+
|
10
|
+
In order to run the tests, you can issue the following command from the exercise
|
11
|
+
directory.
|
12
|
+
|
6
13
|
```bash
|
7
14
|
$ rebar3 eunit
|
8
15
|
```
|
@@ -1,12 +1,12 @@
|
|
1
1
|
%% Erlang compiler options
|
2
2
|
{erl_opts, [debug_info]}.
|
3
3
|
|
4
|
-
{plugins, [rebar3_proper, rebar_alias]}.
|
5
|
-
{deps, [{proper, "1.1.1-beta"}]}.
|
4
|
+
% {plugins, [rebar3_proper, rebar_alias]}.
|
5
|
+
%{deps, [{proper, "1.1.1-beta"}]}.
|
6
6
|
|
7
|
-
{alias, [
|
8
|
-
{test, [eunit, proper]}
|
9
|
-
]}.
|
7
|
+
%{alias, [
|
8
|
+
% {test, [eunit, proper]}
|
9
|
+
%]}.
|
10
10
|
|
11
11
|
{dialyzer, [
|
12
12
|
{warnings, [underspecs, no_return]},
|
@@ -2,7 +2,6 @@
|
|
2
2
|
|
3
3
|
-define(TESTED_MODULE, (sut(rotational_cipher))).
|
4
4
|
-define(TEST_VERSION, 1).
|
5
|
-
-include_lib("proper/include/proper.hrl").
|
6
5
|
-include("exercism.hrl").
|
7
6
|
|
8
7
|
%%% To use this testsuite completely do run
|
@@ -79,20 +78,21 @@ decrypt_punctuation_test() ->
|
|
79
78
|
decrypt_all_letters_test() ->
|
80
79
|
?assertEqual("The quick brown fox jumps over the lazy dog.", ?TESTED_MODULE:decrypt("Gur dhvpx oebja sbk whzcf bire gur ynml qbt.", 13)).
|
81
80
|
|
82
|
-
|
83
|
-
|
84
|
-
prop_decrypt_encrypt_is_id() ->
|
85
|
-
?FORALL({Input, N}, {string(), integer(0,26)},
|
86
|
-
?TESTED_MODULE:decrypt(?TESTED_MODULE:encrypt(Input, N), N) == Input).
|
87
|
-
|
88
|
-
prop_decrypt_is_encrypt_with_another_key() ->
|
89
|
-
?FORALL({Input, N}, {string(), integer(0,26)},
|
90
|
-
?TESTED_MODULE:decrypt(Input, 26 - N) == ?TESTED_MODULE:encrypt(Input, N)).
|
91
|
-
|
92
|
-
prop_encrypt_13_twice_is_id() ->
|
93
|
-
?FORALL(Input, string(),
|
94
|
-
?TESTED_MODULE:encrypt(?TESTED_MODULE:encrypt(Input, 13), 13) == Input).
|
95
|
-
|
96
|
-
prop_decrypt_13_twice_is_id() ->
|
97
|
-
?FORALL(Input, string(),
|
98
|
-
?TESTED_MODULE:decrypt(?TESTED_MODULE:decrypt(Input, 13), 13) == Input).
|
81
|
+
%%% Properties tested via `proper`
|
82
|
+
%
|
83
|
+
%prop_decrypt_encrypt_is_id() ->
|
84
|
+
% ?FORALL({Input, N}, {string(), integer(0,26)},
|
85
|
+
% ?TESTED_MODULE:decrypt(?TESTED_MODULE:encrypt(Input, N), N) == Input).
|
86
|
+
%
|
87
|
+
%prop_decrypt_is_encrypt_with_another_key() ->
|
88
|
+
% ?FORALL({Input, N}, {string(), integer(0,26)},
|
89
|
+
% ?TESTED_MODULE:decrypt(Input, 26 - N) == ?TESTED_MODULE:encrypt(Input, N)).
|
90
|
+
%
|
91
|
+
%prop_encrypt_13_twice_is_id() ->
|
92
|
+
% ?FORALL(Input, string(),
|
93
|
+
% ?TESTED_MODULE:encrypt(?TESTED_MODULE:encrypt(Input, 13), 13) == Input).
|
94
|
+
%
|
95
|
+
%prop_decrypt_13_twice_is_id() ->
|
96
|
+
% ?FORALL(Input, string(),
|
97
|
+
% ?TESTED_MODULE:decrypt(?TESTED_MODULE:decrypt(Input, 13), 13) == Input).
|
98
|
+
%
|