kafo 0.3.11 → 0.3.12

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: c7c2a897b448987978d1730ff5670a7eacbc2729
4
- data.tar.gz: 69cf2ee669a9c6c6ba712525b0ae99722f49f2fa
3
+ metadata.gz: 41d1cfdf276c5f8cf9df36c124011b2b011b3369
4
+ data.tar.gz: f8033005a3355378b9947be0070325cd2368dd3d
5
5
  SHA512:
6
- metadata.gz: 0f7641ece71332d8daeeeb41fcbea51006c5e1b6a95f4c1e2a295faaa7c1af9cb544e45e353a344a8ca296b535be01a81d8ffad9aebd38ea8d87600d503fc312
7
- data.tar.gz: ecb555f01cb7d3bc136ceb92759bf39fab91cea334bef4450a5257a5fd15c99ba244160c1f28351467b73f2afb5934667bba570d8f080273663b8a2eac95dfe5
6
+ metadata.gz: f747712db68b6b2eec04bac5b1e0af72eca6f5c0f38591e1d9111b7af50400ee9fa43ee1693525879e82f3391d92cfe4102887f0af151337b418f6d5d121d0f1
7
+ data.tar.gz: 5e55307ec40c518a463d4c45533f6a1d1bc4cb957ec0632215b259377ca7c0c217f37bcf0e8f19ca3d7ffaefa516108b281c280c8e3eec35187257fa8e64693a
data/lib/kafo/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # encoding: UTF-8
2
2
  module Kafo
3
- VERSION = "0.3.11"
3
+ VERSION = "0.3.12"
4
4
  end
data/lib/kafo/wizard.rb CHANGED
@@ -150,20 +150,28 @@ END
150
150
  $terminal.page_at = data.last if data.last
151
151
  end
152
152
 
153
+ def color_hash
154
+ @color_hash ||= {
155
+ :headline => [:bold, :yellow, :on_black],
156
+ :horizontal_line => [:bold, :white, :on_black],
157
+ :important => [:bold, :white, :on_black],
158
+ :question => [:bold, :green, :on_black],
159
+ :info => [:bold, :cyan, :on_black],
160
+ :cancel => [:bold, :red, :on_black],
161
+ :run => [:bold, :green, :on_black],
162
+ }
163
+ end
164
+
153
165
  # setup colour scheme for prompts
154
166
  def setup_colors
155
167
  colors = HighLine::ColorScheme.new do |cs|
156
- cs[:headline] = [:bold, :yellow, :on_black]
157
- cs[:horizontal_line] = [:bold, :white, :on_black]
158
- cs[:important] = [:bold, :white, :on_black]
159
- cs[:question] = [:bold, :green, :on_black]
160
- cs[:info] = [:bold, :cyan, :on_black]
161
- cs[:cancel] = [:bold, :red, :on_black]
162
- cs[:run] = [:bold, :green, :on_black]
168
+ color_hash.keys.each do |key|
169
+ cs[key] = color_hash[key]
170
+ end
163
171
  end
164
172
 
165
173
  nocolors = HighLine::ColorScheme.new do |cs|
166
- colors.keys.each { |k| cs[k.to_sym] = [] }
174
+ color_hash.keys.each { |k| cs[k.to_sym] = [] }
167
175
  end
168
176
 
169
177
  HighLine.color_scheme = @config.app[:colors] ? colors : nocolors
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kafo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.11
4
+ version: 0.3.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marek Hulan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-29 00:00:00.000000000 Z
11
+ date: 2014-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler