rdialog-ng 0.1.1 → 0.1.3

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: ec8b8d6b054f9ca4e548a65a2cc88ee15ee41315
4
- data.tar.gz: 040ad212aa56544651cfd86df8fcaad71ab50740
3
+ metadata.gz: 615e7db737736dac0ce77acfc36895110276d80a
4
+ data.tar.gz: 9e77e2f57b9cded5a56f4a17f747e66858d83963
5
5
  SHA512:
6
- metadata.gz: 94cd922d9bcdb07544529b51c0667e6f27c54695d6283810a062fb269938b770e62b6cedb91b0f3b7b9d338c7e9958fce4816cfd5b68ecc547e92478a8b6fea3
7
- data.tar.gz: 9b8d988e621aef5263d19114167808024e4eb71687060645aab45059d95acb5fc65a6ad5a3fbe8d3fc41d7868548ed167344101773c003d363a64e8813d696c1
6
+ metadata.gz: 7ad66f3e64daa193d684633c8d9dd508b09e141f6f89d4725171966cf3a23b2f3ee9efaa347897b04605178d4d9a0e6285a8a7e67f0b0a508760b80dafa5094b
7
+ data.tar.gz: b1347802ef8644674c8183bcf40ee399ae364350c56cfca17c093599dfbdee7723b639a235e9039df651a46f557133fcae3a82d9d5bc6bb14d069c262165164b
data/README.rdoc CHANGED
@@ -9,3 +9,4 @@ This gem was developed by Matt Scilipoti, Lucas Vieira and Aleks Clark. This for
9
9
  == Copyright
10
10
 
11
11
  Copyright (c) 2016 Jan-Frederik Rieckers. See LICENSE for details.
12
+ Copyright of the original version: (c) 2013 Aleks Clark
@@ -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
- return success
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.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: 2016-10-27 00:00:00.000000000 Z
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.2.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'.