trackler 2.0.8.54 → 2.0.8.55
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -0
- data/common/CONTRIBUTING.md +7 -6
- data/fixtures/tracks/animal/config.json +1 -0
- data/fixtures/tracks/animal/exercises/dog/a_test_example_for.animal +1 -0
- data/lib/trackler/implementation.rb +32 -38
- data/lib/trackler/implementations.rb +2 -2
- data/lib/trackler/track.rb +24 -4
- data/lib/trackler/version.rb +1 -1
- data/tracks/elixir/config.json +17 -0
- data/tracks/elixir/exercises/bracket-push/bracket_push_test.exs +34 -19
- data/tracks/elixir/exercises/saddle-points/example.exs +1 -1
- data/tracks/elixir/exercises/saddle-points/saddle_points.exs +1 -1
- data/tracks/elixir/exercises/saddle-points/saddle_points_test.exs +10 -10
- data/tracks/elixir/exercises/simple-cipher/example.exs +80 -0
- data/tracks/elixir/exercises/simple-cipher/simple_cipher.exs +49 -0
- data/tracks/elixir/exercises/simple-cipher/simple_cipher_test.exs +89 -0
- data/tracks/elixir/exercises/tournament/HINTS.md +3 -0
- data/tracks/elixir/exercises/tournament/example.exs +81 -0
- data/tracks/elixir/exercises/tournament/tournament.exs +17 -0
- data/tracks/elixir/exercises/tournament/tournament_test.exs +96 -0
- data/tracks/go/exercises/bob/bob.go +2 -2
- data/tracks/go/exercises/clock/clock.go +1 -8
- data/tracks/go/exercises/gigasecond/gigasecond.go +4 -6
- data/tracks/go/exercises/hamming/hamming.go +0 -1
- data/tracks/go/exercises/raindrops/raindrops.go +2 -1
- data/tracks/go/exercises/triangle/triangle.go +1 -2
- data/tracks/java/bin/journey-test.sh +6 -5
- data/tracks/java/exercises/nth-prime/src/example/java/PrimeCalculator.java +1 -5
- data/tracks/java/exercises/rna-transcription/src/test/java/RnaTranscriptionTest.java +5 -5
- data/tracks/pony/.github/stale.yml +0 -0
- data/tracks/pony/.travis.yml +2 -9
- data/tracks/pony/bin/install-deps +15 -8
- data/tracks/pony/bin/test-exercises +2 -0
- data/tracks/pony/config.json +2 -1
- data/tracks/pony/exercises/anagram/example.pony +1 -1
- data/tracks/pony/exercises/anagram/test.pony +2 -2
- data/tracks/pony/exercises/atbash-cipher/example.pony +6 -4
- data/tracks/pony/exercises/atbash-cipher/test.pony +24 -38
- data/tracks/pony/exercises/pascals-triangle/test.pony +3 -3
- data/tracks/pony/exercises/rna-transcription/test.pony +4 -4
- data/tracks/pony/exercises/roman-numerals/example.pony +12 -12
- data/tracks/pony/exercises/roman-numerals/test.pony +18 -18
- data/tracks/purescript/config.json +15 -0
- data/tracks/purescript/exercises/etl/bower.json +17 -0
- data/tracks/purescript/exercises/etl/examples/src/Etl.purs +20 -0
- data/tracks/purescript/exercises/etl/src/Etl.purs +3 -0
- data/tracks/purescript/exercises/etl/test/Main.purs +99 -0
- data/tracks/purescript/exercises/isogram/bower.json +18 -0
- data/tracks/purescript/exercises/isogram/examples/src/Isogram.purs +22 -0
- data/tracks/purescript/exercises/isogram/src/Isogram.purs +4 -0
- data/tracks/purescript/exercises/isogram/test/Main.purs +44 -0
- data/tracks/ruby/README.md +10 -9
- data/tracks/ruby/exercises/anagram/example.tt +1 -1
- data/tracks/ruby/exercises/bowling/example.tt +1 -1
- data/tracks/ruby/exercises/hamming/example.tt +2 -2
- data/tracks/ruby/exercises/luhn/.meta/.version +1 -0
- data/tracks/ruby/exercises/luhn/example.rb +18 -23
- data/tracks/ruby/exercises/luhn/example.tt +18 -0
- data/tracks/ruby/exercises/luhn/luhn_test.rb +60 -27
- data/tracks/ruby/exercises/pig-latin/.meta/.version +1 -0
- data/tracks/ruby/exercises/pig-latin/example.rb +4 -0
- data/tracks/ruby/exercises/pig-latin/example.tt +21 -0
- data/tracks/ruby/exercises/pig-latin/pig_latin_test.rb +73 -24
- data/tracks/ruby/exercises/rna-transcription/example.tt +1 -1
- data/tracks/ruby/lib/anagram_cases.rb +1 -1
- data/tracks/ruby/lib/binary_cases.rb +3 -3
- data/tracks/ruby/lib/bowling_cases.rb +1 -1
- data/tracks/ruby/lib/hamming_cases.rb +1 -1
- data/tracks/ruby/lib/luhn_cases.rb +27 -0
- data/tracks/ruby/lib/pig_latin_cases.rb +20 -0
- data/tracks/ruby/lib/rna_transcription_cases.rb +1 -1
- metadata +25 -3
- data/tracks/go/.github/stale.yml +0 -22
@@ -3,78 +3,127 @@ gem 'minitest', '>= 5.0.0'
|
|
3
3
|
require 'minitest/autorun'
|
4
4
|
require_relative 'pig_latin'
|
5
5
|
|
6
|
+
# Common test data version: d4e9a22
|
6
7
|
class PigLatinTest < Minitest::Test
|
7
8
|
def test_word_beginning_with_a
|
8
|
-
|
9
|
+
# skip
|
10
|
+
assert_equal "appleay", PigLatin.translate("apple")
|
9
11
|
end
|
10
12
|
|
11
|
-
def
|
13
|
+
def test_word_beginning_with_e
|
12
14
|
skip
|
13
|
-
assert_equal
|
15
|
+
assert_equal "earay", PigLatin.translate("ear")
|
16
|
+
end
|
17
|
+
|
18
|
+
def test_word_beginning_with_i
|
19
|
+
skip
|
20
|
+
assert_equal "iglooay", PigLatin.translate("igloo")
|
21
|
+
end
|
22
|
+
|
23
|
+
def test_word_beginning_with_o
|
24
|
+
skip
|
25
|
+
assert_equal "objectay", PigLatin.translate("object")
|
26
|
+
end
|
27
|
+
|
28
|
+
def test_word_beginning_with_u
|
29
|
+
skip
|
30
|
+
assert_equal "underay", PigLatin.translate("under")
|
31
|
+
end
|
32
|
+
|
33
|
+
def test_word_beginning_with_a_vowel_and_followed_by_a_qu
|
34
|
+
skip
|
35
|
+
assert_equal "equalay", PigLatin.translate("equal")
|
14
36
|
end
|
15
37
|
|
16
38
|
def test_word_beginning_with_p
|
17
39
|
skip
|
18
|
-
assert_equal
|
40
|
+
assert_equal "igpay", PigLatin.translate("pig")
|
19
41
|
end
|
20
42
|
|
21
43
|
def test_word_beginning_with_k
|
22
44
|
skip
|
23
|
-
assert_equal
|
45
|
+
assert_equal "oalakay", PigLatin.translate("koala")
|
46
|
+
end
|
47
|
+
|
48
|
+
def test_word_beginning_with_y
|
49
|
+
skip
|
50
|
+
assert_equal "ellowyay", PigLatin.translate("yellow")
|
51
|
+
end
|
52
|
+
|
53
|
+
def test_word_beginning_with_x
|
54
|
+
skip
|
55
|
+
assert_equal "enonxay", PigLatin.translate("xenon")
|
56
|
+
end
|
57
|
+
|
58
|
+
def test_word_beginning_with_q_without_a_following_u
|
59
|
+
skip
|
60
|
+
assert_equal "atqay", PigLatin.translate("qat")
|
24
61
|
end
|
25
62
|
|
26
63
|
def test_word_beginning_with_ch
|
27
64
|
skip
|
28
|
-
assert_equal
|
65
|
+
assert_equal "airchay", PigLatin.translate("chair")
|
29
66
|
end
|
30
67
|
|
31
68
|
def test_word_beginning_with_qu
|
32
69
|
skip
|
33
|
-
assert_equal
|
70
|
+
assert_equal "eenquay", PigLatin.translate("queen")
|
34
71
|
end
|
35
72
|
|
36
|
-
def
|
73
|
+
def test_word_beginning_with_qu_and_a_preceding_consonant
|
37
74
|
skip
|
38
|
-
assert_equal
|
75
|
+
assert_equal "aresquay", PigLatin.translate("square")
|
39
76
|
end
|
40
77
|
|
41
78
|
def test_word_beginning_with_th
|
42
79
|
skip
|
43
|
-
assert_equal
|
80
|
+
assert_equal "erapythay", PigLatin.translate("therapy")
|
44
81
|
end
|
45
82
|
|
46
83
|
def test_word_beginning_with_thr
|
47
84
|
skip
|
48
|
-
assert_equal
|
85
|
+
assert_equal "ushthray", PigLatin.translate("thrush")
|
49
86
|
end
|
50
87
|
|
51
88
|
def test_word_beginning_with_sch
|
52
89
|
skip
|
53
|
-
assert_equal
|
90
|
+
assert_equal "oolschay", PigLatin.translate("school")
|
54
91
|
end
|
55
92
|
|
56
|
-
def
|
93
|
+
def test_word_beginning_with_yt
|
57
94
|
skip
|
58
|
-
assert_equal
|
95
|
+
assert_equal "yttriaay", PigLatin.translate("yttria")
|
59
96
|
end
|
60
97
|
|
61
|
-
def
|
98
|
+
def test_word_beginning_with_xr
|
62
99
|
skip
|
63
|
-
assert_equal
|
100
|
+
assert_equal "xrayay", PigLatin.translate("xray")
|
64
101
|
end
|
65
102
|
|
66
|
-
def
|
103
|
+
def test_a_whole_phrase
|
67
104
|
skip
|
68
|
-
assert_equal
|
105
|
+
assert_equal "ickquay astfay unray", PigLatin.translate("quick fast run")
|
69
106
|
end
|
70
107
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
108
|
+
# Problems in exercism evolve over time, as we find better ways to ask
|
109
|
+
# questions.
|
110
|
+
# The version number refers to the version of the problem you solved,
|
111
|
+
# not your solution.
|
112
|
+
#
|
113
|
+
# Define a constant named VERSION inside of the top level BookKeeping
|
114
|
+
# module, which may be placed near the end of your file.
|
115
|
+
#
|
116
|
+
# In your file, it will look like this:
|
117
|
+
#
|
118
|
+
# module BookKeeping
|
119
|
+
# VERSION = 1 # Where the version number matches the one in the test.
|
120
|
+
# end
|
121
|
+
#
|
122
|
+
# If you are curious, read more about constants on RubyDoc:
|
123
|
+
# http://ruby-doc.org/docs/ruby-doc-bundle/UsersGuide/rg/constants.html
|
75
124
|
|
76
|
-
def
|
125
|
+
def test_bookkeeping
|
77
126
|
skip
|
78
|
-
assert_equal
|
127
|
+
assert_equal 1, BookKeeping::VERSION
|
79
128
|
end
|
80
129
|
end
|
@@ -7,7 +7,7 @@ require_relative 'rna_transcription'
|
|
7
7
|
class ComplementTest < Minitest::Test<% test_cases.each do |test_case| %>
|
8
8
|
def <%= test_case.test_name %>
|
9
9
|
<%= test_case.skipped %>
|
10
|
-
assert_equal '<%= test_case.expected %>', <%= test_case.
|
10
|
+
assert_equal '<%= test_case.expected %>', <%= test_case.workload %>
|
11
11
|
end
|
12
12
|
<% end %>
|
13
13
|
<%= IO.read(XRUBY_LIB + '/bookkeeping.md') %>
|
@@ -16,14 +16,14 @@ class BinaryCase < OpenStruct
|
|
16
16
|
private
|
17
17
|
|
18
18
|
def error_assertion
|
19
|
-
"assert_raises(ArgumentError) { #{
|
19
|
+
"assert_raises(ArgumentError) { #{workload} }"
|
20
20
|
end
|
21
21
|
|
22
22
|
def equality_assertion
|
23
|
-
"assert_equal #{expected}, #{
|
23
|
+
"assert_equal #{expected}, #{workload}"
|
24
24
|
end
|
25
25
|
|
26
|
-
def
|
26
|
+
def workload
|
27
27
|
"Binary.to_decimal('#{binary}')"
|
28
28
|
end
|
29
29
|
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'exercise_cases'
|
2
|
+
|
3
|
+
class LuhnCase < OpenStruct
|
4
|
+
def name
|
5
|
+
'test_%s' % description.tr('- ', '__')
|
6
|
+
end
|
7
|
+
|
8
|
+
def workload
|
9
|
+
%Q(#{assertion} Luhn.valid?(#{input.inspect}))
|
10
|
+
end
|
11
|
+
|
12
|
+
def skipped
|
13
|
+
index.zero? ? '# skip' : 'skip'
|
14
|
+
end
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def assertion
|
19
|
+
expected ? 'assert' : 'refute'
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
LuhnCases = proc do |data|
|
24
|
+
JSON.parse(data)['cases'].map.with_index do |row, i|
|
25
|
+
LuhnCase.new(row.merge('index' => i))
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'exercise_cases'
|
2
|
+
|
3
|
+
class PigLatinCase < OpenStruct
|
4
|
+
def name
|
5
|
+
'test_%s' % description.tr('- ', '__')
|
6
|
+
end
|
7
|
+
|
8
|
+
def workload
|
9
|
+
%Q(assert_equal #{expected.inspect}, PigLatin.translate(#{input.inspect}))
|
10
|
+
end
|
11
|
+
|
12
|
+
def skipped
|
13
|
+
index.zero? ? '# skip' : 'skip'
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
PigLatinCases = proc do |data|
|
18
|
+
JSON.parse(data)['cases'].flat_map {|section| section['cases'] }. # extract all the cases into a single array
|
19
|
+
map.with_index { |test, index| PigLatinCase.new(test.merge('index' => index)) }
|
20
|
+
end
|
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.0.8.
|
4
|
+
version: 2.0.8.55
|
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-04-
|
11
|
+
date: 2017-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubyzip
|
@@ -458,6 +458,7 @@ files:
|
|
458
458
|
- fixtures/tracks/animal/exercises/TRACK_HINTS.md
|
459
459
|
- fixtures/tracks/animal/exercises/dog/a_dog.animal
|
460
460
|
- fixtures/tracks/animal/exercises/dog/a_dog_2.animal
|
461
|
+
- fixtures/tracks/animal/exercises/dog/a_test_example_for.animal
|
461
462
|
- fixtures/tracks/animal/exercises/dog/example.ext
|
462
463
|
- fixtures/tracks/animal/exercises/fish/included-via-symlink.txt
|
463
464
|
- fixtures/tracks/animal/global/some-vendored-library
|
@@ -2658,6 +2659,9 @@ files:
|
|
2658
2659
|
- tracks/elixir/exercises/sieve/example.exs
|
2659
2660
|
- tracks/elixir/exercises/sieve/sieve.exs
|
2660
2661
|
- tracks/elixir/exercises/sieve/sieve_test.exs
|
2662
|
+
- tracks/elixir/exercises/simple-cipher/example.exs
|
2663
|
+
- tracks/elixir/exercises/simple-cipher/simple_cipher.exs
|
2664
|
+
- tracks/elixir/exercises/simple-cipher/simple_cipher_test.exs
|
2661
2665
|
- tracks/elixir/exercises/simple-linked-list/example.exs
|
2662
2666
|
- tracks/elixir/exercises/simple-linked-list/linked_list.exs
|
2663
2667
|
- tracks/elixir/exercises/simple-linked-list/linked_list_test.exs
|
@@ -2675,6 +2679,10 @@ files:
|
|
2675
2679
|
- tracks/elixir/exercises/sum-of-multiples/sum_of_multiples.exs
|
2676
2680
|
- tracks/elixir/exercises/sum-of-multiples/sum_of_multiples_test.exs
|
2677
2681
|
- tracks/elixir/exercises/test_helper.exs
|
2682
|
+
- tracks/elixir/exercises/tournament/HINTS.md
|
2683
|
+
- tracks/elixir/exercises/tournament/example.exs
|
2684
|
+
- tracks/elixir/exercises/tournament/tournament.exs
|
2685
|
+
- tracks/elixir/exercises/tournament/tournament_test.exs
|
2678
2686
|
- tracks/elixir/exercises/triangle/example.exs
|
2679
2687
|
- tracks/elixir/exercises/triangle/triangle.exs
|
2680
2688
|
- tracks/elixir/exercises/triangle/triangle_test.exs
|
@@ -3357,7 +3365,6 @@ files:
|
|
3357
3365
|
- tracks/fsharp/paket.dependencies
|
3358
3366
|
- tracks/fsharp/paket.lock
|
3359
3367
|
- tracks/go/.git
|
3360
|
-
- tracks/go/.github/stale.yml
|
3361
3368
|
- tracks/go/.gitignore
|
3362
3369
|
- tracks/go/.travis.yml
|
3363
3370
|
- tracks/go/LICENSE
|
@@ -6482,6 +6489,7 @@ files:
|
|
6482
6489
|
- tracks/plsql/exercises/roman-numerals/ut_numeral#.plsql
|
6483
6490
|
- tracks/plsql/img/icon.png
|
6484
6491
|
- tracks/pony/.git
|
6492
|
+
- tracks/pony/.github/stale.yml
|
6485
6493
|
- tracks/pony/.gitignore
|
6486
6494
|
- tracks/pony/.travis.yml
|
6487
6495
|
- tracks/pony/LICENSE
|
@@ -6643,10 +6651,18 @@ files:
|
|
6643
6651
|
- tracks/purescript/exercises/difference-of-squares/examples/src/DifferenceOfSquares.purs
|
6644
6652
|
- tracks/purescript/exercises/difference-of-squares/src/DifferenceOfSquares.purs
|
6645
6653
|
- tracks/purescript/exercises/difference-of-squares/test/Main.purs
|
6654
|
+
- tracks/purescript/exercises/etl/bower.json
|
6655
|
+
- tracks/purescript/exercises/etl/examples/src/Etl.purs
|
6656
|
+
- tracks/purescript/exercises/etl/src/Etl.purs
|
6657
|
+
- tracks/purescript/exercises/etl/test/Main.purs
|
6646
6658
|
- tracks/purescript/exercises/hello-world/bower.json
|
6647
6659
|
- tracks/purescript/exercises/hello-world/examples/src/HelloWorld.purs
|
6648
6660
|
- tracks/purescript/exercises/hello-world/src/HelloWorld.purs
|
6649
6661
|
- tracks/purescript/exercises/hello-world/test/Main.purs
|
6662
|
+
- tracks/purescript/exercises/isogram/bower.json
|
6663
|
+
- tracks/purescript/exercises/isogram/examples/src/Isogram.purs
|
6664
|
+
- tracks/purescript/exercises/isogram/src/Isogram.purs
|
6665
|
+
- tracks/purescript/exercises/isogram/test/Main.purs
|
6650
6666
|
- tracks/purescript/exercises/leap/bower.json
|
6651
6667
|
- tracks/purescript/exercises/leap/examples/src/Leap.purs
|
6652
6668
|
- tracks/purescript/exercises/leap/src/Leap.purs
|
@@ -7247,7 +7263,9 @@ files:
|
|
7247
7263
|
- tracks/ruby/exercises/linked-list/linked_list_test.rb
|
7248
7264
|
- tracks/ruby/exercises/list-ops/example.rb
|
7249
7265
|
- tracks/ruby/exercises/list-ops/list_ops_test.rb
|
7266
|
+
- tracks/ruby/exercises/luhn/.meta/.version
|
7250
7267
|
- tracks/ruby/exercises/luhn/example.rb
|
7268
|
+
- tracks/ruby/exercises/luhn/example.tt
|
7251
7269
|
- tracks/ruby/exercises/luhn/luhn_test.rb
|
7252
7270
|
- tracks/ruby/exercises/matrix/example.rb
|
7253
7271
|
- tracks/ruby/exercises/matrix/matrix_test.rb
|
@@ -7277,7 +7295,9 @@ files:
|
|
7277
7295
|
- tracks/ruby/exercises/perfect-numbers/perfect_numbers_test.rb
|
7278
7296
|
- tracks/ruby/exercises/phone-number/example.rb
|
7279
7297
|
- tracks/ruby/exercises/phone-number/phone_number_test.rb
|
7298
|
+
- tracks/ruby/exercises/pig-latin/.meta/.version
|
7280
7299
|
- tracks/ruby/exercises/pig-latin/example.rb
|
7300
|
+
- tracks/ruby/exercises/pig-latin/example.tt
|
7281
7301
|
- tracks/ruby/exercises/pig-latin/pig_latin_test.rb
|
7282
7302
|
- tracks/ruby/exercises/point-mutations/example.rb
|
7283
7303
|
- tracks/ruby/exercises/point-mutations/point_mutations_test.rb
|
@@ -7408,8 +7428,10 @@ files:
|
|
7408
7428
|
- tracks/ruby/lib/isogram_cases.rb
|
7409
7429
|
- tracks/ruby/lib/largest_series_product_cases.rb
|
7410
7430
|
- tracks/ruby/lib/leap_cases.rb
|
7431
|
+
- tracks/ruby/lib/luhn_cases.rb
|
7411
7432
|
- tracks/ruby/lib/nth_prime_cases.rb
|
7412
7433
|
- tracks/ruby/lib/pangram_cases.rb
|
7434
|
+
- tracks/ruby/lib/pig_latin_cases.rb
|
7413
7435
|
- tracks/ruby/lib/queen_attack_cases.rb
|
7414
7436
|
- tracks/ruby/lib/raindrops_cases.rb
|
7415
7437
|
- tracks/ruby/lib/rna_transcription_cases.rb
|
data/tracks/go/.github/stale.yml
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
# Configuration for probot-stale - https://github.com/probot/stale
|
2
|
-
|
3
|
-
# Number of days of inactivity before an Issue or Pull Request becomes stale
|
4
|
-
daysUntilStale: 60
|
5
|
-
# Number of days of inactivity before a stale Issue or Pull Request is closed
|
6
|
-
daysUntilClose: 7
|
7
|
-
# Issues or Pull Requests with these labels will never be considered stale
|
8
|
-
exemptLabels:
|
9
|
-
- pinned
|
10
|
-
- security
|
11
|
-
- good first patch
|
12
|
-
# Label to use when marking as stale
|
13
|
-
staleLabel: wontfix
|
14
|
-
# Comment to post when marking as stale. Set to `false` to disable
|
15
|
-
markComment: >
|
16
|
-
This issue has been automatically marked as stale because it has not had
|
17
|
-
recent activity. It will be closed if no further activity occurs. Thank you
|
18
|
-
for your contributions.
|
19
|
-
# Comment to post when closing a stale Issue or Pull Request. Set to `false` to disable
|
20
|
-
closeComment: false
|
21
|
-
# Limit to only `issues` or `pulls`
|
22
|
-
# only: issues
|