slyce 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/slyce +4 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2c731b8535e6d17c332c7e9e72934343d11e8be440f99fb8476dd6c0083c8676
4
- data.tar.gz: c65100a6813cfa59aaf2711d26c2ac2280ba803232fb04675541aebda58de8db
3
+ metadata.gz: 86b46697d15f638424f3369939a12f962a5daa1a9614bb1cf98cb34c8b8d2519
4
+ data.tar.gz: 9361896529ecaf43baef50da66e2cf41600cc42a110b3af5b97bc53e81270ef5
5
5
  SHA512:
6
- metadata.gz: aa404be4b51dd23be004502356d98f045248f017bf4cb2a86196a60c6d7b6268327f2559cff0be5e1b1e312c5982319edc84d48695600c724b9804e3460247ec
7
- data.tar.gz: 5bd8fbc834b2668e8f333092fa825b525015482fa07820b6045949b4a1b2dbeb4fe8049077a1cc569f6994f70ff1cabeea4381e7a78ab93d25a8e26830c0e57a
6
+ metadata.gz: e4bd3c648d559ee5f0d7395c09e0836f3d309a1a99729f9d5fdd0d1441ccd8954dc0275e13b0de35d471a51f3c7b64bcfefa6cf0120c53a3ad2b9eef92e09d76
7
+ data.tar.gz: f2100f83caa2d1b116b0cc934841ce450208dc38dcf370242a788b563feb6ac84a4499e24a691e210425eca4c7102daaa1f4a45833e05617120b9de7b9d41cdf
data/bin/slyce CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  STDOUT.sync = true
4
4
 
5
- VERSION="0.5.1"
5
+ VERSION="0.5.2"
6
6
 
7
7
  require "bundler/setup"
8
8
  require "mysql2"
@@ -42,6 +42,7 @@ end
42
42
 
43
43
  def display(name, data, show, uniq, tots)
44
44
  seen = data.inject(0) {|seen, coun| seen += coun[0] }
45
+ rows = [data.size, seen].min
45
46
  wide = tots.to_s.size
46
47
  fill = " " * wide
47
48
  line = "=" * name.size
@@ -49,7 +50,7 @@ def display(name, data, show, uniq, tots)
49
50
  puts "\n#{fill} #{name}\n#{fill} #{line}\n"
50
51
  data.each {|cnt, val| puts "%*d %s" % [wide, cnt, val || "NULL"] }
51
52
  puts "#{fill} -----\n"
52
- puts "%*d shown (top #{show})" % [wide, seen] if show
53
+ puts "%*d shown (top #{rows})" % [wide, rows] if show
53
54
  puts "%*d total (all #{uniq})" % [wide, tots]
54
55
  end
55
56
 
@@ -82,7 +83,7 @@ keep.each do |name|
82
83
 
83
84
  uniq = conn.query(<<~"").to_a[0][0]
84
85
  select
85
- count(distinct(`#{name}`))
86
+ count(distinct(ifnull(`#{name}`,0)))
86
87
  from
87
88
  `#{tabl}`
88
89
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slyce
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Shreeve