command_line_reporter 3.3.4 → 3.3.5

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: d6a50a82965011fe248f827a38ebd74334b3010f
4
- data.tar.gz: 01835a6b108b5064c59ab06f92f9177443f38a37
3
+ metadata.gz: 1877affdc74574aea0c9487387ea065c2ba8225c
4
+ data.tar.gz: c32d8b9a32790311dea263dfe536a68826e12d69
5
5
  SHA512:
6
- metadata.gz: 6f6a66faac50b478a1c795d8f499ae19c577e5776e2129c71f3a84ab6b1b01786ed68083311dd672b46ea57fefd90bc3d4bce07578526dc96a0435082dea1b98
7
- data.tar.gz: 352c1e3725cf969e02c54d3767366116f252cbcaca582bef677e484435c87c0a4d0ff2368a0b5648f36774a67e1bd5989a5398fd5ff886278df8e8152252563f
6
+ metadata.gz: 47cec4a1c2cc21884827bf9901d78fca75dba91115c2ba3b578afda1e1498bfeae64bd90a4914d218c07f21ebb6d3f50daef2b540bcc25207712e0750c48a884
7
+ data.tar.gz: 69eec23f5a033e70bcd4030640e493ca18a6c421a0704e5d92a57ccbc09617aab4fde81b6a6d1d1262aedb81e966c034240e2c2cbcf1d4115b3c603f2de7c450
@@ -75,9 +75,14 @@ module CommandLineReporter
75
75
  end
76
76
 
77
77
  def vertical_spacing(lines = 1)
78
- puts "\n" * lines
79
- rescue
80
- raise ArgumentError
78
+ lines = Integer(lines)
79
+
80
+ # because puts "\n" * 0 produces an unwanted newline
81
+ if lines == 0
82
+ print "\0"
83
+ else
84
+ puts "\n" * lines
85
+ end
81
86
  end
82
87
 
83
88
  def datetime(options = {})
@@ -1,3 +1,3 @@
1
1
  module CommandLineReporter
2
- VERSION = '3.3.4'
2
+ VERSION = '3.3.5'
3
3
  end
@@ -328,7 +328,9 @@ describe CommandLineReporter do
328
328
  end
329
329
 
330
330
  it 'prints carriage returns for the number of lines' do
331
- expect(subject).to receive(:puts).with("\n" * 3)
331
+ expect(subject).to receive(:print).with("\0").and_return(nil)
332
+ expect(subject).to receive(:puts).with("\n" * 3).and_return("\n\n\n")
333
+ subject.vertical_spacing(0)
332
334
  subject.vertical_spacing(3)
333
335
  end
334
336
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: command_line_reporter
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.4
4
+ version: 3.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wes