trackler 2.1.0.14 → 2.1.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/lib/trackler/version.rb +1 -1
  3. data/tracks/csharp/exercises/acronym/AcronymTest.cs +2 -2
  4. data/tracks/ecmascript/config.json +8 -1
  5. data/tracks/ecmascript/exercises/connect/connect.spec.js +110 -0
  6. data/tracks/ecmascript/exercises/connect/example.js +68 -0
  7. data/tracks/ecmascript/exercises/connect/package.json +82 -0
  8. data/tracks/haskell/exercises/difference-of-squares/package.yaml +1 -1
  9. data/tracks/haskell/exercises/difference-of-squares/test/Tests.hs +3 -4
  10. data/tracks/java/exercises/all-your-base/src/test/java/BaseConverterTest.java +1 -1
  11. data/tracks/java/exercises/bracket-push/src/test/java/BracketCheckerTest.java +1 -1
  12. data/tracks/java/exercises/wordy/src/test/java/WordProblemSolverTest.java +1 -1
  13. data/tracks/lisp/.travis.yml +12 -14
  14. data/tracks/lisp/README.md +16 -48
  15. data/tracks/objective-c/config.json +9 -0
  16. data/tracks/objective-c/exercises/luhn/LuhnExample.h +9 -0
  17. data/tracks/objective-c/exercises/luhn/LuhnExample.m +50 -0
  18. data/tracks/objective-c/exercises/luhn/LuhnTest.m +80 -0
  19. data/tracks/objective-c/xcodeProject/ObjectiveC.xcodeproj/project.pbxproj +18 -0
  20. data/tracks/php/config.json +397 -382
  21. data/tracks/php/exercises/binary-search/binary-search_test.php +58 -0
  22. data/tracks/php/exercises/binary-search/example.php +21 -0
  23. data/tracks/php/exercises/nth-prime/example.php +19 -0
  24. data/tracks/php/exercises/nth-prime/nth-prime_test.php +31 -0
  25. data/tracks/php/exercises/pascals-triangle/example.php +28 -0
  26. data/tracks/php/exercises/pascals-triangle/pascals-triangle_test.php +42 -0
  27. data/tracks/python/exercises/difference-of-squares/difference_of_squares_test.py +9 -12
  28. data/tracks/r/docs/INSTALLATION.md +2 -6
  29. data/tracks/rust/exercises/difference-of-squares/Cargo.toml +1 -1
  30. data/tracks/rust/exercises/difference-of-squares/tests/difference-of-square.rs +24 -6
  31. data/tracks/typescript/config.json +6 -0
  32. data/tracks/typescript/exercises/raindrops/package.json +36 -0
  33. data/tracks/typescript/exercises/raindrops/raindrops.example.ts +17 -0
  34. data/tracks/typescript/exercises/raindrops/raindrops.test.ts +38 -0
  35. data/tracks/typescript/exercises/raindrops/tsconfig.json +21 -0
  36. data/tracks/typescript/exercises/raindrops/tslint.json +127 -0
  37. data/tracks/typescript/exercises/raindrops/yarn.lock +2739 -0
  38. metadata +20 -3
  39. data/tracks/lisp/bin/cl-travis-install.sh +0 -325
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trackler
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0.14
4
+ version: 2.1.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katrina Owen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-17 00:00:00.000000000 Z
11
+ date: 2017-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip
@@ -2166,6 +2166,9 @@ files:
2166
2166
  - tracks/ecmascript/exercises/clock/clock.spec.js
2167
2167
  - tracks/ecmascript/exercises/clock/example.js
2168
2168
  - tracks/ecmascript/exercises/clock/package.json
2169
+ - tracks/ecmascript/exercises/connect/connect.spec.js
2170
+ - tracks/ecmascript/exercises/connect/example.js
2171
+ - tracks/ecmascript/exercises/connect/package.json
2169
2172
  - tracks/ecmascript/exercises/crypto-square/crypto-square.spec.js
2170
2173
  - tracks/ecmascript/exercises/crypto-square/example.js
