jirify 0.1.8 → 0.1.9

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: 6fa6f6e12d2dc9625fc0d7feff7a43bc6317bdfa3e65399183520fc1abaaf79a
4
- data.tar.gz: e1b7cad8d84ca28e4c4a2f08eabbb37a14fbc519ca6c715e0b4aa075ad24b07b
3
+ metadata.gz: 3fe2cff24e247976331c2d36b5d189bb51686dab4516b76005e8d3e5ca9f3b1f
4
+ data.tar.gz: 14be4832a121facb3a3e2858d52dc9f2699e553a9721c62486c38690e828b88e
5
5
  SHA512:
6
- metadata.gz: 315d6b7ad7ec9d2a32f3b25ffb02836d80cb49fdbef0013715e63468bad235b371907ca7ba94bd4bd79f37c53820a32cdd98aa61d4f8ab27fb86e1b31046f4a0
7
- data.tar.gz: 743c5029ad03b45ecb4d36a24035db2ba6e34d9163a8983e5db1dd62b37887a99257789e6d0ebea39488c2ea8ddae7c1efba7a42aed6470302242d41358bec42
6
+ metadata.gz: 4c0266d79e1f7720b2ee23f094acc960a382102d70f24745d0680c19fbc95b79c85daea1d01fd39d2bf1db1f10a83bd45aae607b5d7dae585c65581689a2bf9e
7
+ data.tar.gz: bf084536e7a48f4fb5a620c4025c112d55e0b2dce48787ed38f7e7459a4f996090fc252afe26bb7ed1e11303b7e6f0dd905f30152548a4bfc6790473786c7c86
@@ -105,7 +105,7 @@ module Jirify
105
105
  transition = issue.transitions.find_by_name(transition_name)
106
106
 
107
107
  if transition.nil?
108
- say "ERROR: Issue can't transition to #{transition_name}".red
108
+ say ColorizedString[" ERROR: Issue can't transition to #{transition_name} "].white.on_red.bold
109
109
  exit(0)
110
110
  end
111
111
 
@@ -201,7 +201,7 @@ module Jirify
201
201
  issue = Models::Issue.find_by_id(issue_id)
202
202
 
203
203
  if issue.nil?
204
- say 'ERROR: Issue not found'.red
204
+ say ColorizedString[' ERROR: Issue not found '].white.on_red.bold
205
205
  exit(0)
206
206
  else
207
207
  issue
@@ -17,8 +17,9 @@ module Jirify
17
17
  duplicate_options[:summary] = true
18
18
  end
19
19
  say UI::SprintTable.new(issues).to_table(duplicate_options)
20
- rescue UI::WindowTooNarrow
21
- say 'ERROR: Your terminal window is too narrow to print the sprint table!'.red
20
+ rescue UI::WindowTooNarrow, StandardError
21
+ say ColorizedString[' ERROR: Your terminal window is too narrow to print the sprint table! ']
22
+ .white.on_red.bold
22
23
  end
23
24
  end
24
25
  end
data/lib/jirify/config.rb CHANGED
@@ -36,7 +36,7 @@ module Jirify
36
36
 
37
37
  def verbose=(value)
38
38
  unless initialized?
39
- puts 'ERROR: You must initialize Jirify first!'.red
39
+ puts ColorizedString[' ERROR: You must initialize Jirify first! '].white.on_red.bold
40
40
  exit(0)
41
41
  end
42
42
 
@@ -47,7 +47,7 @@ module Jirify
47
47
 
48
48
  def options
49
49
  unless initialized?
50
- puts 'ERROR: You must initialize Jirify first!'.red
50
+ puts ColorizedString[' ERROR: You must initialize Jirify first! '].white.on_red.bold
51
51
  exit(0)
52
52
  end
53
53
 
@@ -43,7 +43,8 @@ module Jirify
43
43
  transition = transitions(true).send(transition_name.to_sym)
44
44
 
45
45
  if transition.nil?
46
- puts "ERROR: Issue can't be transitioned with \"#{transition_name}\"".red
46
+ puts ColorizedString[" ERROR: Issue can't be transitioned with \"#{transition_name}\" "]
47
+ .white.on_red.bold
47
48
  exit(0)
48
49
  end
49
50
 
@@ -51,9 +51,11 @@ module Jirify
51
51
  end
52
52
 
53
53
  def wrap(string, columns, character = "\n")
54
+ return '' if string.nil?
55
+
54
56
  start_pos = columns
55
57
  while start_pos < string.length
56
- space = string.rindex(' ', start_pos)
58
+ space = string.rindex(' ', start_pos) || start_pos + 1
57
59
  string.slice!(space)
58
60
  string.insert(space, character)
59
61
  start_pos = space + columns + 1
@@ -1,3 +1,3 @@
1
1
  module Jirify
2
- VERSION = '0.1.8'.freeze
2
+ VERSION = '0.1.9'.freeze
3
3
  end
data/lib/jirify.rb CHANGED
@@ -31,7 +31,7 @@ module Jirify
31
31
 
32
32
  desc 'version', 'Prints Jirify version'
33
33
  def version
34
- say "Current Jirify version: #{VERSION}"
34
+ say ColorizedString[" Current Jirify version: #{VERSION} "].white.on_blue.bold
35
35
  end
36
36
 
37
37
  desc 'setup [SUBCOMMAND]', 'Jirify setup tools'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jirify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Georgi Gardev