trackler 2.0.6.10 → 2.0.6.11

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.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/common/exercises/circular-buffer/canonical-data.json +343 -0
  3. data/common/exercises/luhn/description.md +4 -1
  4. data/common/exercises/secret-handshake/canonical-data.json +67 -0
  5. data/common/exercises/secret-handshake/description.md +6 -8
  6. data/common/exercises/variable-length-quantity/canonical-data.json +147 -0
  7. data/lib/trackler/version.rb +1 -1
  8. data/tracks/ceylon/.gitignore +1 -0
  9. data/tracks/ceylon/.travis.yml +6 -1
  10. data/tracks/ceylon/README.md +143 -4
  11. data/tracks/ceylon/bin/test-all-exercises +13 -0
  12. data/tracks/ceylon/bin/test-exercise +30 -0
  13. data/tracks/ceylon/config.json +33 -3
  14. data/tracks/ceylon/{SETUP.md → exercises/TRACK_HINTS.md} +0 -0
  15. data/tracks/ceylon/exercises/anagram/example/Anagram.ceylon +8 -0
  16. data/tracks/ceylon/exercises/anagram/source/anagram/Anagram.ceylon +3 -0
  17. data/tracks/ceylon/exercises/anagram/source/anagram/AnagramTest.ceylon +47 -0
  18. data/tracks/ceylon/exercises/anagram/source/anagram/module.ceylon +3 -0
  19. data/tracks/ceylon/exercises/bracket-push/example/Brackets.ceylon +18 -0
  20. data/tracks/ceylon/exercises/bracket-push/example/module.ceylon +4 -0
  21. data/tracks/ceylon/exercises/bracket-push/source/bracketpush/Brackets.ceylon +3 -0
  22. data/tracks/ceylon/exercises/bracket-push/source/bracketpush/BracketsTest.ceylon +37 -0
  23. data/tracks/ceylon/exercises/bracket-push/source/bracketpush/module.ceylon +3 -0
  24. data/tracks/ceylon/exercises/leap/example/Leap.ceylon +3 -0
  25. data/tracks/ceylon/exercises/leap/source/leap/Leap.ceylon +3 -0
  26. data/tracks/ceylon/exercises/leap/source/leap/LeapTest.ceylon +10 -0
  27. data/tracks/ceylon/exercises/leap/source/leap/module.ceylon +3 -0
  28. data/tracks/ceylon/exercises/sieve/example/Sieve.ceylon +24 -0
  29. data/tracks/ceylon/exercises/sieve/example/module.ceylon +4 -0
  30. data/tracks/ceylon/exercises/sieve/source/sieve/Sieve.ceylon +3 -0
  31. data/tracks/ceylon/exercises/sieve/source/sieve/SieveTest.ceylon +23 -0
  32. data/tracks/ceylon/exercises/sieve/source/sieve/module.ceylon +3 -0
  33. data/tracks/csharp/.travis.yml +4 -0
  34. data/tracks/elm/SETUP.md +5 -4
  35. data/tracks/fsharp/.travis.yml +4 -0
  36. data/tracks/go/config.json +6 -2
  37. data/tracks/go/exercises/luhn/example.go +5 -4
  38. data/tracks/go/exercises/luhn/luhn_test.go +18 -34
  39. data/tracks/java/exercises/word-count/src/test/java/WordCountTest.java +10 -13
  40. data/tracks/lua/docs/ABOUT.md +1 -1
  41. data/tracks/lua/docs/LEARNING.md +1 -0
  42. data/tracks/lua/docs/RESOURCES.md +6 -1
  43. data/tracks/lua/exercises/flatten-array/flatten-array_spec.lua +11 -0
  44. data/tracks/lua/exercises/luhn/example.lua +11 -27
  45. data/tracks/lua/exercises/luhn/luhn_spec.lua +12 -39
  46. data/tracks/ocaml/exercises/all-your-base/all_your_base.mli +0 -2
  47. data/tracks/ocaml/exercises/bracket-push/bracket_push.mli +0 -2
  48. data/tracks/ocaml/exercises/luhn/example.ml +12 -16
  49. data/tracks/ocaml/exercises/luhn/luhn.mli +1 -2
  50. data/tracks/ocaml/exercises/luhn/test.ml +15 -12
  51. data/tracks/php/config.json +8 -0
  52. data/tracks/php/exercises/grains/example.php +63 -0
  53. data/tracks/php/exercises/grains/grains_test.php +82 -0
  54. data/tracks/pony/config.json +26 -14
  55. data/tracks/pony/exercises/anagram/example.pony +17 -73
  56. data/tracks/pony/exercises/anagram/test.pony +6 -13
  57. data/tracks/pony/exercises/bob/example.pony +24 -24
  58. data/tracks/pony/exercises/bob/test.pony +16 -34
  59. data/tracks/pony/exercises/difference-of-squares/example.pony +13 -25
  60. data/tracks/pony/exercises/difference-of-squares/test.pony +9 -16
  61. data/tracks/pony/exercises/hamming/example.pony +8 -23
  62. data/tracks/pony/exercises/hamming/test.pony +16 -30
  63. data/tracks/pony/exercises/hello-world/example.pony +3 -9
  64. data/tracks/pony/exercises/hello-world/test.pony +2 -11
  65. data/tracks/pony/exercises/leap/example.pony +4 -10
  66. data/tracks/pony/exercises/leap/test.pony +2 -11
  67. data/tracks/ruby/lib/generator/command_line.rb +5 -6
  68. data/tracks/ruby/lib/generator/repository.rb +13 -13
  69. data/tracks/ruby/lib/tasks/exercise_test_tasks.rb +2 -4
  70. data/tracks/ruby/lib/tasks/exercise_tests_runner.rb +6 -8
  71. data/tracks/ruby/test/generator/repository_test.rb +26 -34
  72. data/tracks/rust/README.md +1 -1
  73. data/tracks/scheme/config.json +5 -0
  74. data/tracks/scheme/docs/ABOUT.md +7 -0
  75. data/tracks/scheme/exercises/scrabble-score/example.scm +16 -0
  76. data/tracks/scheme/exercises/scrabble-score/scrabble-score-test.scm +57 -0
  77. data/tracks/scheme/exercises/scrabble-score/scrabble-score.scm +2 -0
  78. metadata +33 -5
  79. data/tracks/ceylon/exercises/.keep +0 -0
  80. data/tracks/ceylon/img/.keep +0 -0