2171
2174
  - tracks/ecmascript/exercises/crypto-square/package.json
@@ -5336,7 +5339,6 @@ files:
5336
5339
  - tracks/lisp/LICENSE
5337
5340
  - tracks/lisp/README.md
5338
5341
  - tracks/lisp/SETUP.md
5339
- - tracks/lisp/bin/cl-travis-install.sh
5340
5342
  - tracks/lisp/bin/fetch-configlet
5341
5343
  - tracks/lisp/bin/xlisp-test.lisp
5342
5344
  - tracks/lisp/config.json
@@ -5765,6 +5767,9 @@ files:
5765
5767
  - tracks/objective-c/exercises/leap/LeapExample.h
5766
5768
  - tracks/objective-c/exercises/leap/LeapExample.m
5767
5769
  - tracks/objective-c/exercises/leap/LeapTest.m
5770
+ - tracks/objective-c/exercises/luhn/LuhnExample.h
5771
+ - tracks/objective-c/exercises/luhn/LuhnExample.m
5772
+ - tracks/objective-c/exercises/luhn/LuhnTest.m
5768
5773
  - tracks/objective-c/exercises/meetup/MeetupExample.h
5769
5774
  - tracks/objective-c/exercises/meetup/MeetupExample.m
5770
5775
  - tracks/objective-c/exercises/meetup/MeetupTest.m
@@ -6398,6 +6403,8 @@ files:
6398
6403
  - tracks/php/exercises/atbash-cipher/example.php
6399
6404
  - tracks/php/exercises/beer-song/beer-song_test.php
6400
6405
  - tracks/php/exercises/beer-song/example.php
6406
+ - tracks/php/exercises/binary-search/binary-search_test.php
6407
+ - tracks/php/exercises/binary-search/example.php
6401
6408
  - tracks/php/exercises/binary/binary.php
6402
6409
  - tracks/php/exercises/binary/binary_test.php
6403
6410
  - tracks/php/exercises/binary/example.php
@@ -6445,12 +6452,16 @@ files:
6445
6452
  - tracks/php/exercises/markdown/markdown_test.php
6446
6453
  - tracks/php/exercises/minesweeper/example.php
6447
6454
  - tracks/php/exercises/minesweeper/minesweeper_test.php
6455
+ - tracks/php/exercises/nth-prime/example.php
6456
+ - tracks/php/exercises/nth-prime/nth-prime_test.php
6448
6457
  - tracks/php/exercises/nucleotide-count/example.php
6449
6458
  - tracks/php/exercises/nucleotide-count/nucleotide-count_test.php
6450
6459
  - tracks/php/exercises/ocr-numbers/example.php
6451
6460
  - tracks/php/exercises/ocr-numbers/ocr-numbers_test.php
6452
6461
  - tracks/php/exercises/pangram/example.php
6453
6462
  - tracks/php/exercises/pangram/pangram_test.php
6463
+ - tracks/php/exercises/pascals-triangle/example.php
6464
+ - tracks/php/exercises/pascals-triangle/pascals-triangle_test.php
6454
6465
  - tracks/php/exercises/perfect-numbers/example.php
6455
6466
  - tracks/php/exercises/perfect-numbers/perfect-numbers_test.php
6456
6467
  - tracks/php/exercises/phone-number/example.php
@@ -8952,6 +8963,12 @@ files:
8952
8963
  - tracks/typescript/exercises/phone-number/tsconfig.json
8953
8964
  - tracks/typescript/exercises/phone-number/tslint.json
8954
8965
  - tracks/typescript/exercises/phone-number/yarn.lock
8966
+ - tracks/typescript/exercises/raindrops/package.json
8967
+ - tracks/typescript/exercises/raindrops/raindrops.example.ts
8968
+ - tracks/typescript/exercises/raindrops/raindrops.test.ts
8969
+ - tracks/typescript/exercises/raindrops/tsconfig.json
8970
+ - tracks/typescript/exercises/raindrops/tslint.json
8971
+ - tracks/typescript/exercises/raindrops/yarn.lock
8955
8972
  - tracks/typescript/exercises/rna-transcription/package.json
