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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 248c2fada6c072524d6f49e9867d79e3483bd780
4
- data.tar.gz: 0c7576bdecdfc841c8ccaf4cb9c39627569ae0b2
3
+ metadata.gz: ad5428c146f9e6636b2a669586bae43dfe2aee40
4
+ data.tar.gz: fb1cc9b23f967f79906fc911e724a606ee8134e0
5
5
  SHA512:
6
- metadata.gz: 8c7c5fbeaea2f63469a4c077c320754574125757a9da00bbc1ce60373714c902c2d773c7769643d30bcbf50d4eece38aea870ccdd0df2e9b383f90b9090a3071
7
- data.tar.gz: 82442653f46de01734769c231a99cc3faae5740620eeaa864b194146412a5f389daee84d46679025b82b7b7adb7fa83cde7accfa2785d3a7924135650ffd3ac0
6
+ metadata.gz: 2a01f0a853ebfcc1cbf1d02e9f6f274bd2797388db006ac7eff8c501bb3410d30ae296f6d3b665a1beedadae1c1a7216c003bbd03e0dd72da9a76038b218352e
7
+ data.tar.gz: 45d11ce9819d26cc0ca110ba02bec6c4c6515e6f3b103ff711d43e2617f51d864bdf4a63839c13d0d1d459d4fa88270e0d346ae28ba1952da6409836e186a944
@@ -1,3 +1,3 @@
1
1
  module Trackler
2
- VERSION = "2.0.6.38"
2
+ VERSION = "2.0.6.39"
3
3
  end
@@ -1,4 +1,4 @@
1
- public final class Deque<T> {
1
+ public final class DoublyLinkedList<T> {
2
2
  private Element<T> head;
3
3
 
4
4
  public void push(T value) {
@@ -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 DequeTest {
9
- private Deque<Integer> subject;
8
+ public class DoublyLinkedListTest {
9
+ private DoublyLinkedList<Integer> subject;
10
10
 
11
11
  @Before
12
12
  public void setUp() {
13
- subject = new Deque<>();
13
+ subject = new DoublyLinkedList<>();
14
14
  }
15
15
 
16
16
 
@@ -0,0 +1 @@
1
+ 1
@@ -1,3 +1,7 @@
1
+ module BookKeeping
2
+ VERSION = 1
3
+ end
4
+
1
5
  class Chunk
2
6
  attr_reader :value, :magnitude
3
7
  def initialize(value, magnitude = nil)
@@ -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 test_0
8
- assert_equal 'zero', Say.new(0).in_english
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
- assert_equal 'one', Say.new(1).in_english
14
+ question = 1
15
+ assert_equal('one', Say.new(question).in_english)
14
16
  end
15
17
 
16
- def test_14
18
+ def test_fourteen
17
19
  skip
18
- assert_equal 'fourteen', Say.new(14).in_english
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
- # This really shouldn't be twenty-zero
24
- assert_equal 'twenty', Say.new(20).in_english
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
- assert_equal 'twenty-two', Say.new(22).in_english
32
+ question = 22
33
+ assert_equal('twenty-two', Say.new(question).in_english)
30
34
  end
31
35
 
32
- def test_100
36
+ def test_one_hundred
33
37
  skip
34
- assert_equal 'one hundred', Say.new(100).in_english
38
+ question = 100
39
+ assert_equal('one hundred', Say.new(question).in_english)
35
40
  end
36
41
 
37
- def test_120
42
+ def test_one_hundred_twenty_three
38
43
  skip
39
- assert_equal 'one hundred twenty', Say.new(120).in_english
44
+ question = 123
45
+ assert_equal('one hundred twenty-three', Say.new(question).in_english)
40
46
  end
41
47
 
42
- def test_123
48
+ def test_one_thousand
43
49
  skip
44
- assert_equal 'one hundred twenty-three', Say.new(123).in_english
50
+ question = 1_000
51
+ assert_equal('one thousand', Say.new(question).in_english)
45
52
  end
46
53
 
47
- def test_1_thousand
54
+ def test_one_thousand_two_hundred_thirty_four
48
55
  skip
49
- assert_equal 'one thousand', Say.new(1000).in_english
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 test_1_thousand_234
60
+ def test_one_million
53
61
  skip
54
- expected = 'one thousand two hundred thirty-four'
55
- assert_equal expected, Say.new(1234).in_english
62
+ question = 1_000_000
63
+ assert_equal('one million', Say.new(question).in_english)
56
64
  end
57
65
 
58
- def test_1_million
66
+ def test_one_million_two_thousand_three_hundred_forty_five
59
67
  skip
60
- assert_equal 'one million', Say.new(10**6).in_english
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 test_1_million_and_some_crumbs
72
+ def test_one_billion
64
73
  skip
65
- assert_equal 'one million two', Say.new(1_000_002).in_english
74
+ question = 1_000_000_000
75
+ assert_equal('one billion', Say.new(question).in_english)
66
76
  end
67
77
 
68
- def test_1_million_2_thousand_345
78
+ def test_a_big_number
69
79
  skip
70
- expected = 'one million two thousand three hundred forty-five'
71
- assert_equal expected, Say.new(1_002_345).in_english
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 test_1_billion
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(-1).in_english
88
+ Say.new(question).in_english
119
89
  end
120
90
  end
121
91
 
122
- def test_upper_bound
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(1_000_000_000_000).in_english
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,4 @@
1
+ *.swp
2
+ .DS_Store
3
+ bin/configlet
4
+ bin/configlet.exe
@@ -0,0 +1,5 @@
1
+ language: bash
2
+
3
+ script:
4
+ - bin/fetch-configlet
5
+ - bin/configlet .
@@ -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.38
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/Deque.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/DequeTest.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