trackler 2.2.1.49 → 2.2.1.50
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.
- checksums.yaml +4 -4
- data/bin/verify-configs +1 -1
- data/lib/trackler/version.rb +1 -1
- data/problem-specifications/exercises/kindergarten-garden/canonical-data.json +0 -37
- data/tracks/c/exercises/allergies/test/test_allergies.c +41 -41
- data/tracks/common-lisp/config.json +266 -252
- data/tracks/common-lisp/config/maintainers.json +23 -23
- data/tracks/common-lisp/exercises/allergies/README.md +0 -1
- data/tracks/common-lisp/exercises/atbash-cipher/README.md +2 -1
- data/tracks/common-lisp/exercises/beer-song/README.md +1 -1
- data/tracks/common-lisp/exercises/binary/README.md +2 -0
- data/tracks/common-lisp/exercises/collatz-conjecture/README.md +4 -8
- data/tracks/common-lisp/exercises/crypto-square/README.md +4 -4
- data/tracks/common-lisp/exercises/etl/README.md +2 -0
- data/tracks/common-lisp/exercises/grade-school/README.md +0 -1
- data/tracks/common-lisp/exercises/grains/README.md +0 -1
- data/tracks/common-lisp/exercises/leap/README.md +1 -1
- data/tracks/common-lisp/exercises/meetup/README.md +1 -2
- data/tracks/common-lisp/exercises/nucleotide-count/README.md +8 -22
- data/tracks/common-lisp/exercises/pascals-triangle/README.md +1 -1
- data/tracks/common-lisp/exercises/perfect-numbers/README.md +3 -4
- data/tracks/common-lisp/exercises/phone-number/README.md +3 -2
- data/tracks/common-lisp/exercises/roman-numerals/README.md +1 -1
- data/tracks/common-lisp/exercises/scrabble-score/README.md +3 -1
- data/tracks/common-lisp/exercises/space-age/README.md +2 -1
- data/tracks/common-lisp/exercises/sublist/README.md +65 -0
- data/tracks/common-lisp/exercises/sublist/example.lisp +24 -0
- data/tracks/common-lisp/exercises/sublist/sublist-test.lisp +87 -0
- data/tracks/common-lisp/exercises/sublist/sublist.lisp +8 -0
- data/tracks/common-lisp/exercises/triangle/README.md +9 -6
- data/tracks/common-lisp/exercises/trinary/README.md +1 -1
- data/tracks/common-lisp/exercises/word-count/README.md +1 -2
- data/tracks/ecmascript/config.json +30 -0
- data/tracks/ecmascript/exercises/bowling/README.md +80 -0
- data/tracks/ecmascript/exercises/bowling/bowling.spec.js +159 -0
- data/tracks/ecmascript/exercises/bowling/example.js +67 -0
- data/tracks/ecmascript/exercises/bowling/package.json +71 -0
- data/tracks/ecmascript/exercises/two-fer/README.md +47 -0
- data/tracks/ecmascript/exercises/two-fer/example.js +4 -0
- data/tracks/ecmascript/exercises/two-fer/package.json +69 -0
- data/tracks/ecmascript/exercises/two-fer/two-fer.spec.js +18 -0
- data/tracks/fsharp/exercises/pascals-triangle/Example.fs +12 -8
- data/tracks/fsharp/exercises/pascals-triangle/PascalsTriangle.fs +2 -2
- data/tracks/fsharp/exercises/pascals-triangle/PascalsTriangleTest.fs +15 -12
- data/tracks/fsharp/generators/Generators.fs +19 -0
- data/tracks/fsharp/generators/Templates/_AssertThrows.liquid +1 -0
- data/tracks/java/docs/ABOUT.md +13 -31
- data/tracks/java/exercises/bracket-push/.meta/version +1 -1
- data/tracks/java/exercises/bracket-push/src/test/java/BracketCheckerTest.java +7 -1
- data/tracks/java/exercises/collatz-conjecture/.meta/version +1 -1
- data/tracks/java/exercises/etl/README.md +1 -1
- data/tracks/java/exercises/ocr-numbers/README.md +1 -1
- data/tracks/java/exercises/pascals-triangle/README.md +1 -1
- data/tracks/java/exercises/perfect-numbers/.meta/version +1 -1
- data/tracks/java/exercises/rna-transcription/README.md +1 -1
- data/tracks/java/exercises/secret-handshake/.meta/version +1 -1
- data/tracks/java/exercises/secret-handshake/src/test/java/HandshakeCalculatorTest.java +1 -9
- data/tracks/java/scripts/canonical_data_check.sh +104 -0
- data/tracks/javascript/exercises/twelve-days/example.js +23 -25
- data/tracks/julia/.travis.yml +1 -0
- data/tracks/kotlin/exercises/all-your-base/.meta/version +1 -0
- data/tracks/kotlin/exercises/all-your-base/src/test/kotlin/BaseConverterTest.kt +0 -3
- data/tracks/kotlin/exercises/change/.meta/version +1 -0
- data/tracks/kotlin/exercises/change/src/test/kotlin/ChangeCalculatorTest.kt +0 -3
- data/tracks/kotlin/exercises/clock/.meta/version +1 -0
- data/tracks/kotlin/exercises/clock/src/test/kotlin/ClockAddTest.kt +1 -4
- data/tracks/kotlin/exercises/clock/src/test/kotlin/ClockCreationTest.kt +1 -4
- data/tracks/kotlin/exercises/clock/src/test/kotlin/ClockEqualTest.kt +1 -4
- data/tracks/kotlin/exercises/collatz-conjecture/.meta/version +1 -0
- data/tracks/kotlin/exercises/collatz-conjecture/src/test/kotlin/CollatzCalculatorTest.kt +0 -3
- data/tracks/kotlin/exercises/complex-numbers/.meta/version +1 -0
- data/tracks/kotlin/exercises/complex-numbers/src/test/kotlin/ComplexNumberTest.kt +0 -3
- data/tracks/kotlin/exercises/diamond/.meta/version +1 -0
- data/tracks/kotlin/exercises/diamond/src/test/kotlin/DiamondPrinterTest.kt +0 -3
- data/tracks/kotlin/exercises/etl/README.md +1 -1
- data/tracks/kotlin/exercises/forth/.meta/version +1 -0
- data/tracks/kotlin/exercises/forth/src/test/kotlin/ForthEvaluatorTest.kt +0 -3
- data/tracks/kotlin/exercises/grains/.meta/version +1 -0
- data/tracks/kotlin/exercises/grains/src/test/kotlin/BoardTest.kt +0 -3
- data/tracks/kotlin/exercises/hamming/.meta/version +1 -0
- data/tracks/kotlin/exercises/hamming/src/test/kotlin/HammingTest.kt +0 -3
- data/tracks/kotlin/exercises/list-ops/.meta/version +1 -0
- data/tracks/kotlin/exercises/list-ops/src/test/kotlin/ListExtensionsTest.kt +0 -3
- data/tracks/kotlin/exercises/meetup/.meta/version +1 -0
- data/tracks/kotlin/exercises/meetup/src/test/kotlin/MeetupTest.kt +0 -3
- data/tracks/kotlin/exercises/minesweeper/.meta/version +1 -0
- data/tracks/kotlin/exercises/minesweeper/src/test/kotlin/MinesweeperBoardTest.kt +0 -3
- data/tracks/kotlin/exercises/pangram/.meta/version +1 -0
- data/tracks/kotlin/exercises/pangram/src/test/kotlin/PangramTest.kt +0 -3
- data/tracks/kotlin/exercises/pascals-triangle/README.md +1 -1
- data/tracks/kotlin/exercises/prime-factors/.meta/version +1 -0
- data/tracks/kotlin/exercises/prime-factors/src/test/kotlin/PrimeFactorCalculatorTest.kt +0 -3
- data/tracks/kotlin/exercises/rna-transcription/.meta/version +1 -0
- data/tracks/kotlin/exercises/rna-transcription/README.md +1 -1
- data/tracks/kotlin/exercises/rna-transcription/src/test/kotlin/RnaTranscriptionTest.kt +0 -3
- data/tracks/kotlin/exercises/robot-simulator/.meta/version +1 -0
- data/tracks/kotlin/exercises/robot-simulator/src/test/kotlin/RobotTest.kt +0 -3
- data/tracks/kotlin/exercises/rotational-cipher/.meta/version +1 -0
- data/tracks/kotlin/exercises/rotational-cipher/src/test/kotlin/RotationalCipherTest.kt +0 -3
- data/tracks/kotlin/exercises/saddle-points/.meta/version +1 -0
- data/tracks/kotlin/exercises/saddle-points/src/test/kotlin/MatrixTest.kt +0 -3
- data/tracks/kotlin/exercises/say/.meta/version +1 -0
- data/tracks/kotlin/exercises/say/src/test/kotlin/NumberSpellerTest.kt +0 -3
- data/tracks/kotlin/exercises/secret-handshake/.meta/version +1 -0
- data/tracks/kotlin/exercises/secret-handshake/src/test/kotlin/HandshakeCalculatorTest.kt +0 -3
- data/tracks/kotlin/exercises/spiral-matrix/.meta/version +1 -0
- data/tracks/kotlin/exercises/spiral-matrix/src/test/kotlin/SpiralMatrixTest.kt +0 -3
- data/tracks/kotlin/exercises/sublist/.meta/version +1 -0
- data/tracks/kotlin/exercises/sublist/src/test/kotlin/SublistTest.kt +0 -3
- data/tracks/kotlin/scripts/canonical_data_check.sh +104 -0
- data/tracks/perl6/exercises/accumulate/accumulate.t +2 -3
- data/tracks/perl6/exercises/all-your-base/all-your-base.t +17 -18
- data/tracks/perl6/exercises/allergies/allergies.t +17 -18
- data/tracks/perl6/exercises/anagram/anagram.t +17 -18
- data/tracks/perl6/exercises/atbash-cipher/atbash-cipher.t +17 -18
- data/tracks/perl6/exercises/bob/bob.t +20 -22
- data/tracks/perl6/exercises/bob/example.yaml +1 -2
- data/tracks/perl6/exercises/clock/clock.t +17 -18
- data/tracks/perl6/exercises/flatten-array/flatten-array.t +17 -18
- data/tracks/perl6/exercises/grade-school/grade-school.t +2 -3
- data/tracks/perl6/exercises/grains/grains.t +17 -18
- data/tracks/perl6/exercises/hello-world/example.yaml +1 -2
- data/tracks/perl6/exercises/hello-world/hello-world.t +20 -22
- data/tracks/perl6/exercises/leap/leap.t +17 -18
- data/tracks/perl6/exercises/linked-list/linked-list.t +2 -3
- data/tracks/perl6/exercises/luhn/luhn.t +17 -18
- data/tracks/perl6/exercises/phone-number/phone-number.t +17 -18
- data/tracks/perl6/exercises/raindrops/raindrops.t +17 -18
- data/tracks/perl6/exercises/rna-transcription/rna-transcription.t +17 -18
- data/tracks/perl6/exercises/robot-name/robot-name.t +2 -3
- data/tracks/perl6/exercises/scrabble-score/scrabble-score.t +17 -18
- data/tracks/perl6/exercises/space-age/space-age.t +17 -18
- data/tracks/perl6/exercises/word-count/word-count.t +17 -18
- data/tracks/perl6/exercises/wordy/wordy.t +17 -18
- data/tracks/perl6/templates/test.mustache +9 -10
- data/tracks/purescript/config.json +11 -0
- data/tracks/purescript/exercises/rna-transcription/README.md +25 -0
- data/tracks/purescript/exercises/rna-transcription/bower.json +26 -0
- data/tracks/purescript/exercises/rna-transcription/examples/src/RNATranscription.purs +18 -0
- data/tracks/purescript/exercises/rna-transcription/src/RNATranscription.purs +3 -0
- data/tracks/purescript/exercises/rna-transcription/test/Main.purs +48 -0
- data/tracks/python/exercises/variable-length-quantity/example.py +6 -6
- data/tracks/python/exercises/variable-length-quantity/variable_length_quantity.py +2 -2
- data/tracks/ruby/config.json +6 -0
- data/tracks/ruby/exercises/complex-numbers/.meta/.version +1 -0
- data/tracks/ruby/exercises/complex-numbers/.meta/generator/complex_numbers_case.rb +44 -0
- data/tracks/ruby/exercises/complex-numbers/.meta/solutions/complex_numbers.rb +49 -0
- data/tracks/ruby/exercises/complex-numbers/README.md +64 -0
- data/tracks/ruby/exercises/complex-numbers/complex_numbers_test.rb +207 -0
- data/tracks/ruby/exercises/crypto-square/.meta/.version +1 -0
- data/tracks/ruby/exercises/crypto-square/.meta/generator/crypto_square_case.rb +19 -0
- data/tracks/ruby/exercises/crypto-square/.meta/solutions/crypto_square.rb +20 -15
- data/tracks/ruby/exercises/crypto-square/README.md +10 -8
- data/tracks/ruby/exercises/crypto-square/crypto_square_test.rb +45 -81
- data/tracks/ruby/exercises/flatten-array/.meta/.version +1 -0
- data/tracks/ruby/exercises/flatten-array/.meta/generator/flatten_array_case.rb +11 -0
- data/tracks/ruby/exercises/flatten-array/.meta/solutions/flatten_array.rb +5 -2
- data/tracks/ruby/exercises/flatten-array/flatten_array_test.rb +32 -7
- data/tracks/ruby/exercises/hamming/hamming_test.rb +3 -3
- data/tracks/ruby/exercises/isogram/isogram_test.rb +4 -4
- data/tracks/ruby/exercises/leap/leap_test.rb +2 -2
- data/tracks/ruby/exercises/pig-latin/.meta/.version +1 -1
- data/tracks/ruby/exercises/pig-latin/.meta/solutions/pig_latin.rb +2 -2
- data/tracks/ruby/exercises/pig-latin/pig_latin_test.rb +17 -7
- data/tracks/ruby/exercises/queen-attack/.meta/generator/queen_attack_case.rb +1 -1
- data/tracks/ruby/exercises/queen-attack/queen_attack_test.rb +7 -7
- data/tracks/ruby/exercises/sum-of-multiples/.meta/.version +1 -1
- data/tracks/ruby/exercises/sum-of-multiples/.meta/solutions/sum_of_multiples.rb +1 -1
- data/tracks/ruby/exercises/sum-of-multiples/sum_of_multiples_test.rb +7 -2
- metadata +53 -2
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import org.junit.Ignore;
|
|
2
2
|
import org.junit.Test;
|
|
3
3
|
|
|
4
|
-
import static org.junit.Assert.assertEquals;
|
|
5
4
|
import static org.junit.Assert.assertFalse;
|
|
6
5
|
import static org.junit.Assert.assertTrue;
|
|
7
6
|
|
|
@@ -34,6 +33,13 @@ public class BracketCheckerTest {
|
|
|
34
33
|
assertFalse(bracketChecker.areBracketsMatchedAndNestedCorrectly());
|
|
35
34
|
}
|
|
36
35
|
|
|
36
|
+
@Ignore("Remove to run test")
|
|
37
|
+
@Test
|
|
38
|
+
public void testSingleOpenBracketWithIncorrectClosingBracket() {
|
|
39
|
+
final BracketChecker bracketChecker = new BracketChecker("{]");
|
|
40
|
+
assertFalse(bracketChecker.areBracketsMatchedAndNestedCorrectly());
|
|
41
|
+
}
|
|
42
|
+
|
|
37
43
|
@Ignore("Remove to run test")
|
|
38
44
|
@Test
|
|
39
45
|
public void testPairedBracketsWithWhitespace() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
1.1.
|
|
1
|
+
1.1.1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
1.
|
|
1
|
+
1.1.0
|
|
@@ -8,8 +8,8 @@ import static java.util.Collections.singletonList;
|
|
|
8
8
|
import static org.junit.Assert.assertEquals;
|
|
9
9
|
|
|
10
10
|
public class HandshakeCalculatorTest {
|
|
11
|
-
private HandshakeCalculator handshakeCalculator;
|
|
12
11
|
|
|
12
|
+
private HandshakeCalculator handshakeCalculator;
|
|
13
13
|
|
|
14
14
|
@Before
|
|
15
15
|
public void setUp() {
|
|
@@ -103,12 +103,4 @@ public class HandshakeCalculatorTest {
|
|
|
103
103
|
handshakeCalculator.calculateHandshake(0));
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
@Ignore("Remove to run test")
|
|
107
|
-
@Test
|
|
108
|
-
public void testThatInputWithLower5BitsNotSetYieldsNoActions() {
|
|
109
|
-
assertEquals(
|
|
110
|
-
emptyList(),
|
|
111
|
-
handshakeCalculator.calculateHandshake(32));
|
|
112
|
-
}
|
|
113
|
-
|
|
114
106
|
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
print_usage() {
|
|
4
|
+
echo "Usage: ./canonical_data_check.sh -t path/to/track -s path/to/problem/specifications"
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
# Execution begins
|
|
8
|
+
|
|
9
|
+
command -v jq >/dev/null 2>&1 || {
|
|
10
|
+
echo >&2 "This script requires jq but it's not installed. Aborting."
|
|
11
|
+
exit 1
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
num_args=$#
|
|
15
|
+
|
|
16
|
+
if [ $num_args -eq 0 ]
|
|
17
|
+
then
|
|
18
|
+
print_usage
|
|
19
|
+
exit 0
|
|
20
|
+
fi
|
|
21
|
+
|
|
22
|
+
path_to_track=
|
|
23
|
+
path_to_problem_specifications=
|
|
24
|
+
|
|
25
|
+
while getopts ":t:s:" option
|
|
26
|
+
do
|
|
27
|
+
case "$option" in
|
|
28
|
+
"t")
|
|
29
|
+
path_to_track="$OPTARG"
|
|
30
|
+
;;
|
|
31
|
+
"s")
|
|
32
|
+
path_to_problem_specifications="$OPTARG"
|
|
33
|
+
;;
|
|
34
|
+
*)
|
|
35
|
+
echo "Unrecognized option. Aborting."
|
|
36
|
+
print_usage
|
|
37
|
+
exit 1
|
|
38
|
+
;;
|
|
39
|
+
esac
|
|
40
|
+
done
|
|
41
|
+
|
|
42
|
+
if [ -z "$path_to_track" ]
|
|
43
|
+
then
|
|
44
|
+
echo "Path to track missing."
|
|
45
|
+
print_usage
|
|
46
|
+
exit 1
|
|
47
|
+
fi
|
|
48
|
+
|
|
49
|
+
if [ -z "$path_to_problem_specifications" ]
|
|
50
|
+
then
|
|
51
|
+
echo "Path to problem specifications missing."
|
|
52
|
+
print_usage
|
|
53
|
+
exit 1
|
|
54
|
+
fi
|
|
55
|
+
|
|
56
|
+
config_file_path="$path_to_track/config.json"
|
|
57
|
+
|
|
58
|
+
if ! [ -f "$config_file_path" ]
|
|
59
|
+
then
|
|
60
|
+
echo "Config file not found at $config_file_path."
|
|
61
|
+
exit 1
|
|
62
|
+
fi
|
|
63
|
+
|
|
64
|
+
track_exercise_slugs=$(jq '.exercises[] | select(has("deprecated") | not) | .slug' $config_file_path | tr -d "\"")
|
|
65
|
+
|
|
66
|
+
for slug in $track_exercise_slugs
|
|
67
|
+
do
|
|
68
|
+
canonical_data_folder_path="$path_to_problem_specifications/exercises/$slug"
|
|
69
|
+
|
|
70
|
+
if ! [ -d "$canonical_data_folder_path" ]
|
|
71
|
+
then
|
|
72
|
+
echo "Canonical data folder $canonical_data_folder_path not found. Aborting."
|
|
73
|
+
exit 1
|
|
74
|
+
fi
|
|
75
|
+
|
|
76
|
+
canonical_data_file_path="$canonical_data_folder_path/canonical-data.json"
|
|
77
|
+
|
|
78
|
+
if ! [ -f "$canonical_data_file_path" ]
|
|
79
|
+
then
|
|
80
|
+
# echo "$slug: no canonical data found."
|
|
81
|
+
continue
|
|
82
|
+
fi
|
|
83
|
+
|
|
84
|
+
canonical_data_version=$(jq '.version' $canonical_data_file_path | tr -d "\"")
|
|
85
|
+
|
|
86
|
+
track_exercise_version_file_path="$path_to_track/exercises/$slug/.meta/version"
|
|
87
|
+
|
|
88
|
+
if ! [ -f "$track_exercise_version_file_path" ]
|
|
89
|
+
then
|
|
90
|
+
echo "$slug: needs update or version file (v$canonical_data_version)."
|
|
91
|
+
continue
|
|
92
|
+
fi
|
|
93
|
+
|
|
94
|
+
track_data_version=$(cat $track_exercise_version_file_path)
|
|
95
|
+
|
|
96
|
+
if [ "$track_data_version" = "$canonical_data_version" ]
|
|
97
|
+
then
|
|
98
|
+
# echo "$slug: up-to-date."
|
|
99
|
+
continue
|
|
100
|
+
else
|
|
101
|
+
echo "$slug: needs update (v$track_data_version -> v$canonical_data_version)."
|
|
102
|
+
fi
|
|
103
|
+
|
|
104
|
+
done
|
|
@@ -1,40 +1,38 @@
|
|
|
1
|
-
var TwelveDays = function() {
|
|
1
|
+
var TwelveDays = function () {
|
|
2
2
|
this.verseList = [
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
3
|
+
'On the first day of Christmas my true love gave to me, a Partridge in a Pear Tree.',
|
|
4
|
+
'On the second day of Christmas my true love gave to me, two Turtle Doves, and a Partridge in a Pear Tree.',
|
|
5
|
+
'On the third day of Christmas my true love gave to me, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.',
|
|
6
|
+
'On the fourth day of Christmas my true love gave to me, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.',
|
|
7
|
+
'On the fifth day of Christmas my true love gave to me, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.',
|
|
8
|
+
'On the sixth day of Christmas my true love gave to me, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.',
|
|
9
|
+
'On the seventh day of Christmas my true love gave to me, seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.',
|
|
10
|
+
'On the eighth day of Christmas my true love gave to me, eight Maids-a-Milking, seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.',
|
|
11
|
+
'On the ninth day of Christmas my true love gave to me, nine Ladies Dancing, eight Maids-a-Milking, seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.',
|
|
12
|
+
'On the tenth day of Christmas my true love gave to me, ten Lords-a-Leaping, nine Ladies Dancing, eight Maids-a-Milking, seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.',
|
|
13
|
+
'On the eleventh day of Christmas my true love gave to me, eleven Pipers Piping, ten Lords-a-Leaping, nine Ladies Dancing, eight Maids-a-Milking, seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.',
|
|
14
|
+
'On the twelfth day of Christmas my true love gave to me, twelve Drummers Drumming, eleven Pipers Piping, ten Lords-a-Leaping, nine Ladies Dancing, eight Maids-a-Milking, seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.'
|
|
15
|
+
];
|
|
18
16
|
};
|
|
19
17
|
|
|
20
|
-
TwelveDays.prototype.startFromZero = function(oneIndexArray) {
|
|
21
|
-
var newArray = oneIndexArray.map(function(item) { return item - 1; });
|
|
18
|
+
TwelveDays.prototype.startFromZero = function (oneIndexArray) {
|
|
19
|
+
var newArray = oneIndexArray.map(function (item) { return item - 1; });
|
|
22
20
|
return newArray;
|
|
23
21
|
};
|
|
24
22
|
|
|
25
|
-
TwelveDays.prototype.singleVerse = function(verseIndex) {
|
|
23
|
+
TwelveDays.prototype.singleVerse = function (verseIndex) {
|
|
26
24
|
var verse = this.verseList[verseIndex].concat('\n');
|
|
27
25
|
return verse;
|
|
28
26
|
};
|
|
29
27
|
|
|
30
|
-
TwelveDays.prototype.multiVerse = function(startIndex, endIndex) {
|
|
28
|
+
TwelveDays.prototype.multiVerse = function (startIndex, endIndex) {
|
|
31
29
|
return this.verseList
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
.filter(function (verse, index) { return index >= startIndex; })
|
|
31
|
+
.filter(function (verse, index) { return index <= endIndex; })
|
|
32
|
+
.join('\n\n').concat('\n');
|
|
35
33
|
};
|
|
36
34
|
|
|
37
|
-
TwelveDays.prototype.verse = function(args) {
|
|
35
|
+
TwelveDays.prototype.verse = function (args) {
|
|
38
36
|
var indexArray = this.startFromZero(args);
|
|
39
37
|
|
|
40
38
|
if (args.length === 2) {
|
|
@@ -43,7 +41,7 @@ TwelveDays.prototype.verse = function(args) {
|
|
|
43
41
|
return this.singleVerse(indexArray[0]);
|
|
44
42
|
};
|
|
45
43
|
|
|
46
|
-
TwelveDays.prototype.sing = function() {
|
|
44
|
+
TwelveDays.prototype.sing = function () {
|
|
47
45
|
var song = this.verseList.join('\n\n').concat('\n');
|
|
48
46
|
return song;
|
|
49
47
|
};
|
data/tracks/julia/.travis.yml
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1.0.0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1.1.0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1.0.1
|
|
@@ -2,9 +2,6 @@ import org.junit.Ignore
|
|
|
2
2
|
import org.junit.Test
|
|
3
3
|
import kotlin.test.assertEquals
|
|
4
4
|
|
|
5
|
-
/*
|
|
6
|
-
* version: 1.0.1
|
|
7
|
-
*/
|
|
8
5
|
class ClockAddTest {
|
|
9
6
|
|
|
10
7
|
@Ignore
|
|
@@ -135,4 +132,4 @@ class ClockAddTest {
|
|
|
135
132
|
assertEquals("00:20", clock.toString())
|
|
136
133
|
}
|
|
137
134
|
|
|
138
|
-
}
|
|
135
|
+
}
|
|
@@ -2,9 +2,6 @@ import org.junit.Ignore
|
|
|
2
2
|
import org.junit.Test
|
|
3
3
|
import kotlin.test.assertEquals
|
|
4
4
|
|
|
5
|
-
/*
|
|
6
|
-
* version: 1.0.1
|
|
7
|
-
*/
|
|
8
5
|
class ClockCreationTest {
|
|
9
6
|
|
|
10
7
|
@Test
|
|
@@ -120,4 +117,4 @@ class ClockCreationTest {
|
|
|
120
117
|
assertEquals("22:10", Clock(-121, -5810).toString())
|
|
121
118
|
}
|
|
122
119
|
|
|
123
|
-
}
|
|
120
|
+
}
|
|
@@ -3,9 +3,6 @@ import org.junit.Test
|
|
|
3
3
|
import kotlin.test.assertNotEquals
|
|
4
4
|
import kotlin.test.assertEquals
|
|
5
5
|
|
|
6
|
-
/*
|
|
7
|
-
* version: 1.0.1
|
|
8
|
-
*/
|
|
9
6
|
class ClockEqualTest {
|
|
10
7
|
|
|
11
8
|
@Ignore
|
|
@@ -98,4 +95,4 @@ class ClockEqualTest {
|
|
|
98
95
|
assertEquals(Clock(18, 7), Clock(-54, -11513))
|
|
99
96
|
}
|
|
100
97
|
|
|
101
|
-
}
|
|
98
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1.1.0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1.0.0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1.0.0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1.2.0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1.0.0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1.1.0
|