mosespa 1.4.2 → 1.4.4
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/mosespa.rb +29 -0
- data/lib/search.rb +2 -2
- data/mosespa.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ffc54adde7b0f021631c080135dd6317f793cce6
|
4
|
+
data.tar.gz: 9fe7f290d910f39ab9b2ba6ed02957e16de807b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba698519e75e0dbe3c1c1ecff2f75d35ddb95b12a548a3c2bce1a31631ebc9a972621e33849d149a1533ff35f4c4017256bef635ebc866dcb678ee2bb4de588e
|
7
|
+
data.tar.gz: 115d42cb2a44a1c490abad374d1337445f0c52f1f56017c492c8f420b6c9f26db0e51cde1c46fb6f191268ce450e82245ade8a4f0252ae0573d3609872f4f978
|
data/Gemfile.lock
CHANGED
data/lib/mosespa.rb
CHANGED
@@ -1,2 +1,31 @@
|
|
1
1
|
require_relative 'm.rb'
|
2
2
|
require_relative 'search.rb'
|
3
|
+
|
4
|
+
# monkey patch table_print
|
5
|
+
module TablePrint
|
6
|
+
module RowRecursion
|
7
|
+
def horizontal_separator
|
8
|
+
""
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
#taken from https://github.com/arches/table_print/pull/45
|
13
|
+
class FixedWidthFormatter
|
14
|
+
|
15
|
+
def strip_escape(value)
|
16
|
+
value.gsub(%r{\e[^m]*m}, '')
|
17
|
+
end
|
18
|
+
|
19
|
+
def format(value)
|
20
|
+
padding = width - strip_escape(value.to_s).each_char.collect{|c| c.bytesize == 1 ? 1 : 2}.inject(0, &:+)
|
21
|
+
truncate(value) + (padding < 0 ? '' : " " * padding)
|
22
|
+
end
|
23
|
+
|
24
|
+
def truncate(value)
|
25
|
+
return "" unless value
|
26
|
+
value = value.to_s
|
27
|
+
return value unless strip_escape(value).length > width
|
28
|
+
"#{value[0..width-4]}..."
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
data/lib/search.rb
CHANGED
@@ -16,9 +16,9 @@ module Mosespa
|
|
16
16
|
def print_search
|
17
17
|
tp @issues,
|
18
18
|
"key",
|
19
|
-
{:updated => {:formatters => [DateColorFormatter.new]}},
|
19
|
+
{:updated => {:formatters => [DateColorFormatter.new], :width => 8}},
|
20
20
|
"status.name",
|
21
|
-
|
21
|
+
{:summary => { :width => 52 }}
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
data/mosespa.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mosespa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Grégoire Seux
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jira-ruby
|