server_launcher 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.idea/.rakeTasks +1 -1
- data/.idea/workspace.xml +130 -82
- data/lib/server_launcher/server.rb +10 -3
- data/lib/server_launcher/version.rb +1 -1
- data/spec/server_spec.rb +30 -0
- metadata +3 -1
data/.idea/.rakeTasks
CHANGED
@@ -4,4 +4,4 @@ You are allowed to:
|
|
4
4
|
1. Remove rake task
|
5
5
|
2. Add existing rake tasks
|
6
6
|
To add existing rake tasks automatically delete this file and reload the project.
|
7
|
-
--><RakeGroup description="" fullCmd="" taksId="rake"
|
7
|
+
--><RakeGroup description="" fullCmd="" taksId="rake" /></Settings>
|
data/.idea/workspace.xml
CHANGED
@@ -1,9 +1,7 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
2
|
<project version="4">
|
3
3
|
<component name="ChangeListManager">
|
4
|
-
<list default="true" id="fda091fd-b6d0-49a2-b237-a27eaae35c88" name="Default" comment=""
|
5
|
-
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/server_launcher.iml" afterPath="$PROJECT_DIR$/.idea/server_launcher.iml" />
|
6
|
-
</list>
|
4
|
+
<list default="true" id="fda091fd-b6d0-49a2-b237-a27eaae35c88" name="Default" comment="" />
|
7
5
|
<ignored path="server_launcher.iws" />
|
8
6
|
<ignored path=".idea/workspace.xml" />
|
9
7
|
<option name="TRACKING_ENABLED" value="true" />
|
@@ -36,16 +34,34 @@
|
|
36
34
|
<file leaf-file-name="tomcat_server_spec.rb" pinned="false" current="false" current-in-tab="false">
|
37
35
|
<entry file="file://$PROJECT_DIR$/spec/tomcat_server_spec.rb">
|
38
36
|
<provider selected="true" editor-type-id="text-editor">
|
39
|
-
<state line="
|
37
|
+
<state line="11" column="20" selection-start="0" selection-end="1058" vertical-scroll-proportion="0.0">
|
38
|
+
<folding />
|
39
|
+
</state>
|
40
|
+
</provider>
|
41
|
+
</entry>
|
42
|
+
</file>
|
43
|
+
<file leaf-file-name="server.rb" pinned="false" current="true" current-in-tab="true">
|
44
|
+
<entry file="file://$PROJECT_DIR$/lib/server_launcher/server.rb">
|
45
|
+
<provider selected="true" editor-type-id="text-editor">
|
46
|
+
<state line="2" column="0" selection-start="39" selection-end="39" vertical-scroll-proportion="0.051863857">
|
40
47
|
<folding />
|
41
48
|
</state>
|
42
49
|
</provider>
|
43
50
|
</entry>
|
44
51
|
</file>
|
45
|
-
<file leaf-file-name="
|
52
|
+
<file leaf-file-name="server_spec.rb" pinned="false" current="false" current-in-tab="false">
|
53
|
+
<entry file="file://$PROJECT_DIR$/spec/server_spec.rb">
|
54
|
+
<provider selected="true" editor-type-id="text-editor">
|
55
|
+
<state line="1" column="0" selection-start="66" selection-end="66" vertical-scroll-proportion="0.0">
|
56
|
+
<folding />
|
57
|
+
</state>
|
58
|
+
</provider>
|
59
|
+
</entry>
|
60
|
+
</file>
|
61
|
+
<file leaf-file-name="jboss_server_spec.rb" pinned="false" current="false" current-in-tab="false">
|
46
62
|
<entry file="file://$PROJECT_DIR$/spec/jboss_server_spec.rb">
|
47
63
|
<provider selected="true" editor-type-id="text-editor">
|
48
|
-
<state line="3" column="21" selection-start="106" selection-end="106" vertical-scroll-proportion="0.
|
64
|
+
<state line="3" column="21" selection-start="106" selection-end="106" vertical-scroll-proportion="0.0">
|
49
65
|
<folding />
|
50
66
|
</state>
|
51
67
|
</provider>
|
@@ -77,6 +93,8 @@
|
|
77
93
|
<option value="$PROJECT_DIR$/lib/server_launcher/version.rb" />
|
78
94
|
<option value="$PROJECT_DIR$/Rakefile" />
|
79
95
|
<option value="$PROJECT_DIR$/server_launcher.gemspec.erb" />
|
96
|
+
<option value="$PROJECT_DIR$/spec/server_spec.rb" />
|
97
|
+
<option value="$PROJECT_DIR$/lib/server_launcher/server.rb" />
|
80
98
|
</list>
|
81
99
|
</option>
|
82
100
|
</component>
|
@@ -107,8 +125,8 @@
|
|
107
125
|
<showLibraryContents />
|
108
126
|
<hideEmptyPackages />
|
109
127
|
<abbreviatePackageNames />
|
110
|
-
<autoscrollToSource />
|
111
|
-
<autoscrollFromSource />
|
128
|
+
<autoscrollToSource ProjectPane="true" />
|
129
|
+
<autoscrollFromSource ProjectPane="true" />
|
112
130
|
<sortByType />
|
113
131
|
</navigator>
|
114
132
|
<panes>
|
@@ -119,6 +137,42 @@
|
|
119
137
|
<option name="myItemId" value="server_launcher" />
|
120
138
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
121
139
|
</PATH_ELEMENT>
|
140
|
+
<PATH_ELEMENT>
|
141
|
+
<option name="myItemId" value="External Libraries" />
|
142
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ExternalLibrariesNode" />
|
143
|
+
</PATH_ELEMENT>
|
144
|
+
</PATH>
|
145
|
+
<PATH>
|
146
|
+
<PATH_ELEMENT>
|
147
|
+
<option name="myItemId" value="server_launcher" />
|
148
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
149
|
+
</PATH_ELEMENT>
|
150
|
+
<PATH_ELEMENT>
|
151
|
+
<option name="myItemId" value="External Libraries" />
|
152
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ExternalLibrariesNode" />
|
153
|
+
</PATH_ELEMENT>
|
154
|
+
<PATH_ELEMENT>
|
155
|
+
<option name="myItemId" value="< RVM: ruby-1.9.3-p194 [server_launcher] >" />
|
156
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.NamedLibraryElementNode" />
|
157
|
+
</PATH_ELEMENT>
|
158
|
+
</PATH>
|
159
|
+
<PATH>
|
160
|
+
<PATH_ELEMENT>
|
161
|
+
<option name="myItemId" value="server_launcher" />
|
162
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
163
|
+
</PATH_ELEMENT>
|
164
|
+
<PATH_ELEMENT>
|
165
|
+
<option name="myItemId" value="External Libraries" />
|
166
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ExternalLibrariesNode" />
|
167
|
+
</PATH_ELEMENT>
|
168
|
+
<PATH_ELEMENT>
|
169
|
+
<option name="myItemId" value="< RVM: ruby-1.9.3-p194 [server_launcher] >" />
|
170
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.NamedLibraryElementNode" />
|
171
|
+
</PATH_ELEMENT>
|
172
|
+
<PATH_ELEMENT>
|
173
|
+
<option name="myItemId" value="1.9.1" />
|
174
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
175
|
+
</PATH_ELEMENT>
|
122
176
|
</PATH>
|
123
177
|
<PATH>
|
124
178
|
<PATH_ELEMENT>
|
@@ -189,8 +243,8 @@
|
|
189
243
|
<recent name="$PROJECT_DIR$/lib/server_launcher" />
|
190
244
|
</key>
|
191
245
|
</component>
|
192
|
-
<component name="RunManager" selected="RSpec.
|
193
|
-
<configuration default="false" name="
|
246
|
+
<component name="RunManager" selected="RSpec.server_spec">
|
247
|
+
<configuration default="false" name="TomcatServer" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
|
194
248
|
<predefined_log_file id="RUBY_RSPEC" enabled="true" />
|
195
249
|
<module name="server_launcher" />
|
196
250
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
@@ -208,10 +262,10 @@
|
|
208
262
|
</COVERAGE_PATTERN>
|
209
263
|
</EXTENSION>
|
210
264
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
|
211
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$PROJECT_DIR$/spec/
|
265
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$PROJECT_DIR$/spec/tomcat_server_spec.rb" />
|
212
266
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
|
213
267
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
|
214
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="
|
268
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="TomcatServer" />
|
215
269
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
216
270
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
|
217
271
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
|
@@ -222,7 +276,7 @@
|
|
222
276
|
<ConfigurationWrapper RunnerId="RubyRunner" />
|
223
277
|
<method />
|
224
278
|
</configuration>
|
225
|
-
<configuration default="false" name="
|
279
|
+
<configuration default="false" name="WinstoneServer" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
|
226
280
|
<predefined_log_file id="RUBY_RSPEC" enabled="true" />
|
227
281
|
<module name="server_launcher" />
|
228
282
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
@@ -240,10 +294,10 @@
|
|
240
294
|
</COVERAGE_PATTERN>
|
241
295
|
</EXTENSION>
|
242
296
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
|
243
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$PROJECT_DIR$/spec/
|
297
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$PROJECT_DIR$/spec/winstone_server_spec.rb" />
|
244
298
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
|
245
299
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
|
246
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="
|
300
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="WinstoneServer" />
|
247
301
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
248
302
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
|
249
303
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
|
@@ -254,7 +308,7 @@
|
|
254
308
|
<ConfigurationWrapper RunnerId="RubyRunner" />
|
255
309
|
<method />
|
256
310
|
</configuration>
|
257
|
-
<configuration default="false" name="
|
311
|
+
<configuration default="false" name="Server should build fix command" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
|
258
312
|
<predefined_log_file id="RUBY_RSPEC" enabled="true" />
|
259
313
|
<module name="server_launcher" />
|
260
314
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
@@ -272,10 +326,10 @@
|
|
272
326
|
</COVERAGE_PATTERN>
|
273
327
|
</EXTENSION>
|
274
328
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
|
275
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$PROJECT_DIR$/spec/
|
329
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$PROJECT_DIR$/spec/server_spec.rb" />
|
276
330
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
|
277
331
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
|
278
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="" />
|
332
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="Server should build fix command" />
|
279
333
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
280
334
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
|
281
335
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
|
@@ -286,7 +340,7 @@
|
|
286
340
|
<ConfigurationWrapper RunnerId="RubyRunner" />
|
287
341
|
<method />
|
288
342
|
</configuration>
|
289
|
-
<configuration default="false" name="
|
343
|
+
<configuration default="false" name="MyServer" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
|
290
344
|
<predefined_log_file id="RUBY_RSPEC" enabled="true" />
|
291
345
|
<module name="server_launcher" />
|
292
346
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
@@ -304,10 +358,10 @@
|
|
304
358
|
</COVERAGE_PATTERN>
|
305
359
|
</EXTENSION>
|
306
360
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
|
307
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$PROJECT_DIR$/spec/
|
361
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$PROJECT_DIR$/spec/server_spec.rb" />
|
308
362
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
|
309
363
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
|
310
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="" />
|
364
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="MyServer" />
|
311
365
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
312
366
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
|
313
367
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
|
@@ -318,7 +372,7 @@
|
|
318
372
|
<ConfigurationWrapper RunnerId="RubyRunner" />
|
319
373
|
<method />
|
320
374
|
</configuration>
|
321
|
-
<configuration default="false" name="
|
375
|
+
<configuration default="false" name="server_spec" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
|
322
376
|
<predefined_log_file id="RUBY_RSPEC" enabled="true" />
|
323
377
|
<module name="server_launcher" />
|
324
378
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
@@ -336,10 +390,10 @@
|
|
336
390
|
</COVERAGE_PATTERN>
|
337
391
|
</EXTENSION>
|
338
392
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
|
339
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$PROJECT_DIR$/spec/
|
393
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$PROJECT_DIR$/spec/server_spec.rb" />
|
340
394
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
|
341
395
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
|
342
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="
|
396
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="" />
|
343
397
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
344
398
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
|
345
399
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
|
@@ -421,43 +475,43 @@
|
|
421
475
|
<method />
|
422
476
|
</configuration>
|
423
477
|
<list size="5">
|
424
|
-
<item index="0" class="java.lang.String" itemvalue="RSpec.
|
425
|
-
<item index="1" class="java.lang.String" itemvalue="RSpec.
|
426
|
-
<item index="2" class="java.lang.String" itemvalue="RSpec.
|
427
|
-
<item index="3" class="java.lang.String" itemvalue="RSpec.
|
428
|
-
<item index="4" class="java.lang.String" itemvalue="RSpec.
|
478
|
+
<item index="0" class="java.lang.String" itemvalue="RSpec.TomcatServer" />
|
479
|
+
<item index="1" class="java.lang.String" itemvalue="RSpec.WinstoneServer" />
|
480
|
+
<item index="2" class="java.lang.String" itemvalue="RSpec.Server should build fix command" />
|
481
|
+
<item index="3" class="java.lang.String" itemvalue="RSpec.MyServer" />
|
482
|
+
<item index="4" class="java.lang.String" itemvalue="RSpec.server_spec" />
|
429
483
|
</list>
|
430
484
|
<recent_temporary>
|
431
485
|
<list size="5">
|
432
|
-
<item index="0" class="java.lang.String" itemvalue="RSpec.
|
433
|
-
<item index="1" class="java.lang.String" itemvalue="RSpec.
|
434
|
-
<item index="2" class="java.lang.String" itemvalue="RSpec.
|
486
|
+
<item index="0" class="java.lang.String" itemvalue="RSpec.server_spec" />
|
487
|
+
<item index="1" class="java.lang.String" itemvalue="RSpec.MyServer" />
|
488
|
+
<item index="2" class="java.lang.String" itemvalue="RSpec.Server should build fix command" />
|
435
489
|
<item index="3" class="java.lang.String" itemvalue="RSpec.TomcatServer" />
|
436
|
-
<item index="4" class="java.lang.String" itemvalue="RSpec.
|
490
|
+
<item index="4" class="java.lang.String" itemvalue="RSpec.WinstoneServer" />
|
437
491
|
</list>
|
438
492
|
</recent_temporary>
|
439
493
|
</component>
|
440
494
|
<component name="ShelveChangesManager" show_recycled="false" />
|
441
495
|
<component name="ToolWindowManager">
|
442
496
|
<frame x="240" y="142" width="1588" height="1058" extended-state="0" />
|
443
|
-
<editor active="
|
497
|
+
<editor active="false" />
|
444
498
|
<layout>
|
445
|
-
<window_info id="
|
446
|
-
<window_info id="
|
447
|
-
<window_info id="jenkinsBrowser" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
448
|
-
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.39958376" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
449
|
-
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
|
450
|
-
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
|
451
|
-
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
452
|
-
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
499
|
+
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3298647" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
500
|
+
<window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3298647" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
453
501
|
<window_info id="CSS-X-Fire" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
454
502
|
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
455
503
|
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="true" content_ui="tabs" />
|
504
|
+
<window_info id="jenkinsBrowser" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
456
505
|
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.25" sideWeight="0.67013526" order="0" side_tool="false" content_ui="combo" />
|
457
|
-
<window_info id="
|
506
|
+
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.39958376" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
507
|
+
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
|
508
|
+
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
|
509
|
+
<window_info id="Run" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.3298647" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
510
|
+
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
458
511
|
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
|
459
512
|
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
460
513
|
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
514
|
+
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3298647" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
461
515
|
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
462
516
|
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
|
463
517
|
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
|
@@ -521,43 +575,20 @@
|
|
521
575
|
<breakpoints>
|
522
576
|
<line-breakpoint enabled="true" type="ruby-line">
|
523
577
|
<url>file://$PROJECT_DIR$/lib/server_launcher/server.rb</url>
|
524
|
-
<line>
|
578
|
+
<line>7</line>
|
525
579
|
</line-breakpoint>
|
526
580
|
</breakpoints>
|
527
581
|
</breakpoint-manager>
|
528
582
|
</component>
|
529
583
|
<component name="editorHistoryManager">
|
530
|
-
<entry file="file://$PROJECT_DIR$/lib/server_launcher.rb">
|
531
|
-
<provider selected="true" editor-type-id="text-editor">
|
532
|
-
<state line="3" column="29" selection-start="121" selection-end="121" vertical-scroll-proportion="0.07779579" />
|
533
|
-
</provider>
|
534
|
-
</entry>
|
535
|
-
<entry file="file://$PROJECT_DIR$/.rvmrc">
|
536
|
-
<provider selected="true" editor-type-id="text-editor">
|
537
|
-
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
|
538
|
-
<folding />
|
539
|
-
</state>
|
540
|
-
</provider>
|
541
|
-
</entry>
|
542
584
|
<entry file="file://$PROJECT_DIR$/spec/spec_helper.rb">
|
543
585
|
<provider selected="true" editor-type-id="text-editor">
|
544
|
-
<state line="1" column="19" selection-start="59" selection-end="59" vertical-scroll-proportion="0.0"
|
545
|
-
<folding />
|
546
|
-
</state>
|
586
|
+
<state line="1" column="19" selection-start="59" selection-end="59" vertical-scroll-proportion="0.0" />
|
547
587
|
</provider>
|
548
588
|
</entry>
|
549
589
|
<entry file="file://$USER_HOME$/.rvm/gems/ruby-1.9.3-p194@server_launcher/gems/rspec-core-2.9.0/lib/rspec/core/example.rb">
|
550
590
|
<provider selected="true" editor-type-id="text-editor">
|
551
|
-
<state line="82" column="35" selection-start="3061" selection-end="3061" vertical-scroll-proportion="0.0"
|
552
|
-
<folding />
|
553
|
-
</state>
|
554
|
-
</provider>
|
555
|
-
</entry>
|
556
|
-
<entry file="file://$PROJECT_DIR$/lib/server_launcher/server.rb">
|
557
|
-
<provider selected="true" editor-type-id="text-editor">
|
558
|
-
<state line="6" column="0" selection-start="84" selection-end="84" vertical-scroll-proportion="0.0">
|
559
|
-
<folding />
|
560
|
-
</state>
|
591
|
+
<state line="82" column="35" selection-start="3061" selection-end="3061" vertical-scroll-proportion="0.0" />
|
561
592
|
</provider>
|
562
593
|
</entry>
|
563
594
|
<entry file="file://$PROJECT_DIR$/lib/server_launcher/tomcat_server.rb">
|
@@ -574,18 +605,9 @@
|
|
574
605
|
</state>
|
575
606
|
</provider>
|
576
607
|
</entry>
|
577
|
-
<entry file="file://$PROJECT_DIR$/Gemfile">
|
578
|
-
<provider selected="true" editor-type-id="text-editor">
|
579
|
-
<state line="10" column="127" selection-start="131" selection-end="131" vertical-scroll-proportion="0.25931928">
|
580
|
-
<folding />
|
581
|
-
</state>
|
582
|
-
</provider>
|
583
|
-
</entry>
|
584
608
|
<entry file="file://$USER_HOME$/.rvm/gems/ruby-1.9.3-p194@server_launcher/gems/meta_methods-1.0.2/lib/meta_methods/meta_methods.rb">
|
585
609
|
<provider selected="true" editor-type-id="text-editor">
|
586
|
-
<state line="18" column="17" selection-start="515" selection-end="515" vertical-scroll-proportion="0.4667747"
|
587
|
-
<folding />
|
588
|
-
</state>
|
610
|
+
<state line="18" column="17" selection-start="515" selection-end="515" vertical-scroll-proportion="0.4667747" />
|
589
611
|
</provider>
|
590
612
|
</entry>
|
591
613
|
<entry file="file://$PROJECT_DIR$/lib/server_launcher/winstone_server.rb">
|
@@ -623,16 +645,42 @@
|
|
623
645
|
</state>
|
624
646
|
</provider>
|
625
647
|
</entry>
|
648
|
+
<entry file="file://$PROJECT_DIR$/spec/jboss_server_spec.rb">
|
649
|
+
<provider selected="true" editor-type-id="text-editor">
|
650
|
+
<state line="3" column="21" selection-start="106" selection-end="106" vertical-scroll-proportion="0.0">
|
651
|
+
<folding />
|
652
|
+
</state>
|
653
|
+
</provider>
|
654
|
+
</entry>
|
626
655
|
<entry file="file://$PROJECT_DIR$/spec/tomcat_server_spec.rb">
|
627
656
|
<provider selected="true" editor-type-id="text-editor">
|
628
|
-
<state line="
|
657
|
+
<state line="11" column="20" selection-start="0" selection-end="1058" vertical-scroll-proportion="0.0">
|
629
658
|
<folding />
|
630
659
|
</state>
|
631
660
|
</provider>
|
632
661
|
</entry>
|
633
|
-
<entry file="file://$
|
662
|
+
<entry file="file://$USER_HOME$/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/open3.rb">
|
663
|
+
<provider selected="true" editor-type-id="text-editor">
|
664
|
+
<state line="29" column="7" selection-start="1114" selection-end="1114" vertical-scroll-proportion="0.33225283">
|
665
|
+
<folding />
|
666
|
+
</state>
|
667
|
+
</provider>
|
668
|
+
</entry>
|
669
|
+
<entry file="file://$PROJECT_DIR$/Gemfile">
|
670
|
+
<provider selected="true" editor-type-id="text-editor">
|
671
|
+
<state line="10" column="127" selection-start="131" selection-end="131" vertical-scroll-proportion="0.25931928" />
|
672
|
+
</provider>
|
673
|
+
</entry>
|
674
|
+
<entry file="file://$PROJECT_DIR$/spec/server_spec.rb">
|
675
|
+
<provider selected="true" editor-type-id="text-editor">
|
676
|
+
<state line="1" column="0" selection-start="66" selection-end="66" vertical-scroll-proportion="0.0">
|
677
|
+
<folding />
|
678
|
+
</state>
|
679
|
+
</provider>
|
680
|
+
</entry>
|
681
|
+
<entry file="file://$PROJECT_DIR$/lib/server_launcher/server.rb">
|
634
682
|
<provider selected="true" editor-type-id="text-editor">
|
635
|
-
<state line="
|
683
|
+
<state line="2" column="0" selection-start="39" selection-end="39" vertical-scroll-proportion="0.051863857">
|
636
684
|
<folding />
|
637
685
|
</state>
|
638
686
|
</provider>
|
@@ -1,18 +1,23 @@
|
|
1
1
|
require 'meta_methods'
|
2
|
+
require 'open3'
|
2
3
|
|
3
4
|
class Server
|
4
5
|
include MetaMethods
|
5
6
|
|
6
|
-
def initialize params
|
7
|
+
def initialize params={}
|
7
8
|
define_attributes(:attr_reader, self, params, false)
|
8
9
|
end
|
9
10
|
|
10
|
-
def execute method_name
|
11
|
+
def execute method_name, *args
|
11
12
|
puts "Target: '#{method_name}'."
|
12
13
|
|
13
14
|
method = self.class.instance_method(method_name)
|
14
15
|
|
15
|
-
|
16
|
+
if args.empty?
|
17
|
+
result = method.bind(self).call()
|
18
|
+
else
|
19
|
+
result = method.bind(self).call(args)
|
20
|
+
end
|
16
21
|
|
17
22
|
if result.kind_of? String
|
18
23
|
commands = [result]
|
@@ -27,6 +32,8 @@ class Server
|
|
27
32
|
end
|
28
33
|
end
|
29
34
|
|
35
|
+
private
|
36
|
+
|
30
37
|
def execute_command(command)
|
31
38
|
output = nil
|
32
39
|
error = nil
|
data/spec/server_spec.rb
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
|
+
|
3
|
+
require 'server_launcher/server'
|
4
|
+
|
5
|
+
class MyServer < Server
|
6
|
+
def stop
|
7
|
+
puts "Calling stop method without parameter."
|
8
|
+
|
9
|
+
'ls'
|
10
|
+
end
|
11
|
+
def start param
|
12
|
+
puts "Calling start method with parameter #{param}."
|
13
|
+
|
14
|
+
param
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
describe MyServer do
|
19
|
+
|
20
|
+
it "should execute command without parameter" do
|
21
|
+
subject.execute(:stop).should == ["ls"]
|
22
|
+
end
|
23
|
+
|
24
|
+
it "should execute command with parameter" do
|
25
|
+
subject.execute(:start, "ls").should == ["ls"]
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
|
30
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: server_launcher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -90,6 +90,7 @@ files:
|
|
90
90
|
- server_launcher.gemspec
|
91
91
|
- server_launcher.gemspec.erb
|
92
92
|
- spec/jboss_server_spec.rb
|
93
|
+
- spec/server_spec.rb
|
93
94
|
- spec/spec_helper.rb
|
94
95
|
- spec/tomcat_server_spec.rb
|
95
96
|
- spec/winstone_server_spec.rb
|
@@ -119,6 +120,7 @@ specification_version: 3
|
|
119
120
|
summary: Convenient classes to manage servers from rake
|
120
121
|
test_files:
|
121
122
|
- spec/jboss_server_spec.rb
|
123
|
+
- spec/server_spec.rb
|
122
124
|
- spec/spec_helper.rb
|
123
125
|
- spec/tomcat_server_spec.rb
|
124
126
|
- spec/winstone_server_spec.rb
|