@@ -4,32 +4,25 @@ actor Main is TestList
4
4
  new create(env: Env) =>
5
5
  PonyTest(env, this)
6
6
 
7
- new make() =>
8
- None
9
-
10
7
  fun tag tests(test: PonyTest) =>
11
8
  test(_AnagramTest)
12
9
 
13
10
  class iso _AnagramTest is UnitTest
14
- """
15
- Test Anagram package
16
- """
17
-
18
11
  fun name(): String => "anagram/Anagram"
19
12
 
20
- fun apply(h: TestHelper): None ? =>
13
+ fun apply(h: TestHelper) =>
21
14
  let anagrams = ["banana", "bob", "sent", "sale", "ales"]
22
- let emptyArray: Array[String] = Array[String]
15
+ let empty = Array[String]
23
16
 
24
17
  // Anagram should return an empty array if there are no anagrams
25
- h.assert_array_eq[String](emptyArray, Anagram("bobs", anagrams))
18
+ h.assert_array_eq[String](empty, Anagram("bobs", anagrams))
26
19
  // Anagram should ignore same words, those aren't anagrams
27
- h.assert_array_eq[String](emptyArray, Anagram("banana", anagrams))
20
+ h.assert_array_eq[String](empty, Anagram("banana", anagrams))
28
21
  // Anagram shouldn't be based on checksum
29
- h.assert_array_eq[String](emptyArray, Anagram("last", ["mass"]))
22
+ h.assert_array_eq[String](empty, Anagram("last", ["mass"]))
30
23
  // Anagram should return an array of anagrams if present
31
24
  h.assert_array_eq[String](["sent"], Anagram("nets", anagrams))
32
25
  // Anagram should be case insensitive
33
- h.assert_array_eq[String](["sent"],Anagram("nETs", anagrams))
26
+ h.assert_array_eq[String](["sent"], Anagram("nETs", anagrams))
34
27
  // Anagram should return multiple anagrams
35
28
  h.assert_array_eq[String](["sale", "ales"], Anagram("seal", anagrams))
@@ -1,33 +1,33 @@
1
- use "regex"
1
+ use "itertools"
2
2
 
