jar_wrapper 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +3 -0
- data/.idea/.name +1 -0
- data/.idea/.rakeTasks +7 -0
- data/.idea/encodings.xml +5 -0
- data/.idea/jar_wrapper.iml +30 -0
- data/.idea/misc.xml +23 -0
- data/.idea/modules.xml +9 -0
- data/.idea/scopes/scope_settings.xml +5 -0
- data/.idea/vcs.xml +7 -0
- data/.idea/workspace.xml +422 -0
- data/.rvmrc +6 -0
- data/CHANGES +5 -0
- data/Gemfile +23 -0
- data/Gemfile.lock +30 -0
- data/README.md +30 -0
- data/Rakefile +29 -46
- data/jar_wrapper.gemspec +12 -49
- data/jar_wrapper.gemspec.erb +18 -0
- data/lib/jar_wrapper/runner.rb +160 -0
- data/lib/jar_wrapper/version.rb +3 -0
- data/lib/jar_wrapper.rb +1 -1
- metadata +25 -58
- data/README +0 -31
- data/VERSION +0 -1
- data/lib/jar_wrapper/jar_wrapper.rb +0 -157
data/.gitignore
ADDED
data/.idea/.name
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
jar_wrapper
|
data/.idea/.rakeTasks
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<Settings><!--This file was automatically generated by Ruby plugin.
|
|
3
|
+
You are allowed to:
|
|
4
|
+
1. Remove rake task
|
|
5
|
+
2. Add existing rake tasks
|
|
6
|
+
To add existing rake tasks automatically delete this file and reload the project.
|
|
7
|
+
--><RakeGroup description="" fullCmd="" taksId="rake"><RakeTask description="Run RSpec code examples" fullCmd="spec" taksId="spec" /><RakeTask description="" fullCmd="build" taksId="build" /><RakeTask description="" fullCmd="install" taksId="install" /><RakeTask description="" fullCmd="release" taksId="release" /></RakeGroup></Settings>
|
data/.idea/encodings.xml
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<module type="RUBY_MODULE" version="4">
|
|
3
|
+
<component name="FacetManager">
|
|
4
|
+
<facet type="gem" name="Gem">
|
|
5
|
+
<configuration>
|
|
6
|
+
<option name="GEM_APP_ROOT_PATH" value="$MODULE_DIR$" />
|
|
7
|
+
<option name="GEM_APP_TEST_PATH" value="" />
|
|
8
|
+
<option name="GEM_APP_LIB_PATH" value="$MODULE_DIR$/lib" />
|
|
9
|
+
</configuration>
|
|
10
|
+
</facet>
|
|
11
|
+
</component>
|
|
12
|
+
<component name="NewModuleRootManager">
|
|
13
|
+
<content url="file://$MODULE_DIR$" />
|
|
14
|
+
<orderEntry type="inheritedJdk" />
|
|
15
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
|
16
|
+
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.2.3, RVM: ruby-1.9.3-p385 [jar_wrapper]) [gem]" level="application" />
|
|
17
|
+
<orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.1.3, RVM: ruby-1.9.3-p385 [jar_wrapper]) [gem]" level="application" />
|
|
18
|
+
<orderEntry type="library" scope="PROVIDED" name="file_utils (v1.0.6, RVM: ruby-1.9.3-p385 [jar_wrapper]) [gem]" level="application" />
|
|
19
|
+
<orderEntry type="library" scope="PROVIDED" name="gemcutter (v0.7.1, RVM: ruby-1.9.3-p385 [jar_wrapper]) [gem]" level="application" />
|
|
20
|
+
<orderEntry type="library" scope="PROVIDED" name="gemspec_deps_gen (v1.0.5, RVM: ruby-1.9.3-p385 [jar_wrapper]) [gem]" level="application" />
|
|
21
|
+
<orderEntry type="library" scope="PROVIDED" name="metaclass (v0.0.1, RVM: ruby-1.9.3-p385 [jar_wrapper]) [gem]" level="application" />
|
|
22
|
+
<orderEntry type="library" scope="PROVIDED" name="mocha (v0.13.2, RVM: ruby-1.9.3-p385 [jar_wrapper]) [gem]" level="application" />
|
|
23
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec (v2.12.0, RVM: ruby-1.9.3-p385 [jar_wrapper]) [gem]" level="application" />
|
|
24
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-core (v2.12.2, RVM: ruby-1.9.3-p385 [jar_wrapper]) [gem]" level="application" />
|
|
25
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v2.12.1, RVM: ruby-1.9.3-p385 [jar_wrapper]) [gem]" level="application" />
|
|
26
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v2.12.2, RVM: ruby-1.9.3-p385 [jar_wrapper]) [gem]" level="application" />
|
|
27
|
+
<orderEntry type="library" scope="PROVIDED" name="zip (v2.0.2, RVM: ruby-1.9.3-p385 [jar_wrapper]) [gem]" level="application" />
|
|
28
|
+
</component>
|
|
29
|
+
</module>
|
|
30
|
+
|
data/.idea/misc.xml
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="ProjectRootManager" version="2" project-jdk-name="RVM: ruby-1.9.3-p385 [jar_wrapper]" project-jdk-type="RUBY_SDK" />
|
|
4
|
+
<component name="SvnConfiguration" maxAnnotateRevisions="500" myUseAcceleration="nothing" myAutoUpdateAfterCommit="false" cleanupOnStartRun="false">
|
|
5
|
+
<option name="USER" value="" />
|
|
6
|
+
<option name="PASSWORD" value="" />
|
|
7
|
+
<option name="mySSHConnectionTimeout" value="30000" />
|
|
8
|
+
<option name="mySSHReadTimeout" value="30000" />
|
|
9
|
+
<option name="LAST_MERGED_REVISION" />
|
|
10
|
+
<option name="MERGE_DRY_RUN" value="false" />
|
|
11
|
+
<option name="MERGE_DIFF_USE_ANCESTRY" value="true" />
|
|
12
|
+
<option name="UPDATE_LOCK_ON_DEMAND" value="false" />
|
|
13
|
+
<option name="IGNORE_SPACES_IN_MERGE" value="false" />
|
|
14
|
+
<option name="DETECT_NESTED_COPIES" value="true" />
|
|
15
|
+
<option name="CHECK_NESTED_FOR_QUICK_MERGE" value="false" />
|
|
16
|
+
<option name="IGNORE_SPACES_IN_ANNOTATE" value="true" />
|
|
17
|
+
<option name="SHOW_MERGE_SOURCES_IN_ANNOTATE" value="true" />
|
|
18
|
+
<option name="FORCE_UPDATE" value="false" />
|
|
19
|
+
<option name="IGNORE_EXTERNALS" value="false" />
|
|
20
|
+
<myIsUseDefaultProxy>false</myIsUseDefaultProxy>
|
|
21
|
+
</component>
|
|
22
|
+
</project>
|
|
23
|
+
|
data/.idea/modules.xml
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="ProjectModuleManager">
|
|
4
|
+
<modules>
|
|
5
|
+
<module fileurl="file://$PROJECT_DIR$/.idea/jar_wrapper.iml" filepath="$PROJECT_DIR$/.idea/jar_wrapper.iml" />
|
|
6
|
+
</modules>
|
|
7
|
+
</component>
|
|
8
|
+
</project>
|
|
9
|
+
|
data/.idea/vcs.xml
ADDED
data/.idea/workspace.xml
ADDED
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="ChangeListManager">
|
|
4
|
+
<list default="true" id="f2d45c82-3b69-4bf8-9eb4-252420ccdf4d" name="Default" comment="">
|
|
5
|
+
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/Gemfile" afterPath="$PROJECT_DIR$/Gemfile" />
|
|
6
|
+
</list>
|
|
7
|
+
<ignored path="jar_wrapper.iws" />
|
|
8
|
+
<ignored path=".idea/workspace.xml" />
|
|
9
|
+
<file path="/Dummy.txt" changelist="f2d45c82-3b69-4bf8-9eb4-252420ccdf4d" time="1360708412222" ignored="false" />
|
|
10
|
+
<file path="/version.rb" changelist="f2d45c82-3b69-4bf8-9eb4-252420ccdf4d" time="1360707454986" ignored="false" />
|
|
11
|
+
<file path="/CHANGES" changelist="f2d45c82-3b69-4bf8-9eb4-252420ccdf4d" time="1360707516699" ignored="false" />
|
|
12
|
+
<file path="/jar_wrapper.gemspec.erb" changelist="f2d45c82-3b69-4bf8-9eb4-252420ccdf4d" time="1360708129179" ignored="false" />
|
|
13
|
+
<file path="/Rakefile" changelist="f2d45c82-3b69-4bf8-9eb4-252420ccdf4d" time="1360707647776" ignored="false" />
|
|
14
|
+
<file path="/jar_wrapper.rb" changelist="f2d45c82-3b69-4bf8-9eb4-252420ccdf4d" time="1360707917299" ignored="false" />
|
|
15
|
+
<file path="/README.md" changelist="f2d45c82-3b69-4bf8-9eb4-252420ccdf4d" time="1360707855647" ignored="false" />
|
|
16
|
+
<file path="/Gemfile" changelist="f2d45c82-3b69-4bf8-9eb4-252420ccdf4d" time="1360708491037" ignored="false" />
|
|
17
|
+
<file path="/a.dummy" changelist="f2d45c82-3b69-4bf8-9eb4-252420ccdf4d" time="1360708108504" ignored="false" />
|
|
18
|
+
<file path="/jar_wrapper.gemspec" changelist="f2d45c82-3b69-4bf8-9eb4-252420ccdf4d" time="1360708115815" ignored="false" />
|
|
19
|
+
<option name="TRACKING_ENABLED" value="true" />
|
|
20
|
+
<option name="SHOW_DIALOG" value="false" />
|
|
21
|
+
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
22
|
+
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
|
23
|
+
<option name="LAST_RESOLUTION" value="IGNORE" />
|
|
24
|
+
</component>
|
|
25
|
+
<component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
|
|
26
|
+
<component name="CreatePatchCommitExecutor">
|
|
27
|
+
<option name="PATCH_PATH" value="" />
|
|
28
|
+
</component>
|
|
29
|
+
<component name="DaemonCodeAnalyzer">
|
|
30
|
+
<disable_hints />
|
|
31
|
+
</component>
|
|
32
|
+
<component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
|
|
33
|
+
<component name="FileEditorManager">
|
|
34
|
+
<leaf>
|
|
35
|
+
<file leaf-file-name="Gemfile" pinned="false" current="true" current-in-tab="true">
|
|
36
|
+
<entry file="file://$PROJECT_DIR$/Gemfile">
|
|
37
|
+
<provider selected="true" editor-type-id="text-editor">
|
|
38
|
+
<state line="5" column="11" selection-start="62" selection-end="62" vertical-scroll-proportion="0.116618074">
|
|
39
|
+
<folding />
|
|
40
|
+
</state>
|
|
41
|
+
</provider>
|
|
42
|
+
</entry>
|
|
43
|
+
</file>
|
|
44
|
+
<file leaf-file-name="version.rb" pinned="false" current="false" current-in-tab="false">
|
|
45
|
+
<entry file="file://$PROJECT_DIR$/lib/jar_wrapper/version.rb">
|
|
46
|
+
<provider selected="true" editor-type-id="text-editor">
|
|
47
|
+
<state line="2" column="31" selection-start="41" selection-end="41" vertical-scroll-proportion="0.0">
|
|
48
|
+
<folding />
|
|
49
|
+
</state>
|
|
50
|
+
</provider>
|
|
51
|
+
</entry>
|
|
52
|
+
</file>
|
|
53
|
+
</leaf>
|
|
54
|
+
</component>
|
|
55
|
+
<component name="FindManager">
|
|
56
|
+
<FindUsagesManager>
|
|
57
|
+
<setting name="OPEN_NEW_TAB" value="false" />
|
|
58
|
+
</FindUsagesManager>
|
|
59
|
+
</component>
|
|
60
|
+
<component name="Git.Settings">
|
|
61
|
+
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
|
62
|
+
</component>
|
|
63
|
+
<component name="GitLogSettings">
|
|
64
|
+
<option name="myDateState">
|
|
65
|
+
<MyDateState />
|
|
66
|
+
</option>
|
|
67
|
+
</component>
|
|
68
|
+
<component name="IdeDocumentHistory">
|
|
69
|
+
<option name="changedFiles">
|
|
70
|
+
<list>
|
|
71
|
+
<option value="$PROJECT_DIR$/lib/jar_wrapper.rb" />
|
|
72
|
+
<option value="$PROJECT_DIR$/CHANGES" />
|
|
73
|
+
<option value="$PROJECT_DIR$/Rakefile" />
|
|
74
|
+
<option value="$PROJECT_DIR$/README.md" />
|
|
75
|
+
<option value="$PROJECT_DIR$/lib/jar_wrapper/jar_wrapper.rb" />
|
|
76
|
+
<option value="$PROJECT_DIR$/jar_wrapper.gemspec" />
|
|
77
|
+
<option value="$PROJECT_DIR$/jar_wrapper.gemspec.erb" />
|
|
78
|
+
<option value="$PROJECT_DIR$/lib/jar_wrapper/version.rb" />
|
|
79
|
+
<option value="$PROJECT_DIR$/Gemfile" />
|
|
80
|
+
</list>
|
|
81
|
+
</option>
|
|
82
|
+
</component>
|
|
83
|
+
<component name="ProjectFrameBounds">
|
|
84
|
+
<option name="x" value="52" />
|
|
85
|
+
<option name="y" value="22" />
|
|
86
|
+
<option name="width" value="1868" />
|
|
87
|
+
<option name="height" value="1160" />
|
|
88
|
+
</component>
|
|
89
|
+
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
|
|
90
|
+
<OptionsSetting value="true" id="Add" />
|
|
91
|
+
<OptionsSetting value="true" id="Remove" />
|
|
92
|
+
<OptionsSetting value="true" id="Checkout" />
|
|
93
|
+
<OptionsSetting value="true" id="Update" />
|
|
94
|
+
<OptionsSetting value="true" id="Status" />
|
|
95
|
+
<OptionsSetting value="true" id="Edit" />
|
|
96
|
+
<ConfirmationsSetting value="0" id="Add" />
|
|
97
|
+
<ConfirmationsSetting value="0" id="Remove" />
|
|
98
|
+
</component>
|
|
99
|
+
<component name="ProjectReloadState">
|
|
100
|
+
<option name="STATE" value="0" />
|
|
101
|
+
</component>
|
|
102
|
+
<component name="ProjectView">
|
|
103
|
+
<navigator currentView="ProjectPane" proportions="" version="1" splitterProportion="0.5">
|
|
104
|
+
<flattenPackages />
|
|
105
|
+
<showMembers />
|
|
106
|
+
<showModules />
|
|
107
|
+
<showLibraryContents />
|
|
108
|
+
<hideEmptyPackages />
|
|
109
|
+
<abbreviatePackageNames />
|
|
110
|
+
<autoscrollToSource />
|
|
111
|
+
<autoscrollFromSource />
|
|
112
|
+
<sortByType />
|
|
113
|
+
</navigator>
|
|
114
|
+
<panes>
|
|
115
|
+
<pane id="Scope" />
|
|
116
|
+
<pane id="ProjectPane">
|
|
117
|
+
<subPane>
|
|
118
|
+
<PATH>
|
|
119
|
+
<PATH_ELEMENT>
|
|
120
|
+
<option name="myItemId" value="jar_wrapper" />
|
|
121
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
|
122
|
+
</PATH_ELEMENT>
|
|
123
|
+
</PATH>
|
|
124
|
+
<PATH>
|
|
125
|
+
<PATH_ELEMENT>
|
|
126
|
+
<option name="myItemId" value="jar_wrapper" />
|
|
127
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
|
128
|
+
</PATH_ELEMENT>
|
|
129
|
+
<PATH_ELEMENT>
|
|
130
|
+
<option name="myItemId" value="jar_wrapper" />
|
|
131
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
|
132
|
+
</PATH_ELEMENT>
|
|
133
|
+
</PATH>
|
|
134
|
+
<PATH>
|
|
135
|
+
<PATH_ELEMENT>
|
|
136
|
+
<option name="myItemId" value="jar_wrapper" />
|
|
137
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
|
138
|
+
</PATH_ELEMENT>
|
|
139
|
+
<PATH_ELEMENT>
|
|
140
|
+
<option name="myItemId" value="jar_wrapper" />
|
|
141
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
|
142
|
+
</PATH_ELEMENT>
|
|
143
|
+
<PATH_ELEMENT>
|
|
144
|
+
<option name="myItemId" value="lib" />
|
|
145
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
|
146
|
+
</PATH_ELEMENT>
|
|
147
|
+
</PATH>
|
|
148
|
+
<PATH>
|
|
149
|
+
<PATH_ELEMENT>
|
|
150
|
+
<option name="myItemId" value="jar_wrapper" />
|
|
151
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
|
152
|
+
</PATH_ELEMENT>
|
|
153
|
+
<PATH_ELEMENT>
|
|
154
|
+
<option name="myItemId" value="jar_wrapper" />
|
|
155
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
|
156
|
+
</PATH_ELEMENT>
|
|
157
|
+
<PATH_ELEMENT>
|
|
158
|
+
<option name="myItemId" value="lib" />
|
|
159
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
|
160
|
+
</PATH_ELEMENT>
|
|
161
|
+
<PATH_ELEMENT>
|
|
162
|
+
<option name="myItemId" value="jar_wrapper" />
|
|
163
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
|
164
|
+
</PATH_ELEMENT>
|
|
165
|
+
</PATH>
|
|
166
|
+
</subPane>
|
|
167
|
+
</pane>
|
|
168
|
+
</panes>
|
|
169
|
+
</component>
|
|
170
|
+
<component name="PropertiesComponent">
|
|
171
|
+
<property name="options.splitter.main.proportions" value="0.3" />
|
|
172
|
+
<property name="WebServerToolWindowFactoryState" value="false" />
|
|
173
|
+
<property name="options.lastSelected" value="org.jetbrains.plugins.ruby.settings.RubyIdeSdkConfigurable" />
|
|
174
|
+
<property name="options.searchVisible" value="true" />
|
|
175
|
+
<property name="options.splitter.details.proportions" value="0.2" />
|
|
176
|
+
</component>
|
|
177
|
+
<component name="RunManager">
|
|
178
|
+
<configuration default="true" type="RSpecRunConfigurationType" factoryName="RSpec">
|
|
179
|
+
<predefined_log_file id="RUBY_RSPEC" enabled="true" />
|
|
180
|
+
<module name="" />
|
|
181
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
|
182
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
|
|
183
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
|
184
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
|
185
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
|
186
|
+
<envs />
|
|
187
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
|
188
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" />
|
|
189
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
|
190
|
+
<COVERAGE_PATTERN ENABLED="true">
|
|
191
|
+
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
|
192
|
+
</COVERAGE_PATTERN>
|
|
193
|
+
</EXTENSION>
|
|
194
|
+
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
|
195
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
|
|
196
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
|
|
197
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
|
|
198
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
|
|
199
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="" />
|
|
200
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
|
201
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
|
|
202
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
|
|
203
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
|
|
204
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
|
|
205
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
|
|
206
|
+
<method />
|
|
207
|
+
</configuration>
|
|
208
|
+
<configuration default="true" type="RubyRunConfigurationType" factoryName="Ruby">
|
|
209
|
+
<module name="" />
|
|
210
|
+
<RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
|
211
|
+
<RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="" />
|
|
212
|
+
<RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
|
|
213
|
+
<RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
|
|
214
|
+
<RUBY_RUN_CONFIG NAME="myPassParentEnvs" VALUE="true" />
|
|
215
|
+
<envs />
|
|
216
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
|
217
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" />
|
|
218
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
|
219
|
+
<COVERAGE_PATTERN ENABLED="true">
|
|
220
|
+
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
|
221
|
+
</COVERAGE_PATTERN>
|
|
222
|
+
</EXTENSION>
|
|
223
|
+
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
|
224
|
+
<RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="" />
|
|
225
|
+
<RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
|
|
226
|
+
<method />
|
|
227
|
+
</configuration>
|
|
228
|
+
<configuration default="true" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest">
|
|
229
|
+
<predefined_log_file id="RUBY_TESTUNIT" enabled="true" />
|
|
230
|
+
<module name="" />
|
|
231
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
|
232
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
|
|
233
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
|
234
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
|
235
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
|
236
|
+
<envs />
|
|
237
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
|
238
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" />
|
|
239
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
|
240
|
+
<COVERAGE_PATTERN ENABLED="true">
|
|
241
|
+
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
|
242
|
+
</COVERAGE_PATTERN>
|
|
243
|
+
</EXTENSION>
|
|
244
|
+
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
|
245
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
|
|
246
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
|
|
247
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="" />
|
|
248
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="" />
|
|
249
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
|
250
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
|
|
251
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_OPTIONS" VALUE="" />
|
|
252
|
+
<method />
|
|
253
|
+
</configuration>
|
|
254
|
+
<list size="0" />
|
|
255
|
+
</component>
|
|
256
|
+
<component name="ShelveChangesManager" show_recycled="false" />
|
|
257
|
+
<component name="TaskManager">
|
|
258
|
+
<task active="true" id="Default" summary="Default task">
|
|
259
|
+
<changelist id="f2d45c82-3b69-4bf8-9eb4-252420ccdf4d" name="Default" comment="" />
|
|
260
|
+
<created>1360707349325</created>
|
|
261
|
+
<updated>1360707349325</updated>
|
|
262
|
+
</task>
|
|
263
|
+
<servers />
|
|
264
|
+
</component>
|
|
265
|
+
<component name="ToolWindowManager">
|
|
266
|
+
<frame x="52" y="22" width="1868" height="1160" extended-state="0" />
|
|
267
|
+
<editor active="true" />
|
|
268
|
+
<layout>
|
|
269
|
+
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32957748" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
|
270
|
+
<window_info id="Changes" 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" />
|
|
271
|
+
<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" />
|
|
272
|
+
<window_info id="Database" 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" />
|
|
273
|
+
<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="false" content_ui="tabs" />
|
|
274
|
+
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.2524698" sideWeight="0.67042255" order="0" side_tool="false" content_ui="combo" />
|
|
275
|
+
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
|
276
|
+
<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="false" content_ui="tabs" />
|
|
277
|
+
<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="false" content_ui="tabs" />
|
|
278
|
+
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
|
279
|
+
<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" />
|
|
280
|
+
<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" />
|
|
281
|
+
<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" />
|
|
282
|
+
<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" />
|
|
283
|
+
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32957748" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
|
284
|
+
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
|
285
|
+
<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" />
|
|
286
|
+
<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" />
|
|
287
|
+
</layout>
|
|
288
|
+
</component>
|
|
289
|
+
<component name="VcsContentAnnotationSettings">
|
|
290
|
+
<option name="myLimit" value="2678400000" />
|
|
291
|
+
</component>
|
|
292
|
+
<component name="VcsManagerConfiguration">
|
|
293
|
+
<option name="OFFER_MOVE_TO_ANOTHER_CHANGELIST_ON_PARTIAL_COMMIT" value="true" />
|
|
294
|
+
<option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="false" />
|
|
295
|
+
<option name="CHECK_NEW_TODO" value="true" />
|
|
296
|
+
<option name="myTodoPanelSettings">
|
|
297
|
+
<value>
|
|
298
|
+
<are-packages-shown value="false" />
|
|
299
|
+
<are-modules-shown value="false" />
|
|
300
|
+
<flatten-packages value="false" />
|
|
301
|
+
<is-autoscroll-to-source value="false" />
|
|
302
|
+
</value>
|
|
303
|
+
</option>
|
|
304
|
+
<option name="PERFORM_UPDATE_IN_BACKGROUND" value="true" />
|
|
305
|
+
<option name="PERFORM_COMMIT_IN_BACKGROUND" value="true" />
|
|
306
|
+
<option name="PERFORM_EDIT_IN_BACKGROUND" value="true" />
|
|
307
|
+
<option name="PERFORM_CHECKOUT_IN_BACKGROUND" value="true" />
|
|
308
|
+
<option name="PERFORM_ADD_REMOVE_IN_BACKGROUND" value="true" />
|
|
309
|
+
<option name="PERFORM_ROLLBACK_IN_BACKGROUND" value="false" />
|
|
310
|
+
<option name="CHECK_LOCALLY_CHANGED_CONFLICTS_IN_BACKGROUND" value="false" />
|
|
311
|
+
<option name="CHANGED_ON_SERVER_INTERVAL" value="60" />
|
|
312
|
+
<option name="SHOW_ONLY_CHANGED_IN_SELECTION_DIFF" value="true" />
|
|
313
|
+
<option name="CHECK_COMMIT_MESSAGE_SPELLING" value="true" />
|
|
314
|
+
<option name="DEFAULT_PATCH_EXTENSION" value="patch" />
|
|
315
|
+
<option name="SHORT_DIFF_HORISONTALLY" value="true" />
|
|
316
|
+
<option name="SHORT_DIFF_EXTRA_LINES" value="2" />
|
|
317
|
+
<option name="SOFT_WRAPS_IN_SHORT_DIFF" value="true" />
|
|
318
|
+
<option name="INCLUDE_TEXT_INTO_PATCH" value="false" />
|
|
319
|
+
<option name="INCLUDE_TEXT_INTO_SHELF" value="false" />
|
|
320
|
+
<option name="SHOW_FILE_HISTORY_DETAILS" value="true" />
|
|
321
|
+
<option name="SHOW_VCS_ERROR_NOTIFICATIONS" value="true" />
|
|
322
|
+
<option name="SHOW_DIRTY_RECURSIVELY" value="false" />
|
|
323
|
+
<option name="LIMIT_HISTORY" value="true" />
|
|
324
|
+
<option name="MAXIMUM_HISTORY_ROWS" value="1000" />
|
|
325
|
+
<option name="FORCE_NON_EMPTY_COMMENT" value="false" />
|
|
326
|
+
<option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="false" />
|
|
327
|
+
<option name="LAST_COMMIT_MESSAGE" />
|
|
328
|
+
<option name="MAKE_NEW_CHANGELIST_ACTIVE" value="false" />
|
|
329
|
+
<option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
|
|
330
|
+
<option name="CHECK_FILES_UP_TO_DATE_BEFORE_COMMIT" value="false" />
|
|
331
|
+
<option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false" />
|
|
332
|
+
<option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" />
|
|
333
|
+
<option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8" />
|
|
334
|
+
<option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5" />
|
|
335
|
+
<option name="ACTIVE_VCS_NAME" />
|
|
336
|
+
<option name="UPDATE_GROUP_BY_PACKAGES" value="false" />
|
|
337
|
+
<option name="UPDATE_GROUP_BY_CHANGELIST" value="false" />
|
|
338
|
+
<option name="SHOW_FILE_HISTORY_AS_TREE" value="false" />
|
|
339
|
+
<option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
|
|
340
|
+
</component>
|
|
341
|
+
<component name="XDebuggerManager">
|
|
342
|
+
<breakpoint-manager />
|
|
343
|
+
</component>
|
|
344
|
+
<component name="editorHistoryManager">
|
|
345
|
+
<entry file="file://$PROJECT_DIR$/LICENSE">
|
|
346
|
+
<provider selected="true" editor-type-id="text-editor">
|
|
347
|
+
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" />
|
|
348
|
+
</provider>
|
|
349
|
+
</entry>
|
|
350
|
+
<entry file="file://$PROJECT_DIR$/Rakefile">
|
|
351
|
+
<provider selected="true" editor-type-id="text-editor">
|
|
352
|
+
<state line="4" column="32" selection-start="119" selection-end="119" vertical-scroll-proportion="0.093294464">
|
|
353
|
+
<folding />
|
|
354
|
+
</state>
|
|
355
|
+
</provider>
|
|
356
|
+
</entry>
|
|
357
|
+
<entry file="file://$PROJECT_DIR$/jar_wrapper.gemspec.erb">
|
|
358
|
+
<provider selected="true" editor-type-id="text-editor">
|
|
359
|
+
<state line="2" column="108" selection-start="104" selection-end="104" vertical-scroll-proportion="0.048411496">
|
|
360
|
+
<folding />
|
|
361
|
+
</state>
|
|
362
|
+
</provider>
|
|
363
|
+
</entry>
|
|
364
|
+
<entry file="file://$PROJECT_DIR$/jar_wrapper.gemspec">
|
|
365
|
+
<provider selected="true" editor-type-id="text-editor">
|
|
366
|
+
<state line="15" column="52" selection-start="598" selection-end="598" vertical-scroll-proportion="0.34985423">
|
|
367
|
+
<folding />
|
|
368
|
+
</state>
|
|
369
|
+
</provider>
|
|
370
|
+
</entry>
|
|
371
|
+
<entry file="file://$PROJECT_DIR$/lib/jar_wrapper/runner.rb">
|
|
372
|
+
<provider selected="true" editor-type-id="text-editor">
|
|
373
|
+
<state line="14" column="140" selection-start="449" selection-end="449" vertical-scroll-proportion="0.3265306">
|
|
374
|
+
<folding />
|
|
375
|
+
</state>
|
|
376
|
+
</provider>
|
|
377
|
+
</entry>
|
|
378
|
+
<entry file="file://$PROJECT_DIR$/lib/jar_wrapper.rb">
|
|
379
|
+
<provider selected="true" editor-type-id="text-editor">
|
|
380
|
+
<state line="0" column="53" selection-start="53" selection-end="53" vertical-scroll-proportion="0.0">
|
|
381
|
+
<folding />
|
|
382
|
+
</state>
|
|
383
|
+
</provider>
|
|
384
|
+
</entry>
|
|
385
|
+
<entry file="file://$PROJECT_DIR$/README.md">
|
|
386
|
+
<provider selected="true" editor-type-id="text-editor">
|
|
387
|
+
<state line="10" column="22" selection-start="175" selection-end="175" vertical-scroll-proportion="0.23323615">
|
|
388
|
+
<folding />
|
|
389
|
+
</state>
|
|
390
|
+
</provider>
|
|
391
|
+
</entry>
|
|
392
|
+
<entry file="file://$PROJECT_DIR$/CHANGES">
|
|
393
|
+
<provider selected="true" editor-type-id="text-editor">
|
|
394
|
+
<state line="14" column="17" selection-start="155" selection-end="155" vertical-scroll-proportion="0.3265306">
|
|
395
|
+
<folding />
|
|
396
|
+
</state>
|
|
397
|
+
</provider>
|
|
398
|
+
</entry>
|
|
399
|
+
<entry file="file://$PROJECT_DIR$/lib/jar_wrapper/version.rb">
|
|
400
|
+
<provider selected="true" editor-type-id="text-editor">
|
|
401
|
+
<state line="2" column="31" selection-start="41" selection-end="41" vertical-scroll-proportion="0.0">
|
|
402
|
+
<folding />
|
|
403
|
+
</state>
|
|
404
|
+
</provider>
|
|
405
|
+
</entry>
|
|
406
|
+
<entry file="file://$USER_HOME$/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/x86_64-darwin12.2.0/rbconfig.rb">
|
|
407
|
+
<provider selected="true" editor-type-id="text-editor">
|
|
408
|
+
<state line="4" column="7" selection-start="144" selection-end="144" vertical-scroll-proportion="0.09509658">
|
|
409
|
+
<folding />
|
|
410
|
+
</state>
|
|
411
|
+
</provider>
|
|
412
|
+
</entry>
|
|
413
|
+
<entry file="file://$PROJECT_DIR$/Gemfile">
|
|
414
|
+
<provider selected="true" editor-type-id="text-editor">
|
|
415
|
+
<state line="5" column="11" selection-start="62" selection-end="62" vertical-scroll-proportion="0.116618074">
|
|
416
|
+
<folding />
|
|
417
|
+
</state>
|
|
418
|
+
</provider>
|
|
419
|
+
</entry>
|
|
420
|
+
</component>
|
|
421
|
+
</project>
|
|
422
|
+
|
data/.rvmrc
ADDED
data/CHANGES
CHANGED
data/Gemfile
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
source :rubygems
|
|
2
|
+
|
|
3
|
+
require 'rbconfig'
|
|
4
|
+
|
|
5
|
+
def windows?
|
|
6
|
+
!!(RbConfig::CONFIG['host_os'] =~ /mswin|mingw|windows/)
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
gem "zip"
|
|
10
|
+
gem "rubyzip" if windows?
|
|
11
|
+
|
|
12
|
+
group :development do
|
|
13
|
+
gem "gemspec_deps_gen"
|
|
14
|
+
gem "gemcutter"
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
group :test do
|
|
18
|
+
gem "rspec"
|
|
19
|
+
gem "mocha"
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
GEM
|
|
2
|
+
remote: http://rubygems.org/
|
|
3
|
+
specs:
|
|
4
|
+
diff-lcs (1.1.3)
|
|
5
|
+
file_utils (1.0.6)
|
|
6
|
+
gemcutter (0.7.1)
|
|
7
|
+
gemspec_deps_gen (1.0.5)
|
|
8
|
+
file_utils
|
|
9
|
+
metaclass (0.0.1)
|
|
10
|
+
mocha (0.13.2)
|
|
11
|
+
metaclass (~> 0.0.1)
|
|
12
|
+
rspec (2.12.0)
|
|
13
|
+
rspec-core (~> 2.12.0)
|
|
14
|
+
rspec-expectations (~> 2.12.0)
|
|
15
|
+
rspec-mocks (~> 2.12.0)
|
|
16
|
+
rspec-core (2.12.2)
|
|
17
|
+
rspec-expectations (2.12.1)
|
|
18
|
+
diff-lcs (~> 1.1.3)
|
|
19
|
+
rspec-mocks (2.12.2)
|
|
20
|
+
zip (2.0.2)
|
|
21
|
+
|
|
22
|
+
PLATFORMS
|
|
23
|
+
ruby
|
|
24
|
+
|
|
25
|
+
DEPENDENCIES
|
|
26
|
+
gemcutter
|
|
27
|
+
gemspec_deps_gen
|
|
28
|
+
mocha
|
|
29
|
+
rspec
|
|
30
|
+
zip
|
data/README.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Jar Wrapper -- Jar wrapper for executable java jarjava jar
|
|
2
|
+
|
|
3
|
+
## Installing Jar Wrapper
|
|
4
|
+
|
|
5
|
+
$ gem install jar_wrapper
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
require 'jar_wrapper'
|
|
10
|
+
|
|
11
|
+
wrapper = JarWrapper::Runner.new
|
|
12
|
+
wrapper.java_opts = ["-Xmx1024m", "-Xss1024k" ]
|
|
13
|
+
|
|
14
|
+
1. install jar file from source URL into target file:
|
|
15
|
+
|
|
16
|
+
wrapper.install source, target
|
|
17
|
+
|
|
18
|
+
2. execute jar file (java -jar jar_file):
|
|
19
|
+
|
|
20
|
+
wrapper.jar_file = jar_file
|
|
21
|
+
wrapper.run ARGV
|
|
22
|
+
|
|
23
|
+
3. execute main class (java -cp ... main_class):
|
|
24
|
+
|
|
25
|
+
wrapper.classpath = some_class_path
|
|
26
|
+
wrapper.main_class = main_class
|
|
27
|
+
wrapper.run ARGV
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
data/Rakefile
CHANGED
|
@@ -1,54 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
gemspec.email = "alexander.shvets@gmail.com"
|
|
16
|
-
gemspec.homepage = "http://github.com/shvets/jar_wrapper"
|
|
17
|
-
gemspec.authors = ["Alexander Shvets"]
|
|
18
|
-
gemspec.files = FileList["CHANGES", "jar_wrapper.gemspec", "Rakefile", "README", "VERSION",
|
|
19
|
-
"lib/**/*", "bin/**/*"]
|
|
20
|
-
gemspec.requirements = ["none"]
|
|
21
|
-
gemspec.bindir = "bin"
|
|
22
|
-
|
|
23
|
-
gemspec.add_bundler_dependencies
|
|
24
|
-
end
|
|
25
|
-
rescue LoadError
|
|
26
|
-
puts "Jeweler not available. Install it s with: [sudo] gem install jeweler"
|
|
27
|
-
end
|
|
28
|
-
rescue LoadError
|
|
29
|
-
puts "Bundler not available. Install it s with: [sudo] gem install bundler"
|
|
1
|
+
#!/usr/bin/env rake
|
|
2
|
+
|
|
3
|
+
$LOAD_PATH.unshift File.expand_path("lib", File.dirname(__FILE__))
|
|
4
|
+
|
|
5
|
+
require "rspec/core/rake_task"
|
|
6
|
+
require "jar_wrapper/version"
|
|
7
|
+
require "gemspec_deps_gen/gemspec_deps_gen"
|
|
8
|
+
|
|
9
|
+
def version
|
|
10
|
+
JarWrapper::VERSION
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def project_name
|
|
14
|
+
File.basename(Dir.pwd)
|
|
30
15
|
end
|
|
31
16
|
|
|
17
|
+
task :build do
|
|
18
|
+
system "rm #{project_name}.gemspec"
|
|
19
|
+
generator = GemspecDepsGen.new
|
|
32
20
|
|
|
33
|
-
|
|
34
|
-
task :"release:gem" do
|
|
35
|
-
%x(
|
|
36
|
-
rake gemspec
|
|
37
|
-
rake build
|
|
38
|
-
rake install
|
|
39
|
-
git add .
|
|
40
|
-
)
|
|
41
|
-
puts "Commit message:"
|
|
42
|
-
message = STDIN.gets
|
|
21
|
+
generator.generate_dependencies "#{project_name}.gemspec.erb", "#{project_name}.gemspec"
|
|
43
22
|
|
|
44
|
-
|
|
23
|
+
system "gem build #{project_name}.gemspec"
|
|
24
|
+
end
|
|
45
25
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
git push origin master
|
|
26
|
+
task :install do
|
|
27
|
+
system "gem install #{project_name}-#{version}.gem"
|
|
28
|
+
end
|
|
50
29
|
|
|
51
|
-
|
|
52
|
-
|
|
30
|
+
task :release => :build do
|
|
31
|
+
system "gem push #{project_name}-#{version}.gem"
|
|
53
32
|
end
|
|
54
33
|
|
|
34
|
+
RSpec::Core::RakeTask.new do |task|
|
|
35
|
+
task.pattern = 'spec/**/*_spec.rb'
|
|
36
|
+
task.verbose = false
|
|
37
|
+
end
|
data/jar_wrapper.gemspec
CHANGED
|
@@ -1,55 +1,18 @@
|
|
|
1
|
-
# Generated by jeweler
|
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
|
4
1
|
# -*- encoding: utf-8 -*-
|
|
5
2
|
|
|
6
|
-
|
|
7
|
-
s.name = %q{jar_wrapper}
|
|
8
|
-
s.version = "0.1.2"
|
|
3
|
+
require File.expand_path(File.dirname(__FILE__) + '/lib/jar_wrapper/version')
|
|
9
4
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"README"
|
|
18
|
-
]
|
|
19
|
-
s.files = [
|
|
20
|
-
"CHANGES",
|
|
21
|
-
"README",
|
|
22
|
-
"Rakefile",
|
|
23
|
-
"VERSION",
|
|
24
|
-
"jar_wrapper.gemspec",
|
|
25
|
-
"lib/jar_wrapper.rb",
|
|
26
|
-
"lib/jar_wrapper/jar_wrapper.rb"
|
|
27
|
-
]
|
|
28
|
-
s.homepage = %q{http://github.com/shvets/jar_wrapper}
|
|
29
|
-
s.require_paths = [%q{lib}]
|
|
30
|
-
s.requirements = [%q{none}]
|
|
31
|
-
s.rubygems_version = %q{1.8.6}
|
|
32
|
-
s.summary = %q{Jar wrapper for executable java jar (Summary).}
|
|
5
|
+
Gem::Specification.new do |spec|
|
|
6
|
+
spec.name = "jar_wrapper"
|
|
7
|
+
spec.summary = %q{Jar wrapper for executable java jar.}
|
|
8
|
+
spec.description = %q{Jar wrapper for executable java jar.}
|
|
9
|
+
spec.email = "alexander.shvets@gmail.com"
|
|
10
|
+
spec.authors = ["Alexander Shvets"]
|
|
11
|
+
spec.homepage = "http://github.com/shvets/jar_wrapper"
|
|
33
12
|
|
|
34
|
-
|
|
35
|
-
|
|
13
|
+
spec.files = `git ls-files`.split($\)
|
|
14
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
15
|
+
spec.require_paths = ["lib"]
|
|
16
|
+
spec.version = JarWrapper::VERSION
|
|
36
17
|
|
|
37
|
-
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
|
38
|
-
s.add_runtime_dependency(%q<jeweler>, [">= 0"])
|
|
39
|
-
s.add_runtime_dependency(%q<zip>, [">= 0"])
|
|
40
|
-
s.add_runtime_dependency(%q<jeweler>, [">= 0"])
|
|
41
|
-
s.add_runtime_dependency(%q<zip>, [">= 0"])
|
|
42
|
-
else
|
|
43
|
-
s.add_dependency(%q<jeweler>, [">= 0"])
|
|
44
|
-
s.add_dependency(%q<zip>, [">= 0"])
|
|
45
|
-
s.add_dependency(%q<jeweler>, [">= 0"])
|
|
46
|
-
s.add_dependency(%q<zip>, [">= 0"])
|
|
47
|
-
end
|
|
48
|
-
else
|
|
49
|
-
s.add_dependency(%q<jeweler>, [">= 0"])
|
|
50
|
-
s.add_dependency(%q<zip>, [">= 0"])
|
|
51
|
-
s.add_dependency(%q<jeweler>, [">= 0"])
|
|
52
|
-
s.add_dependency(%q<zip>, [">= 0"])
|
|
53
|
-
end
|
|
54
18
|
end
|
|
55
|
-
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
|
2
|
+
|
|
3
|
+
require File.expand_path(File.dirname(__FILE__) + '/lib/jar_wrapper/version')
|
|
4
|
+
|
|
5
|
+
Gem::Specification.new do |spec|
|
|
6
|
+
spec.name = "jar_wrapper"
|
|
7
|
+
spec.summary = %q{Jar wrapper for executable java jar.}
|
|
8
|
+
spec.description = %q{Jar wrapper for executable java jar.}
|
|
9
|
+
spec.email = "alexander.shvets@gmail.com"
|
|
10
|
+
spec.authors = ["Alexander Shvets"]
|
|
11
|
+
spec.homepage = "http://github.com/shvets/jar_wrapper"
|
|
12
|
+
|
|
13
|
+
spec.files = `git ls-files`.split($\)
|
|
14
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
15
|
+
spec.require_paths = ["lib"]
|
|
16
|
+
spec.version = JarWrapper::VERSION
|
|
17
|
+
|
|
18
|
+
end
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
require 'open-uri'
|
|
2
|
+
|
|
3
|
+
# some code is extracted from redcar project (https://github.com/redcar/redcar) which is in turn extracted
|
|
4
|
+
# from ruby-processing gem (https://github.com/jashkenas/ruby-processing).
|
|
5
|
+
|
|
6
|
+
module JarWrapper
|
|
7
|
+
class Runner
|
|
8
|
+
attr_accessor :main_class, :classpath, :jar_file, :java_opts
|
|
9
|
+
|
|
10
|
+
def install source, destination
|
|
11
|
+
download_file_to(source, destination)
|
|
12
|
+
|
|
13
|
+
unzip_file(destination) if destination =~ /\.zip$/
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def run args
|
|
17
|
+
construct_command(args) do |command|
|
|
18
|
+
exec(command.join(" "))
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
private
|
|
23
|
+
|
|
24
|
+
def construct_command(args="")
|
|
25
|
+
command = ["java"]
|
|
26
|
+
command.push(*java_args)
|
|
27
|
+
# command.push("-Xbootclasspath/a:#{jruby_complete}")
|
|
28
|
+
# command.push("-Dfile.encoding=UTF8", "-Xmx320m", "-Xss1024k", "-Djruby.memory.max=320m", "-Djruby.stack.max=1024k", "org.jruby.Main")
|
|
29
|
+
command.push(*java_opts) if not (java_opts.nil? or java_opts.length == 0)
|
|
30
|
+
|
|
31
|
+
command.push("-jar", jar_file) if jar_file
|
|
32
|
+
command.push("-cp", classpath, main_class) if main_class
|
|
33
|
+
|
|
34
|
+
#command.push("-Djruby.memory.max=500m", "-Djruby.stack.max=1024k", "-cp", jruby_complete, "org.jruby.Main")
|
|
35
|
+
|
|
36
|
+
command.push "--debug" if debug_mode?
|
|
37
|
+
|
|
38
|
+
command.push(*cleaned_args(args))
|
|
39
|
+
|
|
40
|
+
puts command.join(' ')
|
|
41
|
+
yield command
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def cleaned_args args
|
|
45
|
+
# We should never pass --fork to a subprocess
|
|
46
|
+
result = args.find_all { |arg| arg != '--fork' }.map do |arg|
|
|
47
|
+
if arg =~ /--(.+)=(.+)/
|
|
48
|
+
"--" + $1 + "=\"" + $2 + "\""
|
|
49
|
+
else
|
|
50
|
+
arg
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
result.delete("install")
|
|
54
|
+
result
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
def debug_mode?
|
|
58
|
+
ARGV.include?("--debug")
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
def java_args
|
|
62
|
+
str = []
|
|
63
|
+
if Config::CONFIG["host_os"] =~ /darwin/
|
|
64
|
+
str.push "-XstartOnFirstThread"
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
str.push "-d32" if d32?
|
|
68
|
+
str.push "-client" if client?
|
|
69
|
+
|
|
70
|
+
str
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
def redirect
|
|
74
|
+
@redirect ||= "> #{null_device} 2>&1"
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
def d32?
|
|
78
|
+
@d32 ||= system("java -d32 #{redirect}")
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
def client?
|
|
82
|
+
@client ||= system("java -client #{redirect}")
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# @return [:osx/:windows/:linux]
|
|
86
|
+
def platform
|
|
87
|
+
case Config::CONFIG["target_os"]
|
|
88
|
+
when /darwin/
|
|
89
|
+
:osx
|
|
90
|
+
when /mswin|mingw/
|
|
91
|
+
:windows
|
|
92
|
+
when /linux/
|
|
93
|
+
:linux
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
def null_device
|
|
98
|
+
case platform
|
|
99
|
+
when :windows
|
|
100
|
+
'nul'
|
|
101
|
+
else
|
|
102
|
+
'/dev/null'
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
def download_file_to(uri, destination_file)
|
|
107
|
+
print " downloading #{uri}... "; $stdout.flush
|
|
108
|
+
|
|
109
|
+
temp = destination_file + ".part"
|
|
110
|
+
FileUtils.mkdir_p(File.dirname(destination_file))
|
|
111
|
+
|
|
112
|
+
File.open(temp, "wb") do |out_file|
|
|
113
|
+
open(uri) do |in_file|
|
|
114
|
+
done = false
|
|
115
|
+
|
|
116
|
+
while (!done) do
|
|
117
|
+
buffer = in_file.read(1024*1000)
|
|
118
|
+
out_file.write(buffer)
|
|
119
|
+
|
|
120
|
+
if buffer.nil? || buffer.size == 0
|
|
121
|
+
done = true
|
|
122
|
+
else
|
|
123
|
+
print("#"); $stdout.flush
|
|
124
|
+
end
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
if File.open(temp).read(200) =~ /Access Denied/
|
|
130
|
+
puts "\n\n*** Error downloading #{uri}, got Access Denied from S3."
|
|
131
|
+
FileUtils.rm_rf(temp)
|
|
132
|
+
exit
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
FileUtils.cp(temp, destination_file)
|
|
136
|
+
FileUtils.rm_rf(temp)
|
|
137
|
+
puts "\ndone!"
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# unzip a .zip file into the directory it is located
|
|
141
|
+
def unzip_file(path)
|
|
142
|
+
print "unzipping #{path}..."; $stdout.flush
|
|
143
|
+
source = File.expand_path(path)
|
|
144
|
+
Dir.chdir(File.dirname(source)) do
|
|
145
|
+
Zip::ZipFile.open(source) do |zipfile|
|
|
146
|
+
zipfile.entries.each do |entry|
|
|
147
|
+
FileUtils.mkdir_p(File.dirname(entry.name))
|
|
148
|
+
begin
|
|
149
|
+
entry.extract
|
|
150
|
+
rescue Zip::ZipDestinationFileExistsError
|
|
151
|
+
end
|
|
152
|
+
end
|
|
153
|
+
end
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
end
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
data/lib/jar_wrapper.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jar_wrapper
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.4
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,68 +9,36 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
13
|
-
dependencies:
|
|
14
|
-
- !ruby/object:Gem::Dependency
|
|
15
|
-
name: jeweler
|
|
16
|
-
requirement: &2157025780 !ruby/object:Gem::Requirement
|
|
17
|
-
none: false
|
|
18
|
-
requirements:
|
|
19
|
-
- - ! '>='
|
|
20
|
-
- !ruby/object:Gem::Version
|
|
21
|
-
version: '0'
|
|
22
|
-
type: :runtime
|
|
23
|
-
prerelease: false
|
|
24
|
-
version_requirements: *2157025780
|
|
25
|
-
- !ruby/object:Gem::Dependency
|
|
26
|
-
name: zip
|
|
27
|
-
requirement: &2157025120 !ruby/object:Gem::Requirement
|
|
28
|
-
none: false
|
|
29
|
-
requirements:
|
|
30
|
-
- - ! '>='
|
|
31
|
-
- !ruby/object:Gem::Version
|
|
32
|
-
version: '0'
|
|
33
|
-
type: :runtime
|
|
34
|
-
prerelease: false
|
|
35
|
-
version_requirements: *2157025120
|
|
36
|
-
- !ruby/object:Gem::Dependency
|
|
37
|
-
name: jeweler
|
|
38
|
-
requirement: &2157024480 !ruby/object:Gem::Requirement
|
|
39
|
-
none: false
|
|
40
|
-
requirements:
|
|
41
|
-
- - ! '>='
|
|
42
|
-
- !ruby/object:Gem::Version
|
|
43
|
-
version: '0'
|
|
44
|
-
type: :runtime
|
|
45
|
-
prerelease: false
|
|
46
|
-
version_requirements: *2157024480
|
|
47
|
-
- !ruby/object:Gem::Dependency
|
|
48
|
-
name: zip
|
|
49
|
-
requirement: &2157023880 !ruby/object:Gem::Requirement
|
|
50
|
-
none: false
|
|
51
|
-
requirements:
|
|
52
|
-
- - ! '>='
|
|
53
|
-
- !ruby/object:Gem::Version
|
|
54
|
-
version: '0'
|
|
55
|
-
type: :runtime
|
|
56
|
-
prerelease: false
|
|
57
|
-
version_requirements: *2157023880
|
|
12
|
+
date: 2013-02-12 00:00:00.000000000 Z
|
|
13
|
+
dependencies: []
|
|
58
14
|
description: Jar wrapper for executable java jar.
|
|
59
15
|
email: alexander.shvets@gmail.com
|
|
60
16
|
executables: []
|
|
61
17
|
extensions: []
|
|
62
|
-
extra_rdoc_files:
|
|
63
|
-
- LICENSE
|
|
64
|
-
- README
|
|
18
|
+
extra_rdoc_files: []
|
|
65
19
|
files:
|
|
20
|
+
- .gitignore
|
|
21
|
+
- .idea/.name
|
|
22
|
+
- .idea/.rakeTasks
|
|
23
|
+
- .idea/encodings.xml
|
|
24
|
+
- .idea/jar_wrapper.iml
|
|
25
|
+
- .idea/misc.xml
|
|
26
|
+
- .idea/modules.xml
|
|
27
|
+
- .idea/scopes/scope_settings.xml
|
|
28
|
+
- .idea/vcs.xml
|
|
29
|
+
- .idea/workspace.xml
|
|
30
|
+
- .rvmrc
|
|
66
31
|
- CHANGES
|
|
67
|
-
-
|
|
32
|
+
- Gemfile
|
|
33
|
+
- Gemfile.lock
|
|
34
|
+
- LICENSE
|
|
35
|
+
- README.md
|
|
68
36
|
- Rakefile
|
|
69
|
-
- VERSION
|
|
70
37
|
- jar_wrapper.gemspec
|
|
38
|
+
- jar_wrapper.gemspec.erb
|
|
71
39
|
- lib/jar_wrapper.rb
|
|
72
|
-
- lib/jar_wrapper/
|
|
73
|
-
-
|
|
40
|
+
- lib/jar_wrapper/runner.rb
|
|
41
|
+
- lib/jar_wrapper/version.rb
|
|
74
42
|
homepage: http://github.com/shvets/jar_wrapper
|
|
75
43
|
licenses: []
|
|
76
44
|
post_install_message:
|
|
@@ -89,11 +57,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
89
57
|
- - ! '>='
|
|
90
58
|
- !ruby/object:Gem::Version
|
|
91
59
|
version: '0'
|
|
92
|
-
requirements:
|
|
93
|
-
- none
|
|
60
|
+
requirements: []
|
|
94
61
|
rubyforge_project:
|
|
95
|
-
rubygems_version: 1.8.
|
|
62
|
+
rubygems_version: 1.8.25
|
|
96
63
|
signing_key:
|
|
97
64
|
specification_version: 3
|
|
98
|
-
summary: Jar wrapper for executable java jar
|
|
65
|
+
summary: Jar wrapper for executable java jar.
|
|
99
66
|
test_files: []
|
data/README
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
= Jar Wrapper -- Jar wrapper for executable java jarjava jar
|
|
2
|
-
|
|
3
|
-
= Installing Jar Wrapper
|
|
4
|
-
|
|
5
|
-
== Installing Jar Wrapper
|
|
6
|
-
$ gem install jar_wrapper
|
|
7
|
-
|
|
8
|
-
== Usage
|
|
9
|
-
|
|
10
|
-
require 'jar_wrapper'
|
|
11
|
-
|
|
12
|
-
wrapper = JarWrapper.new
|
|
13
|
-
wrapper.java_opts = ["-Xmx1024m", "-Xss1024k" ]
|
|
14
|
-
|
|
15
|
-
# 1. install jar file from source URL into target file:
|
|
16
|
-
|
|
17
|
-
wrapper.install source, target
|
|
18
|
-
|
|
19
|
-
# 2. execute jar file (java -jar jar_file):
|
|
20
|
-
|
|
21
|
-
wrapper.jar_file = jar_file
|
|
22
|
-
wrapper.run ARGV
|
|
23
|
-
|
|
24
|
-
# 3. execute main class (java -cp ... main_class):
|
|
25
|
-
|
|
26
|
-
wrapper.classpath = some_class_path
|
|
27
|
-
wrapper.main_class = main_class
|
|
28
|
-
wrapper.run ARGV
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
data/VERSION
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0.1.2
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
require 'open-uri'
|
|
2
|
-
|
|
3
|
-
# some code is extracted from redcar project (https://github.com/redcar/redcar) which is in turn extracted
|
|
4
|
-
# from ruby-processing gem (https://github.com/jashkenas/ruby-processing).
|
|
5
|
-
|
|
6
|
-
class JarWrapper
|
|
7
|
-
attr_accessor :main_class, :classpath, :jar_file, :java_opts
|
|
8
|
-
|
|
9
|
-
def install source, destination
|
|
10
|
-
download_file_to(source, destination)
|
|
11
|
-
|
|
12
|
-
unzip_file(destination) if destination =~ /\.zip$/
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
def run args
|
|
16
|
-
construct_command(args) do |command|
|
|
17
|
-
exec(command.join(" "))
|
|
18
|
-
end
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
private
|
|
22
|
-
|
|
23
|
-
def construct_command(args="")
|
|
24
|
-
command = ["java"]
|
|
25
|
-
command.push(*java_args)
|
|
26
|
-
# command.push("-Xbootclasspath/a:#{jruby_complete}")
|
|
27
|
-
# command.push("-Dfile.encoding=UTF8", "-Xmx320m", "-Xss1024k", "-Djruby.memory.max=320m", "-Djruby.stack.max=1024k", "org.jruby.Main")
|
|
28
|
-
command.push(*java_opts) if !java_opts.nil?
|
|
29
|
-
|
|
30
|
-
command.push("-jar", jar_file) if jar_file
|
|
31
|
-
command.push("-cp", classpath, main_class) if main_class
|
|
32
|
-
|
|
33
|
-
#command.push("-Djruby.memory.max=500m", "-Djruby.stack.max=1024k", "-cp", jruby_complete, "org.jruby.Main")
|
|
34
|
-
|
|
35
|
-
command.push "--debug" if debug_mode?
|
|
36
|
-
|
|
37
|
-
command.push(*cleaned_args(args))
|
|
38
|
-
|
|
39
|
-
puts command.join(' ')
|
|
40
|
-
yield command
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
def cleaned_args args
|
|
44
|
-
# We should never pass --fork to a subprocess
|
|
45
|
-
result = args.find_all { |arg| arg != '--fork' }.map do |arg|
|
|
46
|
-
if arg =~ /--(.+)=(.+)/
|
|
47
|
-
"--" + $1 + "=\"" + $2 + "\""
|
|
48
|
-
else
|
|
49
|
-
arg
|
|
50
|
-
end
|
|
51
|
-
end
|
|
52
|
-
result.delete("install")
|
|
53
|
-
result
|
|
54
|
-
end
|
|
55
|
-
|
|
56
|
-
def debug_mode?
|
|
57
|
-
ARGV.include?("--debug")
|
|
58
|
-
end
|
|
59
|
-
|
|
60
|
-
def java_args
|
|
61
|
-
str = []
|
|
62
|
-
if Config::CONFIG["host_os"] =~ /darwin/
|
|
63
|
-
str.push "-XstartOnFirstThread"
|
|
64
|
-
end
|
|
65
|
-
|
|
66
|
-
str.push "-d32" if d32?
|
|
67
|
-
str.push "-client" if client?
|
|
68
|
-
|
|
69
|
-
str
|
|
70
|
-
end
|
|
71
|
-
|
|
72
|
-
def redirect
|
|
73
|
-
@redirect ||= "> #{null_device} 2>&1"
|
|
74
|
-
end
|
|
75
|
-
|
|
76
|
-
def d32?
|
|
77
|
-
@d32 ||= system("java -d32 #{redirect}")
|
|
78
|
-
end
|
|
79
|
-
|
|
80
|
-
def client?
|
|
81
|
-
@client ||= system("java -client #{redirect}")
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
# @return [:osx/:windows/:linux]
|
|
85
|
-
def platform
|
|
86
|
-
case Config::CONFIG["target_os"]
|
|
87
|
-
when /darwin/
|
|
88
|
-
:osx
|
|
89
|
-
when /mswin|mingw/
|
|
90
|
-
:windows
|
|
91
|
-
when /linux/
|
|
92
|
-
:linux
|
|
93
|
-
end
|
|
94
|
-
end
|
|
95
|
-
|
|
96
|
-
def null_device
|
|
97
|
-
case platform
|
|
98
|
-
when :windows
|
|
99
|
-
'nul'
|
|
100
|
-
else
|
|
101
|
-
'/dev/null'
|
|
102
|
-
end
|
|
103
|
-
end
|
|
104
|
-
|
|
105
|
-
def download_file_to(uri, destination_file)
|
|
106
|
-
print " downloading #{uri}... "; $stdout.flush
|
|
107
|
-
|
|
108
|
-
temp = destination_file + ".part"
|
|
109
|
-
FileUtils.mkdir_p(File.dirname(destination_file))
|
|
110
|
-
|
|
111
|
-
File.open(temp, "wb") do |out_file|
|
|
112
|
-
open(uri) do |in_file|
|
|
113
|
-
done = false
|
|
114
|
-
|
|
115
|
-
while(!done) do
|
|
116
|
-
buffer = in_file.read(1024*1000)
|
|
117
|
-
out_file.write(buffer)
|
|
118
|
-
|
|
119
|
-
if buffer.nil? || buffer.size == 0
|
|
120
|
-
done = true
|
|
121
|
-
else
|
|
122
|
-
print("#"); $stdout.flush
|
|
123
|
-
end
|
|
124
|
-
end
|
|
125
|
-
end
|
|
126
|
-
end
|
|
127
|
-
|
|
128
|
-
if File.open(temp).read(200) =~ /Access Denied/
|
|
129
|
-
puts "\n\n*** Error downloading #{uri}, got Access Denied from S3."
|
|
130
|
-
FileUtils.rm_rf(temp)
|
|
131
|
-
exit
|
|
132
|
-
end
|
|
133
|
-
|
|
134
|
-
FileUtils.cp(temp, destination_file)
|
|
135
|
-
FileUtils.rm_rf(temp)
|
|
136
|
-
puts "\ndone!"
|
|
137
|
-
end
|
|
138
|
-
|
|
139
|
-
# unzip a .zip file into the directory it is located
|
|
140
|
-
def unzip_file(path)
|
|
141
|
-
print "unzipping #{path}..."; $stdout.flush
|
|
142
|
-
source = File.expand_path(path)
|
|
143
|
-
Dir.chdir(File.dirname(source)) do
|
|
144
|
-
Zip::ZipFile.open(source) do |zipfile|
|
|
145
|
-
zipfile.entries.each do |entry|
|
|
146
|
-
FileUtils.mkdir_p(File.dirname(entry.name))
|
|
147
|
-
begin
|
|
148
|
-
entry.extract
|
|
149
|
-
rescue Zip::ZipDestinationFileExistsError
|
|
150
|
-
end
|
|
151
|
-
end
|
|
152
|
-
end
|
|
153
|
-
end
|
|
154
|
-
end
|
|
155
|
-
end
|
|
156
|
-
|
|
157
|
-
|