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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dd0208471aa893e7d2d538489efb87b67017987a
4
- data.tar.gz: b8eb649271ee7e8be1dd3177119c891625c9ec62
3
+ metadata.gz: ffc54adde7b0f021631c080135dd6317f793cce6
4
+ data.tar.gz: 9fe7f290d910f39ab9b2ba6ed02957e16de807b7
5
5
  SHA512:
6
- metadata.gz: e93f05829781190b5e9af8df9918e9eb42be50c814c3878ac60a612efd64bc7819d41ffae5bc7f3360efab0a8ae6a3ef4a19495e3c387ca7809d730d553b1102
7
- data.tar.gz: ec1bf09581306fd832f169c4473af9b37539a9d335356943cd4ce56629b7696819948462d99e4b7ab54d5125cc7028b494c0257924d58120ff7e478610330cc7
6
+ metadata.gz: ba698519e75e0dbe3c1c1ecff2f75d35ddb95b12a548a3c2bce1a31631ebc9a972621e33849d149a1533ff35f4c4017256bef635ebc866dcb678ee2bb4de588e
7
+ data.tar.gz: 115d42cb2a44a1c490abad374d1337445f0c52f1f56017c492c8f420b6c9f26db0e51cde1c46fb6f191268ce450e82245ade8a4f0252ae0573d3609872f4f978
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mosespa (1.4.2)
4
+ mosespa (1.4.4)
5
5
  colorize
6
6
  jira-ruby
7
7
  table_print
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
- "summary"
21
+ {:summary => { :width => 52 }}
22
22
  end
23
23
  end
24
24
 
data/mosespa.gemspec CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "mosespa"
6
- s.version = '1.4.2'
6
+ s.version = '1.4.4'
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.authors = ["Grégoire Seux"]
9
9
  s.license = "Apache License v2"
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.2
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-06-25 00:00:00.000000000 Z
11
+ date: 2014-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jira-ruby