cani 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/cani/api/feature/viewer.rb +7 -6
- data/lib/cani/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95f111716af0ddbdcc7341fee4f664ce201f717a0e9eac416f2677149cc641fc
|
4
|
+
data.tar.gz: f2284ea6bb64a1087e08d618238898a13f0914cf27d31893e0cbdcd5d4c82579
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 01c58a9b40c957fc38c538496cf92fb717f1ab0edc0a79c703964516e294eb442003ba0f21338dd87467e6e14e41a2b4cf18f147f8933b9abf81da92bb92ad66
|
7
|
+
data.tar.gz: 28ce0494ce59876a5f96ac631461cb43388490e04db11caebe5fc56d9254136043211e3e85cf6167488b3bb92d4c90969994c40addc6557c4e0740a9aa6b4a03
|
data/Gemfile.lock
CHANGED
@@ -110,18 +110,19 @@ module Cani
|
|
110
110
|
def draw
|
111
111
|
Curses.clear
|
112
112
|
|
113
|
+
outer_width = table_width + 2
|
113
114
|
percent_num = format '%.2f%%', feature.percent
|
114
115
|
status_format = "[#{feature.status}]"
|
115
116
|
percent_label = compact? ? '' : 'support: '
|
116
|
-
legend_format = 'legend'.center
|
117
|
-
notes_format = 'notes'.center
|
117
|
+
legend_format = 'legend'.center outer_width
|
118
|
+
notes_format = 'notes'.center outer_width
|
118
119
|
|
119
|
-
offset_x = ((width -
|
120
|
+
offset_x = ((width - outer_width) / 2.0).floor
|
120
121
|
offset_y = 1
|
121
122
|
cy = 0
|
122
123
|
|
123
124
|
# positioning and drawing of percentage
|
124
|
-
perc_num_xs =
|
125
|
+
perc_num_xs = outer_width - percent_num.size
|
125
126
|
Curses.setpos offset_y + cy, offset_x + perc_num_xs
|
126
127
|
Curses.attron percent_color(feature.percent) do
|
127
128
|
Curses.addstr percent_num
|
@@ -267,8 +268,8 @@ module Cani
|
|
267
268
|
# add extra empty line after legend
|
268
269
|
cy += 1
|
269
270
|
|
270
|
-
notes_chunked = feature.notes.map { |nt| nt.chars.each_slice(
|
271
|
-
num_chunked = feature.notes_by_num.each_with_object({}) { |(k, nt), h| h[k] = nt.chars.each_slice(
|
271
|
+
notes_chunked = feature.notes.map { |nt| nt.chars.each_slice(outer_width).map(&:join).map(&:strip) }
|
272
|
+
num_chunked = feature.notes_by_num.each_with_object({}) { |(k, nt), h| h[k] = nt.chars.each_slice(outer_width - 5).map(&:join).map(&:strip) }
|
272
273
|
notes_total = notes_chunked.map(&:size).sum + num_chunked.map(&:size).sum
|
273
274
|
|
274
275
|
if height > cy + 2 && (notes_chunked.any? || num_chunked.any?)
|
data/lib/cani/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cani
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sidney Liebrand
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|