trackler 2.2.1.41 → 2.2.1.42
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitmodules +0 -3
- data/lib/trackler/version.rb +1 -1
- data/problem-specifications/exercises/change/metadata.yml +0 -3
- data/tracks/c/exercises/allergies/src/allergies.h +12 -12
- data/tracks/c/exercises/allergies/src/example.c +4 -4
- data/tracks/c/exercises/allergies/src/example.h +14 -14
- data/tracks/c/exercises/allergies/test/test_allergies.c +45 -45
- data/tracks/cfml/config.json +139 -193
- data/tracks/cfml/config/maintainers.json +11 -11
- data/tracks/csharp/exercises/etl/Etl.cs +1 -1
- data/tracks/csharp/exercises/etl/EtlTest.cs +102 -0
- data/tracks/csharp/exercises/etl/Example.cs +1 -1
- data/tracks/csharp/exercises/pascals-triangle/Example.cs +10 -1
- data/tracks/csharp/exercises/pascals-triangle/PascalsTriangle.cs +1 -0
- data/tracks/csharp/exercises/pascals-triangle/PascalsTriangleTest.cs +17 -50
- data/tracks/csharp/exercises/saddle-points/SaddlePointsTest.cs +75 -0
- data/tracks/csharp/generators/Exercises/Etl.cs +61 -0
- data/tracks/csharp/generators/Exercises/PascalsTriangle.cs +28 -0
- data/tracks/csharp/generators/Exercises/SaddlePoints.cs +50 -0
- data/tracks/csharp/generators/Output/ValueFormatter.cs +29 -0
- data/tracks/java/config.json +40 -5
- data/tracks/java/exercises/triangle/.meta/src/reference/java/Triangle.java +11 -10
- data/tracks/java/exercises/triangle/src/main/java/Triangle.java +9 -1
- data/tracks/java/exercises/triangle/src/test/java/TriangleTest.java +12 -12
- data/tracks/python/exercises/phone-number/phone_number.py +1 -1
- data/tracks/python/exercises/rna-transcription/rna_transcription.py +1 -1
- data/tracks/python/exercises/run-length-encoding/run_length_encoding.py +2 -2
- data/tracks/python/exercises/saddle-points/saddle_points.py +1 -1
- data/tracks/rust/exercises/etl/README.md +1 -1
- data/tracks/rust/exercises/ocr-numbers/README.md +1 -1
- data/tracks/rust/exercises/pascals-triangle/README.md +1 -1
- data/tracks/rust/exercises/rna-transcription/README.md +1 -1
- data/tracks/scala/exercises/meetup/src/test/scala/MeetupTest.scala +118 -93
- data/tracks/scala/testgen/src/main/scala/MeetupTestGenerator.scala +48 -0
- data/tracks/scala/testgen/src/main/scala/testgen/CanonicalDataParser.scala +1 -1
- data/tracks/typescript/config.json +13 -0
- data/tracks/typescript/exercises/bob/bob.ts +7 -0
- data/tracks/typescript/exercises/hello-world/hello-world.ts +7 -0
- data/tracks/typescript/exercises/leap/leap.ts +5 -0
- data/tracks/typescript/exercises/pangram/pangram.ts +11 -0
- data/tracks/typescript/exercises/prime-factors/README.md +73 -0
- data/tracks/typescript/exercises/prime-factors/package.json +36 -0
- data/tracks/typescript/exercises/prime-factors/prime-factors.example.ts +14 -0
- data/tracks/typescript/exercises/prime-factors/prime-factors.test.ts +25 -0
- data/tracks/{coldfusion/exercises/acronym/.meta/HINTS.md → typescript/exercises/prime-factors/prime-factors.ts} +0 -0
- data/tracks/typescript/exercises/prime-factors/tsconfig.json +22 -0
- data/tracks/typescript/exercises/prime-factors/tslint.json +127 -0
- data/tracks/typescript/exercises/prime-factors/yarn.lock +2305 -0
- data/tracks/typescript/exercises/rna-transcription/rna-transcription.ts +7 -0
- metadata +16 -242
- data/tracks/coldfusion/.gitignore +0 -5
- data/tracks/coldfusion/.travis.yml +0 -18
- data/tracks/coldfusion/CONTRIBUTING.md +0 -10
- data/tracks/coldfusion/LICENSE +0 -21
- data/tracks/coldfusion/README.md +0 -92
- data/tracks/coldfusion/bin/fetch-configlet +0 -32
- data/tracks/coldfusion/config.json +0 -223
- data/tracks/coldfusion/config/exercise_readme.go.tmpl +0 -16
- data/tracks/coldfusion/config/maintainers.json +0 -13
- data/tracks/coldfusion/docs/ABOUT.md +0 -10
- data/tracks/coldfusion/docs/EXERCISE_README_INSERT.md +0 -15
- data/tracks/coldfusion/docs/INSTALLATION.md +0 -35
- data/tracks/coldfusion/docs/LEARNING.md +0 -37
- data/tracks/coldfusion/docs/RESOURCES.md +0 -29
- data/tracks/coldfusion/docs/SNIPPET.txt +0 -8
- data/tracks/coldfusion/docs/TESTS.md +0 -13
- data/tracks/coldfusion/exercises/acronym/Acronym.cfc +0 -13
- data/tracks/coldfusion/exercises/acronym/AcronymTest.cfc +0 -43
- data/tracks/coldfusion/exercises/acronym/Solution.cfc +0 -22
- data/tracks/coldfusion/exercises/acronym/SolutionTest.cfc +0 -7
- data/tracks/coldfusion/exercises/acronym/TestRunner.cfc +0 -103
- data/tracks/coldfusion/exercises/acronym/box.json +0 -8
- data/tracks/coldfusion/exercises/acronym/index.cfm +0 -37
- data/tracks/coldfusion/exercises/atbash-cipher/.meta/HINTS.md +0 -0
- data/tracks/coldfusion/exercises/atbash-cipher/AtbashCipher.cfc +0 -14
- data/tracks/coldfusion/exercises/atbash-cipher/AtbashCipherTest.cfc +0 -71
- data/tracks/coldfusion/exercises/atbash-cipher/Solution.cfc +0 -56
- data/tracks/coldfusion/exercises/atbash-cipher/SolutionTest.cfc +0 -7
- data/tracks/coldfusion/exercises/atbash-cipher/TestRunner.cfc +0 -103
- data/tracks/coldfusion/exercises/atbash-cipher/box.json +0 -8
- data/tracks/coldfusion/exercises/atbash-cipher/index.cfm +0 -37
- data/tracks/coldfusion/exercises/bob/.meta/HINTS.md +0 -0
- data/tracks/coldfusion/exercises/bob/Bob.cfc +0 -13
- data/tracks/coldfusion/exercises/bob/BobTest.cfc +0 -115
- data/tracks/coldfusion/exercises/bob/Solution.cfc +0 -27
- data/tracks/coldfusion/exercises/bob/SolutionTest.cfc +0 -7
- data/tracks/coldfusion/exercises/bob/TestRunner.cfc +0 -103
- data/tracks/coldfusion/exercises/bob/box.json +0 -8
- data/tracks/coldfusion/exercises/bob/index.cfm +0 -37
- data/tracks/coldfusion/exercises/diamond/.meta/HINTS.md +0 -0
- data/tracks/coldfusion/exercises/diamond/Diamond.cfc +0 -13
- data/tracks/coldfusion/exercises/diamond/DiamondTest.cfc +0 -35
- data/tracks/coldfusion/exercises/diamond/Solution.cfc +0 -35
- data/tracks/coldfusion/exercises/diamond/SolutionTest.cfc +0 -7
- data/tracks/coldfusion/exercises/diamond/TestRunner.cfc +0 -103
- data/tracks/coldfusion/exercises/diamond/box.json +0 -8
- data/tracks/coldfusion/exercises/diamond/index.cfm +0 -37
- data/tracks/coldfusion/exercises/difference-of-squares/.meta/HINTS.md +0 -0
- data/tracks/coldfusion/exercises/difference-of-squares/DifferenceOfSquares.cfc +0 -18
- data/tracks/coldfusion/exercises/difference-of-squares/DifferenceOfSquaresTest.cfc +0 -63
- data/tracks/coldfusion/exercises/difference-of-squares/Solution.cfc +0 -28
- data/tracks/coldfusion/exercises/difference-of-squares/SolutionTest.cfc +0 -7
- data/tracks/coldfusion/exercises/difference-of-squares/TestRunner.cfc +0 -103
- data/tracks/coldfusion/exercises/difference-of-squares/box.json +0 -8
- data/tracks/coldfusion/exercises/difference-of-squares/index.cfm +0 -37
- data/tracks/coldfusion/exercises/flatten-array/.meta/HINTS.md +0 -0
- data/tracks/coldfusion/exercises/flatten-array/FlattenArray.cfc +0 -13
- data/tracks/coldfusion/exercises/flatten-array/FlattenArrayTest.cfc +0 -42
- data/tracks/coldfusion/exercises/flatten-array/Solution.cfc +0 -26
- data/tracks/coldfusion/exercises/flatten-array/SolutionTest.cfc +0 -7
- data/tracks/coldfusion/exercises/flatten-array/TestRunner.cfc +0 -103
- data/tracks/coldfusion/exercises/flatten-array/box.json +0 -8
- data/tracks/coldfusion/exercises/flatten-array/index.cfm +0 -37
- data/tracks/coldfusion/exercises/gigasecond/.meta/HINTS.md +0 -0
- data/tracks/coldfusion/exercises/gigasecond/Gigasecond.cfc +0 -13
- data/tracks/coldfusion/exercises/gigasecond/GigasecondTest.cfc +0 -39
- data/tracks/coldfusion/exercises/gigasecond/Solution.cfc +0 -16
- data/tracks/coldfusion/exercises/gigasecond/SolutionTest.cfc +0 -7
- data/tracks/coldfusion/exercises/gigasecond/TestRunner.cfc +0 -103
- data/tracks/coldfusion/exercises/gigasecond/box.json +0 -8
- data/tracks/coldfusion/exercises/gigasecond/index.cfm +0 -37
- data/tracks/coldfusion/exercises/grains/.meta/HINTS.md +0 -0
- data/tracks/coldfusion/exercises/grains/Grains.cfc +0 -14
- data/tracks/coldfusion/exercises/grains/GrainsTest.cfc +0 -63
- data/tracks/coldfusion/exercises/grains/Solution.cfc +0 -22
- data/tracks/coldfusion/exercises/grains/SolutionTest.cfc +0 -7
- data/tracks/coldfusion/exercises/grains/TestRunner.cfc +0 -103
- data/tracks/coldfusion/exercises/grains/box.json +0 -8
- data/tracks/coldfusion/exercises/grains/index.cfm +0 -37
- data/tracks/coldfusion/exercises/hamming/.meta/HINTS.md +0 -0
- data/tracks/coldfusion/exercises/hamming/Hamming.cfc +0 -13
- data/tracks/coldfusion/exercises/hamming/HammingTest.cfc +0 -75
- data/tracks/coldfusion/exercises/hamming/Solution.cfc +0 -25
- data/tracks/coldfusion/exercises/hamming/SolutionTest.cfc +0 -7
- data/tracks/coldfusion/exercises/hamming/TestRunner.cfc +0 -103
- data/tracks/coldfusion/exercises/hamming/box.json +0 -8
- data/tracks/coldfusion/exercises/hamming/index.cfm +0 -37
- data/tracks/coldfusion/exercises/hello-world/HelloWorld.cfc +0 -13
- data/tracks/coldfusion/exercises/hello-world/HelloWorldTest.cfc +0 -18
- data/tracks/coldfusion/exercises/hello-world/Solution.cfc +0 -13
- data/tracks/coldfusion/exercises/hello-world/SolutionTest.cfc +0 -7
- data/tracks/coldfusion/exercises/hello-world/TestRunner.cfc +0 -103
- data/tracks/coldfusion/exercises/hello-world/box.json +0 -8
- data/tracks/coldfusion/exercises/hello-world/index.cfm +0 -37
- data/tracks/coldfusion/exercises/isogram/.meta/HINTS.md +0 -0
- data/tracks/coldfusion/exercises/isogram/Isogram.cfc +0 -13
- data/tracks/coldfusion/exercises/isogram/IsogramTest.cfc +0 -55
- data/tracks/coldfusion/exercises/isogram/Solution.cfc +0 -23
- data/tracks/coldfusion/exercises/isogram/SolutionTest.cfc +0 -7
- data/tracks/coldfusion/exercises/isogram/TestRunner.cfc +0 -103
- data/tracks/coldfusion/exercises/isogram/box.json +0 -8
- data/tracks/coldfusion/exercises/isogram/index.cfm +0 -37
- data/tracks/coldfusion/exercises/largest-series-product/.meta/HINTS.md +0 -0
- data/tracks/coldfusion/exercises/largest-series-product/LargestSeriesProduct.cfc +0 -13
- data/tracks/coldfusion/exercises/largest-series-product/LargestSeriesProductTest.cfc +0 -75
- data/tracks/coldfusion/exercises/largest-series-product/Solution.cfc +0 -41
- data/tracks/coldfusion/exercises/largest-series-product/SolutionTest.cfc +0 -7
- data/tracks/coldfusion/exercises/largest-series-product/TestRunner.cfc +0 -103
- data/tracks/coldfusion/exercises/largest-series-product/box.json +0 -8
- data/tracks/coldfusion/exercises/largest-series-product/index.cfm +0 -37
- data/tracks/coldfusion/exercises/leap/Leap.cfc +0 -15
- data/tracks/coldfusion/exercises/leap/LeapTest.cfc +0 -39
- data/tracks/coldfusion/exercises/leap/README.md +0 -33
- data/tracks/coldfusion/exercises/leap/Solution.cfc +0 -19
- data/tracks/coldfusion/exercises/leap/SolutionTest.cfc +0 -7
- data/tracks/coldfusion/exercises/leap/TestRunner.cfc +0 -103
- data/tracks/coldfusion/exercises/leap/box.json +0 -8
- data/tracks/coldfusion/exercises/leap/index.cfm +0 -37
- data/tracks/coldfusion/exercises/luhn/.meta/HINTS.md +0 -0
- data/tracks/coldfusion/exercises/luhn/Luhn.cfc +0 -13
- data/tracks/coldfusion/exercises/luhn/LuhnTest.cfc +0 -67
- data/tracks/coldfusion/exercises/luhn/Solution.cfc +0 -38
- data/tracks/coldfusion/exercises/luhn/SolutionTest.cfc +0 -7
- data/tracks/coldfusion/exercises/luhn/TestRunner.cfc +0 -103
- data/tracks/coldfusion/exercises/luhn/box.json +0 -8
- data/tracks/coldfusion/exercises/luhn/index.cfm +0 -37
- data/tracks/coldfusion/exercises/nth-prime/.meta/HINTS.md +0 -0
- data/tracks/coldfusion/exercises/nth-prime/NthPrime.cfc +0 -13
- data/tracks/coldfusion/exercises/nth-prime/NthPrimeTest.cfc +0 -35
- data/tracks/coldfusion/exercises/nth-prime/Solution.cfc +0 -33
- data/tracks/coldfusion/exercises/nth-prime/SolutionTest.cfc +0 -7
- data/tracks/coldfusion/exercises/nth-prime/TestRunner.cfc +0 -103
- data/tracks/coldfusion/exercises/nth-prime/box.json +0 -8
- data/tracks/coldfusion/exercises/nth-prime/index.cfm +0 -37
- data/tracks/coldfusion/exercises/pangram/.meta/HINTS.md +0 -0
- data/tracks/coldfusion/exercises/pangram/Pangram.cfc +0 -13
- data/tracks/coldfusion/exercises/pangram/PangramTest.cfc +0 -55
- data/tracks/coldfusion/exercises/pangram/Solution.cfc +0 -21
- data/tracks/coldfusion/exercises/pangram/SolutionTest.cfc +0 -7
- data/tracks/coldfusion/exercises/pangram/TestRunner.cfc +0 -103
- data/tracks/coldfusion/exercises/pangram/box.json +0 -8
- data/tracks/coldfusion/exercises/pangram/index.cfm +0 -37
- data/tracks/coldfusion/exercises/pig-latin/.meta/HINTS.md +0 -0
- data/tracks/coldfusion/exercises/pig-latin/PigLatin.cfc +0 -13
- data/tracks/coldfusion/exercises/pig-latin/PigLatinTest.cfc +0 -115
- data/tracks/coldfusion/exercises/pig-latin/Solution.cfc +0 -30
- data/tracks/coldfusion/exercises/pig-latin/SolutionTest.cfc +0 -7
- data/tracks/coldfusion/exercises/pig-latin/TestRunner.cfc +0 -103
- data/tracks/coldfusion/exercises/pig-latin/box.json +0 -8
- data/tracks/coldfusion/exercises/pig-latin/index.cfm +0 -37
- data/tracks/coldfusion/exercises/raindrops/.meta/HINTS.md +0 -0
- data/tracks/coldfusion/exercises/raindrops/Raindrops.cfc +0 -13
- data/tracks/coldfusion/exercises/raindrops/RaindropsTest.cfc +0 -87
- data/tracks/coldfusion/exercises/raindrops/Solution.cfc +0 -33
- data/tracks/coldfusion/exercises/raindrops/SolutionTest.cfc +0 -7
- data/tracks/coldfusion/exercises/raindrops/TestRunner.cfc +0 -103
- data/tracks/coldfusion/exercises/raindrops/box.json +0 -8
- data/tracks/coldfusion/exercises/raindrops/index.cfm +0 -37
- data/tracks/coldfusion/exercises/rna-transcription/.meta/HINTS.md +0 -0
- data/tracks/coldfusion/exercises/rna-transcription/RnaTranscription.cfc +0 -13
- data/tracks/coldfusion/exercises/rna-transcription/RnaTranscriptionTest.cfc +0 -47
- data/tracks/coldfusion/exercises/rna-transcription/Solution.cfc +0 -35
- data/tracks/coldfusion/exercises/rna-transcription/SolutionTest.cfc +0 -7
- data/tracks/coldfusion/exercises/rna-transcription/TestRunner.cfc +0 -103
- data/tracks/coldfusion/exercises/rna-transcription/box.json +0 -8
- data/tracks/coldfusion/exercises/rna-transcription/index.cfm +0 -37
- data/tracks/coldfusion/exercises/saddle-points/.meta/HINTS.md +0 -0
- data/tracks/coldfusion/exercises/saddle-points/SaddlePoints.cfc +0 -13
- data/tracks/coldfusion/exercises/saddle-points/SaddlePointsTest.cfc +0 -35
- data/tracks/coldfusion/exercises/saddle-points/Solution.cfc +0 -59
- data/tracks/coldfusion/exercises/saddle-points/SolutionTest.cfc +0 -7
- data/tracks/coldfusion/exercises/saddle-points/TestRunner.cfc +0 -103
- data/tracks/coldfusion/exercises/saddle-points/box.json +0 -8
- data/tracks/coldfusion/exercises/saddle-points/index.cfm +0 -37
- data/tracks/coldfusion/exercises/scrabble-score/.meta/HINTS.md +0 -0
- data/tracks/coldfusion/exercises/scrabble-score/ScrabbleScore.cfc +0 -13
- data/tracks/coldfusion/exercises/scrabble-score/ScrabbleScoreTest.cfc +0 -59
- data/tracks/coldfusion/exercises/scrabble-score/Solution.cfc +0 -50
- data/tracks/coldfusion/exercises/scrabble-score/SolutionTest.cfc +0 -7
- data/tracks/coldfusion/exercises/scrabble-score/TestRunner.cfc +0 -103
- data/tracks/coldfusion/exercises/scrabble-score/box.json +0 -8
- data/tracks/coldfusion/exercises/scrabble-score/index.cfm +0 -37
- data/tracks/coldfusion/exercises/secret-handshake/.meta/HINTS.md +0 -0
- data/tracks/coldfusion/exercises/secret-handshake/SecretHandshake.cfc +0 -13
- data/tracks/coldfusion/exercises/secret-handshake/SecretHandshakeTest.cfc +0 -63
- data/tracks/coldfusion/exercises/secret-handshake/Solution.cfc +0 -31
- data/tracks/coldfusion/exercises/secret-handshake/SolutionTest.cfc +0 -7
- data/tracks/coldfusion/exercises/secret-handshake/TestRunner.cfc +0 -103
- data/tracks/coldfusion/exercises/secret-handshake/box.json +0 -8
- data/tracks/coldfusion/exercises/secret-handshake/index.cfm +0 -37
- data/tracks/coldfusion/exercises/space-age/.meta/HINTS.md +0 -0
- data/tracks/coldfusion/exercises/space-age/Solution.cfc +0 -28
- data/tracks/coldfusion/exercises/space-age/SolutionTest.cfc +0 -7
- data/tracks/coldfusion/exercises/space-age/SpaceAge.cfc +0 -13
- data/tracks/coldfusion/exercises/space-age/SpaceAgeTest.cfc +0 -47
- data/tracks/coldfusion/exercises/space-age/TestRunner.cfc +0 -103
- data/tracks/coldfusion/exercises/space-age/box.json +0 -8
- data/tracks/coldfusion/exercises/space-age/index.cfm +0 -37
- data/tracks/coldfusion/exercises/sum-of-multiples/.meta/HINTS.md +0 -0
- data/tracks/coldfusion/exercises/sum-of-multiples/Solution.cfc +0 -27
- data/tracks/coldfusion/exercises/sum-of-multiples/SolutionTest.cfc +0 -7
- data/tracks/coldfusion/exercises/sum-of-multiples/SumOfMultiples.cfc +0 -13
- data/tracks/coldfusion/exercises/sum-of-multiples/SumOfMultiplesTest.cfc +0 -63
- data/tracks/coldfusion/exercises/sum-of-multiples/TestRunner.cfc +0 -103
- data/tracks/coldfusion/exercises/sum-of-multiples/box.json +0 -8
- data/tracks/coldfusion/exercises/sum-of-multiples/index.cfm +0 -37
- data/tracks/coldfusion/exercises/triangle/.meta/HINTS.md +0 -0
- data/tracks/coldfusion/exercises/triangle/Solution.cfc +0 -53
- data/tracks/coldfusion/exercises/triangle/SolutionTest.cfc +0 -7
- data/tracks/coldfusion/exercises/triangle/TestRunner.cfc +0 -103
- data/tracks/coldfusion/exercises/triangle/Triangle.cfc +0 -18
- data/tracks/coldfusion/exercises/triangle/TriangleTest.cfc +0 -95
- data/tracks/coldfusion/exercises/triangle/box.json +0 -8
- data/tracks/coldfusion/exercises/triangle/index.cfm +0 -37
- data/tracks/coldfusion/exercises/word-count/.meta/HINTS.md +0 -0
- data/tracks/coldfusion/exercises/word-count/Solution.cfc +0 -22
- data/tracks/coldfusion/exercises/word-count/SolutionTest.cfc +0 -7
- data/tracks/coldfusion/exercises/word-count/TestRunner.cfc +0 -103
- data/tracks/coldfusion/exercises/word-count/WordCount.cfc +0 -13
- data/tracks/coldfusion/exercises/word-count/WordCountTest.cfc +0 -55
- data/tracks/coldfusion/exercises/word-count/box.json +0 -8
- data/tracks/coldfusion/exercises/word-count/index.cfm +0 -37
- data/tracks/coldfusion/img/icon.png +0 -0
- data/tracks/coldfusion/tasks/GenerateTests.cfc +0 -179
- data/tracks/coldfusion/tasks/ScaffoldExercise.cfc +0 -85
- data/tracks/coldfusion/tasks/TestAllSolutions.cfc +0 -24
- data/tracks/coldfusion/tasks/exercise_template/.meta/HINTS.md +0 -0
- data/tracks/coldfusion/tasks/exercise_template/@@name@@.cfc +0 -13
- data/tracks/coldfusion/tasks/exercise_template/@@name@@Test.cfc +0 -15
- data/tracks/coldfusion/tasks/exercise_template/Solution.cfc +0 -6
- data/tracks/coldfusion/tasks/exercise_template/SolutionTest.cfc +0 -7
- data/tracks/coldfusion/tasks/exercise_template/TestRunner.cfc +0 -103
- data/tracks/coldfusion/tasks/exercise_template/box.json +0 -8
- data/tracks/coldfusion/tasks/exercise_template/index.cfm +0 -37
- data/tracks/csharp/exercises/etl/ETLTest.cs +0 -51
- data/tracks/csharp/exercises/saddle-points/SaddlePointTest.cs +0 -68
- data/tracks/java/exercises/triangle/.meta/src/reference/java/TriangleKind.java +0 -5
- data/tracks/java/exercises/triangle/src/main/java/TriangleKind.java +0 -5
@@ -1,37 +0,0 @@
|
|
1
|
-
<!---
|
2
|
-
|
3
|
-
This file will only be used if you want to start up a web server in this directory. You can do so by running:
|
4
|
-
|
5
|
-
$> box
|
6
|
-
CommandBox> install
|
7
|
-
CommandBox> server start
|
8
|
-
|
9
|
-
However, this is not necessary unless you really just want to use the HTML reporters on TestBox.
|
10
|
-
Ideally, you'll skip the need for this file entirely and just run the tests directly frm the CLI like this:
|
11
|
-
|
12
|
-
CommandBox> task run TestRunner
|
13
|
-
|
14
|
-
--->
|
15
|
-
<cfsetting showDebugOutput="false">
|
16
|
-
<cfparam name="url.reporter" default="simple">
|
17
|
-
<cfscript>
|
18
|
-
// get a list of all CFCs in this folder whose name looks like "XXXTest.cfc"
|
19
|
-
// And turn it into compnent path relative to the web root
|
20
|
-
url.bundles = directoryList(
|
21
|
-
path=expandPath( '/' ),
|
22
|
-
filter='*Test.cfc' )
|
23
|
-
.map( function( path ) {
|
24
|
-
return path
|
25
|
-
.replaceNoCase( expandPath( '/' ), '' )
|
26
|
-
.left( -4 )
|
27
|
-
} )
|
28
|
-
.toList();
|
29
|
-
</cfscript>
|
30
|
-
|
31
|
-
<!--- Ensure TestBox --->
|
32
|
-
<cfif fileExists( "/testbox/system/runners/HTMLRunner.cfm" )>
|
33
|
-
<!--- Include the TestBox HTML Runner --->
|
34
|
-
<cfinclude template="/testbox/system/runners/HTMLRunner.cfm">
|
35
|
-
<cfelse>
|
36
|
-
Oops, you don't have TestBox installed yet! Please run <b>box install</b> from the root of your excercise folder and refresh this page.
|
37
|
-
</cfif>
|
File without changes
|
@@ -1,27 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Here is an example solution for the SumOfMultiples exercise
|
3
|
-
*/
|
4
|
-
component {
|
5
|
-
|
6
|
-
function sum( array factors, limit ) {
|
7
|
-
var i = 0;
|
8
|
-
var accumulator = {};
|
9
|
-
// Loop to our limit
|
10
|
-
while( ++i < limit ) {
|
11
|
-
// For each of the factors
|
12
|
-
if( factors.reduce( function( isFactor, factor ){
|
13
|
-
// If at least one of our factors divides into this number
|
14
|
-
return isFactor || i % factor == 0;
|
15
|
-
}, false ) ) {
|
16
|
-
// Add it to our distinct list
|
17
|
-
accumulator[ i ] = true;
|
18
|
-
}
|
19
|
-
}
|
20
|
-
|
21
|
-
// Total the key names
|
22
|
-
return accumulator
|
23
|
-
.keyArray()
|
24
|
-
.sum();
|
25
|
-
}
|
26
|
-
|
27
|
-
}
|
@@ -1,63 +0,0 @@
|
|
1
|
-
component extends="testbox.system.BaseSpec" {
|
2
|
-
|
3
|
-
function beforeAll(){
|
4
|
-
SUT = createObject( 'SumOfMultiples' );
|
5
|
-
}
|
6
|
-
|
7
|
-
function run(){
|
8
|
-
|
9
|
-
describe( "My SumOfMultiples class", function(){
|
10
|
-
|
11
|
-
it( 'multiples of 3 or 5 up to 1', function(){
|
12
|
-
expect( SUT.sum( factors=[3, 5], limit='1' ) ).toBe( '0' );
|
13
|
-
});
|
14
|
-
|
15
|
-
it( 'multiples of 3 or 5 up to 4', function(){
|
16
|
-
expect( SUT.sum( factors=[3, 5], limit='4' ) ).toBe( '3' );
|
17
|
-
});
|
18
|
-
|
19
|
-
it( 'multiples of 3 or 5 up to 10', function(){
|
20
|
-
expect( SUT.sum( factors=[3, 5], limit='10' ) ).toBe( '23' );
|
21
|
-
});
|
22
|
-
|
23
|
-
it( 'multiples of 3 or 5 up to 100', function(){
|
24
|
-
expect( SUT.sum( factors=[3, 5], limit='100' ) ).toBe( '2318' );
|
25
|
-
});
|
26
|
-
|
27
|
-
it( 'multiples of 3 or 5 up to 1000', function(){
|
28
|
-
expect( SUT.sum( factors=[3, 5], limit='1000' ) ).toBe( '233168' );
|
29
|
-
});
|
30
|
-
|
31
|
-
it( 'multiples of 7, 13 or 17 up to 20', function(){
|
32
|
-
expect( SUT.sum( factors=[7, 13, 17], limit='20' ) ).toBe( '51' );
|
33
|
-
});
|
34
|
-
|
35
|
-
it( 'multiples of 4 or 6 up to 15', function(){
|
36
|
-
expect( SUT.sum( factors=[4, 6], limit='15' ) ).toBe( '30' );
|
37
|
-
});
|
38
|
-
|
39
|
-
it( 'multiples of 5, 6 or 8 up to 150', function(){
|
40
|
-
expect( SUT.sum( factors=[5, 6, 8], limit='150' ) ).toBe( '4419' );
|
41
|
-
});
|
42
|
-
|
43
|
-
it( 'multiples of 5 or 25 up to 51', function(){
|
44
|
-
expect( SUT.sum( factors=[5, 25], limit='51' ) ).toBe( '275' );
|
45
|
-
});
|
46
|
-
|
47
|
-
it( 'multiples of 43 or 47 up to 10000', function(){
|
48
|
-
expect( SUT.sum( factors=[43, 47], limit='10000' ) ).toBe( '2203160' );
|
49
|
-
});
|
50
|
-
|
51
|
-
it( 'multiples of 1 up to 100', function(){
|
52
|
-
expect( SUT.sum( factors=[1], limit='100' ) ).toBe( '4950' );
|
53
|
-
});
|
54
|
-
|
55
|
-
it( 'multiples of an empty list up to 10000', function(){
|
56
|
-
expect( SUT.sum( factors=[], limit='10000' ) ).toBe( '0' );
|
57
|
-
});
|
58
|
-
|
59
|
-
});
|
60
|
-
|
61
|
-
}
|
62
|
-
|
63
|
-
}
|
@@ -1,103 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* I am a CommandBox task runner which you can use to test your implementation of this exercise against the
|
3
|
-
* provided test suite. To use me, open the CommandBox CLI and run this:
|
4
|
-
*
|
5
|
-
* CommandBox> task run TestRunner
|
6
|
-
*
|
7
|
-
* To start up a test watcher that will automatically rerun the test suite every time you save a file change, run this:
|
8
|
-
*
|
9
|
-
* CommandBox> task run TestRunner --watcher
|
10
|
-
*
|
11
|
-
*/
|
12
|
-
component {
|
13
|
-
|
14
|
-
/**
|
15
|
-
* @solution Runs the tests against the solution
|
16
|
-
* @watcher Start up a file watch that re-runs the tests on file changes. Use Ctrl-C to stop
|
17
|
-
*/
|
18
|
-
function run( boolean solution=false, boolean watcher=false ) {
|
19
|
-
|
20
|
-
ensureTestBox();
|
21
|
-
|
22
|
-
if( watcher ) {
|
23
|
-
|
24
|
-
// Tabula rasa
|
25
|
-
command( 'cls' ).run();
|
26
|
-
|
27
|
-
// Start watcher
|
28
|
-
watch()
|
29
|
-
.paths( '*.cfc' )
|
30
|
-
.inDirectory( getCWD() )
|
31
|
-
.withDelay( 500 )
|
32
|
-
.onChange( function() {
|
33
|
-
|
34
|
-
// Clear the screen
|
35
|
-
command( 'cls' )
|
36
|
-
.run();
|
37
|
-
|
38
|
-
// This is neccessary so changes to tests get picked up right away.
|
39
|
-
pagePoolClear();
|
40
|
-
|
41
|
-
runTests( solution );
|
42
|
-
|
43
|
-
} )
|
44
|
-
.start();
|
45
|
-
|
46
|
-
} else {
|
47
|
-
runTests( solution );
|
48
|
-
}
|
49
|
-
|
50
|
-
}
|
51
|
-
|
52
|
-
/**
|
53
|
-
* Make sure the TestBox framework is installed
|
54
|
-
*/
|
55
|
-
private function ensureTestBox() {
|
56
|
-
var excerciseRoot = getCWD();
|
57
|
-
var testBoxRoot = excerciseRoot & '/testbox';
|
58
|
-
|
59
|
-
if( !directoryExists( testBoxRoot ) ) {
|
60
|
-
|
61
|
-
print.boldYellowLine( 'Installing some missing dependencies for you!' ).toConsole();
|
62
|
-
command( 'install' )
|
63
|
-
.inWorkingDirectory( excerciseRoot )
|
64
|
-
.run();
|
65
|
-
}
|
66
|
-
|
67
|
-
// Bootstrap TestBox framework
|
68
|
-
filesystemUtil.createMapping( '/testbox', testBoxRoot );
|
69
|
-
}
|
70
|
-
|
71
|
-
/**
|
72
|
-
* Invoke TestBox to run the test suite
|
73
|
-
*/
|
74
|
-
private function runTests( boolean solution=false ) {
|
75
|
-
|
76
|
-
// Create TestBox and run the tests
|
77
|
-
testData = new testbox.system.TestBox()
|
78
|
-
.runRaw( directory = {
|
79
|
-
// Find all CFCs...
|
80
|
-
mapping = filesystemUtil.makePathRelative( getCWD() ),
|
81
|
-
// ... in this directory ...
|
82
|
-
recurse = false,
|
83
|
-
// ... whose name ends in "test"
|
84
|
-
filter = function( path ) {
|
85
|
-
return path.reFind( ( solution ? 'Solution' : '' ) & 'Test.cfc$' );
|
86
|
-
}
|
87
|
-
} )
|
88
|
-
.getMemento();
|
89
|
-
|
90
|
-
// Print out the results with ANSI formatting for the CLI
|
91
|
-
getInstance( 'CLIRenderer@testbox-commands' )
|
92
|
-
.render( print, testData, true );
|
93
|
-
|
94
|
-
print.toConsole();
|
95
|
-
|
96
|
-
// Set proper exit code
|
97
|
-
if( testData.totalFail || testData.totalError ) {
|
98
|
-
setExitCode( 1 );
|
99
|
-
}
|
100
|
-
}
|
101
|
-
|
102
|
-
}
|
103
|
-
|
@@ -1,37 +0,0 @@
|
|
1
|
-
<!---
|
2
|
-
|
3
|
-
This file will only be used if you want to start up a web server in this directory. You can do so by running:
|
4
|
-
|
5
|
-
$> box
|
6
|
-
CommandBox> install
|
7
|
-
CommandBox> server start
|
8
|
-
|
9
|
-
However, this is not necessary unless you really just want to use the HTML reporters on TestBox.
|
10
|
-
Ideally, you'll skip the need for this file entirely and just run the tests directly frm the CLI like this:
|
11
|
-
|
12
|
-
CommandBox> task run TestRunner
|
13
|
-
|
14
|
-
--->
|
15
|
-
<cfsetting showDebugOutput="false">
|
16
|
-
<cfparam name="url.reporter" default="simple">
|
17
|
-
<cfscript>
|
18
|
-
// get a list of all CFCs in this folder whose name looks like "XXXTest.cfc"
|
19
|
-
// And turn it into compnent path relative to the web root
|
20
|
-
url.bundles = directoryList(
|
21
|
-
path=expandPath( '/' ),
|
22
|
-
filter='*Test.cfc' )
|
23
|
-
.map( function( path ) {
|
24
|
-
return path
|
25
|
-
.replaceNoCase( expandPath( '/' ), '' )
|
26
|
-
.left( -4 )
|
27
|
-
} )
|
28
|
-
.toList();
|
29
|
-
</cfscript>
|
30
|
-
|
31
|
-
<!--- Ensure TestBox --->
|
32
|
-
<cfif fileExists( "/testbox/system/runners/HTMLRunner.cfm" )>
|
33
|
-
<!--- Include the TestBox HTML Runner --->
|
34
|
-
<cfinclude template="/testbox/system/runners/HTMLRunner.cfm">
|
35
|
-
<cfelse>
|
36
|
-
Oops, you don't have TestBox installed yet! Please run <b>box install</b> from the root of your excercise folder and refresh this page.
|
37
|
-
</cfif>
|
File without changes
|
@@ -1,53 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Here is an example solution for the Triangle exercise
|
3
|
-
*/
|
4
|
-
component {
|
5
|
-
|
6
|
-
function equilateral( array sides ) {
|
7
|
-
// Is triangle and all 3 sides the same
|
8
|
-
return isTriangle( sides ) && countSides( sides ) == 1;
|
9
|
-
}
|
10
|
-
|
11
|
-
function isosceles( array sides ) {
|
12
|
-
// Is triangle and at least two sides the same
|
13
|
-
return isTriangle( sides ) && countSides( sides ) < 3;
|
14
|
-
}
|
15
|
-
|
16
|
-
function scalene( array sides ) {
|
17
|
-
// Is triangle and all 3 sides different
|
18
|
-
return isTriangle( sides ) && countSides( sides ) == 3;
|
19
|
-
}
|
20
|
-
|
21
|
-
private function countSides( array sides ) {
|
22
|
-
var distinctSides = {};
|
23
|
-
|
24
|
-
// Keep track of distinct sides
|
25
|
-
sides.each( function( side ){
|
26
|
-
distinctSides[ side ] = true;
|
27
|
-
} );
|
28
|
-
|
29
|
-
// Count 'em up
|
30
|
-
return distinctSides.count();
|
31
|
-
}
|
32
|
-
|
33
|
-
private function isTriangle( array sides ) {
|
34
|
-
// Any sides of 0 are invalid
|
35
|
-
if( sides[ 1 ] == 0 || sides[ 2 ] == 0 || sides[ 3 ] == 0 ) {
|
36
|
-
return false;
|
37
|
-
}
|
38
|
-
// sides 1 and 2 must be at least the size of side 3
|
39
|
-
if( sides[ 1 ] + sides[ 2 ] < sides[ 3 ] ) {
|
40
|
-
return false;
|
41
|
-
}
|
42
|
-
// sides 1 and 3 must be at least the size of side 2
|
43
|
-
if( sides[ 1 ] + sides[ 3 ] < sides[ 2 ] ) {
|
44
|
-
return false;
|
45
|
-
}
|
46
|
-
// sides 2 and 3 must be at least the size of side 1
|
47
|
-
if( sides[ 2 ] + sides[ 3 ] < sides[ 1 ] ) {
|
48
|
-
return false;
|
49
|
-
}
|
50
|
-
// If we made it here, it's a triangle!
|
51
|
-
return true;
|
52
|
-
}
|
53
|
-
}
|
@@ -1,103 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* I am a CommandBox task runner which you can use to test your implementation of this exercise against the
|
3
|
-
* provided test suite. To use me, open the CommandBox CLI and run this:
|
4
|
-
*
|
5
|
-
* CommandBox> task run TestRunner
|
6
|
-
*
|
7
|
-
* To start up a test watcher that will automatically rerun the test suite every time you save a file change, run this:
|
8
|
-
*
|
9
|
-
* CommandBox> task run TestRunner --watcher
|
10
|
-
*
|
11
|
-
*/
|
12
|
-
component {
|
13
|
-
|
14
|
-
/**
|
15
|
-
* @solution Runs the tests against the solution
|
16
|
-
* @watcher Start up a file watch that re-runs the tests on file changes. Use Ctrl-C to stop
|
17
|
-
*/
|
18
|
-
function run( boolean solution=false, boolean watcher=false ) {
|
19
|
-
|
20
|
-
ensureTestBox();
|
21
|
-
|
22
|
-
if( watcher ) {
|
23
|
-
|
24
|
-
// Tabula rasa
|
25
|
-
command( 'cls' ).run();
|
26
|
-
|
27
|
-
// Start watcher
|
28
|
-
watch()
|
29
|
-
.paths( '*.cfc' )
|
30
|
-
.inDirectory( getCWD() )
|
31
|
-
.withDelay( 500 )
|
32
|
-
.onChange( function() {
|
33
|
-
|
34
|
-
// Clear the screen
|
35
|
-
command( 'cls' )
|
36
|
-
.run();
|
37
|
-
|
38
|
-
// This is neccessary so changes to tests get picked up right away.
|
39
|
-
pagePoolClear();
|
40
|
-
|
41
|
-
runTests( solution );
|
42
|
-
|
43
|
-
} )
|
44
|
-
.start();
|
45
|
-
|
46
|
-
} else {
|
47
|
-
runTests( solution );
|
48
|
-
}
|
49
|
-
|
50
|
-
}
|
51
|
-
|
52
|
-
/**
|
53
|
-
* Make sure the TestBox framework is installed
|
54
|
-
*/
|
55
|
-
private function ensureTestBox() {
|
56
|
-
var excerciseRoot = getCWD();
|
57
|
-
var testBoxRoot = excerciseRoot & '/testbox';
|
58
|
-
|
59
|
-
if( !directoryExists( testBoxRoot ) ) {
|
60
|
-
|
61
|
-
print.boldYellowLine( 'Installing some missing dependencies for you!' ).toConsole();
|
62
|
-
command( 'install' )
|
63
|
-
.inWorkingDirectory( excerciseRoot )
|
64
|
-
.run();
|
65
|
-
}
|
66
|
-
|
67
|
-
// Bootstrap TestBox framework
|
68
|
-
filesystemUtil.createMapping( '/testbox', testBoxRoot );
|
69
|
-
}
|
70
|
-
|
71
|
-
/**
|
72
|
-
* Invoke TestBox to run the test suite
|
73
|
-
*/
|
74
|
-
private function runTests( boolean solution=false ) {
|
75
|
-
|
76
|
-
// Create TestBox and run the tests
|
77
|
-
testData = new testbox.system.TestBox()
|
78
|
-
.runRaw( directory = {
|
79
|
-
// Find all CFCs...
|
80
|
-
mapping = filesystemUtil.makePathRelative( getCWD() ),
|
81
|
-
// ... in this directory ...
|
82
|
-
recurse = false,
|
83
|
-
// ... whose name ends in "test"
|
84
|
-
filter = function( path ) {
|
85
|
-
return path.reFind( ( solution ? 'Solution' : '' ) & 'Test.cfc$' );
|
86
|
-
}
|
87
|
-
} )
|
88
|
-
.getMemento();
|
89
|
-
|
90
|
-
// Print out the results with ANSI formatting for the CLI
|
91
|
-
getInstance( 'CLIRenderer@testbox-commands' )
|
92
|
-
.render( print, testData, true );
|
93
|
-
|
94
|
-
print.toConsole();
|
95
|
-
|
96
|
-
// Set proper exit code
|
97
|
-
if( testData.totalFail || testData.totalError ) {
|
98
|
-
setExitCode( 1 );
|
99
|
-
}
|
100
|
-
}
|
101
|
-
|
102
|
-
}
|
103
|
-
|