RDI 0.1.0.20091020

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. data/AUTHORS +3 -0
  2. data/ChangeLog +46 -0
  3. data/Credits +21 -0
  4. data/LICENSE +31 -0
  5. data/README +18 -0
  6. data/TODO +17 -0
  7. data/lib/rdi/Installer.rb +678 -0
  8. data/lib/rdi/Model/ContextModifier.rb +20 -0
  9. data/lib/rdi/Model/DependencyDescription.rb +154 -0
  10. data/lib/rdi/Model/DependencyUserChoice.rb +202 -0
  11. data/lib/rdi/Model/Installer.rb +24 -0
  12. data/lib/rdi/Model/LocationSelector.rb +16 -0
  13. data/lib/rdi/Model/ProgressView.rb +16 -0
  14. data/lib/rdi/Model/Tester.rb +20 -0
  15. data/lib/rdi/Model/View.rb +16 -0
  16. data/lib/rdi/Plugins/ContextModifiers/GemPath.desc.rb +13 -0
  17. data/lib/rdi/Plugins/ContextModifiers/GemPath.rb +106 -0
  18. data/lib/rdi/Plugins/ContextModifiers/LibraryPath.rb +74 -0
  19. data/lib/rdi/Plugins/ContextModifiers/RubyLoadPath.rb +76 -0
  20. data/lib/rdi/Plugins/ContextModifiers/SystemPath.rb +74 -0
  21. data/lib/rdi/Plugins/GemCommon.rb +127 -0
  22. data/lib/rdi/Plugins/Installers/Download.rb +72 -0
  23. data/lib/rdi/Plugins/Installers/DownloadAndInstall.desc.rb +11 -0
  24. data/lib/rdi/Plugins/Installers/DownloadAndInstall.rb +54 -0
  25. data/lib/rdi/Plugins/Installers/Gem.desc.rb +13 -0
  26. data/lib/rdi/Plugins/Installers/Gem.rb +67 -0
  27. data/lib/rdi/Plugins/Installers/Icons/Download.png +0 -0
  28. data/lib/rdi/Plugins/Installers/Icons/DownloadAndInstall.png +0 -0
  29. data/lib/rdi/Plugins/Installers/Icons/Gem.png +0 -0
  30. data/lib/rdi/Plugins/Installers/Yum.rb +52 -0
  31. data/lib/rdi/Plugins/ProgressViews/SimpleWxGUI.desc.rb +13 -0
  32. data/lib/rdi/Plugins/ProgressViews/SimpleWxGUI.rb +58 -0
  33. data/lib/rdi/Plugins/ProgressViews/Text.rb +68 -0
  34. data/lib/rdi/Plugins/RubyGemsDepDesc.rb +41 -0
  35. data/lib/rdi/Plugins/Testers/Binaries.rb +56 -0
  36. data/lib/rdi/Plugins/Testers/DynamicLibraries.rb +56 -0
  37. data/lib/rdi/Plugins/Testers/RubyRequires.rb +76 -0
  38. data/lib/rdi/Plugins/Views/SimpleWxGUI/DependenciesLoaderDialog.rb +147 -0
  39. data/lib/rdi/Plugins/Views/SimpleWxGUI/DependencyPanel.rb +301 -0
  40. data/lib/rdi/Plugins/Views/SimpleWxGUI/Icons/Dependency.png +0 -0
  41. data/lib/rdi/Plugins/Views/SimpleWxGUI/Icons/Ignore.png +0 -0
  42. data/lib/rdi/Plugins/Views/SimpleWxGUI/Icons/ValidKO.png +0 -0
  43. data/lib/rdi/Plugins/Views/SimpleWxGUI/Icons/ValidOK.png +0 -0
  44. data/lib/rdi/Plugins/Views/SimpleWxGUI/LocationSelectors/Directory.desc.rb +13 -0
  45. data/lib/rdi/Plugins/Views/SimpleWxGUI/LocationSelectors/Directory.rb +45 -0
  46. data/lib/rdi/Plugins/Views/SimpleWxGUI.desc.rb +13 -0
  47. data/lib/rdi/Plugins/Views/SimpleWxGUI.rb +60 -0
  48. data/lib/rdi/Plugins/Views/Text/LocationSelectors/Directory.rb +44 -0
  49. data/lib/rdi/Plugins/Views/Text.rb +257 -0
  50. data/lib/rdi/Plugins/WxCommon.rb +69 -0
  51. data/lib/rdi/Plugins/WxRubyDepDesc.rb +36 -0
  52. data/lib/rdi/rdi.rb +8 -0
  53. data/test/Common.rb +796 -0
  54. data/test/Flows/BasicFlows.rb +114 -0
  55. data/test/Flows/UIFlows.rb +460 -0
  56. data/test/Plugins/ContextModifiers/GemPath.rb +44 -0
  57. data/test/Plugins/ContextModifiers/LibraryPath.rb +36 -0
  58. data/test/Plugins/ContextModifiers/RubyLoadPath.rb +36 -0
  59. data/test/Plugins/ContextModifiers/SystemPath.rb +36 -0
  60. data/test/Plugins/Installers/Download.rb +65 -0
  61. data/test/Plugins/Installers/DownloadAndInstall.rb +73 -0
  62. data/test/Plugins/Installers/Gem.rb +79 -0
  63. data/test/Plugins/LocationSelectors/Directory.rb +34 -0
  64. data/test/Plugins/Testers/Binaries.rb +46 -0
  65. data/test/Plugins/Testers/DynamicLibraries.rb +46 -0
  66. data/test/Plugins/Testers/RubyRequires.rb +48 -0
  67. data/test/Plugins/Views/SimpleWxGUI.rb +190 -0
  68. data/test/Plugins/Views/Text.rb +112 -0
  69. data/test/Plugins/WxEnv.rb +58 -0
  70. data/test/Plugins/WxEnvApp.rb +53 -0
  71. data/test/Repository/Binaries/DummyBinary +1 -0
  72. data/test/Repository/Libraries/DummyLibrary.so +1 -0
  73. data/test/Repository/RubyGems/DummyGem-0.0.1.20090828.gem +0 -0
  74. data/test/Repository/RubyGems/GemsSources/DummyGem/DummyGem.gemspec.rb +23 -0
  75. data/test/Repository/RubyGems/GemsSources/DummyGem/lib/DummyGemMain.rb +5 -0
  76. data/test/Repository/RubyLibraries/DummyRubyLib.rb +1 -0
  77. data/test/run.rb +23 -0
  78. metadata +145 -0
