ruber 0.0.5 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +25 -0
- data/bin/ruber +0 -0
- data/data/share/apps/ruber/ruberui.rc +15 -1
- data/data/share/icons/{ruber.png → ruber-old.pgn} +0 -0
- data/lib/ruber/application/application.rb +216 -73
- data/lib/ruber/application/plugin.yaml +2 -2
- data/lib/ruber/document_project.rb +25 -5
- data/lib/ruber/documents/document_list.rb +11 -15
- data/lib/ruber/editor/document.rb +106 -50
- data/lib/ruber/editor/editor_view.rb +4 -2
- data/lib/ruber/external_program_plugin.rb +8 -0
- data/lib/ruber/kde_config_option_backend.rb +12 -4
- data/lib/ruber/kde_sugar.rb +35 -1
- data/lib/ruber/main_window/choose_plugins_dlg.rb +10 -10
- data/lib/ruber/main_window/hint_solver.rb +263 -0
- data/lib/ruber/main_window/main_window.rb +462 -206
- data/lib/ruber/main_window/main_window_actions.rb +228 -62
- data/lib/ruber/main_window/main_window_internal.rb +169 -115
- data/lib/ruber/main_window/plugin.yaml +13 -3
- data/lib/ruber/main_window/save_modified_files_dlg.rb +1 -1
- data/lib/ruber/main_window/ui/choose_plugins_widget.rb +1 -1
- data/lib/ruber/main_window/ui/main_window_settings_widget.rb +1 -1
- data/lib/ruber/main_window/ui/new_project_widget.rb +1 -1
- data/lib/ruber/main_window/ui/open_file_in_project_dlg.rb +1 -1
- data/lib/ruber/main_window/ui/output_color_widget.rb +1 -1
- data/lib/ruber/main_window/ui/workspace_settings_widget.rb +51 -0
- data/lib/ruber/main_window/ui/workspace_settings_widget.ui +28 -0
- data/lib/ruber/main_window/view_manager.rb +418 -0
- data/lib/ruber/main_window/workspace.png +0 -0
- data/lib/ruber/output_widget.rb +43 -37
- data/lib/ruber/pane.rb +621 -0
- data/lib/ruber/plugin_specification_reader.rb +8 -1
- data/lib/ruber/projects/project_files_list.rb +6 -0
- data/lib/ruber/projects/ui/project_files_rule_chooser_widget.rb +1 -1
- data/lib/ruber/projects/ui/project_files_widget.rb +1 -1
- data/lib/ruber/qt_sugar.rb +94 -4
- data/lib/ruber/utils.rb +16 -7
- data/lib/ruber/version.rb +2 -2
- data/plugins/autosave/autosave.rb +62 -1
- data/plugins/autosave/plugin.yaml +1 -0
- data/plugins/autosave/ui/autosave_config_widget.rb +37 -14
- data/plugins/autosave/ui/autosave_config_widget.ui +62 -12
- data/plugins/find_in_files/find_in_files_widgets.rb +1 -3
- data/plugins/find_in_files/ui/config_widget.rb +1 -1
- data/plugins/find_in_files/ui/find_in_files_widget.rb +1 -1
- data/plugins/rake/plugin.yaml +1 -1
- data/plugins/rake/ui/add_quick_task_widget.rb +1 -1
- data/plugins/rake/ui/choose_task_widget.rb +1 -1
- data/plugins/rake/ui/config_widget.rb +1 -1
- data/plugins/rake/ui/project_widget.rb +1 -1
- data/plugins/rspec/rspec.rb +14 -22
- data/plugins/rspec/ruber_rspec_formatter.rb +4 -1
- data/plugins/rspec/ui/rspec_project_widget.rb +1 -1
- data/plugins/ruby_development/plugin.yaml +7 -2
- data/plugins/ruby_development/ruby_development.rb +134 -13
- data/plugins/ruby_development/ui/config_widget.rb +66 -0
- data/plugins/ruby_development/ui/config_widget.ui +58 -0
- data/plugins/ruby_development/ui/project_widget.rb +1 -1
- data/plugins/ruby_runner/plugin.yaml +2 -2
- data/plugins/ruby_runner/ruby_runner.rb +15 -3
- data/plugins/ruby_runner/ui/config_widget.rb +1 -1
- data/plugins/ruby_runner/ui/project_widget.rb +1 -1
- data/plugins/ruby_runner/ui/ruby_runnner_plugin_option_widget.rb +1 -1
- data/plugins/state/plugin.yaml +6 -2
- data/plugins/state/state.rb +305 -81
- data/plugins/state/ui/config_widget.rb +1 -1
- data/spec/common.rb +11 -3
- data/spec/document_list_spec.rb +8 -8
- data/spec/document_project_spec.rb +98 -25
- data/spec/document_spec.rb +178 -152
- data/spec/editor_view_spec.rb +26 -5
- data/spec/framework.rb +5 -0
- data/spec/hint_solver_spec.rb +450 -0
- data/spec/kde_sugar_spec.rb +73 -6
- data/spec/output_widget_spec.rb +172 -156
- data/spec/pane_spec.rb +1165 -0
- data/spec/plugin_specification_reader_spec.rb +37 -1
- data/spec/project_files_list_spec.rb +30 -20
- data/spec/qt_sugar_spec.rb +269 -0
- data/spec/state_spec.rb +566 -353
- data/spec/utils_spec.rb +1 -1
- data/spec/view_manager_spec.rb +71 -0
- metadata +16 -4
data/spec/utils_spec.rb
CHANGED
@@ -227,7 +227,7 @@ describe Ruber::Activable do
|
|
227
227
|
@obj.deactivate
|
228
228
|
@obj.should_not be_active
|
229
229
|
end
|
230
|
-
|
230
|
+
|
231
231
|
it 'should emit the "deactivated" signal when the deactivated method is called, unless it was already inactive' do
|
232
232
|
m1 = flexmock{|m| m.should_receive(:deactivated).once}
|
233
233
|
m2 = flexmock{|m| m.should_receive(:deactivated).never}
|
@@ -0,0 +1,71 @@
|
|
1
|
+
require './spec/common'
|
2
|
+
|
3
|
+
require 'forwardable'
|
4
|
+
|
5
|
+
require 'ruber/main_window/view_manager'
|
6
|
+
require 'ruber/editor/document'
|
7
|
+
|
8
|
+
describe Ruber::MainWindow::ViewManager do
|
9
|
+
|
10
|
+
class ViewManagerSpecComponentManager < Qt::Object
|
11
|
+
extend Forwardable
|
12
|
+
signals 'component_loaded(QObject*)', 'unloading_component(QObject*)'
|
13
|
+
def_delegators :@data, :[], :<<
|
14
|
+
def_delegator :@data, :each, :each_component
|
15
|
+
|
16
|
+
def initialize parent = nil
|
17
|
+
super
|
18
|
+
@data = []
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
|
23
|
+
before do
|
24
|
+
@main_window = Qt::Widget.new
|
25
|
+
flexmock(Ruber).should_receive(:[]).with(:main_window).and_return(@main_window).by_default
|
26
|
+
flexmock(Ruber).should_receive(:[]).with(:components).and_return(ViewManagerSpecComponentManager.new).by_default
|
27
|
+
@tabs = KDE::TabWidget.new
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'derives from Qt::Object' do
|
31
|
+
Ruber::MainWindow::ViewManager.ancestors.should include(Qt::Object)
|
32
|
+
end
|
33
|
+
|
34
|
+
context 'when created' do
|
35
|
+
|
36
|
+
|
37
|
+
it 'takes the tab widget and a toplevel parent widget as argument' do
|
38
|
+
manager = Ruber::MainWindow::ViewManager.new @tabs, @main_window
|
39
|
+
manager.parent.should == @main_window
|
40
|
+
end
|
41
|
+
|
42
|
+
it 'creates a part manager for its parent' do
|
43
|
+
manager = Ruber::MainWindow::ViewManager.new @tabs, @main_window
|
44
|
+
pm = manager.instance_variable_get(:@part_manager)
|
45
|
+
pm.should be_a(KParts::PartManager)
|
46
|
+
end
|
47
|
+
|
48
|
+
end
|
49
|
+
|
50
|
+
describe '#editor_for' do
|
51
|
+
|
52
|
+
before do
|
53
|
+
@manager = Ruber::MainWindow::ViewManager.new @tabs, @main_window
|
54
|
+
@doc = Ruber::Document.new
|
55
|
+
end
|
56
|
+
|
57
|
+
it 'uses a HintSolver to find out the editor to return' do
|
58
|
+
hs = @manager.instance_variable_get(:@solver)
|
59
|
+
views = 2.times.map{@doc.create_view}
|
60
|
+
hints = {:existing => :always, :strategy => :last_used}
|
61
|
+
flexmock(hs).should_receive(:find_editor).once.with(@doc, hints).and_return views[1]
|
62
|
+
@manager.editor_for(@doc, hints).should == views[1]
|
63
|
+
end
|
64
|
+
|
65
|
+
it 'returns nil if the hint solver can\'t find an editor and the :create_if_needed hint is false' do
|
66
|
+
@manager.editor_for(@doc, {:create_if_needed => false}).should be_nil
|
67
|
+
end
|
68
|
+
|
69
|
+
end
|
70
|
+
|
71
|
+
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 7
|
9
|
+
version: 0.0.7
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Stefano Crocco
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date:
|
17
|
+
date: 2011-01-12 00:00:00 +01:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -89,6 +89,8 @@ files:
|
|
89
89
|
- lib/ruber/main_window/ui/choose_plugins_widget.ui
|
90
90
|
- lib/ruber/main_window/ui/open_file_in_project_dlg.rb
|
91
91
|
- lib/ruber/main_window/ui/open_file_in_project_dlg.ui
|
92
|
+
- lib/ruber/main_window/ui/workspace_settings_widget.rb
|
93
|
+
- lib/ruber/main_window/ui/workspace_settings_widget.ui
|
92
94
|
- lib/ruber/main_window/ui/main_window_settings_widget.rb
|
93
95
|
- lib/ruber/main_window/ui/main_window_settings_widget.ui
|
94
96
|
- lib/ruber/main_window/main_window_internal.rb
|
@@ -99,6 +101,9 @@ files:
|
|
99
101
|
- lib/ruber/main_window/main_window_actions.rb
|
100
102
|
- lib/ruber/main_window/output_color_widget.rb
|
101
103
|
- lib/ruber/main_window/save_modified_files_dlg.rb
|
104
|
+
- lib/ruber/main_window/hint_solver.rb
|
105
|
+
- lib/ruber/main_window/workspace.png
|
106
|
+
- lib/ruber/main_window/view_manager.rb
|
102
107
|
- lib/ruber/main_window/open_file_in_project_dlg.rb
|
103
108
|
- lib/ruber/main_window/choose_plugins_dlg.rb
|
104
109
|
- lib/ruber/application/plugin.yaml
|
@@ -126,6 +131,7 @@ files:
|
|
126
131
|
- lib/ruber/external_program_plugin.rb
|
127
132
|
- lib/ruber/kde_sugar.rb
|
128
133
|
- lib/ruber/filtered_output_widget.rb
|
134
|
+
- lib/ruber/pane.rb
|
129
135
|
- lib/ruber/projects/ui/project_files_widget.rb
|
130
136
|
- lib/ruber/projects/ui/project_files_widget.ui
|
131
137
|
- lib/ruber/projects/ui/project_files_rule_chooser_widget.rb
|
@@ -198,6 +204,8 @@ files:
|
|
198
204
|
- plugins/syntax_checker/syntax_checker.rb
|
199
205
|
- plugins/ruby_development/ui/project_widget.rb
|
200
206
|
- plugins/ruby_development/ui/project_widget.ui
|
207
|
+
- plugins/ruby_development/ui/config_widget.rb
|
208
|
+
- plugins/ruby_development/ui/config_widget.ui
|
201
209
|
- plugins/ruby_development/plugin.yaml
|
202
210
|
- plugins/ruby_development/ruby_development.png
|
203
211
|
- plugins/ruby_development/ruby_development.rb
|
@@ -212,7 +220,9 @@ files:
|
|
212
220
|
- spec/utils_spec.rb
|
213
221
|
- spec/document_spec.rb
|
214
222
|
- spec/workspace_spec.rb
|
223
|
+
- spec/framework.rb
|
215
224
|
- spec/ktexteditor_wrapper_spec.rb
|
225
|
+
- spec/hint_solver_spec.rb
|
216
226
|
- spec/kde_config_option_backend_spec.rb
|
217
227
|
- spec/filtered_output_widget_spec.rb
|
218
228
|
- spec/settings_container_spec.rb
|
@@ -225,15 +235,17 @@ files:
|
|
225
235
|
- spec/kde_sugar_spec.rb
|
226
236
|
- spec/settings_dialog_spec.rb
|
227
237
|
- spec/output_widget_spec.rb
|
238
|
+
- spec/view_manager_spec.rb
|
228
239
|
- spec/state_spec.rb
|
229
240
|
- spec/plugin_specification_reader_spec.rb
|
230
241
|
- spec/plugin_specification_spec.rb
|
231
242
|
- spec/yaml_option_backend_spec.rb
|
243
|
+
- spec/pane_spec.rb
|
232
244
|
- spec/gui_states_handler_spec.rb
|
233
245
|
- spec/project_spec.rb
|
234
246
|
- data/share/apps/ruber/core_components.yaml
|
235
247
|
- data/share/apps/ruber/ruberui.rc
|
236
|
-
- data/share/icons/ruber.
|
248
|
+
- data/share/icons/ruber-old.pgn
|
237
249
|
- data/share/pixmaps/ruby.png
|
238
250
|
- ruber.desktop
|
239
251
|
- outsider_files
|