3
- // Not the best example. Will refactor when I grok the type system better.
4
-
5
-
6
- class Bob
7
- let _default: String
8
-
9
- new create() =>
10
- _default = "Whatever."
11
-
12
- fun apply(phrase: String): String ? =>
13
- if loud(phrase) then
3
+ primitive Bob
4
+ fun apply(phrase: String): String =>
5
+ if _silent(phrase) then
6
+ "Fine. Be that way!"
7
+ elseif _loud(phrase) then
14
8
  "Whoa, chill out!"
15
- elseif question(phrase) then
9
+ elseif _question(phrase) then
16
10
  "Sure."
17
- elseif silent(phrase) then
18
- "Fine. Be that way!"
19
11
  else
20
- _default
12
+ "Whatever."
21
13
  end
22
14
 
23
- fun loud(phrase: String): Bool ? =>
24
- (Regex("[A-Z]").eq(phrase)) and (phrase == phrase.upper())
15
+ fun _silent(phrase: String): Bool =>
16
+ phrase.clone().>strip() == ""
17
+
18
+ fun _loud(phrase: String): Bool =>
19
+ Iter[U8](phrase.values()).all(this~_not_lowercase())
20
+ and Iter[U8](phrase.values()).any(this~_is_letter())
25
21
 
26
- fun question(phrase: String): Bool =>
27
- let rephrase: String box = consume phrase
28
- rephrase.reverse().at("?",0)
22
+ fun _not_lowercase(b: U8): Bool =>
23
+ (b < 'a') and ('z' > b)
29
24
 
25
+ fun _is_letter(b: U8): Bool =>
26
+ (('a' <= b) and (b <= 'z')) or (('A' <= b) and (b <= 'Z'))
30
27
 
31
- fun silent(phrase: String): Bool ? =>
32
- let rephrase: String box = consume phrase
33
- (rephrase.size() == 0) or Regex("^\\s+$").eq(rephrase)
28
+ fun _question(phrase: String): Bool =>
29
+ try
30
+ Iter[U8](phrase.values()).last() == '?'
31
+ else
32
+ false
33
+ end
@@ -4,22 +4,16 @@ actor Main is TestList
4
4
  new create(env: Env) =>
5
5
  PonyTest(env, this)
6
6
 
7
- new make() =>
8
- None
9
-
10
7
  fun tag tests(test: PonyTest) =>
11
- test(_BobShoutTest)
12
- test(_BobQuestionTest)
13
- test(_BobSilentTest)
14
- test(_BobDefaultTest)
8
+ test(_TestBobShout)
9
+ test(_TestBobQuestion)
10
+ test(_TestBobSilent)
11
+ test(_TestBobDefault)
15
12
 
16
- class iso _BobShoutTest is UnitTest
17
- """
18
- Test matching when Bob is shouted at
19
- """
20
- fun name(): String => "bob/Bob"
13
+ class iso _TestBobShout is UnitTest
14
+ fun name(): String => "bob/Bob (Whoa, chill out!)"
21
15
 
22
- fun apply(h: TestHelper): None ? =>
16
+ fun apply(h: TestHelper) =>
23
17
  let shout_resp: String = "Whoa, chill out!"
24
18
 
25
19
  h.assert_eq[String](shout_resp, Bob("WATCH OUT!"))
@@ -27,14 +21,10 @@ class iso _BobShoutTest is UnitTest
27
21
  h.assert_eq[String](shout_resp, Bob("1, 2, 3 GO!"))
28
22
  h.assert_eq[String](shout_resp, Bob("ZOMG THE %^*@#$(*^ ZOMBIES ARE COMING!!11!!1!"))
29
23
 
30
- class iso _BobQuestionTest is UnitTest
31
- """
32
- Test matching when Bob is questioned
33
- """
34
-
35
- fun name(): String => "bob/Bob"
24
+ class iso _TestBobQuestion is UnitTest
25
+ fun name(): String => "bob/Bob (Sure.)"
36
26
 
37
- fun apply(h: TestHelper): None ? =>
27
+ fun apply(h: TestHelper) =>
38
28
  let ques_resp: String = "Sure."
39
29
 
40
30
  h.assert_eq[String](ques_resp, Bob("Does this cryogenic chamber make me look fat?"))
@@ -42,27 +32,19 @@ class iso _BobQuestionTest is UnitTest
42
32
  h.assert_eq[String](ques_resp, Bob("4?"))
43
33
  h.assert_eq[String](ques_resp, Bob("Wait! Hang on. Are you going to be OK?"))
44
34
 
