cani 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8b3bfdea3cdcd9f53dad3c04993ab289f935053ea36a5facb58f4c4a8c7bc66b
4
- data.tar.gz: 35a9526b42ac5e4ac3d1cc31dd0a8da559a26ed282ff7f9205d12fd30559b245
3
+ metadata.gz: 056dad5365e1fa79e23f2f0d0402a1410b7d8719f1521caa1288a60c99bbc8a6
4
+ data.tar.gz: ab5199feb69612e152dadea893c8a721149c8c9bdf708df4b4b143a91896a93d
5
5
  SHA512:
6
- metadata.gz: 19fbf82938be788b4779bed524134b72a7ce65026f558bb239252896dcd7fac58539499ee87335b9926c35d17f4678f72a8190837ae394f2bd3ffb4acaec92b1
7
- data.tar.gz: 4e1b54b2e74637b8ea14329f43b40bf7d67cf7482d503231edd04733176b00788a3434c4869081e0998951eb969a68e1acaf2e6c347cea33ade86016bbf1a10a
6
+ metadata.gz: e940dca2ceffabead9d8f73c6efece1244a1fbbd6c67ee27a5d81e084b295ce9ac71f1b988da08b647b0325bbc3eb481859c1444883c0334e35f123124ec171c
7
+ data.tar.gz: 5b1f9e0f8655b6a8040546e0a41c262cbf73501f86041b6367ecd87a11095f622bf57ee4246748b071bf0dc181ffd788cbab133a7a04d42c997d1d6263a06e33
data/README.md CHANGED
@@ -207,6 +207,12 @@ cani show firefox 63 | head -3
207
207
 
208
208
  Bug reports and pull requests are welcome on GitHub at https://github.com/sidofc/cani. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
209
209
 
210
+ Special thanks to the following users and contributors:
211
+
212
+ - [DamienRobert](https://github.com/DamienRobert)
213
+ - Enhance `fzf` executable [detection](https://github.com/SidOfc/cani/pull/3)
214
+ - Pointing out that some texts were [unreadable](https://github.com/SidOfc/cani/issues/2) on light background terminals ([pull](https://github.com/SidOfc/cani/pull/4)).
215
+
210
216
  ## License
211
217
 
212
218
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -22,10 +22,7 @@ module Cani
22
22
  end
23
23
 
24
24
  def self.executable?
25
- @exe ||= begin
26
- `command -v fzf`
27
- $?.success?
28
- end
25
+ @exe ||= !system('fzf --version').nil?
29
26
  end
30
27
 
31
28
  def self.feature_rows
@@ -35,18 +32,20 @@ module Cani
35
32
  tt = format('%-24s', ft.title.size > 24 ? ft.title[0..23].strip + '..'
36
33
  : ft.title)
37
34
 
38
- [{content: "[#{ft.status}]", color: cl}, pc, tt, *ft.current_support]
35
+ [{content: "[#{ft.status}]", color: cl}, pc,
36
+ {content: tt, color: :default}, *ft.current_support]
39
37
  end
40
38
  end
41
39
 
42
40
  def self.browser_rows
43
41
  @browser_rows ||= Cani.api.browsers.map do |bwsr|
44
- [bwsr.title, 'usage: ' + format('%.4f%%', bwsr.usage.values.reduce(0) { |total, add| total + add })]
42
+ [{content: bwsr.title, color: :default},
43
+ 'usage: ' + format('%.4f%%', bwsr.usage.values.reduce(0) { |total, add| total + add })]
45
44
  end
46
45
  end
47
46
 
48
47
  def self.browser_usage_rows(brwsr)
49
- brwsr.usage.map { |(v, u)| [v, 'usage: ' + format('%.4f%%', u)] }.reverse
48
+ brwsr.usage.map { |(v, u)| [{content: v, color: :default}, 'usage: ' + format('%.4f%%', u)] }.reverse
50
49
  end
51
50
 
52
51
  def self.browser_feature_rows(brwsr, version)
@@ -57,7 +56,7 @@ module Cani
57
56
  features.map do |feature|
58
57
  color = {'un' => :yellow, 'ot' => :magenta}.fetch feature[:status], :green
59
58
  [{content: "[#{feature[:status]}]", color: color},
60
- "[#{type[:symbol]}]", feature[:title]]
59
+ "[#{type[:symbol]}]", {content: feature[:title], color: :default}]
61
60
  end
62
61
  end
63
62
  end.compact
@@ -1,3 +1,3 @@
1
1
  module Cani
2
- VERSION = "0.5.2"
2
+ VERSION = "0.5.3"
3
3
  end
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.5.2
4
+ version: 0.5.3
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-09-09 00:00:00.000000000 Z
11
+ date: 2018-10-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize