rugui 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. data/Changelog +54 -0
  2. data/Rakefile +4 -42
  3. data/lib/rugui/tasks/release_framework.rake +39 -0
  4. data/lib/rugui/version.rb +1 -1
  5. data/rugui_generators/controller/USAGE +1 -0
  6. data/rugui_generators/controller/controller_generator.rb +35 -0
  7. data/rugui_generators/controller/templates/controller.erb +3 -0
  8. data/rugui_generators/generators_support.rb +75 -0
  9. data/rugui_generators/model/USAGE +1 -0
  10. data/rugui_generators/model/model_generator.rb +35 -0
  11. data/rugui_generators/model/templates/model.erb +3 -0
  12. data/rugui_generators/pack/USAGE +1 -0
  13. data/rugui_generators/pack/pack_generator.rb +40 -0
  14. data/rugui_generators/pack/templates/README +3 -0
  15. data/rugui_generators/rugui/USAGE +1 -0
  16. data/rugui_generators/rugui/rugui_generator.rb +163 -0
  17. data/rugui_generators/rugui/templates/GTK/application_controller.rb +4 -0
  18. data/rugui_generators/rugui/templates/GTK/application_view.rb +4 -0
  19. data/rugui_generators/rugui/templates/GTK/application_view_helper.rb +4 -0
  20. data/rugui_generators/rugui/templates/GTK/environment.rb +39 -0
  21. data/rugui_generators/rugui/templates/GTK/main.rc +23 -0
  22. data/rugui_generators/rugui/templates/GTK/main_controller.rb +17 -0
  23. data/rugui_generators/rugui/templates/GTK/main_view.glade +33 -0
  24. data/rugui_generators/rugui/templates/GTK/main_view.rb +10 -0
  25. data/rugui_generators/rugui/templates/GTK/main_view_helper.rb +3 -0
  26. data/rugui_generators/rugui/templates/Qt4/application_controller.rb +4 -0
  27. data/rugui_generators/rugui/templates/Qt4/application_view.rb +4 -0
  28. data/rugui_generators/rugui/templates/Qt4/application_view_helper.rb +4 -0
  29. data/rugui_generators/rugui/templates/Qt4/environment.rb +39 -0
  30. data/rugui_generators/rugui/templates/Qt4/main_controller.rb +13 -0
  31. data/rugui_generators/rugui/templates/Qt4/main_view.rb +10 -0
  32. data/rugui_generators/rugui/templates/Qt4/main_view.ui +37 -0
  33. data/rugui_generators/rugui/templates/Qt4/main_view_helper.rb +3 -0
  34. data/rugui_generators/rugui/templates/README +3 -0
  35. data/rugui_generators/rugui/templates/Rakefile +7 -0
  36. data/rugui_generators/rugui/templates/boot.rb +81 -0
  37. data/rugui_generators/rugui/templates/development.rb.sample +21 -0
  38. data/rugui_generators/rugui/templates/main.rb +11 -0
  39. data/rugui_generators/rugui/templates/main_executable.bat.erb +8 -0
  40. data/rugui_generators/rugui/templates/main_executable.erb +17 -0
  41. data/rugui_generators/rugui/templates/production.rb.sample +21 -0
  42. data/rugui_generators/rugui/templates/rcov.opts +1 -0
  43. data/rugui_generators/rugui/templates/spec.opts +4 -0
  44. data/rugui_generators/rugui/templates/spec_helper.rb +12 -0
  45. data/rugui_generators/rugui/templates/test.rb.sample +21 -0
  46. data/rugui_generators/rugui/templates/test_helper.rb +12 -0
  47. data/rugui_generators/view/USAGE +1 -0
  48. data/rugui_generators/view/templates/toplevels/about_dialog.glade +32 -0
  49. data/rugui_generators/view/templates/toplevels/assistant.glade +30 -0
  50. data/rugui_generators/view/templates/toplevels/color_selection_dialog.glade +60 -0
  51. data/rugui_generators/view/templates/toplevels/dialog_box.glade +35 -0
  52. data/rugui_generators/view/templates/toplevels/file_chooser_dialog.glade +35 -0
  53. data/rugui_generators/view/templates/toplevels/font_selection_dialog.glade +58 -0
  54. data/rugui_generators/view/templates/toplevels/input_dialog.glade +35 -0
  55. data/rugui_generators/view/templates/toplevels/message_dialog.glade +35 -0
  56. data/rugui_generators/view/templates/toplevels/recent_chooser_dialog.glade +33 -0
  57. data/rugui_generators/view/templates/toplevels/window.glade +11 -0
  58. data/rugui_generators/view/templates/view.erb +11 -0
  59. data/rugui_generators/view/templates/view.glade +4 -0
  60. data/rugui_generators/view/templates/view.ui +18 -0
  61. data/rugui_generators/view/templates/view_helper.erb +3 -0
  62. data/rugui_generators/view/view_generator.rb +36 -0
  63. data/script/console +10 -0
  64. data/script/destroy +14 -0
  65. data/script/generate +14 -0
  66. metadata +67 -5
  67. data/VERSION.yml +0 -4
