progress 0.0.9.1 → 0.0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +1 -1
- data/lib/progress.rb +8 -4
- data/progress.gemspec +1 -1
- metadata +1 -1
data/VERSION.yml
CHANGED
@@ -1 +1 @@
|
|
1
|
-
[0, 0, 9,
|
1
|
+
[0, 0, 9, 2]
|
data/lib/progress.rb
CHANGED
@@ -90,26 +90,30 @@ protected
|
|
90
90
|
@io ||= $stderr
|
91
91
|
end
|
92
92
|
|
93
|
+
def io_tty?
|
94
|
+
ENV['PROGRESS_TTY'] || io.tty?
|
95
|
+
end
|
96
|
+
|
93
97
|
def io=(io)
|
94
98
|
@io = io
|
95
99
|
end
|
96
100
|
|
97
101
|
def lines=(value)
|
98
|
-
@lines =
|
102
|
+
@lines = value
|
99
103
|
end
|
100
104
|
def lines?
|
101
105
|
if @lines.nil?
|
102
|
-
@lines = !
|
106
|
+
@lines = !io_tty?
|
103
107
|
end
|
104
108
|
@lines
|
105
109
|
end
|
106
110
|
|
107
111
|
def highlight=(value)
|
108
|
-
@highlight =
|
112
|
+
@highlight = value
|
109
113
|
end
|
110
114
|
def highlight?
|
111
115
|
if @highlight.nil?
|
112
|
-
@highlight =
|
116
|
+
@highlight = io_tty?
|
113
117
|
end
|
114
118
|
@highlight
|
115
119
|
end
|
data/progress.gemspec
CHANGED