batt 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +7 -0
- data/lib/batt/reader.rb +1 -2
- data/lib/batt/version.rb +1 -1
- data/spec/batt/reader_spec.rb +0 -8
- metadata +3 -3
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,15 @@
|
|
1
|
+
0.2.1 (2013/08/04)
|
2
|
+
---
|
3
|
+
|
4
|
+
* apparently orange is not a valid tmux color. woops.
|
5
|
+
|
1
6
|
0.2.0 (2013/08/04)
|
2
7
|
---
|
3
8
|
|
4
9
|
* added new `meter` action for rendering a meter
|
5
10
|
* created new `Batt::Formatter::Tmux` class for doing tmux color more easily
|
11
|
+
* changed the way we calculate how to colourize. instead of even thirds, it now
|
12
|
+
uses custom ranges. red is less than 20, yellow is 20-75 and green is 75 and higher.
|
6
13
|
|
7
14
|
0.1.0 (2013/07/13)
|
8
15
|
---
|
data/lib/batt/reader.rb
CHANGED
@@ -54,8 +54,7 @@ module Batt
|
|
54
54
|
def color_for_capacity(capacity)
|
55
55
|
case capacity.to_i
|
56
56
|
when -100..20 then :red # if there's any weird errors where things go negative, be red.
|
57
|
-
when 20..
|
58
|
-
when 30..75 then :yellow
|
57
|
+
when 20..75 then :yellow
|
59
58
|
else
|
60
59
|
:green
|
61
60
|
end
|
data/lib/batt/version.rb
CHANGED
data/spec/batt/reader_spec.rb
CHANGED
@@ -112,14 +112,6 @@ describe Batt::Reader do
|
|
112
112
|
color_for_capacity(20).should == :red
|
113
113
|
end
|
114
114
|
|
115
|
-
it "should be :orange when between 20 and 30" do
|
116
|
-
color_for_capacity(25).should == :orange
|
117
|
-
end
|
118
|
-
|
119
|
-
it "should be :orange when == 30" do
|
120
|
-
color_for_capacity(30).should == :orange
|
121
|
-
end
|
122
|
-
|
123
115
|
it "should be :yellow when == 50" do
|
124
116
|
color_for_capacity(50).should == :yellow
|
125
117
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: batt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -148,7 +148,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
148
148
|
version: '0'
|
149
149
|
segments:
|
150
150
|
- 0
|
151
|
-
hash:
|
151
|
+
hash: 3922355646144771477
|
152
152
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
153
153
|
none: false
|
154
154
|
requirements:
|
@@ -157,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
157
157
|
version: '0'
|
158
158
|
segments:
|
159
159
|
- 0
|
160
|
-
hash:
|
160
|
+
hash: 3922355646144771477
|
161
161
|
requirements: []
|
162
162
|
rubyforge_project:
|
163
163
|
rubygems_version: 1.8.24
|