@@ -0,0 +1,58 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
3
+ <glade-interface>
4
+ <widget class="GtkFontSelectionDialog" id="fontselectiondialog1">
5
+ <property name="border_width">5</property>
6
+ <property name="title" translatable="yes">Font Selection</property>
7
+ <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
8
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
9
+ <child internal-child="font_selection">
10
+ <widget class="GtkFontSelection" id="fontsel-font_selection1">
11
+ <property name="visible">True</property>
12
+ <property name="border_width">5</property>
13
+ <property name="spacing">12</property>
14
+ <property name="font_name">Sans 12</property>
15
+ <child>
16
+ <placeholder/>
17
+ </child>
18
+ </widget>
19
+ </child>
20
+ <child internal-child="cancel_button">
21
+ <widget class="GtkButton" id="fontsel-cancel_button1">
22
+ <property name="visible">True</property>
23
+ <property name="can_focus">True</property>
24
+ <property name="can_default">True</property>
25
+ <property name="receives_default">True</property>
26
+ <property name="label" translatable="yes">gtk-cancel</property>
27
+ <property name="use_underline">True</property>
28
+ <property name="use_stock">True</property>
29
+ <property name="response_id">0</property>
30
+ </widget>
31
+ </child>
32
+ <child internal-child="apply_button">
33
+ <widget class="GtkButton" id="fontsel-apply_button1">
34
+ <property name="visible">True</property>
35
+ <property name="can_focus">True</property>
36
+ <property name="can_default">True</property>
37
+ <property name="receives_default">True</property>
38
+ <property name="label" translatable="yes">gtk-apply</property>
39
+ <property name="use_underline">True</property>
40
+ <property name="use_stock">True</property>
41
+ <property name="response_id">0</property>
42
+ </widget>
43
+ </child>
44
+ <child internal-child="ok_button">
45
+ <widget class="GtkButton" id="fontsel-ok_button1">
46
+ <property name="visible">True</property>
47
+ <property name="can_focus">True</property>
48
+ <property name="can_default">True</property>
49
+ <property name="has_default">True</property>
50
+ <property name="receives_default">True</property>
51
+ <property name="label" translatable="yes">gtk-ok</property>
52
+ <property name="use_underline">True</property>
53
+ <property name="use_stock">True</property>
54
+ <property name="response_id">0</property>
55
+ </widget>
56
+ </child>
57
+ </widget>
58
+ </glade-interface>
@@ -0,0 +1,35 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
3
+ <glade-interface>
4
+ <widget class="GtkInputDialog" id="inputdialog1">
5
+ <property name="border_width">5</property>
6
+ <property name="title" translatable="yes">Input</property>
7
+ <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
8
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
9
+ <child internal-child="save_button">
10
+ <widget class="GtkButton" id="inputdialog-save_button1">
11
+ <property name="visible">True</property>
12
+ <property name="can_focus">True</property>
13
+ <property name="can_default">True</property>
14
+ <property name="receives_default">True</property>
15
+ <property name="label" translatable="yes">gtk-save</property>
16
+ <property name="use_underline">True</property>
17
+ <property name="use_stock">True</property>
18
+ <property name="response_id">0</property>
19
+ </widget>
20
+ </child>
21
+ <child internal-child="close_button">
22
+ <widget class="GtkButton" id="inputdialog-close_button1">
23
+ <property name="visible">True</property>
24
+ <property name="can_focus">True</property>
25
+ <property name="can_default">True</property>
26
+ <property name="has_default">True</property>
27
+ <property name="receives_default">True</property>
28
+ <property name="label" translatable="yes">gtk-close</property>
29
+ <property name="use_underline">True</property>
30
+ <property name="use_stock">True</property>
31
+ <property name="response_id">0</property>
32
+ </widget>
33
+ </child>
34
+ </widget>
35
+ </glade-interface>
@@ -0,0 +1,35 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
3
+ <glade-interface>
4
+ <widget class="GtkMessageDialog" id="messagedialog1">
5
+ <property name="border_width">5</property>
6
+ <property name="resizable">False</property>
7
+ <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
8
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
9
+ <property name="skip_taskbar_hint">True</property>
10
+ <property name="has_separator">False</property>
11
+ <property name="image"></property>
12
+ <child internal-child="vbox">
13
+ <widget class="GtkVBox" id="dialog-vbox1">
14
+ <property name="visible">True</property>
15
+ <property name="spacing">2</property>
16
+ <child internal-child="action_area">
17
+ <widget class="GtkHButtonBox" id="dialog-action_area1">
18
+ <property name="visible">True</property>
19
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
20
+ <child>
21
+ <placeholder/>
22
+ </child>
23
+ <child>
24
+ <placeholder/>
25
+ </child>
26
+ </widget>
27
+ <packing>
28
+ <property name="expand">False</property>
29
+ <property name="pack_type">GTK_PACK_END</property>
30
+ </packing>
31
+ </child>
32
+ </widget>
33
+ </child>
34
+ </widget>
35
+ </glade-interface>
@@ -0,0 +1,33 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
3
+ <glade-interface>
4
+ <widget class="GtkRecentChooserDialog" id="recentchooserdialog1">
5
+ <property name="border_width">5</property>
6
+ <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
7
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
8
+ <property name="has_separator">False</property>
9
+ <property name="limit">50</property>
10
+ <child internal-child="vbox">
11
+ <widget class="GtkVBox" id="dialog-vbox1">
12
+ <property name="visible">True</property>
13
+ <property name="spacing">2</property>
14
+ <child internal-child="action_area">
15
+ <widget class="GtkHButtonBox" id="dialog-action_area1">
16
+ <property name="visible">True</property>
17
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
18
+ <child>
19
+ <placeholder/>
20
+ </child>
21
+ <child>
22
+ <placeholder/>
23
+ </child>
24
+ </widget>
25
+ <packing>
26
+ <property name="expand">False</property>
27
+ <property name="pack_type">GTK_PACK_END</property>
28
+ </packing>
29
+ </child>
30
+ </widget>
31
+ </child>
32
+ </widget>
33
+ </glade-interface>
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
3
+ <glade-interface>
4
+ <widget class="GtkWindow" id="window">
5
+ <property name="visible">True</property>
6
+ <property name="title" translatable="yes">Title</property>
7
+ <child>
8
+ <placeholder/>
9
+ </child>
10
+ </widget>
11
+ </glade-interface>
@@ -0,0 +1,11 @@
1
+ class <%= view_name %>View < ApplicationView
2
+ <%- if uses_builder -%>
3
+ use_builder
4
+ # Add your stuff here.
5
+ <%- else -%>
6
+ # Setup widgets for the view
7
+ def setup_widgets
8
+ # Add your stuff here.
9
+ end
10
+ <%- end -%>
11
+ end
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
3
+ <glade-interface>
4
+ </glade-interface>
@@ -0,0 +1,18 @@
1
+ <ui version="4.0" >
2
+ <class>widget</class>
3
+ <widget class="QWidget" name="widget" >
4
+ <property name="geometry" >
5
+ <rect>
6
+ <x>0</x>
7
+ <y>0</y>
8
+ <width>400</width>
9
+ <height>300</height>
10
+ </rect>
11
+ </property>
12
+ <property name="windowTitle" >
13
+ <string>Widget</string>
14
+ </property>
15
+ </widget>
16
+ <resources/>
17
+ <connections/>
18
+ </ui>
@@ -0,0 +1,3 @@
1
+ class <%= view_name %>ViewHelper < ApplicationViewHelper
2
+ # Add your stuff here.
3
+ end
@@ -0,0 +1,36 @@
1
+ require File.join(File.dirname(__FILE__), "../generators_support")
2
+
3
+ class ViewGenerator < RubiGen::Base
4
+ include GeneratorsSupport
5
+
6
+ default_options :author => nil
7
+
8
+ attr_reader :name
9
+
10
+ def initialize(runtime_args, runtime_options = {})
11
+ @uses_builder = true
12
+ super
13
+ usage if args.empty?
14
+ @name = args.shift
15
+ extract_options
16
+ end
17
+
18
+ def manifest
19
+ record do |m|
20
+ build_view_templates(m)
21
+ end
22
+ end
23
+
24
+ protected
25
+ def banner
26
+ <<-EOS
27
+ Creates a RuGUI view with its resources.
28
+
29
+ USAGE: script/generate view YOUR_VIEW_NAME [options]
30
+ EOS
31
+ end
32
+
33
+ def add_options!(opts)
34
+ view_add_options!(opts)
35
+ end
36
+ end
data/script/console ADDED
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env ruby
2
+ # File: script/console
3
+ irb = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb'
4
+
5
+ libs = " -r irb/completion"
6
+ # Perhaps use a console_lib to store any extra methods I may want available in the cosole
7
+ # libs << " -r #{File.dirname(__FILE__) + '/../lib/console_lib/console_logger.rb'}"
8
+ libs << " -r #{File.dirname(__FILE__) + '/../lib/rugui-newgem.rb'}"
9
+ puts "Loading rugui-newgem gem"
10
+ exec "#{irb} #{libs} --simple-prompt"
data/script/destroy ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+ APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
3
+
4
+ begin
5
+ require 'rubigen'
6
+ rescue LoadError
7
+ require 'rubygems'
8
+ require 'rubigen'
9
+ end
10
+ require 'rubigen/scripts/destroy'
11
+
12
+ ARGV.shift if ['--help', '-h'].include?(ARGV[0])
13
+ RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
14
+ RubiGen::Scripts::Destroy.new.run(ARGV)
data/script/generate ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+ APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
3
+
4
+ begin
5
+ require 'rubigen'
6
+ rescue LoadError
7
+ require 'rubygems'
8
+ require 'rubigen'
9
+ end
10
+ require 'rubigen/scripts/generate'
11
+
12
+ ARGV.shift if ['--help', '-h'].include?(ARGV[0])
13
+ RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
14
+ RubiGen::Scripts::Generate.new.run(ARGV)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rugui
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vicente Mundim
@@ -11,7 +11,7 @@ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2009-04-23 00:00:00 -03:00
14
+ date: 2009-04-24 00:00:00 -03:00
15
15
  default_executable: rugui
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
@@ -48,10 +48,10 @@ extra_rdoc_files:
48
48
  - README
