command_line_reporter 3.0.1 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/examples/variable.rb +30 -0
- data/lib/command_line_reporter.rb +7 -0
- data/lib/version.rb +1 -1
- metadata +4 -3
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'command_line_reporter'
|
2
|
+
|
3
|
+
include CommandLineReporter
|
4
|
+
|
5
|
+
class Example
|
6
|
+
def initialize
|
7
|
+
self.formatter = 'progress'
|
8
|
+
end
|
9
|
+
|
10
|
+
def run
|
11
|
+
suppress_output
|
12
|
+
|
13
|
+
report do
|
14
|
+
sum = 0
|
15
|
+
10.times do
|
16
|
+
sum += 10
|
17
|
+
progress
|
18
|
+
end
|
19
|
+
vertical_spacing
|
20
|
+
aligned("Sum: #{sum}")
|
21
|
+
end
|
22
|
+
|
23
|
+
capture_output
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
out = Example.new.run
|
28
|
+
|
29
|
+
puts 'this could be stored in a database'
|
30
|
+
puts out
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: command_line_reporter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 3.0
|
5
|
+
version: 3.1.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Wes
|
@@ -11,7 +11,7 @@ autorequire:
|
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
13
|
|
14
|
-
date: 2012-02-
|
14
|
+
date: 2012-02-21 00:00:00 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|
@@ -49,6 +49,7 @@ files:
|
|
49
49
|
- examples/quiet.rb
|
50
50
|
- examples/simple.rb
|
51
51
|
- examples/table.rb
|
52
|
+
- examples/variable.rb
|
52
53
|
- lib/column.rb
|
53
54
|
- lib/command_line_reporter.rb
|
54
55
|
- lib/nested_formatter.rb
|
@@ -81,7 +82,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
81
82
|
requirements:
|
82
83
|
- - ">="
|
83
84
|
- !ruby/object:Gem::Version
|
84
|
-
hash: -
|
85
|
+
hash: -339870674346797653
|
85
86
|
segments:
|
86
87
|
- 0
|
87
88
|
version: "0"
|