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.
Files changed (4) hide show
  1. data/VERSION.yml +1 -1
  2. data/lib/progress.rb +8 -4
  3. data/progress.gemspec +1 -1
  4. metadata +1 -1
data/VERSION.yml CHANGED
@@ -1 +1 @@
1
- [0, 0, 9, 1]
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 = !!value
102
+ @lines = value
99
103
  end
100
104
  def lines?
101
105
  if @lines.nil?
102
- @lines = !io.tty?
106
+ @lines = !io_tty?
103
107
  end
104
108
  @lines
105
109
  end
106
110
 
107
111
  def highlight=(value)
108
- @highlight = !!value
112
+ @highlight = value
109
113
  end
110
114
  def highlight?
111
115
  if @highlight.nil?
112
- @highlight = !!io.tty?
116
+ @highlight = io_tty?
113
117
  end
114
118
  @highlight
115
119
  end
data/progress.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{progress}
5
- s.version = "0.0.9.1"
5
+ s.version = "0.0.9.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["toy"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: progress
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9.1
4
+ version: 0.0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - toy