themigrator 0.1.14 → 0.1.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/themigrator.rb +1 -0
- data/lib/themigrator/ui.rb +1 -15
- data/lib/themigrator/ui/getchar.rb +2 -1
- data/lib/themigrator/ui/log.rb +19 -0
- data/lib/themigrator/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bdc66f94992c2eae613898a237e2e7c3f695c35f
|
4
|
+
data.tar.gz: 8cc703cd8487ef7945513d21178e782e4fecf047
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65a157a879c5d4b822ce0e01d27d54ca050eda2de7693a4e17cd33aca8adc38949fc34244df4a4e4571750099d763d6aadf4b6a22c73cc3aa91361a5b0c1576d
|
7
|
+
data.tar.gz: a291a9296de059354c564d632b7602c0de73f42bce54d40eb3e22558409ef9a9d0904f6e93cb137d240ecaaf9730a49dba4b464c07ba3ad8f0ff3db869f6f50d
|
data/lib/themigrator.rb
CHANGED
data/lib/themigrator/ui.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'curses'
|
2
2
|
|
3
|
+
require 'themigrator/ui/log'
|
3
4
|
require 'themigrator/ui/log_area'
|
4
5
|
require 'themigrator/ui/title_bar'
|
5
6
|
require 'themigrator/ui/progress_window'
|
@@ -8,22 +9,7 @@ require 'thread'
|
|
8
9
|
|
9
10
|
Thread.abort_on_exception = true
|
10
11
|
|
11
|
-
UILOG = Logger.new('ui.log')
|
12
|
-
UILOG.formatter = proc { |_severity, _datetime, _progname, msg|
|
13
|
-
msg + "\n"
|
14
|
-
}
|
15
|
-
UILOGMUTEX = Mutex.new
|
16
|
-
def ui_log(*args)
|
17
|
-
UILOGMUTEX.synchronize do
|
18
|
-
UILOG << args.join("\n\r") + "\n"
|
19
|
-
end
|
20
|
-
end
|
21
12
|
|
22
|
-
def ui_log_exception(e)
|
23
|
-
ui_log ''
|
24
|
-
ui_log e.inspect
|
25
|
-
ui_log e.backtrace
|
26
|
-
end
|
27
13
|
|
28
14
|
module Themigrator
|
29
15
|
class UI
|
@@ -1,4 +1,5 @@
|
|
1
1
|
|
2
|
+
require 'themigrator/ui/log'
|
2
3
|
# From: http://www.alecjacobson.com/weblog/?p=75
|
3
4
|
module Themigrator
|
4
5
|
class UI
|
@@ -30,7 +31,7 @@ module Themigrator
|
|
30
31
|
extra_thread.kill
|
31
32
|
end
|
32
33
|
rescue => e
|
33
|
-
|
34
|
+
ui_log_exception(e)
|
34
35
|
ensure
|
35
36
|
end
|
36
37
|
KEY2SYM[c]
|
@@ -0,0 +1,19 @@
|
|
1
|
+
|
2
|
+
require 'logger'
|
3
|
+
UILOG = Logger.new('ui.log')
|
4
|
+
UILOG.formatter = proc { |_severity, _datetime, _progname, msg|
|
5
|
+
msg + "\n"
|
6
|
+
}
|
7
|
+
UILOGMUTEX = Mutex.new
|
8
|
+
|
9
|
+
def ui_log(*args)
|
10
|
+
UILOGMUTEX.synchronize do
|
11
|
+
UILOG << args.join("\n\r") + "\n"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def ui_log_exception(e)
|
16
|
+
ui_log ''
|
17
|
+
ui_log e.inspect
|
18
|
+
ui_log e.backtrace
|
19
|
+
end
|
data/lib/themigrator/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: themigrator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Guillermo Álvarez
|
@@ -139,6 +139,7 @@ files:
|
|
139
139
|
- lib/themigrator/script_pool.rb
|
140
140
|
- lib/themigrator/ui.rb
|
141
141
|
- lib/themigrator/ui/getchar.rb
|
142
|
+
- lib/themigrator/ui/log.rb
|
142
143
|
- lib/themigrator/ui/log_area.rb
|
143
144
|
- lib/themigrator/ui/progress_window.rb
|
144
145
|
- lib/themigrator/ui/title_bar.rb
|