trackler 2.1.0.4 → 2.1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/trackler/version.rb +1 -1
- data/tracks/ecmascript/.travis.yml +1 -0
- data/tracks/ecmascript/Makefile +13 -18
- data/tracks/ecmascript/README.md +4 -8
- data/tracks/ecmascript/docs/INSTALLATION.md +1 -17
- data/tracks/ecmascript/docs/TESTS.md +10 -3
- data/tracks/ecmascript/exercises/accumulate/package.json +62 -13
- data/tracks/ecmascript/exercises/acronym/package.json +62 -13
- data/tracks/ecmascript/exercises/all-your-base/package.json +62 -13
- data/tracks/ecmascript/exercises/allergies/package.json +62 -13
- data/tracks/ecmascript/exercises/anagram/package.json +62 -13
- data/tracks/ecmascript/exercises/atbash-cipher/package.json +62 -13
- data/tracks/ecmascript/exercises/beer-song/package.json +62 -13
- data/tracks/ecmascript/exercises/binary-search-tree/package.json +62 -13
- data/tracks/ecmascript/exercises/binary-search/package.json +62 -13
- data/tracks/ecmascript/exercises/binary/package.json +62 -13
- data/tracks/ecmascript/exercises/bob/package.json +62 -13
- data/tracks/ecmascript/exercises/bracket-push/package.json +62 -13
- data/tracks/ecmascript/exercises/circular-buffer/package.json +62 -13
- data/tracks/ecmascript/exercises/clock/package.json +62 -13
- data/tracks/ecmascript/exercises/crypto-square/package.json +62 -13
- data/tracks/ecmascript/exercises/custom-set/package.json +62 -13
- data/tracks/ecmascript/exercises/diamond/package.json +62 -13
- data/tracks/ecmascript/exercises/difference-of-squares/package.json +62 -13
- data/tracks/ecmascript/exercises/etl/package.json +62 -13
- data/tracks/ecmascript/exercises/food-chain/package.json +62 -13
- data/tracks/ecmascript/exercises/gigasecond/package.json +62 -13
- data/tracks/ecmascript/exercises/grade-school/package.json +62 -13
- data/tracks/ecmascript/exercises/grains/package.json +62 -13
- data/tracks/ecmascript/exercises/hamming/package.json +62 -13
- data/tracks/ecmascript/exercises/hello-world/example.js +5 -4
- data/tracks/ecmascript/exercises/hello-world/hello-world.js +7 -5
- data/tracks/ecmascript/exercises/hello-world/hello-world.spec.js +4 -2
- data/tracks/ecmascript/exercises/hello-world/package.json +62 -13
- data/tracks/ecmascript/exercises/hexadecimal/package.json +62 -13
- data/tracks/ecmascript/exercises/isogram/package.json +62 -13
- data/tracks/ecmascript/exercises/kindergarten-garden/package.json +62 -13
- data/tracks/ecmascript/exercises/largest-series-product/package.json +62 -13
- data/tracks/ecmascript/exercises/leap/example.js +10 -1
- data/tracks/ecmascript/exercises/leap/leap.spec.js +13 -30
- data/tracks/ecmascript/exercises/leap/package.json +62 -13
- data/tracks/ecmascript/exercises/linked-list/package.json +62 -13
- data/tracks/ecmascript/exercises/luhn/package.json +62 -13
- data/tracks/ecmascript/exercises/matrix/package.json +62 -13
- data/tracks/ecmascript/exercises/meetup/package.json +62 -13
- data/tracks/ecmascript/exercises/nth-prime/package.json +62 -13
- data/tracks/ecmascript/exercises/ocr-numbers/package.json +62 -13
- data/tracks/ecmascript/exercises/octal/package.json +62 -13
- data/tracks/ecmascript/exercises/package.json +62 -9
- data/tracks/ecmascript/exercises/palindrome-products/package.json +62 -13
- data/tracks/ecmascript/exercises/palindrome-products/palindrome-products.spec.js +28 -1
- data/tracks/ecmascript/exercises/pangram/package.json +62 -13
- data/tracks/ecmascript/exercises/pascals-triangle/package.json +62 -13
- data/tracks/ecmascript/exercises/perfect-numbers/example.js +1 -1
- data/tracks/ecmascript/exercises/perfect-numbers/package.json +62 -13
- data/tracks/ecmascript/exercises/perfect-numbers/perfect-numbers.spec.js +16 -14
- data/tracks/ecmascript/exercises/phone-number/package.json +62 -13
- data/tracks/ecmascript/exercises/pig-latin/package.json +62 -13
- data/tracks/ecmascript/exercises/prime-factors/package.json +62 -13
- data/tracks/ecmascript/exercises/pythagorean-triplet/package.json +62 -13
- data/tracks/ecmascript/exercises/queen-attack/package.json +62 -13
- data/tracks/ecmascript/exercises/raindrops/package.json +62 -13
- data/tracks/ecmascript/exercises/rna-transcription/package.json +62 -13
- data/tracks/ecmascript/exercises/robot-name/package.json +62 -13
- data/tracks/ecmascript/exercises/robot-simulator/package.json +62 -13
- data/tracks/ecmascript/exercises/roman-numerals/package.json +62 -13
- data/tracks/ecmascript/exercises/saddle-points/package.json +62 -13
- data/tracks/ecmascript/exercises/say/package.json +62 -13
- data/tracks/ecmascript/exercises/scrabble-score/package.json +62 -13
- data/tracks/ecmascript/exercises/secret-handshake/package.json +62 -13
- data/tracks/ecmascript/exercises/series/package.json +62 -13
- data/tracks/ecmascript/exercises/sieve/package.json +62 -13
- data/tracks/ecmascript/exercises/simple-cipher/package.json +62 -13
- data/tracks/ecmascript/exercises/space-age/package.json +62 -13
- data/tracks/ecmascript/exercises/strain/package.json +62 -13
- data/tracks/ecmascript/exercises/sum-of-multiples/package.json +62 -13
- data/tracks/ecmascript/exercises/triangle/package.json +62 -13
- data/tracks/ecmascript/exercises/trinary/package.json +62 -13
- data/tracks/ecmascript/exercises/two-bucket/package.json +62 -13
- data/tracks/ecmascript/exercises/word-count/package.json +62 -13
- data/tracks/ecmascript/exercises/wordy/package.json +62 -13
- data/tracks/ecmascript/package.json +62 -13
- data/tracks/erlang/.github/stale.yml +3 -0
- data/tracks/go/exercises/series/asktoomuch_test.go +1 -1
- data/tracks/go/exercises/series/example.go +2 -2
- data/tracks/go/exercises/series/first_example.go +1 -1
- data/tracks/go/exercises/series/first_test.go +1 -1
- data/tracks/go/exercises/series/series_test.go +2 -2
- data/tracks/ocaml/exercises/bracket-push/test.ml +2 -0
- data/tracks/ocaml/exercises/phone-number/example.ml +7 -2
- data/tracks/ocaml/exercises/phone-number/test.ml +11 -5
- data/tracks/ocaml/tools/test-generator/templates/phone-number/template.ml +1 -1
- data/tracks/pony/.github/stale.yml +16 -0
- data/tracks/purescript/config.json +7 -0
- data/tracks/purescript/exercises/pascals-triangle/bower.json +16 -0
- data/tracks/purescript/exercises/pascals-triangle/examples/src/PascalsTriangle.purs +24 -0
- data/tracks/purescript/exercises/pascals-triangle/src/PascalsTriangle.purs +1 -0
- data/tracks/purescript/exercises/pascals-triangle/test/Main.purs +74 -0
- data/tracks/ruby/.github/ISSUE_TEMPLATE.md +2 -2
- data/tracks/ruby/.github/PULL_REQUEST_TEMPLATE.md +14 -10
- data/tracks/ruby/.github/stale.yml +21 -0
- data/tracks/ruby/README.md +80 -74
- data/tracks/ruby/{lib → exercises/acronym/.meta/generator}/acronym_cases.rb +0 -0
- data/tracks/ruby/{lib → exercises/all-your-base/.meta/generator}/all_your_base_cases.rb +0 -0
- data/tracks/ruby/{lib → exercises/alphametics/.meta/generator}/alphametics_cases.rb +0 -0
- data/tracks/ruby/{lib → exercises/anagram/.meta/generator}/anagram_cases.rb +0 -0
- data/tracks/ruby/{lib → exercises/beer-song/.meta/generator}/beer_song_cases.rb +0 -0
- data/tracks/ruby/{lib → exercises/binary/.meta/generator}/binary_cases.rb +0 -0
- data/tracks/ruby/{lib → exercises/bowling/.meta/generator}/bowling_cases.rb +0 -0
- data/tracks/ruby/{lib → exercises/bracket-push/.meta/generator}/bracket_push_cases.rb +0 -0
- data/tracks/ruby/{lib → exercises/clock/.meta/generator}/clock_cases.rb +0 -0
- data/tracks/ruby/{lib → exercises/connect/.meta/generator}/connect_cases.rb +0 -0
- data/tracks/ruby/{lib → exercises/custom-set/.meta/generator}/custom_set_cases.rb +0 -0
- data/tracks/ruby/{lib → exercises/difference-of-squares/.meta/generator}/difference_of_squares_cases.rb +0 -0
- data/tracks/ruby/{lib → exercises/dominoes/.meta/generator}/dominoes_cases.rb +0 -0
- data/tracks/ruby/{lib → exercises/etl/.meta/generator}/etl_cases.rb +0 -0
- data/tracks/ruby/{lib → exercises/gigasecond/.meta/generator}/gigasecond_cases.rb +0 -0
- data/tracks/ruby/{lib → exercises/grains/.meta/generator}/grains_cases.rb +0 -0
- data/tracks/ruby/{lib → exercises/hamming/.meta/generator}/hamming_cases.rb +0 -0
- data/tracks/ruby/{lib → exercises/hello-world/.meta/generator}/hello_world_cases.rb +0 -0
- data/tracks/ruby/{lib → exercises/isogram/.meta/generator}/isogram_cases.rb +0 -0
- data/tracks/ruby/{lib → exercises/largest-series-product/.meta/generator}/largest_series_product_cases.rb +0 -0
- data/tracks/ruby/{lib → exercises/leap/.meta/generator}/leap_cases.rb +0 -0
- data/tracks/ruby/{lib → exercises/luhn/.meta/generator}/luhn_cases.rb +0 -0
- data/tracks/ruby/{lib → exercises/nth-prime/.meta/generator}/nth_prime_cases.rb +0 -0
- data/tracks/ruby/{lib → exercises/ocr-numbers/.meta/generator}/ocr_numbers_cases.rb +0 -0
- data/tracks/ruby/{lib → exercises/pangram/.meta/generator}/pangram_cases.rb +0 -0
- data/tracks/ruby/{lib → exercises/pig-latin/.meta/generator}/pig_latin_cases.rb +0 -0
- data/tracks/ruby/{lib → exercises/queen-attack/.meta/generator}/queen_attack_cases.rb +0 -0
- data/tracks/ruby/{lib → exercises/raindrops/.meta/generator}/raindrops_cases.rb +0 -0
- data/tracks/ruby/{lib → exercises/rna-transcription/.meta/generator}/rna_transcription_cases.rb +0 -0
- data/tracks/ruby/{lib → exercises/roman-numerals/.meta/generator}/roman_numerals_cases.rb +0 -0
- data/tracks/ruby/{lib → exercises/run-length-encoding/.meta/generator}/run_length_encoding_cases.rb +0 -0
- data/tracks/ruby/{lib → exercises/say/.meta/generator}/say_cases.rb +0 -0
- data/tracks/ruby/{lib → exercises/sieve/.meta/generator}/sieve_cases.rb +0 -0
- data/tracks/ruby/{lib → exercises/tournament/.meta/generator}/tournament_cases.rb +0 -0
- data/tracks/ruby/{lib → exercises/transpose/.meta/generator}/transpose_cases.rb +0 -0
- data/tracks/ruby/{lib → exercises/triangle/.meta/generator}/triangle_cases.rb +0 -0
- data/tracks/ruby/{lib → exercises/two-bucket/.meta/generator}/two_bucket_cases.rb +0 -0
- data/tracks/ruby/{lib → exercises/word-count/.meta/generator}/word_count_cases.rb +0 -0
- data/tracks/ruby/{lib → exercises/wordy/.meta/generator}/wordy_cases.rb +0 -0
- data/tracks/ruby/lib/generator/files.rb +5 -1
- data/tracks/ruby/lib/generator/files/generator_cases.rb +18 -4
- data/tracks/ruby/lib/generator/files/metadata_files.rb +3 -0
- data/tracks/ruby/lib/generator/files/track_files.rb +24 -6
- data/tracks/ruby/test/fixtures/xruby/exercises/alpha/.meta/generator/test_template.erb +23 -0
- data/tracks/ruby/test/fixtures/xruby/exercises/beta/.meta/.version +1 -0
- data/tracks/ruby/test/fixtures/xruby/{lib → exercises/beta/.meta/generator}/beta_cases.rb +0 -0
- data/tracks/ruby/test/fixtures/xruby/exercises/beta/example.rb +5 -0
- data/tracks/ruby/test/fixtures/xruby/exercises/{alpha → beta}/example.tt +10 -7
- data/tracks/ruby/test/generator/files/generate_cases_test.rb +25 -1
- data/tracks/ruby/test/generator/files/metadata_files_test.rb +21 -0
- data/tracks/ruby/test/generator/files/track_files_test.rb +20 -3
- data/tracks/ruby/test/generator/files_test.rb +18 -0
- data/tracks/ruby/test/wordy_cases_test.rb +1 -0
- data/tracks/typescript/README.md +1 -1
- data/tracks/typescript/config.json +6 -0
- data/tracks/typescript/exercises/difference-of-squares/difference-of-squares.example.ts +39 -0
- data/tracks/typescript/exercises/difference-of-squares/difference-of-squares.test.ts +56 -0
- data/tracks/typescript/exercises/difference-of-squares/package.json +36 -0
- data/tracks/typescript/exercises/difference-of-squares/tsconfig.json +21 -0
- data/tracks/typescript/exercises/difference-of-squares/tslint.json +127 -0
- data/tracks/typescript/exercises/difference-of-squares/yarn.lock +2739 -0
- data/tracks/typescript/exercises/wordy/wordy.example.ts +1 -1
- metadata +56 -114
- data/tracks/csharp/.github/stale.yml +0 -0
- data/tracks/ecmascript/exercises/accumulate/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/acronym/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/all-your-base/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/allergies/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/anagram/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/atbash-cipher/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/beer-song/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/binary-search-tree/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/binary-search/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/binary/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/bob/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/bracket-push/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/circular-buffer/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/clock/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/crypto-square/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/custom-set/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/diamond/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/difference-of-squares/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/etl/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/food-chain/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/gigasecond/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/grade-school/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/grains/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/gulpfile.js +0 -89
- data/tracks/ecmascript/exercises/hamming/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/hello-world/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/hexadecimal/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/isogram/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/kindergarten-garden/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/largest-series-product/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/leap/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/linked-list/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/luhn/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/matrix/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/meetup/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/nth-prime/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/ocr-numbers/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/octal/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/palindrome-products/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/palindrome-products/palindrome-products.js +0 -18
- data/tracks/ecmascript/exercises/pangram/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/pascals-triangle/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/perfect-numbers/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/phone-number/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/pig-latin/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/prime-factors/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/pythagorean-triplet/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/queen-attack/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/raindrops/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/rna-transcription/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/robot-name/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/robot-simulator/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/roman-numerals/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/saddle-points/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/say/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/scrabble-score/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/secret-handshake/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/series/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/sieve/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/simple-cipher/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/space-age/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/strain/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/sum-of-multiples/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/triangle/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/trinary/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/two-bucket/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/word-count/gulpfile.js +0 -92
- data/tracks/ecmascript/exercises/wordy/gulpfile.js +0 -92
- data/tracks/ecmascript/gulpfile.js +0 -92
- data/tracks/fsharp/.github/stale.yml +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53368d2c6f951fa2ab876df0b690320ba55336c5
|
4
|
+
data.tar.gz: ad36bdd5732556237afe9e8dbdb3581c030958c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bafa08cf3c809c5bb3b95f18a1e25a9805fab0c251497f993ad7d5137379317a55d85ff2975996ad9acec8725e2165bb42cf98bb6a0995712b7dfbe58f274153
|
7
|
+
data.tar.gz: bfe6e996cf35d2c8be1ad6d8cc79a7f4e29d4e7e311dee91e174662d176b9a4f1f5e8e8121c9404b0490a5db48be42d68756646035af19fadf0eb5d6ba3f32cf
|
data/lib/trackler/version.rb
CHANGED
data/tracks/ecmascript/Makefile
CHANGED
@@ -1,32 +1,27 @@
|
|
1
1
|
# assignments
|
2
2
|
ASSIGNMENT ?= ""
|
3
|
-
IGNOREDIRS := "^(\.git|bin|node_modules
|
3
|
+
IGNOREDIRS := "^(\.git|docs|bin|node_modules|.idea)$$"
|
4
4
|
ASSIGNMENTS = $(shell find ./exercises -maxdepth 1 -mindepth 1 -type d | cut -d'/' -f3 | sort | grep -Ev $(IGNOREDIRS))
|
5
5
|
|
6
|
-
# output
|
7
|
-
|
8
|
-
INTDIR := $(shell mktemp -d "$(TMPDIR)/$(ASSIGNMENT).XXXXXXXXXX")
|
9
|
-
OUTDIR := $(shell mktemp -d "$(TMPDIR)/$(ASSIGNMENT).XXXXXXXXXX")
|
6
|
+
# output directories
|
7
|
+
OUTDIR ?= "exercises/$(ASSIGNMENT)/tmp"
|
10
8
|
|
11
9
|
# language specific config (tweakable per language)
|
12
10
|
FILEEXT := "js"
|
13
11
|
EXAMPLE := "example.$(FILEEXT)"
|
14
|
-
TSTFILE := "$(ASSIGNMENT).spec.$(FILEEXT)"
|
12
|
+
TSTFILE := "$(subst _,-,$(ASSIGNMENT)).spec.$(FILEEXT)"
|
15
13
|
|
16
|
-
|
17
|
-
|
18
|
-
node_modules: package.json
|
19
|
-
@npm prune
|
20
|
-
@npm install
|
21
|
-
|
22
|
-
test-assignment: node_modules
|
23
|
-
@printf "\e[4mRunning tests for $(ASSIGNMENT) assignment\e[0m\n"
|
24
|
-
@cp gulpfile.js exercises/$(ASSIGNMENT)
|
14
|
+
test-assignment:
|
25
15
|
@cp package.json exercises/$(ASSIGNMENT)
|
16
|
+
@echo "running tests for: $(ASSIGNMENT)"
|
17
|
+
@mkdir -p $(OUTDIR)
|
26
18
|
@cp exercises/grains/lib/big-integer.$(FILEEXT) $(OUTDIR)
|
27
|
-
@
|
28
|
-
@cp exercises/$(ASSIGNMENT)/$(EXAMPLE) $(
|
29
|
-
@
|
19
|
+
@cp exercises/$(ASSIGNMENT)/$(TSTFILE) $(OUTDIR)
|
20
|
+
@cp exercises/$(ASSIGNMENT)/$(EXAMPLE) $(OUTDIR)/$(subst _,-,$(ASSIGNMENT)).$(FILEEXT)
|
21
|
+
@sed 's/xit/it/g' exercises/$(ASSIGNMENT)/$(TSTFILE) > $(OUTDIR)/temp.$(TSTFILE)
|
22
|
+
@jest $(OUTDIR)/temp.*.spec.js
|
23
|
+
@rm $(OUTDIR)/*
|
24
|
+
@rmdir $(OUTDIR)
|
30
25
|
|
31
26
|
test:
|
32
27
|
@for assignment in $(ASSIGNMENTS); do ASSIGNMENT=$$assignment $(MAKE) -s test-assignment || exit 1; done
|
data/tracks/ecmascript/README.md
CHANGED
@@ -4,12 +4,11 @@ Exercism exercises in ECMAScript 6
|
|
4
4
|
|
5
5
|
## Running the Unit Test Suite
|
6
6
|
|
7
|
-
[Node.js](https://nodejs.org) must be installed. We recommend using the latest stable version
|
8
|
-
a [Gulp](http://gulpjs.com) task so the `gulp-cli` tool must be installed via `npm`
|
7
|
+
[Node.js](https://nodejs.org) must be installed. We recommend using the latest stable version (v7 at the moment.)
|
9
8
|
|
10
|
-
% npm install
|
9
|
+
% npm install
|
11
10
|
|
12
|
-
Then, `make`
|
11
|
+
Then, the `make` command will install other dependencies as needed.
|
13
12
|
|
14
13
|
### Linting Your Code
|
15
14
|
This project uses [eslint](https://github.com/eslint/eslint) to help you write quality JavaScript code by checking for common formatting errors, enforcing style rules, and suggesting changes that conform to best practices.
|
@@ -18,13 +17,10 @@ This project uses [eslint](https://github.com/eslint/eslint) to help you write q
|
|
18
17
|
|
19
18
|
|
20
19
|
### All Assignments
|
20
|
+
The make script will build and test all exercises.
|
21
21
|
|
22
22
|
% make
|
23
23
|
|
24
|
-
### Single Assignment
|
25
|
-
|
26
|
-
% make test-assignment ASSIGNMENT=palindrome-products
|
27
|
-
|
28
24
|
## Contributing Guide
|
29
25
|
|
30
26
|
Please see the [contributing guide](https://github.com/exercism/x-api/blob/master/CONTRIBUTING.md#the-exercise-data)
|
@@ -7,20 +7,6 @@ Install [Node.js](http://nodejs.org):
|
|
7
7
|
|
8
8
|
[linstall]: https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager
|
9
9
|
|
10
|
-
Install globally a tool to run [Gulp](http://gulpjs.com):
|
11
|
-
|
12
|
-
```bash
|
13
|
-
$ npm install -g gulp-cli
|
14
|
-
```
|
15
|
-
|
16
|
-
Depending on your setup, you may need super user privileges to install an NPM
|
17
|
-
module globally. This is the case if you've used the official installer linked
|
18
|
-
to above. If NPM gives you an error saying you don't have access, add `sudo` to
|
19
|
-
the command above:
|
20
|
-
|
21
|
-
```bash
|
22
|
-
$ sudo npm install -g gulp-cli
|
23
|
-
````
|
24
10
|
|
25
11
|
If you've used the official installer, your `PATH` should have been automatically
|
26
12
|
configured, but if your shell has trouble locating your globally installed
|
@@ -34,11 +20,9 @@ $ export PATH=/usr/local/share/npm/bin:$PATH
|
|
34
20
|
|
35
21
|
Each assignment needs some tools to run the tests:
|
36
22
|
|
23
|
+
* [Jest](https://facebook.github.io/jest/): a test runner based on Jasmine
|
37
24
|
* [Babel](https://github.com/babel/babel): to transpile ECMAScript
|
38
25
|
2015 code to ECMAScript 5
|
39
|
-
* [Jasmine](http://jasmine.github.io): to run tests
|
40
|
-
* [Gulp](http://gulpjs.com): to automate everything, you don't need to worry
|
41
|
-
about anything
|
42
26
|
* [ESLint](http://eslint.org/) (optional): to perform several static analysis and
|
43
27
|
coding style checks to your ECMAScript code.
|
44
28
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Execute the tests with:
|
2
2
|
|
3
3
|
```bash
|
4
|
-
$
|
4
|
+
$ npm run test
|
5
5
|
```
|
6
6
|
|
7
7
|
Be sure your code follows best practices and coding styles, as other users do, with
|
@@ -9,15 +9,22 @@ ESLint, a tool to perform static analysis to your code. Sometimes, tools like th
|
|
9
9
|
save you some time detecting typos or silly mistakes in your ECMAScript code:
|
10
10
|
|
11
11
|
```bash
|
12
|
-
$
|
12
|
+
$ npm run lint
|
13
13
|
```
|
14
14
|
|
15
15
|
Or do both at the same time:
|
16
16
|
|
17
17
|
```bash
|
18
|
-
$
|
18
|
+
$ npm run lint-test
|
19
19
|
```
|
20
20
|
|
21
|
+
You can also run Jest in "watch" mode, which will re-run your tests automatically when you save changes to the code or test module:
|
22
|
+
|
23
|
+
```bash
|
24
|
+
$ npm run watch
|
25
|
+
```
|
26
|
+
|
27
|
+
|
21
28
|
## Making Your First ECMAScript 2015 Module
|
22
29
|
|
23
30
|
Usually, tests on this track will load your implementation importing it as a
|
@@ -9,22 +9,71 @@
|
|
9
9
|
"url": "https://github.com/exercism/xecmascript"
|
10
10
|
},
|
11
11
|
"devDependencies": {
|
12
|
-
"babel-
|
13
|
-
"babel-core": "^6.24.1",
|
14
|
-
"babel-plugin-transform-object-rest-spread": "^6.23.0",
|
15
|
-
"babel-polyfill": "^6.23.0",
|
12
|
+
"babel-jest": "^19.0.0",
|
16
13
|
"babel-preset-env": "^1.3.3",
|
17
|
-
"
|
18
|
-
"
|
19
|
-
|
20
|
-
|
21
|
-
"
|
22
|
-
|
23
|
-
|
14
|
+
"eslint": "^3.19.0",
|
15
|
+
"jest": "^19.0.2"
|
16
|
+
},
|
17
|
+
"jest": {
|
18
|
+
"modulePathIgnorePatterns": [
|
19
|
+
"package.json"
|
20
|
+
]
|
21
|
+
},
|
22
|
+
"babel": {
|
23
|
+
"presets": [
|
24
|
+
"env"
|
25
|
+
]
|
24
26
|
},
|
25
27
|
"scripts": {
|
26
|
-
"test": "
|
27
|
-
"
|
28
|
+
"test": "jest --no-cache ./*",
|
29
|
+
"watch": "jest --no-cache --watch ./*",
|
30
|
+
"lint": "eslint *.js; exit 0;",
|
31
|
+
"lint-test": "eslint *.js && jest --no-cache ./* "
|
32
|
+
},
|
33
|
+
"eslintConfig": {
|
34
|
+
"parserOptions": {
|
35
|
+
"ecmaVersion": 6,
|
36
|
+
"sourceType": "module"
|
37
|
+
},
|
38
|
+
"rules": {
|
39
|
+
"comma-dangle": [
|
40
|
+
2,
|
41
|
+
"never"
|
42
|
+
],
|
43
|
+
"no-cond-assign": [
|
44
|
+
2,
|
45
|
+
"always"
|
46
|
+
],
|
47
|
+
"no-console": 2,
|
48
|
+
"no-constant-condition": 2,
|
49
|
+
"no-control-regex": 2,
|
50
|
+
"no-debugger": 2,
|
51
|
+
"no-dupe-args": 2,
|
52
|
+
"no-dupe-keys": 2,
|
53
|
+
"no-duplicate-case": 2,
|
54
|
+
"no-empty-character-class": 2,
|
55
|
+
"no-empty": 2,
|
56
|
+
"no-ex-assign": 2,
|
57
|
+
"no-extra-boolean-cast": 2,
|
58
|
+
"no-extra-parens": 2,
|
59
|
+
"no-extra-semi": 2,
|
60
|
+
"no-func-assign": 2,
|
61
|
+
"no-inner-declarations": [
|
62
|
+
2,
|
63
|
+
"both"
|
64
|
+
],
|
65
|
+
"no-invalid-regexp": 2,
|
66
|
+
"no-irregular-whitespace": 2,
|
67
|
+
"no-negated-in-lhs": 2,
|
68
|
+
"no-obj-calls": 2,
|
69
|
+
"no-regex-spaces": 2,
|
70
|
+
"no-sparse-arrays": 2,
|
71
|
+
"no-unexpected-multiline": 2,
|
72
|
+
"no-unreachable": 2,
|
73
|
+
"use-isnan": 2,
|
74
|
+
"valid-jsdoc": 2,
|
75
|
+
"valid-typeof": 2
|
76
|
+
}
|
28
77
|
},
|
29
78
|
"licenses": [
|
30
79
|
"MIT"
|
@@ -9,22 +9,71 @@
|
|
9
9
|
"url": "https://github.com/exercism/xecmascript"
|
10
10
|
},
|
11
11
|
"devDependencies": {
|
12
|
-
"babel-
|
13
|
-
"babel-core": "^6.24.1",
|
14
|
-
"babel-plugin-transform-object-rest-spread": "^6.23.0",
|
15
|
-
"babel-polyfill": "^6.23.0",
|
12
|
+
"babel-jest": "^19.0.0",
|
16
13
|
"babel-preset-env": "^1.3.3",
|
17
|
-
"
|
18
|
-
"
|
19
|
-
|
20
|
-
|
21
|
-
"
|
22
|
-
|
23
|
-
|
14
|
+
"eslint": "^3.19.0",
|
15
|
+
"jest": "^19.0.2"
|
16
|
+
},
|
17
|
+
"jest": {
|
18
|
+
"modulePathIgnorePatterns": [
|
19
|
+
"package.json"
|
20
|
+
]
|
21
|
+
},
|
22
|
+
"babel": {
|
23
|
+
"presets": [
|
24
|
+
"env"
|
25
|
+
]
|
24
26
|
},
|
25
27
|
"scripts": {
|
26
|
-
"test": "
|
27
|
-
"
|
28
|
+
"test": "jest --no-cache ./*",
|
29
|
+
"watch": "jest --no-cache --watch ./*",
|
30
|
+
"lint": "eslint *.js; exit 0;",
|
31
|
+
"lint-test": "eslint *.js && jest --no-cache ./* "
|
32
|
+
},
|
33
|
+
"eslintConfig": {
|
34
|
+
"parserOptions": {
|
35
|
+
"ecmaVersion": 6,
|
36
|
+
"sourceType": "module"
|
37
|
+
},
|
38
|
+
"rules": {
|
39
|
+
"comma-dangle": [
|
40
|
+
2,
|
41
|
+
"never"
|
42
|
+
],
|
43
|
+
"no-cond-assign": [
|
44
|
+
2,
|
45
|
+
"always"
|
46
|
+
],
|
47
|
+
"no-console": 2,
|
48
|
+
"no-constant-condition": 2,
|
49
|
+
"no-control-regex": 2,
|
50
|
+
"no-debugger": 2,
|
51
|
+
"no-dupe-args": 2,
|
52
|
+
"no-dupe-keys": 2,
|
53
|
+
"no-duplicate-case": 2,
|
54
|
+
"no-empty-character-class": 2,
|
55
|
+
"no-empty": 2,
|
56
|
+
"no-ex-assign": 2,
|
57
|
+
"no-extra-boolean-cast": 2,
|
58
|
+
"no-extra-parens": 2,
|
59
|
+
"no-extra-semi": 2,
|
60
|
+
"no-func-assign": 2,
|
61
|
+
"no-inner-declarations": [
|
62
|
+
2,
|
63
|
+
"both"
|
64
|
+
],
|
65
|
+
"no-invalid-regexp": 2,
|
66
|
+
"no-irregular-whitespace": 2,
|
67
|
+
"no-negated-in-lhs": 2,
|
68
|
+
"no-obj-calls": 2,
|
69
|
+
"no-regex-spaces": 2,
|
70
|
+
"no-sparse-arrays": 2,
|
71
|
+
"no-unexpected-multiline": 2,
|
72
|
+
"no-unreachable": 2,
|
73
|
+
"use-isnan": 2,
|
74
|
+
"valid-jsdoc": 2,
|
75
|
+
"valid-typeof": 2
|
76
|
+
}
|
28
77
|
},
|
29
78
|
"licenses": [
|
30
79
|
"MIT"
|
@@ -9,22 +9,71 @@
|
|
9
9
|
"url": "https://github.com/exercism/xecmascript"
|
10
10
|
},
|
11
11
|
"devDependencies": {
|
12
|
-
"babel-
|
13
|
-
"babel-core": "^6.24.1",
|
14
|
-
"babel-plugin-transform-object-rest-spread": "^6.23.0",
|
15
|
-
"babel-polyfill": "^6.23.0",
|
12
|
+
"babel-jest": "^19.0.0",
|
16
13
|
"babel-preset-env": "^1.3.3",
|
17
|
-
"
|
18
|
-
"
|
19
|
-
|
20
|
-
|
21
|
-
"
|
22
|
-
|
23
|
-
|
14
|
+
"eslint": "^3.19.0",
|
15
|
+
"jest": "^19.0.2"
|
16
|
+
},
|
17
|
+
"jest": {
|
18
|
+
"modulePathIgnorePatterns": [
|
19
|
+
"package.json"
|
20
|
+
]
|
21
|
+
},
|
22
|
+
"babel": {
|
23
|
+
"presets": [
|
24
|
+
"env"
|
25
|
+
]
|
24
26
|
},
|
25
27
|
"scripts": {
|
26
|
-
"test": "
|
27
|
-
"
|
28
|
+
"test": "jest --no-cache ./*",
|
29
|
+
"watch": "jest --no-cache --watch ./*",
|
30
|
+
"lint": "eslint *.js; exit 0;",
|
31
|
+
"lint-test": "eslint *.js && jest --no-cache ./* "
|
32
|
+
},
|
33
|
+
"eslintConfig": {
|
34
|
+
"parserOptions": {
|
35
|
+
"ecmaVersion": 6,
|
36
|
+
"sourceType": "module"
|
37
|
+
},
|
38
|
+
"rules": {
|
39
|
+
"comma-dangle": [
|
40
|
+
2,
|
41
|
+
"never"
|
42
|
+
],
|
43
|
+
"no-cond-assign": [
|
44
|
+
2,
|
45
|
+
"always"
|
46
|
+
],
|
47
|
+
"no-console": 2,
|
48
|
+
"no-constant-condition": 2,
|
49
|
+
"no-control-regex": 2,
|
50
|
+
"no-debugger": 2,
|
51
|
+
"no-dupe-args": 2,
|
52
|
+
"no-dupe-keys": 2,
|
53
|
+
"no-duplicate-case": 2,
|
54
|
+
"no-empty-character-class": 2,
|
55
|
+
"no-empty": 2,
|
56
|
+
"no-ex-assign": 2,
|
57
|
+
"no-extra-boolean-cast": 2,
|
58
|
+
"no-extra-parens": 2,
|
59
|
+
"no-extra-semi": 2,
|
60
|
+
"no-func-assign": 2,
|
61
|
+
"no-inner-declarations": [
|
62
|
+
2,
|
63
|
+
"both"
|
64
|
+
],
|
65
|
+
"no-invalid-regexp": 2,
|
66
|
+
"no-irregular-whitespace": 2,
|
67
|
+
"no-negated-in-lhs": 2,
|
68
|
+
"no-obj-calls": 2,
|
69
|
+
"no-regex-spaces": 2,
|
70
|
+
"no-sparse-arrays": 2,
|
71
|
+
"no-unexpected-multiline": 2,
|
72
|
+
"no-unreachable": 2,
|
73
|
+
"use-isnan": 2,
|
74
|
+
"valid-jsdoc": 2,
|
75
|
+
"valid-typeof": 2
|
76
|
+
}
|
28
77
|
},
|
29
78
|
"licenses": [
|
30
79
|
"MIT"
|
@@ -9,22 +9,71 @@
|
|
9
9
|
"url": "https://github.com/exercism/xecmascript"
|
10
10
|
},
|
11
11
|
"devDependencies": {
|
12
|
-
"babel-
|
13
|
-
"babel-core": "^6.24.1",
|
14
|
-
"babel-plugin-transform-object-rest-spread": "^6.23.0",
|
15
|
-
"babel-polyfill": "^6.23.0",
|
12
|
+
"babel-jest": "^19.0.0",
|
16
13
|
"babel-preset-env": "^1.3.3",
|
17
|
-
"
|
18
|
-
"
|
19
|
-
|
20
|
-
|
21
|
-
"
|
22
|
-
|
23
|
-
|
14
|
+
"eslint": "^3.19.0",
|
15
|
+
"jest": "^19.0.2"
|
16
|
+
},
|
17
|
+
"jest": {
|
18
|
+
"modulePathIgnorePatterns": [
|
19
|
+
"package.json"
|
20
|
+
]
|
21
|
+
},
|
22
|
+
"babel": {
|
23
|
+
"presets": [
|
24
|
+
"env"
|
25
|
+
]
|
24
26
|
},
|
25
27
|
"scripts": {
|
26
|
-
"test": "
|
27
|
-
"
|
28
|
+
"test": "jest --no-cache ./*",
|
29
|
+
"watch": "jest --no-cache --watch ./*",
|
30
|
+
"lint": "eslint *.js; exit 0;",
|
31
|
+
"lint-test": "eslint *.js && jest --no-cache ./* "
|
32
|
+
},
|
33
|
+
"eslintConfig": {
|
34
|
+
"parserOptions": {
|
35
|
+
"ecmaVersion": 6,
|
36
|
+
"sourceType": "module"
|
37
|
+
},
|
38
|
+
"rules": {
|
39
|
+
"comma-dangle": [
|
40
|
+
2,
|
41
|
+
"never"
|
42
|
+
],
|
43
|
+
"no-cond-assign": [
|
44
|
+
2,
|
45
|
+
"always"
|
46
|
+
],
|
47
|
+
"no-console": 2,
|
48
|
+
"no-constant-condition": 2,
|
49
|
+
"no-control-regex": 2,
|
50
|
+
"no-debugger": 2,
|
51
|
+
"no-dupe-args": 2,
|
52
|
+
"no-dupe-keys": 2,
|
53
|
+
"no-duplicate-case": 2,
|
54
|
+
"no-empty-character-class": 2,
|
55
|
+
"no-empty": 2,
|
56
|
+
"no-ex-assign": 2,
|
57
|
+
"no-extra-boolean-cast": 2,
|
58
|
+
"no-extra-parens": 2,
|
59
|
+
"no-extra-semi": 2,
|
60
|
+
"no-func-assign": 2,
|
61
|
+
"no-inner-declarations": [
|
62
|
+
2,
|
63
|
+
"both"
|
64
|
+
],
|
65
|
+
"no-invalid-regexp": 2,
|
66
|
+
"no-irregular-whitespace": 2,
|
67
|
+
"no-negated-in-lhs": 2,
|
68
|
+
"no-obj-calls": 2,
|
69
|
+
"no-regex-spaces": 2,
|
70
|
+
"no-sparse-arrays": 2,
|
71
|
+
"no-unexpected-multiline": 2,
|
72
|
+
"no-unreachable": 2,
|
73
|
+
"use-isnan": 2,
|
74
|
+
"valid-jsdoc": 2,
|
75
|
+
"valid-typeof": 2
|
76
|
+
}
|
28
77
|
},
|
29
78
|
"licenses": [
|
30
79
|
"MIT"
|