inch 0.5.0.rc10 → 0.5.0.rc11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d83477cb56f05fa36eae43b8a5207cccf6160b53
|
4
|
+
data.tar.gz: 89554aa7ecb0f7845ebeaca9851eb8daa0e735e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d7282dabbec8ed4f730eac1d7511f507c3dd260f8820ee8edaefe0fd385e902c0b7003c455487b90ae91596f1d9e2a0235e7cb102f6b2ab52a999d5872d3c4e
|
7
|
+
data.tar.gz: f2ee1b8f2716a954873e14fb7d58f8b1bd11c18182e8c1ee3bddedaf80f580a99d82b6c1e6518b6346b9cf559f25e40a22ff48f3aa22a78b52f371ce6c149312
|
data/lib/inch/cli.rb
CHANGED
@@ -10,9 +10,13 @@ module Inch
|
|
10
10
|
# @param default [Fixnum] default value for columns
|
11
11
|
# @return [Fixnum]
|
12
12
|
def get_term_columns(default = 80)
|
13
|
-
str = `stty size`
|
14
|
-
|
15
|
-
|
13
|
+
str = `stty size 2>&1`
|
14
|
+
if str =~ /Invalid argument/
|
15
|
+
default
|
16
|
+
else
|
17
|
+
rows_cols = str.split(' ').map(&:to_i)
|
18
|
+
rows_cols[1] || default
|
19
|
+
end
|
16
20
|
rescue
|
17
21
|
default
|
18
22
|
end
|
@@ -31,21 +31,20 @@ module Inch
|
|
31
31
|
|
32
32
|
class FunctionSignature < Struct.new(:signature)
|
33
33
|
def parameter_names
|
34
|
-
|
35
|
-
signature.
|
36
|
-
|
37
|
-
names << name
|
38
|
-
end
|
34
|
+
return [] if signature.nil?
|
35
|
+
signature.map do |tuple|
|
36
|
+
name_from_tuple(*tuple)
|
39
37
|
end
|
40
|
-
names
|
41
38
|
end
|
42
39
|
|
43
40
|
def name_from_tuple(a, _, b)
|
44
|
-
if b.nil?
|
41
|
+
if b.nil? || b == 'Elixir'
|
45
42
|
a
|
46
43
|
else
|
47
44
|
if a == "\\\\"
|
48
|
-
b.first
|
45
|
+
name_from_tuple(*b.first)
|
46
|
+
else
|
47
|
+
warn "[WARN] could not parse FunctionSignature: #{[a, _, b].inspect}"
|
49
48
|
end
|
50
49
|
end
|
51
50
|
end
|
data/lib/inch/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.0.
|
4
|
+
version: 0.5.0.rc11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- René Föhring
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|