8956
8973
  - tracks/typescript/exercises/rna-transcription/rna-transcription.example.ts
8957
8974
  - tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
@@ -1,325 +0,0 @@
1
- #!/bin/sh
2
- # cl-travis install script.
3
-
4
- # Copied from
5
- # https://github.com/luismbo/cl-travis/raw/master/install.sh
6
- # per commit 6fece41 to investigate
7
- # https://github.com/exercism/xlisp/issues/106
8
-
9
- set -e # Don't remove this line.
10
-
11
- # get <destination> <url(s)>
12
- get() {
13
- destination=$1; shift
14
- for url in "$@"; do
15
- echo "Downloading ${url}..."
16
- if curl --no-progress-bar --retry 10 -o "$destination" -L "$url"; then
17
- return 0;
18
- else
19
- echo "Failed to download ${url}."
20
- fi
21
- done
22
-
23
- return 1;
24
- }
25
-
26
- # unpack <uncompression option> <file> <destination>
27
- unpack() {
28
- opt=$1
29
- file=$2;
30
- destination=$3;
31
-
32
- echo "Unpacking tarball $1 into $3..."
33
- mkdir -p "$destination"
34
- tar -C "$destination" --strip-components=1 "$opt" -xf "$file"
35
- }
36
-
37
- install_i386_arch() {
38
- echo "check foreign arch"
39
- sudo dpkg --print-foreign-architectures
40
- # hack for issue https://github.com/luismbo/cl-travis/issues/17
41
- sudo sed -i -e 's/deb http/deb [arch=amd64] http/' "/etc/apt/sources.list.d/google-chrome.list"
42
- echo "install i386 arch"
43
- sudo dpkg --add-architecture i386
44
- echo "apt-get update"
45
- sudo apt-get update -qq
46
- echo "install libc6:i386"
47
- sudo apt-get install -y libc6:i386
48
- }
49
-
50
- # add_to_lisp_rc <string>
51
- add_to_lisp_rc() {
52
- string=$1
53
-
54
- case "$LISP" in
55
- abcl) rc=".abclrc" ;;
56
- allegro*) rc=".clinit.cl" ;;
57
- sbcl*) rc=".sbclrc" ;;
58
- ccl*) rc=".ccl-init.lisp" ;;
59
- cmucl) rc=".cmucl-init.lisp" ;;
60
- clisp*) rc=".clisprc.lisp" ;;
61
- ecl) rc=".eclrc" ;;
62
- *)
63
- echo "Unable to determine RC file for '$LISP'."
64
- exit 1
65
- ;;
66
- esac
67
-
68
- echo "$string" >> "$HOME/.cim/init.lisp"
69
- echo "$string" >> "$HOME/$rc"
70
- }
71
-
72
- ASDF_URL="https://raw.githubusercontent.com/luismbo/cl-travis/master/deps/asdf.lisp"
73
- ASDF_LOCATION="$HOME/asdf"
74
-
75
- install_asdf() {
76
- get asdf.lisp "$ASDF_URL"
77
- add_to_lisp_rc "(load \"$ASDF_LOCATION\")"
78
- }
79
-
80
- compile_asdf() {
81
- echo "Compiling ASDF..."
82
- cl -c "$ASDF_LOCATION.lisp" -Q
83
- }
84
-
85
- ASDF_SR_CONF_DIR="$HOME/.config/common-lisp/source-registry.conf.d"
86
- ASDF_SR_CONF_FILE="$ASDF_SR_CONF_DIR/cl-travis.conf"
87
- LOCAL_LISP_TREE="$HOME/lisp"
88
-
89
- setup_asdf_source_registry() {
90
- mkdir -p "$LOCAL_LISP_TREE"
91
- mkdir -p "$ASDF_SR_CONF_DIR"
92
-
93
- echo "(:tree \"$TRAVIS_BUILD_DIR/\")" > "$ASDF_SR_CONF_FILE"
94
- echo "(:tree \"$LOCAL_LISP_TREE/\")" >> "$ASDF_SR_CONF_FILE"
95
-
96
- echo "Created $ASDF_SR_CONF_FILE"
97
- cat -n "$ASDF_SR_CONF_FILE"
98
- }
99
-
100
- # install_script <path> <lines...>
101
- install_script() {
102
- path=$1; shift
103
- tmp=$(mktemp)
104
-
105
- echo "#!/bin/sh" > "$tmp"
106
- for line; do
107
- echo "$line" >> "$tmp"
108
- done
109
- chmod 755 "$tmp"
110
-
111
- sudo mv "$tmp" "$path"
112
- }
113
-
114
- ABCL_TARBALL_URL1="https://common-lisp.net/project/armedbear/releases/1.3.2/abcl-bin-1.3.2.tar.gz"
115
- ABCL_TARBALL_URL2="http://cddr.org/ci/abcl-bin-1.3.2.tar.gz"
116
- ABCL_TARBALL="abcl.tar.gz"
117
- ABCL_DIR="$HOME/abcl"
118
- ABCL_SCRIPT="/usr/local/bin/abcl"
119
-
120
- install_abcl() {
121
- sudo apt-get install -y default-jre
122
- get "$ABCL_TARBALL" "$ABCL_TARBALL_URL1" "$ABCL_TARBALL_URL2"
123
- unpack -z "$ABCL_TARBALL" "$ABCL_DIR"
124
-
125
- install_script "$ABCL_SCRIPT" \
126
- "java -cp \"$ABCL_DIR/abcl-contrib.jar\" \
127
- -jar \"$ABCL_DIR/abcl.jar\" \"\$@\""
128
-
129
- cim use abcl-system --default
130
- }
131
-
132
- SBCL_TARBALL_URL1="http://prdownloads.sourceforge.net/sbcl/sbcl-1.2.13-x86-64-linux-binary.tar.bz2"
133
- SBCL_TARBALL_URL2="http://cddr.org/ci/sbcl-1.2.13-x86-64-linux-binary.tar.bz2"
134
- SBCL_TARBALL="sbcl.tar.bz2"
135
- SBCL_DIR="$HOME/sbcl"
136
-
137
- install_sbcl() {
138
- echo "Installing SBCL..."
139
- get "$SBCL_TARBALL" "$SBCL_TARBALL_URL1" "$SBCL_TARBALL_URL2"
140
- unpack -j "$SBCL_TARBALL" "$SBCL_DIR"
141
- ( cd "$SBCL_DIR" && sudo bash install.sh )
142
-
143
- cim use sbcl-system --default
144
- }
145
-
146
- SBCL32_TARBALL_URL1="http://prdownloads.sourceforge.net/sbcl/sbcl-1.2.7-x86-linux-binary.tar.bz2"
147
- SBCL32_TARBALL_URL2="http://cddr.org/ci/sbcl-1.2.7-x86-linux-binary.tar.bz2"
148
- SBCL32_TARBALL="sbcl32.tar.bz2"
149
- SBCL32_DIR="$HOME/sbcl32"
150
-
151
- install_sbcl32() {
152
- echo "Installing 32-bit SBCL..."
153
- install_i386_arch
154
-
155
- get "$SBCL32_TARBALL" "$SBCL32_TARBALL_URL1" "$SBCL32_TARBALL_URL2"
156
- unpack -j "$SBCL32_TARBALL" "$SBCL32_DIR"
157
- ( cd "$SBCL32_DIR" && sudo bash install.sh )
158
- sudo ln -s /usr/local/bin/sbcl /usr/local/bin/sbcl32
159
-
160
- cim use sbcl-system --default
161
- }
162
-
163
- CCL_TARBALL_URL1="ftp://ftp.clozure.com/pub/release/1.10/ccl-1.10-linuxx86.tar.gz"
164
- CCL_TARBALL_URL2="http://kerno.org/~luis/ci/ccl-1.10-linuxx86.tar.gz"
165
- CCL_TARBALL_URL3="http://common-lisp.net/~loliveira/tarballs/ci/ccl-1.10-linuxx86.tar.gz"
166
- CCL_TARBALL="ccl.tar.gz"
167
- CCL_DIR="$HOME/ccl"
168
- CCL_SCRIPT_PREFIX="/usr/local/bin"
169
-
170
- install_ccl() {
171
- if [ "$LISP" = "ccl32" ]; then
172
- echo "Installing 32-bit CCL..."
173
- install_i386_arch
174
- bin="lx86cl"
175
- script="ccl32"
176
- else
177
- echo "Installing CCL..."
178
- bin="lx86cl64"
179
- script="ccl"
180
- fi
181
- get "$CCL_TARBALL" "$CCL_TARBALL_URL1" "$CCL_TARBALL_URL2" "$CCL_TARBALL_URL3"
182
- unpack -z "$CCL_TARBALL" "$CCL_DIR"
183
-
184
- install_script "$CCL_SCRIPT_PREFIX/$script" "\"$CCL_DIR/$bin\" \"\$@\""
185
- if [ "$LISP" = "ccl32" ]; then
186
- # also install the 'ccl' script so that CIM can pick it up.
187
- install_script "$CCL_SCRIPT_PREFIX/ccl" "\"$CCL_DIR/$bin\" \"\$@\""
188
- fi
189
-
190
- cim use ccl-system --default
191
- }
192
-
193
- CMUCL_TARBALL_URL1="https://common-lisp.net/project/cmucl/downloads/snapshots/2015/07/cmucl-2015-07-x86-linux.tar.bz2"
194
- CMUCL_EXTRA_TARBALL_URL1="https://common-lisp.net/project/cmucl/downloads/snapshots/2015/07/cmucl-2015-07-x86-linux.extra.tar.bz2"
195
- CMUCL_TARBALL_URL2="http://cddr.org/ci/cmucl-2015-07-x86-linux.tar.bz2"
196
- CMUCL_EXTRA_TARBALL_URL2="http://cddr.org/ci/cmucl-2015-07-x86-linux.extra.tar.bz2"
197
- CMUCL_TARBALL="cmucl.tar.bz2"
198
- CMUCL_EXTRA_TARBALL="cmucl-extra.tar.bz2"
199
- CMUCL_DIR="$HOME/cmucl"
200
- CMUCL_SCRIPT="/usr/local/bin/cmucl"
201
-
202
- install_cmucl() {
203
- echo "Installing CMUCL..."
204
- install_i386_arch
205
- get "$CMUCL_TARBALL" "$CMUCL_TARBALL_URL1" "$CMUCL_TARBALL_URL2"
206
- get "$CMUCL_EXTRA_TARBALL" "$CMUCL_EXTRA_TARBALL_URL" "$CMUCL_EXTRA_TARBALL_URL2"
207
- mkdir -p "$CMUCL_DIR"
208
- tar -C "$CMUCL_DIR" -xjf "$CMUCL_TARBALL"
209
- tar -C "$CMUCL_DIR" -xjf "$CMUCL_EXTRA_TARBALL"
210
-
211
- install_script "$CMUCL_SCRIPT" \
212
- "CMUCLLIB=\"$CMUCL_DIR/lib/cmucl/lib\" \"$CMUCL_DIR/bin/lisp\" \"\$@\""
213
-
214
- # XXX: no CIM support for CMUCL
215
- }
216
-
217
- ECL_TARBALL_URL1="http://common-lisp.net/~loliveira/tarballs/ecl-13.5.1-linux-amd64.tar.gz"
218
- ECL_TARBALL_URL2="http://kerno.org/~luis/ci/ecl-13.5.1-linux-amd64.tar.gz"
219
- ECL_TARBALL="ecl.tar.gz"
220
-
221
- install_ecl() {
222
- echo "Installing ECL..."
223
- get "$ECL_TARBALL" "$ECL_TARBALL_URL1" "$ECL_TARBALL_URL2"
224
- sudo tar -C / -xzf "$ECL_TARBALL"
225
-
226
- cim use ecl-system --default
227
- }
228
-
229
- install_clisp() {
230
- if [ "$LISP" = "clisp32" ]; then
231
- echo "Installing 32-bit CLISP..."
232
- install_i386_arch
233
- sudo apt-get remove -y libsigsegv2
234
- sudo apt-get install -y libsigsegv2:i386
235
- sudo apt-get install -y clisp:i386
236
- sudo ln -s /usr/bin/clisp /usr/local/bin/clisp32
237
- else
238
- echo "Installing CLISP..."
239
- sudo apt-get install -y clisp
240
- fi
241
- cim use clisp-system --default
242
- }
243
-
244
- install_acl() {
245
- echo "Installing Allegro CL..."
246
- install_i386_arch
247
-
248
- case "$LISP" in
249
- allegro) acl=alisp ;;
250
- allegromodern) acl=mlisp ;;
251
- *)
252
- echo "Unrecognised lisp: '$LISP'"
253
- exit 1
254
- ;;
255
- esac
256
-
257
- cim install "$acl"
258
-
259
- sudo ln -vs "$HOME/.cim/bin/$acl" "/usr/local/bin/$acl"
260
- sudo ln -vs "$HOME/.cim/bin/$acl" "/usr/local/bin/$LISP"
261
-
262
- # XXX: cim doesn't support mlisp
263
- cim use "$acl" --default
264
- }
265
-
266
- QUICKLISP_URL="http://beta.quicklisp.org/quicklisp.lisp"
267
-
268
- install_quicklisp() {
269
- get quicklisp.lisp "$QUICKLISP_URL"
270
- echo 'Installing Quicklisp...'
271
- cl -f quicklisp.lisp -e '(quicklisp-quickstart:install)'
272
- add_to_lisp_rc '(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp"
273
- (user-homedir-pathname))))
274
- (when (probe-file quicklisp-init)
275
- (load quicklisp-init)))'
276
- }
277
-
278
- # this variable is used to grab a specific version of the
279
- # cim_installer which itself looks at this variable to figure out
280
- # which version of CIM it should install.
281
- CIM_INSTALL_BRANCH=47079db7f26a7a0e9100211a0ad122ea2e482eef
282
- CL_SCRIPT="/usr/local/bin/cl"
283
- CIM_SCRIPT="/usr/local/bin/cim"
284
- QL_SCRIPT="/usr/local/bin/ql"
285
-
286
- install_cim() {
287
- curl -L "https://raw.github.com/KeenS/CIM/$CIM_INSTALL_BRANCH/scripts/cim_installer" | /bin/sh
288
-
289
- install_script "$CL_SCRIPT" ". \"$HOME\"/.cim/init.sh; exec cl \"\$@\""
290
- install_script "$CIM_SCRIPT" ". \"$HOME\"/.cim/init.sh; exec cim \"\$@\""
291
- install_script "$QL_SCRIPT" ". \"$HOME\"/.cim/init.sh; exec ql \"\$@\""
292
- }
293
-
294
- (
295
- cd "$HOME"
296
-
297
- sudo apt-get update
298
- install_cim
299
- install_asdf
300
-
301
- case "$LISP" in
302
- abcl) install_abcl ;;
303
- allegro|allegromodern) install_acl ;;
304
- sbcl) install_sbcl ;;
305
- sbcl32) install_sbcl32 ;;
306
- ccl|ccl32) install_ccl ;;
307
- cmucl) install_cmucl; exit 0 ;; # no CIM support
308
- clisp|clisp32) install_clisp ;;
309
- ecl) install_ecl ;;
310
- *)
311
- echo "Unrecognised lisp: '$LISP'"
312
- exit 1
313
- ;;
314
- esac
315
-
316
- compile_asdf
317
-
318
- cl -e '(format t "~%~a ~a up and running! (ASDF ~a)~%~%"
319
- (lisp-implementation-type)
320
- (lisp-implementation-version)
321
- (asdf:asdf-version))'
322
-
323
- install_quicklisp
324
- setup_asdf_source_registry
325
- )