mrdialog 1.0.1
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 +7 -0
- data/.document +5 -0
- data/ChangeLog.md +61 -0
- data/Gemfile +14 -0
- data/Gemfile.lock +82 -0
- data/LICENSE.txt +21 -0
- data/README.rdoc +52 -0
- data/Rakefile +62 -0
- data/VERSION +1 -0
- data/lib/mrdialog/mrdialog.rb +1245 -0
- data/lib/mrdialog.rb +3 -0
- data/pkg/mrdialog-1.0.1.gem +0 -0
- data/samples/buildlist.rb +77 -0
- data/samples/calendar.rb +33 -0
- data/samples/checklist.rb +67 -0
- data/samples/editbox.rb +60 -0
- data/samples/form1.rb +90 -0
- data/samples/form2.rb +170 -0
- data/samples/form3.rb +96 -0
- data/samples/fselect.rb +29 -0
- data/samples/gauge.rb +39 -0
- data/samples/infobox.rb +36 -0
- data/samples/inputbox.rb +36 -0
- data/samples/menubox.rb +72 -0
- data/samples/mixedform1.rb +120 -0
- data/samples/msgbox.rb +31 -0
- data/samples/password.rb +32 -0
- data/samples/password2.rb +39 -0
- data/samples/passwordform.rb +91 -0
- data/samples/pause.rb +48 -0
- data/samples/prgbox.rb +34 -0
- data/samples/program.rb +33 -0
- data/samples/progress.rb +32 -0
- data/samples/radiolist.rb +71 -0
- data/samples/shortlist +19 -0
- data/samples/timebox.rb +31 -0
- data/samples/treeview.rb +100 -0
- data/samples/treeview2.rb +80 -0
- data/samples/yesno.rb +39 -0
- data/test/helper.rb +34 -0
- data/test/test_mrdialog.rb +7 -0
- metadata +161 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 2e725ccd9925f5c32dcaac2b37b2b4ee972467cf
|
4
|
+
data.tar.gz: 8bf881b6b328ca8985cf75515a4b10c407c82eb1
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e39db23a82f21465dfb4f6de48a2bd1e4ef9de501f17abcc9e93885c91b4fa01d2c5ea01dc851de34a781ca7c9955413057663b132a79efa03cdda4f41a411c4
|
7
|
+
data.tar.gz: ceae617cc022f8806a168cc7a079fa60ce7a5868e58c79c65a3f227dc43cac2a1d5ff0335743d65c7fba564f9c89ab8c9b4d6514031dda2694dbb1dd017ddc26
|
data/.document
ADDED
data/ChangeLog.md
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
## 1.0.1
|
2
|
+
|
3
|
+
* Jeweler support for making the gem.
|
4
|
+
|
5
|
+
* Implemented methods for:
|
6
|
+
* 'buildlist' (--buildlist)
|
7
|
+
* 'editbox' (--editbox)
|
8
|
+
* 'form' (--form)
|
9
|
+
* 'gauge' (--gauge). Thanks to Mike Morgan.
|
10
|
+
* 'mixedform' (--mixedform)
|
11
|
+
* 'passwordform' (--mixedform)
|
12
|
+
* 'pause' (--pasue)
|
13
|
+
* 'prgbox' (--prgbox)
|
14
|
+
* 'progressbox' (--progressbox)
|
15
|
+
* 'progambox' (--programbox)
|
16
|
+
* 'treeview' (--treeview)
|
17
|
+
|
18
|
+
* Added accessors:
|
19
|
+
"logger", "clear", "ok_label <label>", "insecure", "ascii_lines"
|
20
|
+
* Added methods to check dialog's exit code
|
21
|
+
dialog_ok, dialog_cancel, dialog_help, dialog_extra,
|
22
|
+
dialog_item_help, dialog_esc
|
23
|
+
|
24
|
+
* Implemented examples for:
|
25
|
+
** buildlist
|
26
|
+
** calendar
|
27
|
+
** checklist
|
28
|
+
** editbox
|
29
|
+
** form
|
30
|
+
** fselect
|
31
|
+
** gauge
|
32
|
+
** infobox
|
33
|
+
** inputbox
|
34
|
+
** menu
|
35
|
+
** msgbox
|
36
|
+
** passwordbox
|
37
|
+
** pause
|
38
|
+
** prgbox
|
39
|
+
** progressbox
|
40
|
+
** programbox
|
41
|
+
** radiolist
|
42
|
+
** timebox
|
43
|
+
** treeview
|
44
|
+
** yesno
|
45
|
+
|
46
|
+
Note: The examples use Struct class, making the examples clean and
|
47
|
+
easy to understand.
|
48
|
+
|
49
|
+
|
50
|
+
# bug fixes:
|
51
|
+
|
52
|
+
* raise exception if 'dialog' program is not found.
|
53
|
+
* title in the option string was not quoted
|
54
|
+
* timebox syntax is different now.
|
55
|
+
etc..
|
56
|
+
|
57
|
+
-- muquit@muquit.com , Apr-05-2014, first cut
|
58
|
+
|
59
|
+
## 0.5.0
|
60
|
+
|
61
|
+
* original base code
|
data/Gemfile
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
source "http://rubygems.org"
|
2
|
+
# Add dependencies required to use your gem here.
|
3
|
+
# Example:
|
4
|
+
# gem "activesupport", ">= 2.3.5"
|
5
|
+
|
6
|
+
# Add dependencies to develop your gem here.
|
7
|
+
# Include everything needed to run rake, tests, features, etc.
|
8
|
+
group :development do
|
9
|
+
gem "shoulda", ">= 0"
|
10
|
+
gem "rdoc", "~> 3.12"
|
11
|
+
gem "bundler", "~> 1.0"
|
12
|
+
gem "jeweler", "~> 2.0.1"
|
13
|
+
gem "simplecov", ">= 0"
|
14
|
+
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
activesupport (4.0.4)
|
5
|
+
i18n (~> 0.6, >= 0.6.9)
|
6
|
+
minitest (~> 4.2)
|
7
|
+
multi_json (~> 1.3)
|
8
|
+
thread_safe (~> 0.1)
|
9
|
+
tzinfo (~> 0.3.37)
|
10
|
+
addressable (2.3.6)
|
11
|
+
atomic (1.1.16)
|
12
|
+
builder (3.2.2)
|
13
|
+
descendants_tracker (0.0.4)
|
14
|
+
thread_safe (~> 0.3, >= 0.3.1)
|
15
|
+
docile (1.1.3)
|
16
|
+
faraday (0.9.0)
|
17
|
+
multipart-post (>= 1.2, < 3)
|
18
|
+
git (1.2.6)
|
19
|
+
github_api (0.11.3)
|
20
|
+
addressable (~> 2.3)
|
21
|
+
descendants_tracker (~> 0.0.1)
|
22
|
+
faraday (~> 0.8, < 0.10)
|
23
|
+
hashie (>= 1.2)
|
24
|
+
multi_json (>= 1.7.5, < 2.0)
|
25
|
+
nokogiri (~> 1.6.0)
|
26
|
+
oauth2
|
27
|
+
hashie (2.0.5)
|
28
|
+
highline (1.6.21)
|
29
|
+
i18n (0.6.9)
|
30
|
+
jeweler (2.0.1)
|
31
|
+
builder
|
32
|
+
bundler (>= 1.0)
|
33
|
+
git (>= 1.2.5)
|
34
|
+
github_api
|
35
|
+
highline (>= 1.6.15)
|
36
|
+
nokogiri (>= 1.5.10)
|
37
|
+
rake
|
38
|
+
rdoc
|
39
|
+
json (1.8.1)
|
40
|
+
jwt (0.1.11)
|
41
|
+
multi_json (>= 1.5)
|
42
|
+
mini_portile (0.5.3)
|
43
|
+
minitest (4.7.5)
|
44
|
+
multi_json (1.9.2)
|
45
|
+
multi_xml (0.5.5)
|
46
|
+
multipart-post (2.0.0)
|
47
|
+
nokogiri (1.6.1)
|
48
|
+
mini_portile (~> 0.5.0)
|
49
|
+
oauth2 (0.9.3)
|
50
|
+
faraday (>= 0.8, < 0.10)
|
51
|
+
jwt (~> 0.1.8)
|
52
|
+
multi_json (~> 1.3)
|
53
|
+
multi_xml (~> 0.5)
|
54
|
+
rack (~> 1.2)
|
55
|
+
rack (1.5.2)
|
56
|
+
rake (10.2.2)
|
57
|
+
rdoc (3.12.2)
|
58
|
+
json (~> 1.4)
|
59
|
+
shoulda (3.5.0)
|
60
|
+
shoulda-context (~> 1.0, >= 1.0.1)
|
61
|
+
shoulda-matchers (>= 1.4.1, < 3.0)
|
62
|
+
shoulda-context (1.2.0)
|
63
|
+
shoulda-matchers (2.5.0)
|
64
|
+
activesupport (>= 3.0.0)
|
65
|
+
simplecov (0.8.2)
|
66
|
+
docile (~> 1.1.0)
|
67
|
+
multi_json
|
68
|
+
simplecov-html (~> 0.8.0)
|
69
|
+
simplecov-html (0.8.0)
|
70
|
+
thread_safe (0.3.1)
|
71
|
+
atomic (>= 1.1.7, < 2)
|
72
|
+
tzinfo (0.3.39)
|
73
|
+
|
74
|
+
PLATFORMS
|
75
|
+
ruby
|
76
|
+
|
77
|
+
DEPENDENCIES
|
78
|
+
bundler (~> 1.0)
|
79
|
+
jeweler (~> 2.0.1)
|
80
|
+
rdoc (~> 3.12)
|
81
|
+
shoulda
|
82
|
+
simplecov
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
Copyright (c) Aleks Clarks, http://rdialog.rubyforge.org/
|
2
|
+
Copyright (c) 2014, Muhammad Muquit, http://ww.muquit.com/
|
3
|
+
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
5
|
+
a copy of this software and associated documentation files (the
|
6
|
+
"Software"), to deal in the Software without restriction, including
|
7
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
8
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
9
|
+
permit persons to whom the Software is furnished to do so, subject to
|
10
|
+
the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be
|
13
|
+
included in all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
16
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
17
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
18
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
19
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
20
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
21
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
= MRDialog
|
2
|
+
|
3
|
+
mrdialog is a pure ruby library for the ncurses dialog program. dialog is
|
4
|
+
a command line tool that can present questions, messages, forms using
|
5
|
+
dialog boxes from a shell script. However, it is painful to program dialog
|
6
|
+
from shell scripts due to lack of data structure etc. You constactly have
|
7
|
+
to watch if the correct number of items are specified, if the arguments
|
8
|
+
are in correct order for example.
|
9
|
+
|
10
|
+
MRDialog is based on the rdialog ruby gem (http://rdialog.rubyforge.org/) by
|
11
|
+
Aleks Clark.
|
12
|
+
|
13
|
+
The original license is MIT and my code is also free to use under the
|
14
|
+
terms of the MIT license. Please look at the LICENSE.txt file for
|
15
|
+
details.
|
16
|
+
|
17
|
+
I added support for all of the missing widgets, fixed bugs, implemented
|
18
|
+
the examples for all the widgets. Please look at the ChangeLog.md file
|
19
|
+
for details.
|
20
|
+
|
21
|
+
Please look at the examples in the "samples" directory to see how the API works.
|
22
|
+
|
23
|
+
TODO: write the API document here
|
24
|
+
|
25
|
+
=== Requirements
|
26
|
+
|
27
|
+
* dialog must be installed. dialog home is:
|
28
|
+
http://invisible-island.net/dialog/dialog.html
|
29
|
+
|
30
|
+
=== To build
|
31
|
+
|
32
|
+
$ rake build
|
33
|
+
|
34
|
+
Will create the gem inside the pkg directory
|
35
|
+
|
36
|
+
=== To install the built gem
|
37
|
+
|
38
|
+
$ sudo gem install --local pkg/mrdialog-1.0.1.gem
|
39
|
+
|
40
|
+
=== To install using rake
|
41
|
+
|
42
|
+
$ sudo rake install
|
43
|
+
|
44
|
+
=== To install the gem to a specific directory:
|
45
|
+
|
46
|
+
$ GEM_HOME=/tmp gem install --local pkg/mrdialog-1.0.1.gem
|
47
|
+
|
48
|
+
The gem will be installed in /tmp/gems directory
|
49
|
+
|
50
|
+
--
|
51
|
+
Muhammad Muquit, muquit@muquit.com
|
52
|
+
Apr-05-2014 - first cut
|
data/Rakefile
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'bundler'
|
5
|
+
begin
|
6
|
+
Bundler.setup(:default, :development)
|
7
|
+
rescue Bundler::BundlerError => e
|
8
|
+
$stderr.puts e.message
|
9
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
10
|
+
exit e.status_code
|
11
|
+
end
|
12
|
+
require 'rake'
|
13
|
+
|
14
|
+
require 'jeweler'
|
15
|
+
Jeweler::Tasks.new do |gem|
|
16
|
+
# gem is a Gem::Specification... see http://guides.rubygems.org/specification-reference/ for more options
|
17
|
+
gem.name = "mrdialog"
|
18
|
+
gem.homepage = "http://github.com/muquit/mrdialog"
|
19
|
+
gem.license = "MIT"
|
20
|
+
gem.summary = %Q{A ruby gem for ncurses dialog program, based on the gem rdialog}
|
21
|
+
gem.description = %Q{A ruby gem for ncurses dialog program.
|
22
|
+
This gem is based on rdialog (http://rdialog.rubyforge.org/) by
|
23
|
+
Aleks Clark. I added support for missing widgets, fixed
|
24
|
+
bugs and wrote the sample apps. I am
|
25
|
+
also renaming the class to MRDialog to avoid conflicts.
|
26
|
+
Please look at ChangeLog.md for details. }
|
27
|
+
gem.email = "muquit@gmail.com"
|
28
|
+
gem.authors = ["Aleks Clark", "Muhammad Muquit"]
|
29
|
+
gem.files.include 'lib/mrdialog.rb'
|
30
|
+
gem.files.include 'lib/mrdialog/mrdialog.rb'
|
31
|
+
gem.files.include 'samples/*'
|
32
|
+
gem.files.include 'VERSION'
|
33
|
+
gem.files.include 'README.md'
|
34
|
+
gem.files.include 'ChangeLog.md'
|
35
|
+
# dependencies defined in Gemfile
|
36
|
+
end
|
37
|
+
Jeweler::RubygemsDotOrgTasks.new
|
38
|
+
|
39
|
+
require 'rake/testtask'
|
40
|
+
Rake::TestTask.new(:test) do |test|
|
41
|
+
test.libs << 'lib' << 'test'
|
42
|
+
test.pattern = 'test/**/test_*.rb'
|
43
|
+
test.verbose = true
|
44
|
+
end
|
45
|
+
|
46
|
+
desc "Code coverage detail"
|
47
|
+
task :simplecov do
|
48
|
+
ENV['COVERAGE'] = "true"
|
49
|
+
Rake::Task['test'].execute
|
50
|
+
end
|
51
|
+
|
52
|
+
task :default => :test
|
53
|
+
|
54
|
+
require 'rdoc/task'
|
55
|
+
Rake::RDocTask.new do |rdoc|
|
56
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
57
|
+
|
58
|
+
rdoc.rdoc_dir = 'rdoc'
|
59
|
+
rdoc.title = "mrdialog #{version}"
|
60
|
+
rdoc.rdoc_files.include('README*')
|
61
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
62
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
1.0.1
|