trackler 2.0.6.38 → 2.0.6.39
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/java/exercises/linked-list/src/example/java/{Deque.java → DoublyLinkedList.java} +1 -1
- data/tracks/java/exercises/linked-list/src/test/java/{DequeTest.java → DoublyLinkedListTest.java} +3 -3
- data/tracks/ruby/exercises/say/.meta/.version +1 -0
- data/tracks/ruby/exercises/say/example.rb +4 -0
- data/tracks/ruby/exercises/say/example.tt +17 -0
- data/tracks/ruby/exercises/say/say_test.rb +65 -73
- data/tracks/ruby/lib/say_cases.rb +46 -0
- data/tracks/typescript/.gitignore +4 -0
- data/tracks/typescript/.travis.yml +5 -0
- data/tracks/typescript/LICENSE +21 -0
- data/tracks/typescript/README.md +11 -0
- data/tracks/typescript/SETUP.md +0 -0
- data/tracks/typescript/bin/fetch-configlet +32 -0
- data/tracks/typescript/config.json +21 -0
- data/tracks/typescript/docs/ABOUT.md +0 -0
- data/tracks/typescript/docs/INSTALLATION.md +0 -0
- data/tracks/typescript/docs/LEARNING.md +0 -0
- data/tracks/typescript/docs/RESOURCES.md +0 -0
- data/tracks/typescript/docs/TESTS.md +0 -0
- data/tracks/typescript/exercises/.keep +0 -0
- data/tracks/typescript/img/.keep +0 -0
- metadata +21 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad5428c146f9e6636b2a669586bae43dfe2aee40
|
4
|
+
data.tar.gz: fb1cc9b23f967f79906fc911e724a606ee8134e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a01f0a853ebfcc1cbf1d02e9f6f274bd2797388db006ac7eff8c501bb3410d30ae296f6d3b665a1beedadae1c1a7216c003bbd03e0dd72da9a76038b218352e
|
7
|
+
data.tar.gz: 45d11ce9819d26cc0ca110ba02bec6c4c6515e6f3b103ff711d43e2617f51d864bdf4a63839c13d0d1d459d4fa88270e0d346ae28ba1952da6409836e186a944
|
data/lib/trackler/version.rb
CHANGED
data/tracks/java/exercises/linked-list/src/test/java/{DequeTest.java → DoublyLinkedListTest.java}
RENAMED
@@ -5,12 +5,12 @@ import org.junit.Test;
|
|
5
5
|
import static org.hamcrest.CoreMatchers.*;
|
6
6
|
import static org.junit.Assert.*;
|
7
7
|
|
8
|
-
public class
|
9
|
-
private
|
8
|
+
public class DoublyLinkedListTest {
|
9
|
+
private DoublyLinkedList<Integer> subject;
|
10
10
|
|
11
11
|
@Before
|
12
12
|
public void setUp() {
|
13
|
-
subject = new
|
13
|
+
subject = new DoublyLinkedList<>();
|
14
14
|
}
|
15
15
|
|
16
16
|
|
@@ -0,0 +1 @@
|
|
1
|
+
1
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'minitest/autorun'
|
2
|
+
require_relative 'say'
|
3
|
+
|
4
|
+
# Test data version: <%= sha1 %>
|
5
|
+
class SayTest < Minitest::Test<% test_cases.each do |test_case| %>
|
6
|
+
def <%= test_case.test_name %>
|
7
|
+
<%= test_case.skipped %>
|
8
|
+
<%= test_case.workload %>
|
9
|
+
end
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
<%= IO.read(XRUBY_LIB + '/bookkeeping.md') %>
|
13
|
+
def test_bookkeeping
|
14
|
+
skip
|
15
|
+
assert_equal <%= version.next %>, BookKeeping::VERSION
|
16
|
+
end
|
17
|
+
end
|
@@ -1,128 +1,120 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
gem 'minitest', '>= 5.0.0'
|
3
1
|
require 'minitest/autorun'
|
4
2
|
require_relative 'say'
|
5
3
|
|
4
|
+
# Test data version: e3bd4a2
|
6
5
|
class SayTest < Minitest::Test
|
7
|
-
def
|
8
|
-
|
6
|
+
def test_zero
|
7
|
+
# skip
|
8
|
+
question = 0
|
9
|
+
assert_equal('zero', Say.new(question).in_english)
|
9
10
|
end
|
10
11
|
|
11
12
|
def test_one
|
12
13
|
skip
|
13
|
-
|
14
|
+
question = 1
|
15
|
+
assert_equal('one', Say.new(question).in_english)
|
14
16
|
end
|
15
17
|
|
16
|
-
def
|
18
|
+
def test_fourteen
|
17
19
|
skip
|
18
|
-
|
20
|
+
question = 14
|
21
|
+
assert_equal('fourteen', Say.new(question).in_english)
|
19
22
|
end
|
20
23
|
|
21
24
|
def test_twenty
|
22
25
|
skip
|
23
|
-
|
24
|
-
assert_equal
|
26
|
+
question = 20
|
27
|
+
assert_equal('twenty', Say.new(question).in_english)
|
25
28
|
end
|
26
29
|
|
27
30
|
def test_twenty_two
|
28
31
|
skip
|
29
|
-
|
32
|
+
question = 22
|
33
|
+
assert_equal('twenty-two', Say.new(question).in_english)
|
30
34
|
end
|
31
35
|
|
32
|
-
def
|
36
|
+
def test_one_hundred
|
33
37
|
skip
|
34
|
-
|
38
|
+
question = 100
|
39
|
+
assert_equal('one hundred', Say.new(question).in_english)
|
35
40
|
end
|
36
41
|
|
37
|
-
def
|
42
|
+
def test_one_hundred_twenty_three
|
38
43
|
skip
|
39
|
-
|
44
|
+
question = 123
|
45
|
+
assert_equal('one hundred twenty-three', Say.new(question).in_english)
|
40
46
|
end
|
41
47
|
|
42
|
-
def
|
48
|
+
def test_one_thousand
|
43
49
|
skip
|
44
|
-
|
50
|
+
question = 1_000
|
51
|
+
assert_equal('one thousand', Say.new(question).in_english)
|
45
52
|
end
|
46
53
|
|
47
|
-
def
|
54
|
+
def test_one_thousand_two_hundred_thirty_four
|
48
55
|
skip
|
49
|
-
|
56
|
+
question = 1_234
|
57
|
+
assert_equal('one thousand two hundred thirty-four', Say.new(question).in_english)
|
50
58
|
end
|
51
59
|
|
52
|
-
def
|
60
|
+
def test_one_million
|
53
61
|
skip
|
54
|
-
|
55
|
-
assert_equal
|
62
|
+
question = 1_000_000
|
63
|
+
assert_equal('one million', Say.new(question).in_english)
|
56
64
|
end
|
57
65
|
|
58
|
-
def
|
66
|
+
def test_one_million_two_thousand_three_hundred_forty_five
|
59
67
|
skip
|
60
|
-
|
68
|
+
question = 1_002_345
|
69
|
+
assert_equal('one million two thousand three hundred forty-five', Say.new(question).in_english)
|
61
70
|
end
|
62
71
|
|
63
|
-
def
|
72
|
+
def test_one_billion
|
64
73
|
skip
|
65
|
-
|
74
|
+
question = 1_000_000_000
|
75
|
+
assert_equal('one billion', Say.new(question).in_english)
|
66
76
|
end
|
67
77
|
|
68
|
-
def
|
78
|
+
def test_a_big_number
|
69
79
|
skip
|
70
|
-
|
71
|
-
assert_equal
|
80
|
+
question = 987_654_321_123
|
81
|
+
assert_equal('nine hundred eighty-seven billion six hundred fifty-four million three hundred twenty-one thousand one hundred twenty-three', Say.new(question).in_english)
|
72
82
|
end
|
73
83
|
|
74
|
-
def
|
75
|
-
skip
|
76
|
-
assert_equal 'one billion', Say.new(10**9).in_english
|
77
|
-
end
|
78
|
-
|
79
|
-
def test_really_big_number
|
80
|
-
skip
|
81
|
-
expected = 'nine hundred eighty-seven billion '
|
82
|
-
expected << 'six hundred fifty-four million '
|
83
|
-
expected << 'three hundred twenty-one thousand '
|
84
|
-
expected << 'one hundred twenty-three'
|
85
|
-
assert_equal expected, Say.new(987_654_321_123).in_english
|
86
|
-
end
|
87
|
-
|
88
|
-
def test_really_big_number_with_teens
|
89
|
-
skip
|
90
|
-
expected = 'nine hundred seventeen billion '
|
91
|
-
expected << 'six hundred fourteen million '
|
92
|
-
expected << 'three hundred eleven thousand '
|
93
|
-
expected << 'one hundred twenty-three'
|
94
|
-
assert_equal expected, Say.new(917_614_311_123).in_english
|
95
|
-
end
|
96
|
-
|
97
|
-
def test_really_big_number_with_tens
|
98
|
-
skip
|
99
|
-
expected = 'nine hundred eighty billion '
|
100
|
-
expected << 'six hundred forty million '
|
101
|
-
expected << 'three hundred twenty thousand '
|
102
|
-
expected << 'one hundred twenty-three'
|
103
|
-
assert_equal expected, Say.new(980_640_320_123).in_english
|
104
|
-
end
|
105
|
-
|
106
|
-
def test_really_big_number_with_hundreds
|
107
|
-
skip
|
108
|
-
expected = 'nine hundred billion '
|
109
|
-
expected << 'six hundred million '
|
110
|
-
expected << 'three hundred thousand '
|
111
|
-
expected << 'one hundred twenty-three'
|
112
|
-
assert_equal expected, Say.new(900_600_300_123).in_english
|
113
|
-
end
|
114
|
-
|
115
|
-
def test_lower_bound
|
84
|
+
def test_numbers_below_zero_are_out_of_range
|
116
85
|
skip
|
86
|
+
question = -1
|
117
87
|
assert_raises ArgumentError do
|
118
|
-
Say.new(
|
88
|
+
Say.new(question).in_english
|
119
89
|
end
|
120
90
|
end
|
121
91
|
|
122
|
-
def
|
92
|
+
def test_numbers_above_999_999_999_999_are_out_of_range
|
123
93
|
skip
|
94
|
+
question = 1_000_000_000_000
|
124
95
|
assert_raises ArgumentError do
|
125
|
-
Say.new(
|
96
|
+
Say.new(question).in_english
|
126
97
|
end
|
127
98
|
end
|
99
|
+
|
100
|
+
# Problems in exercism evolve over time, as we find better ways to ask
|
101
|
+
# questions.
|
102
|
+
# The version number refers to the version of the problem you solved,
|
103
|
+
# not your solution.
|
104
|
+
#
|
105
|
+
# Define a constant named VERSION inside of the top level BookKeeping
|
106
|
+
# module, which may be placed near the end of your file.
|
107
|
+
#
|
108
|
+
# In your file, it will look like this:
|
109
|
+
#
|
110
|
+
# module BookKeeping
|
111
|
+
# VERSION = 1 # Where the version number matches the one in the test.
|
112
|
+
# end
|
113
|
+
#
|
114
|
+
# If you are curious, read more about constants on RubyDoc:
|
115
|
+
# http://ruby-doc.org/docs/ruby-doc-bundle/UsersGuide/rg/constants.html
|
116
|
+
def test_bookkeeping
|
117
|
+
skip
|
118
|
+
assert_equal 1, BookKeeping::VERSION
|
119
|
+
end
|
128
120
|
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
class SayCase < OpenStruct
|
2
|
+
def test_name
|
3
|
+
'test_%s' % description.tr(' ,-', '_').downcase
|
4
|
+
end
|
5
|
+
|
6
|
+
def workload
|
7
|
+
[
|
8
|
+
"question = #{underscore_format(input)}",
|
9
|
+
indent(4, assertion),
|
10
|
+
].join("\n")
|
11
|
+
end
|
12
|
+
|
13
|
+
def skipped
|
14
|
+
index.zero? ? '# skip' : 'skip'
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
def indent(size, lines)
|
20
|
+
lines.lines.each_with_object('') { |line, obj| obj << ' ' * size + line }
|
21
|
+
end
|
22
|
+
|
23
|
+
def assertion
|
24
|
+
return error_assertion if expected == -1
|
25
|
+
|
26
|
+
"assert_equal('#{expected}', Say.new(question).in_english)"
|
27
|
+
end
|
28
|
+
|
29
|
+
def error_assertion
|
30
|
+
[
|
31
|
+
'assert_raises ArgumentError do',
|
32
|
+
indent(2, 'Say.new(question).in_english'),
|
33
|
+
'end',
|
34
|
+
].join("\n")
|
35
|
+
end
|
36
|
+
|
37
|
+
def underscore_format(number)
|
38
|
+
number.to_s.reverse.gsub(/...(?=.)/, '\&_').reverse
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
SayCases = proc do |data|
|
43
|
+
JSON.parse(data)['cases'].map.with_index do |row, i|
|
44
|
+
SayCase.new(row.merge(index: i))
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 Katrina Owen, _@kytrinyx.com
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# Exercism TypeScript Track
|
2
|
+
|
3
|
+
Exercism exercises in TypeScript.
|
4
|
+
|
5
|
+
## TODO
|
6
|
+
|
7
|
+
_Document how to contribute to the TypeScript track._
|
8
|
+
|
9
|
+
## Contributing Guide
|
10
|
+
|
11
|
+
Please see the [contributing guide](https://github.com/exercism/x-common/blob/master/CONTRIBUTING.md).
|
File without changes
|
@@ -0,0 +1,32 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
LATEST=https://github.com/exercism/configlet/releases/latest
|
4
|
+
|
5
|
+
OS=$(
|
6
|
+
case $(uname) in
|
7
|
+
(Darwin*)
|
8
|
+
echo "mac";;
|
9
|
+
(Linux*)
|
10
|
+
echo "linux";;
|
11
|
+
(Windows*)
|
12
|
+
echo "windows";;
|
13
|
+
(*)
|
14
|
+
echo "linux";;
|
15
|
+
esac)
|
16
|
+
|
17
|
+
ARCH=$(
|
18
|
+
case $(uname -m) in
|
19
|
+
(*64*)
|
20
|
+
echo 64bit;;
|
21
|
+
(*686*)
|
22
|
+
echo 32bit;;
|
23
|
+
(*386*)
|
24
|
+
echo 32bit;;
|
25
|
+
(*)
|
26
|
+
echo 64bit;;
|
27
|
+
esac)
|
28
|
+
|
29
|
+
VERSION="$(curl --head --silent $LATEST | awk -v FS=/ '/Location:/{print $NF}' | tr -d '\r')"
|
30
|
+
URL=https://github.com/exercism/configlet/releases/download/$VERSION/configlet-$OS-${ARCH}.tgz
|
31
|
+
|
32
|
+
curl -s --location $URL | tar xz -C bin/
|
@@ -0,0 +1,21 @@
|
|
1
|
+
{
|
2
|
+
"slug": "typescript",
|
3
|
+
"language": "TypeScript",
|
4
|
+
"repository": "https://github.com/exercism/xtypescript",
|
5
|
+
"active": false,
|
6
|
+
"test_pattern": "TODO",
|
7
|
+
"exercises": [
|
8
|
+
|
9
|
+
],
|
10
|
+
"deprecated": [
|
11
|
+
|
12
|
+
],
|
13
|
+
"ignored": [
|
14
|
+
"bin",
|
15
|
+
"img",
|
16
|
+
"docs"
|
17
|
+
],
|
18
|
+
"foregone": [
|
19
|
+
|
20
|
+
]
|
21
|
+
}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trackler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.6.
|
4
|
+
version: 2.0.6.39
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Katrina Owen
|
@@ -3919,9 +3919,9 @@ files:
|
|
3919
3919
|
- tracks/java/exercises/largest-series-product/src/main/java/LargestSeriesProductCalculator.java
|
3920
3920
|
- tracks/java/exercises/largest-series-product/src/test/java/LargestSeriesProductCalculatorTest.java
|
3921
3921
|
- tracks/java/exercises/linked-list/build.gradle
|
3922
|
-
- tracks/java/exercises/linked-list/src/example/java/
|
3922
|
+
- tracks/java/exercises/linked-list/src/example/java/DoublyLinkedList.java
|
3923
3923
|
- tracks/java/exercises/linked-list/src/main/java/.keep
|
3924
|
-
- tracks/java/exercises/linked-list/src/test/java/
|
3924
|
+
- tracks/java/exercises/linked-list/src/test/java/DoublyLinkedListTest.java
|
3925
3925
|
- tracks/java/exercises/luhn/build.gradle
|
3926
3926
|
- tracks/java/exercises/luhn/src/example/java/LuhnValidator.java
|
3927
3927
|
- tracks/java/exercises/luhn/src/main/java/.keep
|
@@ -6530,7 +6530,9 @@ files:
|
|
6530
6530
|
- tracks/ruby/exercises/run-length-encoding/run_length_encoding_test.rb
|
6531
6531
|
- tracks/ruby/exercises/saddle-points/example.rb
|
6532
6532
|
- tracks/ruby/exercises/saddle-points/saddle_points_test.rb
|
6533
|
+
- tracks/ruby/exercises/say/.meta/.version
|
6533
6534
|
- tracks/ruby/exercises/say/example.rb
|
6535
|
+
- tracks/ruby/exercises/say/example.tt
|
6534
6536
|
- tracks/ruby/exercises/say/say_test.rb
|
6535
6537
|
- tracks/ruby/exercises/scale-generator/example.rb
|
6536
6538
|
- tracks/ruby/exercises/scale-generator/scale_generator_test.rb
|
@@ -6623,6 +6625,7 @@ files:
|
|
6623
6625
|
- tracks/ruby/lib/rna_transcription_cases.rb
|
6624
6626
|
- tracks/ruby/lib/roman_numerals_cases.rb
|
6625
6627
|
- tracks/ruby/lib/run_length_encoding_cases.rb
|
6628
|
+
- tracks/ruby/lib/say_cases.rb
|
6626
6629
|
- tracks/ruby/lib/sieve_cases.rb
|
6627
6630
|
- tracks/ruby/lib/tasks/exercise.rb
|
6628
6631
|
- tracks/ruby/lib/tasks/exercise_test_tasks.rb
|
@@ -7859,6 +7862,21 @@ files:
|
|
7859
7862
|
- tracks/teco/docs/RESOURCES.md
|
7860
7863
|
- tracks/teco/docs/TESTS.md
|
7861
7864
|
- tracks/teco/exercises/.keep
|
7865
|
+
- tracks/typescript/.git
|
7866
|
+
- tracks/typescript/.gitignore
|
7867
|
+
- tracks/typescript/.travis.yml
|
7868
|
+
- tracks/typescript/LICENSE
|
7869
|
+
- tracks/typescript/README.md
|
7870
|
+
- tracks/typescript/SETUP.md
|
7871
|
+
- tracks/typescript/bin/fetch-configlet
|
7872
|
+
- tracks/typescript/config.json
|
7873
|
+
- tracks/typescript/docs/ABOUT.md
|
7874
|
+
- tracks/typescript/docs/INSTALLATION.md
|
7875
|
+
- tracks/typescript/docs/LEARNING.md
|
7876
|
+
- tracks/typescript/docs/RESOURCES.md
|
7877
|
+
- tracks/typescript/docs/TESTS.md
|
7878
|
+
- tracks/typescript/exercises/.keep
|
7879
|
+
- tracks/typescript/img/.keep
|
7862
7880
|
- tracks/vbnet/.git
|
7863
7881
|
- tracks/vbnet/.gitignore
|
7864
7882
|
- tracks/vbnet/.travis.yml
|