@@ -0,0 +1,13 @@
1
+ #--
2
+ # Copyright (c) 2009 Muriel Salvan (murielsalvan@users.sourceforge.net)
3
+ # Licensed under the terms specified in LICENSE file. No warranty is provided.
4
+ #++
5
+
6
+ require 'rdi/Plugins/WxRubyDepDesc'
7
+
8
+ {
9
+ :Dependencies => [
10
+ # WxRuby
11
+ ::RDI::getWxRubyDepDesc
12
+ ]
13
+ }
@@ -0,0 +1,45 @@
1
+ #--
2
+ # Copyright (c) 2009 Muriel Salvan (murielsalvan@users.sourceforge.net)
3
+ # Licensed under the terms specified in LICENSE file. No warranty is provided.
4
+ #++
5
+
6
+ require 'rdi/Model/LocationSelector'
7
+
8
+ module RDI
9
+
10
+ module Views
11
+
12
+ module LocationSelectors
13
+
14
+ module SimpleWxGUI
15
+
16
+ class Directory < RDI::Model::LocationSelector
17
+
18
+ # Give user the choice of a new location
19
+ #
20
+ # Return:
21
+ # * _Object_: A location, or nil if none selected
22
+ def getNewLocation
23
+ rLocation = nil
24
+
25
+ require 'rdi/Plugins/WxCommon'
26
+ RDI::Views::RDIWx.ensureWxApp do
27
+ showModal(Wx::DirDialog, nil) do |iModalResult, iDialog|
28
+ if (iModalResult == Wx::ID_OK)
29
+ rLocation = iDialog.path
30
+ end
31
+ end
32
+ end
33
+
34
+ return rLocation
35
+ end
36
+
37
+ end
38
+
39
+ end
40
+
41
+ end
42
+
43
+ end
44
+
45
+ end
@@ -0,0 +1,13 @@
1
+ #--
2
+ # Copyright (c) 2009 Muriel Salvan (murielsalvan@users.sourceforge.net)
3
+ # Licensed under the terms specified in LICENSE file. No warranty is provided.
4
+ #++
5
+
6
+ require 'rdi/Plugins/WxRubyDepDesc'
7
+
8
+ {
9
+ :Dependencies => [
10
+ # WxRuby
11
+ ::RDI::getWxRubyDepDesc
12
+ ]
13
+ }
@@ -0,0 +1,60 @@
1
+ #--
2
+ # Copyright (c) 2009 Muriel Salvan (murielsalvan@users.sourceforge.net)
3
+ # Licensed under the terms specified in LICENSE file. No warranty is provided.
4
+ #++
5
+
6
+ require 'rdi/Model/View'
7
+
8
+ module RDI
9
+
10
+ module Views
11
+
12
+ class SimpleWxGUI < RDI::Model::View
13
+
14
+ # Ask the user about missing dependencies.
15
+ # This method will use a user interface to know what to do with missing dependencies.
16
+ # For each dependency, choices are:
17
+ # * Install it
18
+ # * Ignore it
19
+ # * Change the context to find it (select directory...)
20
+ #
21
+ # Parameters:
22
+ # * *ioInstaller* (_Installer_): The RDI installer
23
+ # * *iMissingDependencies* (<em>list<DependencyDescription></em>): The missing dependencies list
24
+ # Return:
25
+ # * <em>list<DependencyUserChoice></em>: The corresponding user choices
26
+ def execute(ioInstaller, iMissingDependencies)
27
+ # List of corresponding dependencies user choices
28
+ # list< DependencyUserChoice >
29
+ rDependenciesUserChoices = []
30
+
31
+ # Initialize the list
32
+ iMissingDependencies.each do |iDepDesc|
33
+ rDependenciesUserChoices << RDI::Model::DependencyUserChoice.new(ioInstaller, 'SimpleWxGUI', iDepDesc)
34
+ end
35
+ # Display the dialog
36
+ require 'rdi/Plugins/Views/SimpleWxGUI/DependenciesLoaderDialog'
37
+ if (defined?(showModal) == nil)
38
+ require 'RUtilAnts/GUI'
39
+ RUtilAnts::GUI.initializeGUI
40
+ end
41
+ if (defined?($rUtilAnts_URLCache) == nil)
42
+ require 'RUtilAnts/URLCache'
43
+ RUtilAnts::URLCache.initializeURLCache
44
+ end
45
+ # If an application is already running, use it
46
+ require 'rdi/Plugins/WxCommon'
47
+ RDI::Views::RDIWx.ensureWxApp do
48
+ showModal(DependenciesLoaderDialog, nil, ioInstaller, rDependenciesUserChoices) do |iModalResult, iDialog|
49
+ # Nothing to do
50
+ end
51
+ end
52
+
53
+ return rDependenciesUserChoices
54
+ end
55
+
56
+ end
57
+
58
+ end
59
+
60
+ end
@@ -0,0 +1,44 @@
1
+ #--
2
+ # Copyright (c) 2009 Muriel Salvan (murielsalvan@users.sourceforge.net)
3
+ # Licensed under the terms specified in LICENSE file. No warranty is provided.
4
+ #++
5
+
6
+ require 'rdi/Model/LocationSelector'
7
+
8
+ module RDI
9
+
10
+ module Views
11
+
12
+ module LocationSelectors
13
+
14
+ module Text
15
+
16
+ class Directory < RDI::Model::LocationSelector
17
+
18
+ # Give user the choice of a new location
19
+ #
20
+ # Return:
21
+ # * _Object_: A location, or nil if none selected
22
+ def getNewLocation
23
+ rLocation = nil
24
+
25
+ puts 'Please enter a directory name (Ctrl-C to cancel):'
26
+ $stdout.write('-Directory-> ')
27
+ begin
28
+ rLocation = $stdin.gets.chomp
29
+ rescue Exception
30
+ rLocation = nil
31
+ end
32
+
33
+ return rLocation
34
+ end
35
+
36
+ end
37
+
38
+ end
39
+
40
+ end
41
+
42
+ end
43
+
44
+ end
@@ -0,0 +1,257 @@
1
+ #--
2
+ # Copyright (c) 2009 Muriel Salvan (murielsalvan@users.sourceforge.net)
3
+ # Licensed under the terms specified in LICENSE file. No warranty is provided.
4
+ #++
5
+
6
+ require 'rdi/Model/View'
7
+
8
+ module RDI
9
+
10
+ module Views
11
+
12
+ class Text < RDI::Model::View
13
+
14
+ # Ask the user about missing dependencies.
15
+ # This method will use a user interface to know what to do with missing dependencies.
16
+ # For each dependency, choices are:
17
+ # * Install it
18
+ # * Ignore it
19
+ # * Change the context to find it (select directory...)
20
+ #
21
+ # Parameters:
22
+ # * *ioInstaller* (_Installer_): The RDI installer
23
+ # * *iMissingDependencies* (<em>list<DependencyDescription></em>): The missing dependencies list
24
+ # Return:
25
+ # * <em>list<DependencyUserChoice></em>: The corresponding user choices
26
+ def execute(ioInstaller, iMissingDependencies)
27
+ # List of corresponding dependencies user choices
28
+ # list< DependencyUserChoice >
29
+ rDependenciesUserChoices = []
30
+
31
+ # Fill it from the beginning
32
+ iMissingDependencies.each do |iDepDesc|
33
+ rDependenciesUserChoices << RDI::Model::DependencyUserChoice.new(ioInstaller, 'Text', iDepDesc)
34
+ end
35
+ # Start looping unless user validates its choices
36
+ lExit = false
37
+ while (!lExit)
38
+ display(ioInstaller, iMissingDependencies, rDependenciesUserChoices)
39
+ # Wait for input
40
+ $stdout.write('Please enter choice number -> ')
41
+ lUserChoiceText = $stdin.gets
42
+ # Parse user choice
43
+ lInvalid = false
44
+ # Check that we have an array of integers not 0
45
+ lUserChoice = lUserChoiceText.chomp('.').chomp.split('.').map do |iElem|
46
+ lInt = iElem.to_i
47
+ if (lInt == 0)
48
+ lInvalid = true
49
+ end
50
+ next lInt
51
+ end
52
+ if (!lInvalid)
53
+ # Check that each value does not exceed maximal value
54
+ if ((lUserChoice.empty?) or
55
+ (lUserChoice[0] > iMissingDependencies.size + 1))
56
+ lInvalid = true
57
+ elsif (lUserChoice[0] == iMissingDependencies.size + 1)
58
+ if (lUserChoice.size == 1)
59
+ # We want to apply those choices
60
+ lExit = true
61
+ else
62
+ lInvalid = true
63
+ end
64
+ else
65
+ # A given dependency has been selected
66
+ lDepDesc = iMissingDependencies[lUserChoice[0]-1]
67
+ lDepUserChoice = rDependenciesUserChoices[lUserChoice[0]-1]
68
+ case lUserChoice[1]
69
+ when 1
70
+ # Ask to modify the context somewhere
71
+ if (lUserChoice.size == 2)
72
+ # Just select that we locate it
73
+ lDepUserChoice.setLocate
74
+ else
75
+ # We try to use a given ContextModifier
76
+ if (lUserChoice.size == 3)
77
+ if (lUserChoice[2] > lDepUserChoice.AffectingContextModifiers.size)
78
+ lInvalid = true
79
+ else
80
+ # Select a new location for the given context modifier
81
+ lDepUserChoice.affectContextModifier(lDepUserChoice.AffectingContextModifiers[lUserChoice[2]-1])
82
+ end
83
+ else
84
+ lInvalid = true
85
+ end
86
+ end
87
+ when 2
88
+ # Ask to ignore the dependency
89
+ if (lUserChoice.size == 2)
90
+ lDepUserChoice.setIgnore
91
+ else
92
+ lInvalid = true
93
+ end
94
+ when 3
95
+ # Ask to install the dependency
96
+ if (lUserChoice.size == 4)
97
+ if (lUserChoice[2] > lDepDesc.Installers.size)
98
+ lInvalid = true
99
+ else
100
+ lInstallerName, lInstallerContent, lContextModifiers = lDepDesc.Installers[lUserChoice[2]-1]
101
+ # Access the possible destinations
102
+ ioInstaller.accessPlugin('Installers', lInstallerName) do |ioPlugin|
103
+ if (lUserChoice[3] > ioPlugin.PossibleDestinations.size)
104
+ lInvalid = true
105
+ else
106
+ lDepUserChoice.setInstaller(lUserChoice[2]-1, lUserChoice[3]-1)
107
+ # Check if it is a DEST_OTHER flavour
108
+ if (ioPlugin.PossibleDestinations[lUserChoice[3]-1][0] == DEST_OTHER)
109
+ # Replace the other location of this dependency
110
+ if (!lDepUserChoice.selectOtherInstallLocation(ioPlugin.PossibleDestinations[lUserChoice[3]-1][1]))
111
+ lDepUserChoice.setInstaller(lUserChoice[2]-1, 0)
112
+ end
113
+ end
114
+ end
115
+ end
116
+ end
117
+ else
118
+ lInvalid = true
119
+ end
120
+ else
121
+ lInvalid = true
122
+ end
123
+ end
124
+ end
125
+ # Now either store the last selection
126
+ if (lInvalid)
127
+ puts "Invalid selection. Please type the selection correctly (i.e. 1.3.2)"
128
+ end
129
+ end
130
+
131
+ return rDependenciesUserChoices
132
+ end
133
+
134
+ private
135
+
136
+ # Display the current state
137
+ #
138
+ # Parameters:
139
+ # * *ioInstaller* (_Installer_): The RDI installer
140
+ # * *iMissingDependencies* (<em>list<DependencyDescription></em>): The missing dependencies list
141
+ # * *iDepsUserChoices* (<em>list<DependencyUserChoice></em>): The corresponding user choices
142
+ def display(ioInstaller, iMissingDependencies, iDepsUserChoices)
143
+ lIdxMissingDeps = 1
144
+ iMissingDependencies.each do |iDepDesc|
145
+ lDepID = iDepDesc.ID
146
+ # Get the dependency info
147
+ lDepUserChoice = iDepsUserChoices[lIdxMissingDeps-1]
148
+ # Check the state of this dependency
149
+ lStateText = ''
150
+ lLocateChoice = ' '
151
+ lIgnoreChoice = ' '
152
+ lInstallChoice = ' '
153
+ if (lDepUserChoice.Locate)
154
+ # To be located
155
+ lLocateChoice = '*'
156
+ # Check if the Testers are all resolved
157
+ if (lDepUserChoice.ResolvedTesters.size == iDepDesc.Testers.size)
158
+ lStateText = 'Found'
159
+ else
160
+ lStateText = 'Locate incomplete'
161
+ end
162
+ elsif (lDepUserChoice.Ignore)
163
+ # To be ignored
164
+ lIgnoreChoice = '*'
165
+ lStateText = 'Ignore'
166
+ else
167
+ # To be installed
168
+ lInstallChoice = '*'
169
+ lStateText = 'Install'
170
+ end
171
+ # Display title
172
+ puts "#{lIdxMissingDeps}. [ #{lStateText} ] #{lDepID}"
173
+ puts ''
174
+ # Display the "Locate it" choice
175
+ puts " #{lIdxMissingDeps}.1. (#{lLocateChoice}) Locate it"
176
+ lIdxTester = 0
177
+ iDepDesc.Testers.each do |iTesterInfo|
178
+ iTesterName, iTesterContent = iTesterInfo
179
+ # Check the state of this tester
180
+ lTesterText = nil
181
+ if (lDepUserChoice.ResolvedTesters.has_key?(lIdxTester))
182
+ lTesterText = 'Found'
183
+ else
184
+ lTesterText = 'Missing'
185
+ end
186
+ puts " [ #{lTesterText} ] #{iTesterName} - #{iTesterContent}"
187
+ lIdxTester += 1
188
+ end
189
+ # Display the choices for location
190
+ lIdxACM = 1
191
+ lDepUserChoice.AffectingContextModifiers.each do |iCMName|
192
+ puts " #{lIdxMissingDeps}.1.#{lIdxACM}. Add location to #{iCMName}"
193
+ lIdxACM += 1
194
+ end
195
+ puts ''
196
+ # Display the "Ignore it" choice
197
+ puts " #{lIdxMissingDeps}.2. (#{lIgnoreChoice}) Ignore it"
198
+ puts ''
199
+ # Display the "Install it" choice
200
+ puts " #{lIdxMissingDeps}.3. (#{lInstallChoice}) Install it"
201
+ lIdxInstaller = 1
202
+ iDepDesc.Installers.each do |iInstallerInfo|
203
+ iInstallerName, iInstallerContent, iContextModifiers = iInstallerInfo
204
+ lInstallSelectionText = ' '
205
+ if (lDepUserChoice.IdxInstaller == lIdxInstaller-1)
206
+ lInstallSelectionText = '*'
207
+ end
208
+ puts " #{lIdxMissingDeps}.3.#{lIdxInstaller}. (#{lInstallSelectionText}) #{iInstallerName} - #{iInstallerContent}"
209
+ puts ' Install in:'
210
+ ioInstaller.accessPlugin('Installers', iInstallerName) do |iPlugin|
211
+ lIdxDest = 1
212
+ iPlugin.PossibleDestinations.each do |iDestInfo|
213
+ iDestFlavour, iDestLocation = iDestInfo
214
+ lFlavourText = nil
215
+ lDestLocation = iDestLocation
216
+ case iDestFlavour
217
+ when DEST_LOCAL
218
+ lFlavourText = 'Local'
219
+ when DEST_SYSTEM
220
+ lFlavourText = 'System'
221
+ when DEST_USER
222
+ lFlavourText = 'User'
223
+ when DEST_TEMP
224
+ lFlavourText = 'Temporary'
225
+ when DEST_OTHER
226
+ lFlavourText = 'Other'
227
+ if (lDepUserChoice.IdxInstaller == lIdxInstaller-1)
228
+ lDestLocation = lDepUserChoice.OtherLocation
229
+ else
230
+ lDestLocation = 'Choose'
231
+ end
232
+ else
233
+ logBug "Unknown flavour ID: #{iDestFlavour}"
234
+ lFlavourText = 'Unknown'
235
+ end
236
+ lInstallLocationSelectionText = ' '
237
+ if (lDepUserChoice.IdxDestination == lIdxDest-1)
238
+ lInstallLocationSelectionText = '*'
239
+ end
240
+ puts " #{lIdxMissingDeps}.3.#{lIdxInstaller}.#{lIdxDest}. (#{lInstallLocationSelectionText}) #{lFlavourText} - #{lDestLocation}"
241
+ lIdxDest += 1
242
+ end
243
+ end
244
+ lIdxInstaller += 1
245
+ end
246
+ puts ''
247
+ lIdxMissingDeps += 1
248
+ end
249
+ # Display the apply choice
250
+ puts "#{lIdxMissingDeps}. Apply."
251
+ end
252
+
253
+ end
254
+
255
+ end
256
+
257
+ end
@@ -0,0 +1,69 @@
1
+ #--
2
+ # Copyright (c) 2009 Muriel Salvan (murielsalvan@users.sourceforge.net)
3
+ # Licensed under the terms specified in LICENSE file. No warranty is provided.
4
+ #++
5
+
6
+ require 'wx'
7
+
8
+ module RDI
9
+
10
+ module Views
11
+
12
+ module RDIWx
13
+
14
+ # Dummy Class that executes code in a Wx application context
15
+ # This is used only if there is no already an existing application
16
+ class DummyApp < Wx::App
17
+
18
+ # Constructor
19
+ #
20
+ # Parameters:
21
+ # * *iCodeBlock* (_Proc_): The code to call
22
+ def initialize(iCodeBlock)
23
+ super()
24
+ @CodeBlock = iCodeBlock
25
+ end
26
+
27
+ # Initialize the application
28
+ def on_init
29
+ @CodeBlock.call
30
+ return false
31
+ end
32
+
33
+ end
34
+
35
+ # Get the main Ex application, or nil if none
36
+ #
37
+ # Return:
38
+ # * <em>Wx::App</em>: The application
39
+ def self.getWxMainApp
40
+ rApp = nil
41
+
42
+ begin
43
+ rApp = Wx.get_app
44
+ rescue Exception
45
+ rApp = nil
46
+ end
47
+
48
+ return rApp
49
+ end
50
+
51
+ # Ensure that some given code is run in a Wx::App context
52
+ #
53
+ # Parameters:
54
+ # * _CodeBlock_: To execute in the Wx::App context
55
+ def self.ensureWxApp(&iCodeBlock)
56
+ if (self.getWxMainApp != nil)
57
+ # We are already running
58
+ iCodeBlock.call
59
+ else
60
+ # Call the dummy application
61
+ DummyApp.new(iCodeBlock).main_loop
62
+ end
63
+ end
64
+
65
+ end
66
+
67
+ end
68
+
69
+ end
@@ -0,0 +1,36 @@
1
+ #--
2
+ # Copyright (c) 2009 Muriel Salvan (murielsalvan@users.sourceforge.net)
3
+ # Licensed under the terms specified in LICENSE file. No warranty is provided.
4
+ #++
5
+
6
+ module RDI
7
+
8
+ # Give the description of the RubyGems dependency
9
+ # It has been put in this singular file because it is required by many different plugins
10
+ #
11
+ # Return:
12
+ # * <em>map<Symbol,Object></em>: The description
13
+ def self.getWxRubyDepDesc
14
+ return RDI::Model::DependencyDescription.new('WxRuby 2.0.0').addDescription( {
15
+ :Testers => [
16
+ {
17
+ :Type => 'RubyRequires',
18
+ :Content => [ 'wx' ]
19
+ }
20
+ ],
21
+ :Installers => [
22
+ {
23
+ :Type => 'Gem',
24
+ :Content => 'wxruby',
25
+ :ContextModifiers => [
26
+ {
27
+ :Type => 'GemPath',
28
+ :Content => '%INSTALLDIR%'
29
+ }
30
+ ]
31
+ }
32
+ ]
33
+ } )
34
+ end
35
+
36
+ end
data/lib/rdi/rdi.rb ADDED
@@ -0,0 +1,8 @@
1
+ #--
2
+ # Copyright (c) 2009 Muriel Salvan (murielsalvan@users.sourceforge.net)
3
+ # Licensed under the terms specified in LICENSE file. No warranty is provided.
4
+ #++
5
+
6
+ require 'rdi/Model/DependencyDescription'
7
+ require 'rdi/Model/DependencyUserChoice'
8
+ require 'rdi/Installer'