45
- class iso _BobSilentTest is UnitTest
46
- """
47
- Test matching when Bob faces silence
48
- """
35
+ class iso _TestBobSilent is UnitTest
36
+ fun name(): String => "bob/Bob (Fine. Be that way!)"
49
37
 
50
- fun name(): String => "bob/Bob"
51
-
52
- fun apply(h: TestHelper): None ? =>
38
+ fun apply(h: TestHelper) =>
53
39
  let silent_resp: String = "Fine. Be that way!"
54
40
 
55
41
  h.assert_eq[String](silent_resp, Bob(""))
56
42
  h.assert_eq[String](silent_resp, Bob(" "))
57
43
 
58
- class iso _BobDefaultTest is UnitTest
59
- """
60
- Test matching when Bob is defaulting
61
- """
62
-
63
- fun name(): String => "bob/Bob"
44
+ class iso _TestBobDefault is UnitTest
45
+ fun name(): String => "bob/Bob (Whatever.)"
64
46
 
65
- fun apply(h: TestHelper): None ? =>
47
+ fun apply(h: TestHelper) =>
66
48
  let default_resp: String = "Whatever."
67
49
 
68
50
  h.assert_eq[String](default_resp, Bob("Tom-ay-to, tom-aaaah-to."))
@@ -1,31 +1,19 @@
1
1
  use "collections"
2
+ use "itertools"
2
3
 
3
- class Squares
4
- let _max: U32
5
-
6
- new create(max: U32) =>
7
- _max = max + 1
8
-
9
- fun square_of_sums(): U32 =>
10
- var sum: U32 = 0
11
- let rng: Range[U32] = Range[U32](1, _max)
12
-
13
- while rng.has_next() do
14
- sum = sum + rng.next()
15
- end
16
-
4
+ primitive Squares
5
+ fun square_of_sums(n: USize): USize =>
6
+ let sum = (n * (n + 1)) / 2
17
7
  sum * sum
18
8
 
19
- fun sum_of_squares(): U32 =>
20
- var sum: U32 = 0
21
- let rng: Range[U32] = Range[U32](1, _max)
22
-
23
- while rng.has_next() do
24
- var t: U32 = rng.next()
25
- sum = sum + (t * t)
9
+ fun sum_of_squares(n: USize): USize =>
10
+ try
11
+ Iter[USize](Range(0, n + 1))
12
+ .map[USize]({(x: USize): USize => x * x})
13
+ .fold[USize]({(acc: USize, x: USize): USize => acc + x}, 0)
14
+ else
15
+ 0
26
16
  end
27
17
 
28
- sum
29
-
30
- fun difference(): U32 =>
31
- square_of_sums() - sum_of_squares()
18
+ fun difference(n: USize): USize =>
19
+ square_of_sums(n) - sum_of_squares(n)
@@ -4,28 +4,21 @@ actor Main is TestList
4
4
  new create(env: Env) =>
5
5
  PonyTest(env, this)
6
6
 
7
- new make() =>
8
- None
9
-
10
7
  fun tag tests(test: PonyTest) =>
11
8
  test(_TestSquares)
12
9
 
13
10
  class iso _TestSquares is UnitTest
14
- """
15
- Test Difference of Squares package
16
- """
17
-
18
11
  fun name(): String => "difference-of-squares/Squares"
19
12
 
20
13
  fun apply(h: TestHelper) =>
21
- h.assert_eq[U32](225, Squares(5).square_of_sums())
22
- h.assert_eq[U32](55, Squares(5).sum_of_squares())
23
- h.assert_eq[U32](170, Squares(5).difference())
14
+ h.assert_eq[USize](225, Squares.square_of_sums(5))
15
+ h.assert_eq[USize](55, Squares.sum_of_squares(5))
16
+ h.assert_eq[USize](170, Squares.difference(5))
24
17
 
25
- h.assert_eq[U32](3025, Squares(10).square_of_sums())
26
- h.assert_eq[U32](385, Squares(10).sum_of_squares())
27
- h.assert_eq[U32](2640, Squares(10).difference())
18
+ h.assert_eq[USize](3025, Squares.square_of_sums(10))
19
+ h.assert_eq[USize](385, Squares.sum_of_squares(10))
20
+ h.assert_eq[USize](2640, Squares.difference(10))
28
21
 
