ffi-tk 2010.08.23 → 2018.02.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +2 -0
- data/.rubocop.yml +7 -0
- data/.rubocop_todo.yml +371 -0
- data/AUTHORS +4 -2
- data/CHANGELOG +302 -262
- data/Gemfile +10 -0
- data/Gemfile.lock +45 -0
- data/MANIFEST +6 -6
- data/README.md +1 -1
- data/Rakefile +12 -11
- data/bin/rwish +6 -5
- data/example/choose_color.rb +5 -4
- data/example/choose_directory.rb +5 -4
- data/example/dialog.rb +9 -8
- data/example/hello.rb +2 -1
- data/example/message_box.rb +8 -5
- data/example/option_menu.rb +4 -3
- data/example/popup.rb +4 -3
- data/example/set_palette.rb +5 -4
- data/example/text.rb +30 -30
- data/example/tile/kroc_demo_small.rb +51 -55
- data/example/tile/kroc_rb_demo.rb +74 -83
- data/example/tile/notebook.rb +6 -9
- data/example/tile/theme_hello.rb +6 -8
- data/example/tile/themes.rb +4 -2
- data/example/tile/treeview.rb +16 -14
- data/example/tkgo.rb +120 -88
- data/example/various.rb +8 -7
- data/example/wait.rb +3 -2
- data/ffi-tk.gemspec +21 -20
- data/gemset.nix +134 -0
- data/lib/ffi-tk.rb +10 -11
- data/lib/ffi-tk/command.rb +3 -2
- data/lib/ffi-tk/command/after.rb +8 -7
- data/lib/ffi-tk/command/bell.rb +2 -1
- data/lib/ffi-tk/command/bind.rb +1 -0
- data/lib/ffi-tk/command/bindtags.rb +1 -0
- data/lib/ffi-tk/command/cget.rb +31 -24
- data/lib/ffi-tk/command/choose_color.rb +2 -1
- data/lib/ffi-tk/command/choose_directory.rb +2 -1
- data/lib/ffi-tk/command/clipboard.rb +6 -5
- data/lib/ffi-tk/command/configure.rb +23 -21
- data/lib/ffi-tk/command/destroy.rb +2 -1
- data/lib/ffi-tk/command/dialog.rb +4 -3
- data/lib/ffi-tk/command/event.rb +1 -0
- data/lib/ffi-tk/command/focus.rb +2 -1
- data/lib/ffi-tk/command/font.rb +12 -9
- data/lib/ffi-tk/command/get_open_file.rb +1 -0
- data/lib/ffi-tk/command/get_save_file.rb +1 -0
- data/lib/ffi-tk/command/grab.rb +2 -1
- data/lib/ffi-tk/command/grid.rb +7 -6
- data/lib/ffi-tk/command/image.rb +5 -4
- data/lib/ffi-tk/command/lower.rb +1 -0
- data/lib/ffi-tk/command/message_box.rb +2 -1
- data/lib/ffi-tk/command/option_menu.rb +3 -2
- data/lib/ffi-tk/command/pack.rb +5 -4
- data/lib/ffi-tk/command/place.rb +5 -4
- data/lib/ffi-tk/command/popup.rb +2 -1
- data/lib/ffi-tk/command/raise.rb +1 -0
- data/lib/ffi-tk/command/scrollable.rb +7 -10
- data/lib/ffi-tk/command/selection.rb +4 -3
- data/lib/ffi-tk/command/set_palette.rb +2 -1
- data/lib/ffi-tk/command/tk_cmd.rb +1 -0
- data/lib/ffi-tk/command/vars.rb +2 -1
- data/lib/ffi-tk/command/wait.rb +2 -1
- data/lib/ffi-tk/command/winfo.rb +9 -8
- data/lib/ffi-tk/command/wm.rb +11 -10
- data/lib/ffi-tk/core_extensions.rb +5 -4
- data/lib/ffi-tk/event/data.rb +32 -31
- data/lib/ffi-tk/event/handler.rb +4 -3
- data/lib/ffi-tk/ffi/tcl.rb +42 -31
- data/lib/ffi-tk/ffi/tcl/cmd_proc.rb +2 -1
- data/lib/ffi-tk/ffi/tcl/eval_result.rb +47 -8
- data/lib/ffi-tk/ffi/tcl/interp.rb +7 -4
- data/lib/ffi-tk/ffi/tcl/obj.rb +7 -32
- data/lib/ffi-tk/ffi/tcl/time.rb +2 -1
- data/lib/ffi-tk/ffi/tk.rb +8 -7
- data/lib/ffi-tk/geometry.rb +20 -17
- data/lib/ffi-tk/thread_sender.rb +1 -0
- data/lib/ffi-tk/tk.rb +23 -23
- data/lib/ffi-tk/variable.rb +25 -3
- data/lib/ffi-tk/version.rb +1 -1
- data/lib/ffi-tk/widget.rb +2 -1
- data/lib/ffi-tk/widget/button.rb +4 -1
- data/lib/ffi-tk/widget/canvas.rb +18 -15
- data/lib/ffi-tk/widget/canvas/arc.rb +2 -1
- data/lib/ffi-tk/widget/canvas/bitmap.rb +2 -1
- data/lib/ffi-tk/widget/canvas/image.rb +2 -1
- data/lib/ffi-tk/widget/canvas/item.rb +4 -4
- data/lib/ffi-tk/widget/canvas/line.rb +2 -1
- data/lib/ffi-tk/widget/canvas/oval.rb +2 -1
- data/lib/ffi-tk/widget/canvas/polygon.rb +2 -1
- data/lib/ffi-tk/widget/canvas/rectangle.rb +2 -1
- data/lib/ffi-tk/widget/canvas/text.rb +2 -1
- data/lib/ffi-tk/widget/canvas/window.rb +2 -1
- data/lib/ffi-tk/widget/checkbutton.rb +4 -1
- data/lib/ffi-tk/widget/entry.rb +4 -1
- data/lib/ffi-tk/widget/frame.rb +4 -1
- data/lib/ffi-tk/widget/label.rb +4 -1
- data/lib/ffi-tk/widget/labelframe.rb +4 -1
- data/lib/ffi-tk/widget/listbox.rb +5 -2
- data/lib/ffi-tk/widget/menu.rb +4 -1
- data/lib/ffi-tk/widget/menubutton.rb +4 -1
- data/lib/ffi-tk/widget/message.rb +4 -1
- data/lib/ffi-tk/widget/panedwindow.rb +5 -2
- data/lib/ffi-tk/widget/radiobutton.rb +4 -1
- data/lib/ffi-tk/widget/root.rb +1 -0
- data/lib/ffi-tk/widget/scale.rb +4 -1
- data/lib/ffi-tk/widget/scrollbar.rb +4 -1
- data/lib/ffi-tk/widget/spinbox.rb +4 -1
- data/lib/ffi-tk/widget/text.rb +20 -16
- data/lib/ffi-tk/widget/text/peer.rb +1 -0
- data/lib/ffi-tk/widget/tile.rb +2 -1
- data/lib/ffi-tk/widget/tile/button.rb +4 -1
- data/lib/ffi-tk/widget/tile/checkbutton.rb +4 -1
- data/lib/ffi-tk/widget/tile/combobox.rb +5 -2
- data/lib/ffi-tk/widget/tile/entry.rb +4 -1
- data/lib/ffi-tk/widget/tile/frame.rb +4 -1
- data/lib/ffi-tk/widget/tile/label.rb +4 -2
- data/lib/ffi-tk/widget/tile/labelframe.rb +4 -1
- data/lib/ffi-tk/widget/tile/menubutton.rb +4 -1
- data/lib/ffi-tk/widget/tile/notebook.rb +4 -1
- data/lib/ffi-tk/widget/tile/panedwindow.rb +4 -1
- data/lib/ffi-tk/widget/tile/progressbar.rb +4 -2
- data/lib/ffi-tk/widget/tile/radiobutton.rb +4 -1
- data/lib/ffi-tk/widget/tile/scale.rb +4 -1
- data/lib/ffi-tk/widget/tile/scrollbar.rb +7 -4
- data/lib/ffi-tk/widget/tile/separator.rb +4 -1
- data/lib/ffi-tk/widget/tile/sizegrip.rb +4 -1
- data/lib/ffi-tk/widget/tile/style.rb +16 -17
- data/lib/ffi-tk/widget/tile/treeview.rb +11 -5
- data/lib/ffi-tk/widget/toplevel.rb +4 -1
- data/shell.nix +19 -0
- data/spec/ffi-tk/command/bind.rb +5 -4
- data/spec/ffi-tk/command/bindtags.rb +2 -1
- data/spec/ffi-tk/command/clipboard.rb +4 -3
- data/spec/ffi-tk/command/font.rb +20 -19
- data/spec/ffi-tk/command/image.rb +13 -5
- data/spec/ffi-tk/command/pack.rb +3 -2
- data/spec/ffi-tk/command/place.rb +4 -3
- data/spec/ffi-tk/command/selection.rb +2 -1
- data/spec/ffi-tk/command/vars.rb +3 -2
- data/spec/ffi-tk/command/winfo.rb +10 -10
- data/spec/ffi-tk/command/wm.rb +23 -22
- data/spec/ffi-tk/event.rb +23 -21
- data/spec/ffi-tk/tile/button.rb +8 -8
- data/spec/ffi-tk/tile/checkbutton.rb +1 -1
- data/spec/ffi-tk/tile/combobox.rb +11 -12
- data/spec/ffi-tk/tile/entry.rb +18 -19
- data/spec/ffi-tk/tile/frame.rb +13 -13
- data/spec/ffi-tk/tile/label.rb +2 -2
- data/spec/ffi-tk/tile/labelframe.rb +1 -1
- data/spec/ffi-tk/tile/menubutton.rb +1 -1
- data/spec/ffi-tk/tile/notebook.rb +22 -20
- data/spec/ffi-tk/tile/panedwindow.rb +1 -1
- data/spec/ffi-tk/tile/progressbar.rb +1 -1
- data/spec/ffi-tk/tile/radiobutton.rb +1 -1
- data/spec/ffi-tk/tile/scale.rb +1 -1
- data/spec/ffi-tk/tile/scrollbar.rb +1 -16
- data/spec/ffi-tk/tile/separator.rb +2 -2
- data/spec/ffi-tk/tile/sizegrip.rb +1 -1
- data/spec/ffi-tk/tile/style.rb +63 -65
- data/spec/ffi-tk/tile/treeview.rb +11 -10
- data/spec/ffi-tk/variable.rb +5 -4
- data/spec/ffi-tk/widget/button.rb +3 -2
- data/spec/ffi-tk/widget/canvas.rb +59 -58
- data/spec/ffi-tk/widget/checkbutton.rb +6 -5
- data/spec/ffi-tk/widget/entry.rb +112 -103
- data/spec/ffi-tk/widget/frame.rb +2 -1
- data/spec/ffi-tk/widget/label.rb +2 -1
- data/spec/ffi-tk/widget/labelframe.rb +1 -0
- data/spec/ffi-tk/widget/listbox.rb +5 -4
- data/spec/ffi-tk/widget/menu.rb +3 -2
- data/spec/ffi-tk/widget/menubutton.rb +1 -0
- data/spec/ffi-tk/widget/message.rb +1 -0
- data/spec/ffi-tk/widget/panedwindow.rb +1 -0
- data/spec/ffi-tk/widget/radiobutton.rb +1 -0
- data/spec/ffi-tk/widget/root.rb +2 -1
- data/spec/ffi-tk/widget/scale.rb +1 -0
- data/spec/ffi-tk/widget/scrollbar.rb +1 -0
- data/spec/ffi-tk/widget/spinbox.rb +1 -0
- data/spec/ffi-tk/widget/text.rb +63 -54
- data/spec/ffi-tk/widget/toplevel.rb +1 -0
- data/spec/helper.rb +3 -1
- data/tasks/authors.rake +3 -2
- data/tasks/bacon.rake +13 -11
- data/tasks/changelog.rake +1 -0
- data/tasks/gem.rake +13 -11
- data/tasks/manifest.rake +2 -1
- data/tasks/release.rake +11 -32
- data/tasks/reversion.rake +2 -1
- metadata +52 -75
- data/spec/ffi-tk/command/grid.rb +0 -6
- data/tasks/gem_setup.rake +0 -113
- data/tasks/grancher.rake +0 -12
- data/tasks/rcov.rake +0 -17
- data/tasks/setup.rake +0 -12
- data/tasks/ycov.rake +0 -84
data/tasks/grancher.rake
DELETED
data/tasks/rcov.rake
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
desc 'code coverage'
|
2
|
-
task :rcov => :clean do
|
3
|
-
specs = Dir['spec/ffi-tk/**/*.rb']
|
4
|
-
|
5
|
-
# we ignore adapter as this has extensive specs in rack already.
|
6
|
-
ignore = %w[ gem bacon ]
|
7
|
-
|
8
|
-
ignored = ignore.join(',')
|
9
|
-
|
10
|
-
cmd = "rcov --aggregate coverage.data --sort coverage -t --%s -x '#{ignored}' %s"
|
11
|
-
|
12
|
-
while spec = specs.shift
|
13
|
-
puts '', "Gather coverage for #{spec} ..."
|
14
|
-
html = specs.empty? ? 'html' : 'no-html'
|
15
|
-
sh(cmd % [html, spec])
|
16
|
-
end
|
17
|
-
end
|
data/tasks/setup.rake
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
desc 'install dependencies from gemspec'
|
2
|
-
task :setup => [:gem_setup] do
|
3
|
-
GemSetup.new :verbose => false do
|
4
|
-
DEPENDENCIES.each do |name, options|
|
5
|
-
gem(name, options)
|
6
|
-
end
|
7
|
-
|
8
|
-
DEVELOPMENT_DEPENDENCIES.each do |name, options|
|
9
|
-
gem(name, options)
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
data/tasks/ycov.rake
DELETED
@@ -1,84 +0,0 @@
|
|
1
|
-
begin
|
2
|
-
require 'yard'
|
3
|
-
|
4
|
-
task 'Show Documentation coverage'
|
5
|
-
task :ycov => ['.yardoc'] do
|
6
|
-
YARD::Registry.load_yardoc
|
7
|
-
code_objects = YARD::Registry.paths.map{|path| YARD::Registry.at(path) }
|
8
|
-
code_objects.delete_if{|obj| obj.type == :root }
|
9
|
-
without_doc, with_doc = code_objects.partition{|obj| obj.docstring.empty? }
|
10
|
-
|
11
|
-
documented = with_doc.size
|
12
|
-
undocumented = without_doc.size
|
13
|
-
total = documented + undocumented
|
14
|
-
percentage = (documented / 0.01) / total
|
15
|
-
|
16
|
-
puts "Documentation coverage is %d/%d (%3.1f%%)" % [documented, total, percentage]
|
17
|
-
end
|
18
|
-
|
19
|
-
task 'ycov-full' => ['.yardoc'] do
|
20
|
-
require 'builder'
|
21
|
-
|
22
|
-
YARD::Registry.load_yardoc
|
23
|
-
code_objects = YARD::Registry.paths.map{|path| YARD::Registry.at(path) }
|
24
|
-
code_objects.delete_if{|obj| obj.type == :root }
|
25
|
-
without_doc, with_doc = code_objects.partition{|obj| obj.docstring.empty? }
|
26
|
-
|
27
|
-
list_objects = lambda{|body, list|
|
28
|
-
body.table(:width => '100%') do |table|
|
29
|
-
list.group_by{|obj| obj.type }.
|
30
|
-
sort_by{|k,v| k.to_s }.each do |type, objects|
|
31
|
-
|
32
|
-
table.tr do |tr|
|
33
|
-
tr.th(type.to_s, :colspan => 2)
|
34
|
-
end
|
35
|
-
|
36
|
-
objects.sort_by{|obj| obj.path }.each do |obj|
|
37
|
-
table.tr do |tr|
|
38
|
-
tr.td obj.path
|
39
|
-
tr.td "#{obj.file} +#{obj.line}"
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
}
|
45
|
-
|
46
|
-
File.open('ycov.html', 'w+') do |ycov|
|
47
|
-
builder = Builder::XmlMarkup.new(:target => ycov, :indent=>2)
|
48
|
-
builder.html do |html|
|
49
|
-
html.head do |head|
|
50
|
-
head.title 'YARD Coverage report'
|
51
|
-
end
|
52
|
-
|
53
|
-
html.body do |body|
|
54
|
-
body.h1 'YARD Coverage report'
|
55
|
-
|
56
|
-
body.h2 "#{without_doc.size} Undocumented objects"
|
57
|
-
list_objects[body, without_doc]
|
58
|
-
|
59
|
-
body.h2 "#{with_doc.size} Documented objects"
|
60
|
-
list_objects[body, with_doc]
|
61
|
-
end
|
62
|
-
end
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
file '.yardoc' => FileList['lib/**/*.rb'] do
|
67
|
-
files = ['lib/**/*.rb']
|
68
|
-
options = ['--no-output', '--private']
|
69
|
-
YARD::CLI::Yardoc.run(*(options + files))
|
70
|
-
end
|
71
|
-
|
72
|
-
desc 'Generate YARD documentation'
|
73
|
-
task :yardoc => ['.yardoc'] do
|
74
|
-
files = ['lib/**/*.rb']
|
75
|
-
options = [
|
76
|
-
'--output-dir', 'ydoc',
|
77
|
-
'--readme', PROJECT_README,
|
78
|
-
'--db', '.yardoc',
|
79
|
-
'--private']
|
80
|
-
YARD::CLI::Yardoc.run(*(options + files))
|
81
|
-
end
|
82
|
-
rescue LoadError
|
83
|
-
# you'll survive
|
84
|
-
end
|