rdialog-ng 0.1.1 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +1 -0
- data/lib/rdialog-ng/rdialog-ng.rb +11 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 615e7db737736dac0ce77acfc36895110276d80a
|
4
|
+
data.tar.gz: 9e77e2f57b9cded5a56f4a17f747e66858d83963
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ad66f3e64daa193d684633c8d9dd508b09e141f6f89d4725171966cf3a23b2f3ee9efaa347897b04605178d4d9a0e6285a8a7e67f0b0a508760b80dafa5094b
|
7
|
+
data.tar.gz: b1347802ef8644674c8183bcf40ee399ae364350c56cfca17c093599dfbdee7723b639a235e9039df651a46f557133fcae3a82d9d5bc6bb14d069c262165164b
|
data/README.rdoc
CHANGED
@@ -445,6 +445,8 @@ attr_accessor :timeout
|
|
445
445
|
# 'h' and 'l', or arrow-keys. A '0' resets the scrolling.
|
446
446
|
|
447
447
|
def textbox(file, type="text", height=0, width=0)
|
448
|
+
temp = Tempfile.new('tmp')
|
449
|
+
|
448
450
|
case type
|
449
451
|
when "text"
|
450
452
|
opt = "--textbox"
|
@@ -457,11 +459,18 @@ attr_accessor :timeout
|
|
457
459
|
end
|
458
460
|
|
459
461
|
command = option_string() + opt +" \"" + file.to_s +
|
460
|
-
"\" " + height.to_i.to_s + " " + width.to_i.to_s + " "
|
462
|
+
"\" " + height.to_i.to_s + " " + width.to_i.to_s + " 2>" + temp.path
|
461
463
|
|
462
464
|
success = system(command)
|
463
465
|
|
464
|
-
|
466
|
+
if success
|
467
|
+
data = temp.read()
|
468
|
+
temp.close!
|
469
|
+
return data
|
470
|
+
else
|
471
|
+
temp.close!
|
472
|
+
return success
|
473
|
+
end
|
465
474
|
end
|
466
475
|
|
467
476
|
# A dialog is displayed which allows you to select hour, minute
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rdialog-ng
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aleks Clark
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2017-01-15 00:00:00.000000000 Z
|
15
15
|
dependencies: []
|
16
16
|
description: A gem providing a ruby interface to the n-curses dialog generator - 'dialog'.
|
17
17
|
email: rubygem@rieckers.it
|
@@ -46,7 +46,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
46
46
|
version: '0'
|
47
47
|
requirements: []
|
48
48
|
rubyforge_project:
|
49
|
-
rubygems_version: 2.
|
49
|
+
rubygems_version: 2.5.1
|
50
50
|
signing_key:
|
51
51
|
specification_version: 4
|
52
52
|
summary: A gem providing a ruby interface to the n-curses dialog generator - 'dialog'.
|