49
49
  - README.rdoc
50
50
  files:
51
+ - Changelog
51
52
  - LICENSE
52
- - README.rdoc
53
+ - README
53
54
  - Rakefile
54
- - VERSION.yml
55
55
  - bin/rugui
56
56
  - lib/rugui.rb
57
57
  - lib/rugui/base_controller.rb
@@ -75,6 +75,7 @@ files:
75
75
  - lib/rugui/property_observer.rb
76
76
  - lib/rugui/signal_support.rb
77
77
  - lib/rugui/tasks/gems_application.rake
78
+ - lib/rugui/tasks/release_framework.rake
78
79
  - lib/rugui/tasks/rugui.rb
79
80
  - lib/rugui/tasks/rugui_framework.rb
80
81
  - lib/rugui/tasks/runner_application.rake
@@ -83,6 +84,67 @@ files:
83
84
  - lib/rugui/tasks/test_application.rake
84
85
  - lib/rugui/vendor_gem_source_index.rb
85
86
  - lib/rugui/version.rb
87
+ - rugui_generators/controller/USAGE
88
+ - rugui_generators/controller/controller_generator.rb
89
+ - rugui_generators/controller/templates/controller.erb
90
+ - rugui_generators/generators_support.rb
91
+ - rugui_generators/model/USAGE
92
+ - rugui_generators/model/model_generator.rb
93
+ - rugui_generators/model/templates/model.erb
94
+ - rugui_generators/pack/USAGE
95
+ - rugui_generators/pack/pack_generator.rb
96
+ - rugui_generators/pack/templates/README
97
+ - rugui_generators/rugui/USAGE
98
+ - rugui_generators/rugui/rugui_generator.rb
99
+ - rugui_generators/rugui/templates/GTK/application_controller.rb
100
+ - rugui_generators/rugui/templates/GTK/application_view.rb
101
+ - rugui_generators/rugui/templates/GTK/application_view_helper.rb
102
+ - rugui_generators/rugui/templates/GTK/environment.rb
103
+ - rugui_generators/rugui/templates/GTK/main.rc
104
+ - rugui_generators/rugui/templates/GTK/main_controller.rb
105
+ - rugui_generators/rugui/templates/GTK/main_view.glade
106
+ - rugui_generators/rugui/templates/GTK/main_view.rb
107
+ - rugui_generators/rugui/templates/GTK/main_view_helper.rb
108
+ - rugui_generators/rugui/templates/Qt4/application_controller.rb
109
+ - rugui_generators/rugui/templates/Qt4/application_view.rb
110
+ - rugui_generators/rugui/templates/Qt4/application_view_helper.rb
111
+ - rugui_generators/rugui/templates/Qt4/environment.rb
112
+ - rugui_generators/rugui/templates/Qt4/main_controller.rb
113
+ - rugui_generators/rugui/templates/Qt4/main_view.rb
114
+ - rugui_generators/rugui/templates/Qt4/main_view.ui
115
+ - rugui_generators/rugui/templates/Qt4/main_view_helper.rb
116
+ - rugui_generators/rugui/templates/README
117
+ - rugui_generators/rugui/templates/Rakefile
118
+ - rugui_generators/rugui/templates/boot.rb
119
+ - rugui_generators/rugui/templates/development.rb.sample
120
+ - rugui_generators/rugui/templates/main.rb
121
+ - rugui_generators/rugui/templates/main_executable.bat.erb
122
+ - rugui_generators/rugui/templates/main_executable.erb
123
+ - rugui_generators/rugui/templates/production.rb.sample
124
+ - rugui_generators/rugui/templates/rcov.opts
125
+ - rugui_generators/rugui/templates/spec.opts
126
+ - rugui_generators/rugui/templates/spec_helper.rb
127
+ - rugui_generators/rugui/templates/test.rb.sample
128
+ - rugui_generators/rugui/templates/test_helper.rb
129
+ - rugui_generators/view/USAGE
130
+ - rugui_generators/view/templates/toplevels/about_dialog.glade
131
+ - rugui_generators/view/templates/toplevels/assistant.glade
132
+ - rugui_generators/view/templates/toplevels/color_selection_dialog.glade
133
+ - rugui_generators/view/templates/toplevels/dialog_box.glade
134
+ - rugui_generators/view/templates/toplevels/file_chooser_dialog.glade
135
+ - rugui_generators/view/templates/toplevels/font_selection_dialog.glade
136
+ - rugui_generators/view/templates/toplevels/input_dialog.glade
137
+ - rugui_generators/view/templates/toplevels/message_dialog.glade
138
+ - rugui_generators/view/templates/toplevels/recent_chooser_dialog.glade
139
+ - rugui_generators/view/templates/toplevels/window.glade
140
+ - rugui_generators/view/templates/view.erb
141
+ - rugui_generators/view/templates/view.glade
142
+ - rugui_generators/view/templates/view.ui
143
+ - rugui_generators/view/templates/view_helper.erb
144
+ - rugui_generators/view/view_generator.rb
145
+ - script/console
146
+ - script/destroy
147
+ - script/generate
86
148
  - spec/framework/base_controller_spec.rb
87
149
  - spec/framework/base_model_spec.rb
88
150
  - spec/framework/base_view_helper_spec.rb
@@ -102,7 +164,7 @@ files:
102
164
  - spec/resource_files/my_view.glade
103
165
  - spec/spec.opts
104
166
  - spec/spec_helper.rb
105
- - README
167
+ - README.rdoc
106
168
  has_rdoc: true
107
169
  homepage: http://rugui.org
108
170
  licenses: []
data/VERSION.yml DELETED
@@ -1,4 +0,0 @@
1
- ---
2
- :patch: 1
3
- :major: 1
4
- :minor: 2