29
- h.assert_eq[U32](25502500, Squares(100).square_of_sums())
30
- h.assert_eq[U32](338350, Squares(100).sum_of_squares())
31
- h.assert_eq[U32](25164150, Squares(100).difference())
22
+ h.assert_eq[USize](25502500, Squares.square_of_sums(100))
23
+ h.assert_eq[USize](338350, Squares.sum_of_squares(100))
24
+ h.assert_eq[USize](25164150, Squares.difference(100))
@@ -1,26 +1,11 @@
1
1
  use "collections"
2
+ use "itertools"
2
3
 
3
- class Hamming
4
- let _name: String
5
-
6
- new create() =>
7
- _name = "Hamming"
8
-
9
- fun apply(strand1: String, strand2: String): U8 ? =>
4
+ primitive HammingDistance
5
+ fun apply(strand1: String, strand2: String): USize ? =>
10
6
  if (strand1.size() != strand2.size()) then error end
11
-
12
- compute_distance(strand1, strand2)
13
-
14
- fun compute_distance(strand1: String, strand2: String): U8 ? =>
15
- let size: USize = strand1.size()
16
- var dist: U8 = U8(0)
17
- var idx: ISize = 0
18
-
19
- while idx < size.isize() do
20
- if (strand1.at_offset(idx).ne(strand2.at_offset(idx))) then
21
- dist = dist + 1
22
- end
23
- idx = idx + 1
24
- end
25
-
26
- dist
7
+
8
+ Iter[U8](strand1.values())
9
+ .zip[U8](strand2.values())
10
+ .filter({(t: (U8, U8)): Bool => t._1 != t._2})
11
+ .count()
@@ -4,37 +4,23 @@ actor Main is TestList
4
4
  new create(env: Env) =>
5
5
  PonyTest(env, this)
6
6
 
7
- new make() =>
8
- None
9
-
10
7
  fun tag tests(test: PonyTest) =>
11
- test(_HammingDistanceTest)
12
- test(_HammingParamTest)
13
-
14
- class iso _HammingDistanceTest is UnitTest
15
- """
16
- Test Hamming package returns the right distance
17
- """
18
- fun name(): String => "hamming/Hamming"
8
+ test(_TestHammingDistance)
19
9
 
20
- fun apply(h: TestHelper): None ? =>
21
- h.assert_eq[U8](0, Hamming("A", "A"))
22
- h.assert_eq[U8](0, Hamming("GGACTGA", "GGACTGA"))
23
- h.assert_eq[U8](1, Hamming("A", "G"))
24
- h.assert_eq[U8](2, Hamming("AG", "CT"))
25
- h.assert_eq[U8](1, Hamming("AT", "CT"))
26
- h.assert_eq[U8](1, Hamming("GGACG", "GGTCG"))
27
- h.assert_eq[U8](2, Hamming("ACCAGGG", "ACTATGG"))
28
- h.assert_eq[U8](1, Hamming("AGG", "AGA"))
29
- h.assert_eq[U8](4, Hamming("GATACA", "GCATAA"))
30
- h.assert_eq[U8](9, Hamming("GGACGGATTCTG", "AGGACGGATTCT"))
10
+ class iso _TestHammingDistance is UnitTest
11
+ fun name(): String => "hamming/HammingDistance"
31
12
 
32
- class iso _HammingParamTest is UnitTest
33
- """
34
- Test Hamming package returns the right distance
35
- """
36
- fun name(): String => "hamming/Hamming"
13
+ fun apply(h: TestHelper) ? =>
14
+ h.assert_eq[USize](0, HammingDistance("A", "A"))
15
+ h.assert_eq[USize](0, HammingDistance("GGACTGA", "GGACTGA"))
16
+ h.assert_eq[USize](1, HammingDistance("A", "G"))
17
+ h.assert_eq[USize](2, HammingDistance("AG", "CT"))
18
+ h.assert_eq[USize](1, HammingDistance("AT", "CT"))
19
+ h.assert_eq[USize](1, HammingDistance("GGACG", "GGTCG"))
20
+ h.assert_eq[USize](2, HammingDistance("ACCAGGG", "ACTATGG"))
21
+ h.assert_eq[USize](1, HammingDistance("AGG", "AGA"))
22
+ h.assert_eq[USize](4, HammingDistance("GATACA", "GCATAA"))
23
+ h.assert_eq[USize](9, HammingDistance("GGACGGATTCTG", "AGGACGGATTCT"))
37
24
 
38
- fun apply(h: TestHelper) =>
39
- h.assert_error({()? => Hamming("GAT", "GA")})
40
- h.assert_error({()? => Hamming("GA", "GAC")})
25
+ h.assert_error({()? => HammingDistance("GAT", "GA")})
26
+ h.assert_error({()? => HammingDistance("GA", "GAC")})
@@ -1,9 +1,3 @@
1
- class HelloWorld
2
-
3
- let hello: String
4
-
5
- new create() =>
6
- hello = "Hello, "
7
-
8
- fun say_hello(who: String = "World"): String =>
9
- hello.add(who + "!")
1
+ primitive HelloWorld
2
+ fun hello(name: String = "World"): String =>
3
+ "Hello, " + name + "!"
@@ -4,21 +4,12 @@ actor Main is TestList
4
4
  new create(env: Env) =>
5
5
  PonyTest(env, this)
6
6
 
7
- new make() =>
8
- None
9
-
10
7
  fun tag tests(test: PonyTest) =>
11
8
  test(_TestHelloWorld)
12
9
 
13
10
  class iso _TestHelloWorld is UnitTest
14
- """
15
- Test HelloWorld package
16
- """
17
11
  fun name(): String => "hello-world/HelloWorld"
18
12
 
19
13
  fun apply(h: TestHelper) =>
20
- let hello: HelloWorld = HelloWorld.create()
21
-
22
- h.assert_eq[String]("Hello, World!", hello.say_hello())
23
- h.assert_eq[String]("Hello, Exercism!", hello.say_hello("Exercism"))
24
-
14
+ h.assert_eq[String]("Hello, World!", HelloWorld.hello())
15
+ h.assert_eq[String]("Hello, Exercism!", HelloWorld.hello("Exercism"))
@@ -1,10 +1,4 @@
1
- class Leap
2
-
3
- fun apply(year: U32): Bool =>
4
- if (year % 400) == 0 then
5
- true
6
- elseif ((year % 100) != 0) and ((year % 4) == 0) then
7
- true
8
- else
9
- false
10
- end
1
+ primitive Leap
2
+ fun apply(year: USize): Bool =>
3
+ let has_factor = {(n: USize)(year): Bool => (year % n) == 0}
4
+ has_factor(4) and (not has_factor(100) or has_factor(400))
@@ -4,22 +4,13 @@ actor Main is TestList
4
4
  new create(env: Env) =>
5
5
  PonyTest(env, this)
6
6
 
7
- new make() =>
8
- None
9
-
10
7
  fun tag tests(test: PonyTest) =>
11
- test(_LeapTest)
8
+ test(_TestLeap)
12
9
 
13
- class iso _LeapTest is UnitTest
14
- """
15
- Test Leap package
16
- """
10
+ class iso _TestLeap is UnitTest
17
11
  fun name(): String => "leap/Leap"
18
12
 
19
13
  fun apply(h: TestHelper) =>
20
- // Note -> Current master-branch simplifies these functions to
21
- // assert_true/false, and removes expect
22
- // https://github.com/ponylang/ponyc/blob/master/packages/ponytest/helper.pony
23
14
  h.assert_true(Leap(1996), "Testing a leap year")
24
15
  h.assert_false(Leap(1997), "Testing an odd year")
25
16
  h.assert_false(Leap(1998), "Testing a non-leap even year")
@@ -30,11 +30,10 @@ module Generator
30
30
  end
31
31
 
32
32
  def repository
33
- if @options[:verbose]
34
- LoggingRepository.new(paths: @paths, exercise_name: @options[:exercise_name], logger: logger)
35
- else
36
- Repository.new(paths: @paths, exercise_name: @options[:exercise_name])
37
- end
33
+ LoggingRepository.new(
34
+ repository: Repository.new(paths: @paths, exercise_name: @options[:exercise_name]),
35
+ logger: logger
36
+ )
38
37
  end
39
38
 
40
39
  def parse_options(args)
@@ -46,7 +45,7 @@ module Generator
46
45
  def logger
47
46
  logger = Logger.new($stdout)
48
47
  logger.formatter = proc { |_severity, _datetime, _progname, msg| "#{msg}\n" }
49
- logger.level = @options[:verbose] ? Logger::DEBUG : Logger::ERROR
48
+ logger.level = @options[:verbose] ? Logger::DEBUG : Logger::INFO
50
49
  logger
51
50
  end
52
51