search_biomodel 1.0.3 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/.document CHANGED
File without changes
data/.idea/.name ADDED
@@ -0,0 +1 @@
1
+ search_biomodel
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="Build gem into pkg/" fullCmd="build" taksId="build" /><RakeTask description="Remove rcov products for rcov" fullCmd="clobber_rcov" taksId="clobber_rcov" /><RakeTask description="Remove rdoc products" fullCmd="clobber_rdoc" taksId="clobber_rdoc" /><RakeTask description="Start IRB with all runtime dependencies loaded" fullCmd="console[script]" taksId="console[script]" /><RakeGroup description="" fullCmd="" taksId="gemcutter"><RakeTask description="Release gem to Gemcutter" fullCmd="gemcutter:release" taksId="release" /></RakeGroup><RakeTask description="Generate and validate gemspec" fullCmd="gemspec" taksId="gemspec" /><RakeGroup description="" fullCmd="" taksId="gemspec"><RakeTask description="Display the gemspec for debugging purposes, as jeweler knows it (not from the filesystem)" fullCmd="gemspec:debug" taksId="debug" /><RakeTask description="Regenreate the gemspec on the filesystem" fullCmd="gemspec:generate" taksId="generate" /><RakeTask description="Regenerate and validate gemspec, and then commits and pushes to git" fullCmd="gemspec:release" taksId="release" /><RakeTask description="Validates the gemspec on the filesystem" fullCmd="gemspec:validate" taksId="validate" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="git"><RakeTask description="Tag and push release to git" fullCmd="git:release" taksId="release" /></RakeGroup><RakeTask description="Build and install gem using `gem install`" fullCmd="install" taksId="install" /><RakeTask description="Analyze code coverage with tests" fullCmd="rcov" taksId="rcov" /><RakeTask description="Build the rdoc HTML Files" fullCmd="rdoc" taksId="rdoc" /><RakeTask description="Release gem" fullCmd="release" taksId="release" /><RakeTask description="Force a rebuild of the RDOC files" fullCmd="rerdoc" taksId="rerdoc" /><RakeTask description="Run tests" fullCmd="test" taksId="test" /><RakeTask description="Displays the current version" fullCmd="version" taksId="version" /><RakeGroup description="" fullCmd="" taksId="version"><RakeGroup description="" fullCmd="" taksId="bump"><RakeTask description="Bump the major version by 1" fullCmd="version:bump:major" taksId="major" /><RakeTask description="Bump the a minor version by 1" fullCmd="version:bump:minor" taksId="minor" /><RakeTask description="Bump the patch version by 1" fullCmd="version:bump:patch" taksId="patch" /></RakeGroup><RakeTask description="Writes out an explicit version" fullCmd="version:write" taksId="write" /></RakeGroup><RakeTask description="" fullCmd="clobber" taksId="clobber" /><RakeTask description="" fullCmd="console" taksId="console" /><RakeTask description="" fullCmd="default" taksId="default" /><RakeTask description="" fullCmd="gemspec_required" taksId="gemspec_required" /><RakeTask description="" fullCmd="rdoc/index.html" taksId="rdoc/index.html" /><RakeTask description="" fullCmd="version_required" taksId="version_required" /></RakeGroup></Settings>
@@ -0,0 +1,7 @@
1
+ <component name="ProjectDictionaryState">
2
+ <dictionary name="root">
3
+ <words>
4
+ <w>chebiid</w>
5
+ </words>
6
+ </dictionary>
7
+ </component>
@@ -0,0 +1,5 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
4
+ </project>
5
+
data/.idea/misc.xml ADDED
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="DependencyValidationManager">
4
+ <option name="SKIP_IMPORT_STATEMENTS" value="false" />
5
+ </component>
6
+ <component name="ProjectRootManager" version="2" project-jdk-name="ruby-1.8.7-p249" project-jdk-type="RUBY_SDK" />
7
+ </project>
8
+
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/search_biomodel.iml" filepath="$PROJECT_DIR$/.idea/search_biomodel.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
9
+
@@ -0,0 +1,44 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="RUBY_MODULE" version="4">
3
+ <component name="GemRequirementsHolder" version="3">
4
+ <requirement>
5
+ <requirement>
6
+ <dependency name="jeweler" version="1.6.2" bound="LATEST_IN_BRANCH" git="false" path="false" doRequire="true" />
7
+ </requirement>
8
+ <source from="Gemfile" />
9
+ </requirement>
10
+ <requirement>
11
+ <requirement>
12
+ <dependency name="rcov" version="0" bound="GREATER_OR_EQUAL" git="false" path="false" doRequire="true" />
13
+ </requirement>
14
+ <source from="Gemfile" />
15
+ </requirement>
16
+ <requirement>
17
+ <requirement>
18
+ <dependency name="savon" version="0.9.2" bound="LATEST_IN_BRANCH" git="false" path="false" doRequire="true" />
19
+ </requirement>
20
+ <source from="Gemfile" />
21
+ </requirement>
22
+ </component>
23
+ <component name="NewModuleRootManager">
24
+ <content url="file://$MODULE_DIR$">
25
+ <excludeFolder url="file://$MODULE_DIR$/.bundle" />
26
+ </content>
27
+ <orderEntry type="inheritedJdk" />
28
+ <orderEntry type="sourceFolder" forTests="false" />
29
+ <orderEntry type="library" scope="PROVIDED" name="[gem] bundler (v1.0.15, /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15)" level="application" />
30
+ <orderEntry type="library" scope="PROVIDED" name="[gem] jeweler (v1.6.2, /usr/lib/ruby/gems/1.8/gems/jeweler-1.6.2)" level="application" />
31
+ <orderEntry type="library" scope="PROVIDED" name="[gem] rcov (v0.9.9, /root/.gem/ruby/1.8/gems/rcov-0.9.9)" level="application" />
32
+ <orderEntry type="library" scope="PROVIDED" name="[gem] savon (v0.9.2, /usr/lib/ruby/gems/1.8/gems/savon-0.9.2)" level="application" />
33
+ <orderEntry type="library" scope="PROVIDED" name="[gem] git (v1.2.5, /usr/lib/ruby/gems/1.8/gems/git-1.2.5)" level="application" />
34
+ <orderEntry type="library" scope="PROVIDED" name="[gem] builder (v3.0.0, /usr/lib/ruby/gems/1.8/gems/builder-3.0.0)" level="application" />
35
+ <orderEntry type="library" scope="PROVIDED" name="[gem] gyoku (v0.4.4, /usr/lib/ruby/gems/1.8/gems/gyoku-0.4.4)" level="application" />
36
+ <orderEntry type="library" scope="PROVIDED" name="[gem] rake (v0.8.7, /usr/lib/ruby/gems/1.8/gems/rake-0.8.7)" level="application" />
37
+ <orderEntry type="library" scope="PROVIDED" name="[gem] pyu-ntlm-http (v0.1.3.1, /usr/lib/ruby/gems/1.8/gems/pyu-ntlm-http-0.1.3.1)" level="application" />
38
+ <orderEntry type="library" scope="PROVIDED" name="[gem] rack (v1.3.0, /usr/lib/ruby/gems/1.8/gems/rack-1.3.0)" level="application" />
39
+ <orderEntry type="library" scope="PROVIDED" name="[gem] nokogiri (v1.4.6, /usr/lib/ruby/gems/1.8/gems/nokogiri-1.4.6)" level="application" />
40
+ <orderEntry type="library" scope="PROVIDED" name="[gem] httpi (v0.9.4, /usr/lib/ruby/gems/1.8/gems/httpi-0.9.4)" level="application" />
41
+ <orderEntry type="library" scope="PROVIDED" name="[gem] nori (v1.0.1, /usr/lib/ruby/gems/1.8/gems/nori-1.0.1)" level="application" />
42
+ </component>
43
+ </module>
44
+
data/.idea/vcs.xml ADDED
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
+ </component>
6
+ </project>
7
+
@@ -0,0 +1,443 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ChangeListManager">
4
+ <list default="true" id="c5060248-6b34-4e75-b0c1-8bf3e1f0b7e1" name="Default" comment="">
5
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
6
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/search_biomodel.rb" afterPath="$PROJECT_DIR$/lib/search_biomodel.rb" />
7
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/test/test_search_biomodel.rb" afterPath="$PROJECT_DIR$/test/test_search_biomodel.rb" />
8
+ </list>
9
+ <ignored path="search_biomodel.iws" />
10
+ <ignored path=".idea/workspace.xml" />
11
+ <option name="TRACKING_ENABLED" value="true" />
12
+ <option name="SHOW_DIALOG" value="false" />
13
+ <option name="HIGHLIGHT_CONFLICTS" value="true" />
14
+ <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
15
+ <option name="LAST_RESOLUTION" value="IGNORE" />
16
+ </component>
17
+ <component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
18
+ <component name="CoverageDataManager" choice="3" />
19
+ <component name="CreatePatchCommitExecutor">
20
+ <option name="PATCH_PATH" value="" />
21
+ <option name="REVERSE_PATCH" value="false" />
22
+ </component>
23
+ <component name="DaemonCodeAnalyzer">
24
+ <disable_hints />
25
+ </component>
26
+ <component name="FavoritesManager">
27
+ <favorites_list name="search_biomodel" />
28
+ </component>
29
+ <component name="FileEditorManager">
30
+ <leaf>
31
+ <file leaf-file-name="test_search_biomodel.rb" pinned="false" current="false" current-in-tab="false">
32
+ <entry file="file://$PROJECT_DIR$/test/test_search_biomodel.rb">
33
+ <provider selected="true" editor-type-id="text-editor">
34
+ <state line="28" column="77" selection-start="811" selection-end="811" vertical-scroll-proportion="0.0">
35
+ <folding />
36
+ </state>
37
+ </provider>
38
+ </entry>
39
+ </file>
40
+ <file leaf-file-name="search_biomodel.rb" pinned="false" current="true" current-in-tab="true">
41
+ <entry file="file://$PROJECT_DIR$/lib/search_biomodel.rb">
42
+ <provider selected="true" editor-type-id="text-editor">
43
+ <state line="28" column="116" selection-start="768" selection-end="768" vertical-scroll-proportion="0.7094595">
44
+ <folding />
45
+ </state>
46
+ </provider>
47
+ </entry>
48
+ </file>
49
+ <file leaf-file-name="search_biomodel.gemspec" pinned="false" current="false" current-in-tab="false">
50
+ <entry file="file://$PROJECT_DIR$/search_biomodel.gemspec">
51
+ <provider selected="true" editor-type-id="text-editor">
52
+ <state line="59" column="99" selection-start="1896" selection-end="1896" vertical-scroll-proportion="0.0">
53
+ <folding />
54
+ </state>
55
+ </provider>
56
+ </entry>
57
+ </file>
58
+ <file leaf-file-name="helper.rb" pinned="false" current="false" current-in-tab="false">
59
+ <entry file="file://$PROJECT_DIR$/test/helper.rb">
60
+ <provider selected="true" editor-type-id="text-editor">
61
+ <state line="7" column="25" selection-start="224" selection-end="224" vertical-scroll-proportion="0.0">
62
+ <folding />
63
+ </state>
64
+ </provider>
65
+ </entry>
66
+ </file>
67
+ </leaf>
68
+ </component>
69
+ <component name="FindManager">
70
+ <FindUsagesManager>
71
+ <setting name="OPEN_NEW_TAB" value="false" />
72
+ </FindUsagesManager>
73
+ </component>
74
+ <component name="Git.Settings">
75
+ <option name="CHECKOUT_INCLUDE_TAGS" value="false" />
76
+ <option name="UPDATE_CHANGES_POLICY" value="STASH" />
77
+ </component>
78
+ <component name="IdeDocumentHistory">
79
+ <option name="changedFiles">
80
+ <list>
81
+ <option value="$PROJECT_DIR$/test/helper.rb" />
82
+ <option value="$PROJECT_DIR$/LICENSE.txt" />
83
+ <option value="$PROJECT_DIR$/README.rdoc" />
84
+ <option value="$PROJECT_DIR$/search_biomodel.gemspec" />
85
+ <option value="$PROJECT_DIR$/test/test_search_biomodel.rb" />
86
+ <option value="$PROJECT_DIR$/lib/search_biomodel.rb" />
87
+ </list>
88
+ </option>
89
+ </component>
90
+ <component name="ProjectLevelVcsManager" settingsEditedManually="false">
91
+ <OptionsSetting value="true" id="Add" />
92
+ <OptionsSetting value="true" id="Remove" />
93
+ <OptionsSetting value="true" id="Checkout" />
94
+ <OptionsSetting value="true" id="Update" />
95
+ <OptionsSetting value="true" id="Status" />
96
+ <OptionsSetting value="true" id="Edit" />
97
+ <ConfirmationsSetting value="0" id="Add" />
98
+ <ConfirmationsSetting value="0" id="Remove" />
99
+ </component>
100
+ <component name="ProjectReloadState">
101
+ <option name="STATE" value="0" />
102
+ </component>
103
+ <component name="ProjectView">
104
+ <navigator currentView="ProjectPane" proportions="" version="1" splitterProportion="0.5">
105
+ <flattenPackages />
106
+ <showMembers />
107
+ <showModules />
108
+ <showLibraryContents />
109
+ <hideEmptyPackages />
110
+ <abbreviatePackageNames />
111
+ <autoscrollToSource />
112
+ <autoscrollFromSource />
113
+ <sortByType />
114
+ </navigator>
115
+ <panes>
116
+ <pane id="ProjectPane">
117
+ <subPane>
118
+ <PATH>
119
+ <PATH_ELEMENT>
120
+ <option name="myItemId" value="search_biomodel" />
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="search_biomodel" />
127
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
128
+ </PATH_ELEMENT>
129
+ <PATH_ELEMENT>
130
+ <option name="myItemId" value="search_biomodel" />
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="search_biomodel" />
137
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
138
+ </PATH_ELEMENT>
139
+ <PATH_ELEMENT>
140
+ <option name="myItemId" value="search_biomodel" />
141
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
142
+ </PATH_ELEMENT>
143
+ <PATH_ELEMENT>
144
+ <option name="myItemId" value="test" />
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="search_biomodel" />
151
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
152
+ </PATH_ELEMENT>
153
+ <PATH_ELEMENT>
154
+ <option name="myItemId" value="search_biomodel" />
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>
162
+ </subPane>
163
+ </pane>
164
+ <pane id="Favorites" />
165
+ <pane id="Scope" />
166
+ </panes>
167
+ </component>
168
+ <component name="PropertiesComponent">
169
+ <property name="recentsLimit" value="5" />
170
+ </component>
171
+ <component name="RunManager" selected="Test::Unit/Shoulda.TestSearchBiomodel">
172
+ <configuration default="false" name="test_find_all_models" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda" temporary="true">
173
+ <predefined_log_file id="RUBY_TESTUNIT" enabled="true" />
174
+ <module name="search_biomodel" />
175
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
176
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$PROJECT_DIR$/test" />
177
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
178
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
179
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
180
+ <envs />
181
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
182
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" track_test_folders="true" runner="rcov">
183
+ <COVERAGE_PATTERN ENABLED="true">
184
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
185
+ </COVERAGE_PATTERN>
186
+ </EXTENSION>
187
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
188
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$PROJECT_DIR$/test/test_search_biomodel.rb" />
189
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_CLASS_NAME" VALUE="TestSearchBiomodel" />
190
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="" />
191
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="test_find_all_models" />
192
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_METHOD" />
193
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="INHERITANCE_CHECK_DISABLED" VALUE="false" />
194
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
195
+ <RunnerSettings RunnerId="RubyRunner" />
196
+ <ConfigurationWrapper RunnerId="RubyRunner" />
197
+ <method />
198
+ </configuration>
199
+ <configuration default="false" name="TestSearchBiomodel" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda" temporary="true">
200
+ <predefined_log_file id="RUBY_TESTUNIT" enabled="true" />
201
+ <module name="search_biomodel" />
202
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
203
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$PROJECT_DIR$/test" />
204
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
205
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
206
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
207
+ <envs />
208
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
209
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" track_test_folders="true" runner="rcov">
210
+ <COVERAGE_PATTERN ENABLED="true">
211
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
212
+ </COVERAGE_PATTERN>
213
+ </EXTENSION>
214
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
215
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$PROJECT_DIR$/test/test_search_biomodel.rb" />
216
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_CLASS_NAME" VALUE="" />
217
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="" />
218
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="" />
219
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
220
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="INHERITANCE_CHECK_DISABLED" VALUE="false" />
221
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
222
+ <RunnerSettings RunnerId="RubyRunner" />
223
+ <ConfigurationWrapper RunnerId="RubyRunner" />
224
+ <method />
225
+ </configuration>
226
+ <configuration default="false" name="test_search_by_ChEBIID" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda" temporary="true">
227
+ <predefined_log_file id="RUBY_TESTUNIT" enabled="true" />
228
+ <module name="search_biomodel" />
229
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
230
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$PROJECT_DIR$/test" />
231
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
232
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
233
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
234
+ <envs />
235
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
236
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" track_test_folders="true" runner="rcov">
237
+ <COVERAGE_PATTERN ENABLED="true">
238
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
239
+ </COVERAGE_PATTERN>
240
+ </EXTENSION>
241
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
242
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$PROJECT_DIR$/test/test_search_biomodel.rb" />
243
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_CLASS_NAME" VALUE="TestSearchBiomodel" />
244
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="" />
245
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="test_search_by_ChEBIID" />
246
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_METHOD" />
247
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="INHERITANCE_CHECK_DISABLED" VALUE="false" />
248
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
249
+ <RunnerSettings RunnerId="RubyRunner" />
250
+ <ConfigurationWrapper RunnerId="RubyRunner" />
251
+ <method />
252
+ </configuration>
253
+ <configuration default="true" type="RubyRunConfigurationType" factoryName="Ruby">
254
+ <module name="" />
255
+ <RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
256
+ <RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="" />
257
+ <RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
258
+ <RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
259
+ <RUBY_RUN_CONFIG NAME="myPassParentEnvs" VALUE="true" />
260
+ <envs />
261
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
262
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" track_test_folders="true" runner="rcov">
263
+ <COVERAGE_PATTERN ENABLED="true">
264
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
265
+ </COVERAGE_PATTERN>
266
+ </EXTENSION>
267
+ <RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="" />
268
+ <RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
269
+ <method />
270
+ </configuration>
271
+ <configuration default="true" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda">
272
+ <predefined_log_file id="RUBY_TESTUNIT" enabled="true" />
273
+ <module name="" />
274
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
275
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
276
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
277
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
278
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
279
+ <envs />
280
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
281
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" track_test_folders="true" runner="rcov">
282
+ <COVERAGE_PATTERN ENABLED="true">
283
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
284
+ </COVERAGE_PATTERN>
285
+ </EXTENSION>
286
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
287
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
288
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_CLASS_NAME" VALUE="" />
289
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="" />
290
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="" />
291
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
292
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="INHERITANCE_CHECK_DISABLED" VALUE="false" />
293
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
294
+ <method />
295
+ </configuration>
296
+ <list size="3">
297
+ <item index="0" class="java.lang.String" itemvalue="Test::Unit/Shoulda.test_find_all_models" />
298
+ <item index="1" class="java.lang.String" itemvalue="Test::Unit/Shoulda.TestSearchBiomodel" />
299
+ <item index="2" class="java.lang.String" itemvalue="Test::Unit/Shoulda.test_search_by_ChEBIID" />
300
+ </list>
301
+ </component>
302
+ <component name="ShelveChangesManager" show_recycled="false" />
303
+ <component name="SvnConfiguration" maxAnnotateRevisions="500">
304
+ <option name="USER" value="" />
305
+ <option name="PASSWORD" value="" />
306
+ <option name="LAST_MERGED_REVISION" />
307
+ <option name="MERGE_DRY_RUN" value="false" />
308
+ <option name="MERGE_DIFF_USE_ANCESTRY" value="true" />
309
+ <option name="UPDATE_LOCK_ON_DEMAND" value="false" />
310
+ <option name="IGNORE_SPACES_IN_MERGE" value="false" />
311
+ <option name="DETECT_NESTED_COPIES" value="true" />
312
+ <option name="CHECK_NESTED_FOR_QUICK_MERGE" value="false" />
313
+ <option name="IGNORE_SPACES_IN_ANNOTATE" value="true" />
314
+ <option name="SHOW_MERGE_SOURCES_IN_ANNOTATE" value="true" />
315
+ <option name="FORCE_UPDATE" value="false" />
316
+ <myIsUseDefaultProxy>false</myIsUseDefaultProxy>
317
+ </component>
318
+ <component name="TaskManager">
319
+ <task active="true" id="Default" summary="Default task">
320
+ <created>1309955102836</created>
321
+ <updated>1309955102836</updated>
322
+ </task>
323
+ <servers />
324
+ </component>
325
+ <component name="TodoView" selected-index="0">
326
+ <todo-panel id="selected-file">
327
+ <are-packages-shown value="false" />
328
+ <are-modules-shown value="false" />
329
+ <flatten-packages value="false" />
330
+ <is-autoscroll-to-source value="false" />
331
+ </todo-panel>
332
+ <todo-panel id="all">
333
+ <are-packages-shown value="false" />
334
+ <are-modules-shown value="false" />
335
+ <flatten-packages value="false" />
336
+ <is-autoscroll-to-source value="false" />
337
+ </todo-panel>
338
+ <todo-panel id="default-changelist">
339
+ <are-packages-shown value="false" />
340
+ <are-modules-shown value="false" />
341
+ <flatten-packages value="false" />
342
+ <is-autoscroll-to-source value="false" />
343
+ </todo-panel>
344
+ </component>
345
+ <component name="ToolWindowManager">
346
+ <frame x="0" y="0" width="1680" height="1050" extended-state="0" />
347
+ <editor active="true" />
348
+ <layout>
349
+ <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32972974" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
350
+ <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32972974" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
351
+ <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32972974" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
352
+ <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" />
353
+ <window_info id="Dependency Viewer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
354
+ <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.2496977" sideWeight="0.67027026" order="0" side_tool="false" content_ui="tabs" />
355
+ <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" />
356
+ <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32972974" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
357
+ <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32972974" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
358
+ <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" />
359
+ <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" />
360
+ <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" />
361
+ <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" />
362
+ <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" />
363
+ <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" />
364
+ </layout>
365
+ </component>
366
+ <component name="VcsManagerConfiguration">
367
+ <option name="OFFER_MOVE_TO_ANOTHER_CHANGELIST_ON_PARTIAL_COMMIT" value="true" />
368
+ <option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="true" />
369
+ <option name="PERFORM_UPDATE_IN_BACKGROUND" value="true" />
370
+ <option name="PERFORM_COMMIT_IN_BACKGROUND" value="true" />
371
+ <option name="PERFORM_EDIT_IN_BACKGROUND" value="true" />
372
+ <option name="PERFORM_CHECKOUT_IN_BACKGROUND" value="true" />
373
+ <option name="PERFORM_ADD_REMOVE_IN_BACKGROUND" value="true" />
374
+ <option name="PERFORM_ROLLBACK_IN_BACKGROUND" value="false" />
375
+ <option name="CHECK_LOCALLY_CHANGED_CONFLICTS_IN_BACKGROUND" value="false" />
376
+ <option name="ENABLE_BACKGROUND_PROCESSES" value="false" />
377
+ <option name="CHANGED_ON_SERVER_INTERVAL" value="60" />
378
+ <option name="SHOW_ONLY_CHANGED_IN_SELECTION_DIFF" value="true" />
379
+ <option name="CHECK_COMMIT_MESSAGE_SPELLING" value="true" />
380
+ <option name="FORCE_NON_EMPTY_COMMENT" value="false" />
381
+ <option name="LAST_COMMIT_MESSAGE" />
382
+ <option name="MAKE_NEW_CHANGELIST_ACTIVE" value="true" />
383
+ <option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
384
+ <option name="CHECK_FILES_UP_TO_DATE_BEFORE_COMMIT" value="false" />
385
+ <option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false" />
386
+ <option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" />
387
+ <option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8" />
388
+ <option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5" />
389
+ <option name="ACTIVE_VCS_NAME" />
390
+ <option name="UPDATE_GROUP_BY_PACKAGES" value="false" />
391
+ <option name="UPDATE_GROUP_BY_CHANGELIST" value="false" />
392
+ <option name="SHOW_FILE_HISTORY_AS_TREE" value="false" />
393
+ <option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
394
+ </component>
395
+ <component name="XDebuggerManager">
396
+ <breakpoint-manager />
397
+ </component>
398
+ <component name="editorHistoryManager">
399
+ <entry file="file://$PROJECT_DIR$/LICENSE.txt">
400
+ <provider selected="true" editor-type-id="text-editor">
401
+ <state line="11" column="32" selection-start="462" selection-end="462" vertical-scroll-proportion="0.2787162">
402
+ <folding />
403
+ </state>
404
+ </provider>
405
+ </entry>
406
+ <entry file="file://$PROJECT_DIR$/README.rdoc">
407
+ <provider selected="true" editor-type-id="text-editor">
408
+ <state line="16" column="0" selection-start="710" selection-end="710" vertical-scroll-proportion="-0.4189189">
409
+ <folding />
410
+ </state>
411
+ </provider>
412
+ </entry>
413
+ <entry file="file://$PROJECT_DIR$/test/helper.rb">
414
+ <provider selected="true" editor-type-id="text-editor">
415
+ <state line="7" column="25" selection-start="224" selection-end="224" vertical-scroll-proportion="0.0">
416
+ <folding />
417
+ </state>
418
+ </provider>
419
+ </entry>
420
+ <entry file="file://$PROJECT_DIR$/search_biomodel.gemspec">
421
+ <provider selected="true" editor-type-id="text-editor">
422
+ <state line="59" column="99" selection-start="1896" selection-end="1896" vertical-scroll-proportion="0.0">
423
+ <folding />
424
+ </state>
425
+ </provider>
426
+ </entry>
427
+ <entry file="file://$PROJECT_DIR$/test/test_search_biomodel.rb">
428
+ <provider selected="true" editor-type-id="text-editor">
429
+ <state line="28" column="77" selection-start="811" selection-end="811" vertical-scroll-proportion="0.0">
430
+ <folding />
431
+ </state>
432
+ </provider>
433
+ </entry>
434
+ <entry file="file://$PROJECT_DIR$/lib/search_biomodel.rb">
435
+ <provider selected="true" editor-type-id="text-editor">
436
+ <state line="28" column="116" selection-start="768" selection-end="768" vertical-scroll-proportion="0.7094595">
437
+ <folding />
438
+ </state>
439
+ </provider>
440
+ </entry>
441
+ </component>
442
+ </project>
443
+
data/Gemfile CHANGED
File without changes
data/Gemfile.lock CHANGED
File without changes
data/LICENSE.txt CHANGED
@@ -1,20 +1,29 @@
1
- Copyright (c) 2011 Niall Beard
1
+ Copyright (c) 2011, The University of Manchester, UK.
2
2
 
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
3
+ All rights reserved.
10
4
 
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
13
7
 
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8
+ * Redistributions of source code must retain the above copyright notice,
9
+ this list of conditions and the following disclaimer.
10
+
11
+ * Redistributions in binary form must reproduce the above copyright notice,
12
+ this list of conditions and the following disclaimer in the documentation
13
+ and/or other materials provided with the distribution.
14
+
15
+ * Neither the names of The University of Manchester nor the names of its
16
+ contributors may be used to endorse or promote products derived from this
17
+ software without specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
23
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
+ POSSIBILITY OF SUCH DAMAGE.
data/README.rdoc CHANGED
@@ -1,45 +1,74 @@
1
1
  = search_biomodel
2
2
 
3
- search biomodel is a small gem ready to be used for running queries through the biomodel web service API.
3
+ search biomodel is a small ruby gem ready to be used for running queries through the biomodel web service API.
4
4
 
5
- There are (currently) 3 methods to communicate with the biomodels website (found at http://www.ebi.ac.uk/biomodels-main/).
5
+ There are (currently) 5 methods implemented here to communicate with the biomodels website (found at http://www.ebi.ac.uk/biomodels-main/).
6
+
7
+ These methods are "search_by_chebiid", "search_by_name", "get_all_models", "search_by_person" and "get_model_name_by_id".
6
8
 
7
- These methods are "search_by_chebiid", "search_by_name" and "get_all_models". The former two return an array and the latter a hash map of :key and :value
8
9
 
9
10
  == Installation
10
11
 
11
12
  gem install seach_biomodel
12
13
 
14
+
13
15
  == Usage
14
- example:
15
-
16
+ The first four methods return an array of model IDs (or an empty array if nothing is found) and the 5th returns the name of the model of an ID you search for. The ChEBIID can take quite some time to run on the biomodel servers side.
17
+
18
+ The "get_all_models" method returns a hash map of :key's and :value's which can be retrieved as such:
19
+
20
+
21
+
16
22
  require 'rubygems'
17
- require 'seach_biomodel'
23
+ require 'search_biomodel'
18
24
 
19
- include SysMODB::SearchBiomodel
20
25
 
26
+ @connection = SysMODB::SearchBiomodel.instance
21
27
 
22
- puts "\n\n ------------------ List All -----------------------------\n\n"
23
28
 
24
- all_models = get_all_models
29
+ puts "\n\n ------------------ List All -----------------------------\n"
30
+ all_models = @connection.get_all_models
25
31
  all_models.each { |item| puts "ID = #{item[:key]} | NAME = #{item[:value]}\n" }
32
+ puts " ----------------------------------------------------------\n\n\n"
26
33
 
34
+ puts "\n\n ------------------ By Chebiid --------------------------\n"
35
+ i=0
36
+ models_by_chebiid = @connection.search_by_ChEBIID("CHEBI:15422")
37
+ models_by_chebiid.each { |item| puts "#{i+=1} #{item.to_s}\n"}
38
+ puts " ----------------------------------------------------------\n\n\n"
27
39
 
28
- puts "\n\n ------------------ By Chebiid --------------------------\n\n" i=0
40
+ puts "\n\n ------------------ By Name -----------------------------\n"
41
+ i=0
42
+ models_by_name = @connection.search_by_name("Kolomeisky2003")
43
+ models_by_name.each { |item| puts "#{i+=1} #{item.to_s}\n"}
44
+ puts " ----------------------------------------------------------\n\n\n"
29
45
 
30
- models_by_chebiid = search_by_ChEBIID("CHEBI:15422")
31
- models_by_chebiid.each { |item| puts "#{i+=1} #{item.to_s}\n"}
46
+
47
+ puts "\n\n ------------------ By Person----------------------------\n"
48
+ i=0
49
+ models_by_person = @connection.search_by_person("Jim")
50
+ models_by_person.each { |item| puts "#{i+=1} #{item.to_s}\n"}
51
+ puts " ----------------------------------------------------------\n\n\n"
52
+
53
+ puts "\n\n ------------------ Model ID by Name---------------------------\n"
54
+ i=0
55
+ models_by_person = @connection.get_model_name_by_id("BIOMD0000000190")
56
+ models_by_person.each { |item| puts "#{i+=1} #{item.to_s}\n"}
57
+ puts " ----------------------------------------------------------\n\n\n"
58
+
59
+
60
+ == Fun Fact
61
+
62
+ You can append the Model ID to the URL http://www.ebi.ac.uk/biomodels-main/ to load the link
63
+ eg (continuing from above).
32
64
 
33
65
 
34
- puts "\n\n ------------------ By Name -----------------------------\n\n" i=0
35
66
 
36
- models_by_name = search_by_name("Kolomeisky2003")
37
- models_by_name.each { |item| puts "#{i+=1} #{item.to_s}\n"}
38
67
 
68
+ models_by_person.each { |item| puts "http://www.ebi.ac.uk/biomodels-main/#{item.to_s}\n" }
39
69
 
40
- puts "\n ----------------------------------------------------------\n\n\n"
41
-
42
-
70
+ #=> http://www.ebi.ac.uk/biomodels-main/BIOMD0000000190
71
+ #=> http://www.ebi.ac.uk/biomodels-main/BIOMD0000000191
43
72
 
44
73
  == Contributing to search_biomodel
45
74
 
data/Rakefile CHANGED
File without changes
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.3
1
+ 2.0.0
@@ -1,74 +1,145 @@
1
-
2
-
3
- require 'rubygems'
4
1
  require 'savon'
5
-
2
+ require 'singleton'
6
3
 
7
4
  module SysMODB
8
5
 
9
6
  class SearchBiomodelException < Exception
10
7
  end
11
8
 
12
- module SearchBiomodel
9
+ class SearchBiomodel
10
+ include Singleton
13
11
 
14
- def search_by_ChEBIID(search_string)
15
- client = create_connection
16
- response = client.request(:biom, "get_models_id_by_ch_ebi_id") do
17
- soap.body = { :ChEBBId => search_string, :attributes! => { :ChEBBId => { "xsi:type" => "xsd:string" } } }
12
+ def initialize
13
+ @connection = Savon.configure do |config|
14
+ config.log = false
15
+ HTTPI.log = false
16
+ config.raise_errors = true
17
+ Savon::Client.new do
18
+ wsdl.document = "http://www.ebi.ac.uk/biomodels-main/services/BioModelsWebServices?wsdl"
19
+ wsdl.namespace = "http://biomodels.ebi.ac.uk"
20
+ end
18
21
  end
19
- return response.to_hash[:get_models_id_by_ch_ebi_id_response][:get_models_id_by_ch_ebi_id_return][:get_models_id_by_ch_ebi_id_return]
22
+
20
23
  end
21
-
22
24
 
23
- def get_all_models
24
- client = create_connection
25
- response = client.request(:biom, "get_all_models" ) do
26
- soap.body = { :modelName => "?", :attributes! => { :modelName => { "xsi:type" => "xsd:string" } } }
25
+
26
+ def models(search_string)
27
+ #collect results from sub-methods
28
+ results = Array.new
29
+ results << @connection.search_by_name(search_string)
30
+ results << @connection.search_by_chebiid(search_string)
31
+ results << @connection.search_by_person(search_string)
32
+
33
+ #turn into one big array, remove duplicates and select first X
34
+ results = results.flatten
35
+ results = results.uniq
36
+ results = results.first(3)
37
+
38
+ sbml_results = Array.new
39
+ results.each{ |a| sbml_results << "#{@connection.getModel(a)}" }
40
+ sbml_results
41
+ end
42
+
43
+
44
+
45
+ def getModel(model_id)
46
+ client = connection
47
+ response = client.request(:biom, "get_model_by_id") do
48
+ soap.body = {:id => model_id, :attributes! => {:id => {"xsi:type" => "xsd:string"}}}
49
+ end
50
+
51
+ search_results = response.to_hash[:get_model_by_id_response][:get_model_by_id_return]
52
+ if search_results.nil?
53
+ []
54
+ else
55
+ search_results
56
+ end
57
+ end
58
+
59
+
60
+ #search_by_chebiid
61
+ #search_by_name
62
+ #search_by_person
63
+
64
+ def search_by_chebiid(search_string)
65
+ client = connection
66
+ response = client.request(:biom, "get_models_id_by_ch_ebi_id") do
67
+ soap.body = {:ChEBBId => search_string, :attributes! => {:ChEBBId => {"xsi:type" => "xsd:string"}}}
68
+ end
69
+
70
+ search_results = response.to_hash[:get_models_id_by_ch_ebi_id_response][:get_models_id_by_ch_ebi_id_return][:get_models_id_by_ch_ebi_id_return]
71
+ if search_results.nil?
72
+ []
73
+ else
74
+ search_results
27
75
  end
28
- return response.to_hash[:multi_ref][:item]
29
76
  end
30
-
77
+
31
78
 
32
79
  def search_by_name (search_string)
33
- client = create_connection
80
+ client = connection
34
81
  response = client.request(:biom, "get_models_id_by_name") do
35
- soap.body = { :modelName => search_string, :attributes! => { :modelName => { "xsi:type" => "xsd:string" } } }
82
+ soap.body = {:modelName => search_string, :attributes! => {:modelName => {"xsi:type" => "xsd:string"}}}
83
+ end
84
+ search_results = response.to_hash[:get_models_id_by_name_response][:get_models_id_by_name_return][:get_models_id_by_name_return]
85
+ if search_results.nil?
86
+ []
87
+ else
88
+ search_results
36
89
  end
37
- return response.to_hash[:get_models_id_by_name_response][:get_models_id_by_name_return][:get_models_id_by_name_return]
38
90
  end
39
91
 
40
- def get_models_id_by_person (search_string)
41
- client = create_connection
92
+ def search_by_person (search_string)
93
+ client = connection
42
94
  response = client.request(:biom, "get_models_id_by_person") do
43
- soap.body = { :personName => search_string, :attributes! => { :personName => { "xsi:type" => "xsd:string" } } }
95
+ soap.body = {:personName => search_string, :attributes! => {:personName => {"xsi:type" => "xsd:string"}}}
96
+ end
97
+ search_results = response.to_hash[:get_models_id_by_person_response][:get_models_id_by_person_return][:get_models_id_by_person_return]
98
+ if search_results.nil?
99
+ []
100
+ else
101
+ search_results
44
102
  end
45
- return response.to_hash[:get_models_id_by_person_response][:get_models_id_by_person_return][:get_models_id_by_person_return]
46
- end
103
+ end
47
104
 
48
- def get_model_name_by_id (search_string)
49
- client = create_connection
105
+
106
+ #more used for testing
107
+
108
+ def get_model_name_by_id (search_string)
109
+ client = connection
50
110
  response = client.request(:biom, "get_model_name_by_id") do
51
- soap.body = { :id => search_string, :attributes! => { :id => { "xsi:type" => "xsd:string" } } }
111
+ soap.body = {:id => search_string, :attributes! => {:id => {"xsi:type" => "xsd:string"}}}
52
112
  end
53
- return response.to_hash[:get_model_name_by_id_response][:get_model_name_by_id_return]
54
- end
55
-
56
-
113
+ search_results = response.to_hash[:get_model_name_by_id_response][:get_model_name_by_id_return]
114
+ if search_results.nil? || search_results.include?('is an invalid Model ID.')
115
+ []
116
+ else
117
+ search_results
118
+ end
119
+ end
57
120
 
58
- private
59
-
60
- def create_connection
61
- Savon.configure do |config|
62
- config.log = false
63
- HTTPI.log = false
64
- client = Savon::Client.new do
65
- wsdl.document = "http://www.ebi.ac.uk/biomodels-main/services/BioModelsWebServices?wsdl"
66
- wsdl.namespace = "http://biomodels.ebi.ac.uk"
67
- end
121
+ def get_all_models
122
+ client = connection
123
+ response = client.request(:biom, "get_all_models") do
124
+ soap.body = {:modelName => "?", :attributes! => {:modelName => {"xsi:type" => "xsd:string"}}}
125
+ end
126
+ search_results = response.to_hash[:multi_ref][:item]
127
+ if search_results.nil?
128
+ []
129
+ else
130
+ search_results
68
131
  end
69
- end
132
+ end
133
+
134
+
70
135
 
71
136
 
137
+ protected
138
+
139
+ def connection
140
+ @connection
141
+ end
142
+
72
143
  end #SearchBiomodel
73
144
  end #SysMODB
74
145
 
Binary file
Binary file
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{search_biomodel}
8
- s.version = "1.0.3"
8
+ s.version = "2.0.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Niall Beard"]
12
- s.date = %q{2011-07-05}
12
+ s.date = %q{2012-02-17}
13
13
  s.description = %q{Client package for creating, sending, recieving and consuming SOAP messages from BioModels search engine }
14
14
  s.email = %q{beardn9@cs.man.ac.uk}
15
15
  s.extra_rdoc_files = [
@@ -18,6 +18,15 @@ Gem::Specification.new do |s|
18
18
  ]
19
19
  s.files = [
20
20
  ".document",
21
+ ".idea/.name",
22
+ ".idea/.rakeTasks",
23
+ ".idea/dictionaries/root.xml",
24
+ ".idea/encodings.xml",
25
+ ".idea/misc.xml",
26
+ ".idea/modules.xml",
27
+ ".idea/search_biomodel.iml",
28
+ ".idea/vcs.xml",
29
+ ".idea/workspace.xml",
21
30
  "Gemfile",
22
31
  "Gemfile.lock",
23
32
  "LICENSE.txt",
@@ -25,6 +34,8 @@ Gem::Specification.new do |s|
25
34
  "Rakefile",
26
35
  "VERSION",
27
36
  "lib/search_biomodel.rb",
37
+ "search_biomodel-1.1.1.gem",
38
+ "search_biomodel-1.1.2.gem",
28
39
  "search_biomodel.gemspec",
29
40
  "test/helper.rb",
30
41
  "test/test_search_biomodel.rb"
data/test/helper.rb CHANGED
@@ -8,7 +8,7 @@ rescue Bundler::BundlerError => e
8
8
  exit e.status_code
9
9
  end
10
10
  require 'test/unit'
11
- require 'shoulda'
11
+
12
12
 
13
13
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
14
14
  $LOAD_PATH.unshift(File.dirname(__FILE__))
@@ -1,60 +1,97 @@
1
1
  require 'test/unit'
2
- require '/home/cspc018/Work/Repos/gems/search_biomodel/lib/search_biomodel.rb'
2
+ require 'helper'
3
+ class TestSearchBiomodel < Test::Unit::TestCase
3
4
 
5
+ def setup
6
+ @instance = SysMODB::SearchBiomodel.instance
7
+ end
4
8
 
5
- class TestSearchBiomodel < Test::Unit::TestCase
9
+ def test_find_all_models
10
+ puts "\n\n ---------------------find all models---------------------\n\n"
11
+ response = []
12
+ i=0
13
+ response = @instance.get_all_models
14
+ response.each { |x| puts "Response #{i+=1}: #{x[:key].to_s} " }
15
+ response.each { |x| assert_not_nil x[:key] }
16
+ assert_not_nil response
17
+ end
18
+
19
+
20
+ def test_search_by_chebiid
21
+ puts "\n\n ---------------------search by chebiid---------------------\n\n"
22
+ response = []
23
+ i = 0
24
+ response = @instance.search_by_chebiid("CHEBI:15422")
25
+ response.each { |x| puts "Response #{i+=1}: #{x} " }
26
+ response.each { |x| assert_not_nil x }
27
+ assert_not_nil response
28
+ end
29
+
30
+ def test_search_by_incorrect_chebiid
31
+ puts "\n\n ---------------------search by incorrect chebiid---------------------\n\n"
32
+ response = []
33
+ i = 0
34
+ response = @instance.search_by_chebiid("THIS IS NOT A VALID CHEBIID!!!!!<P></P>")
35
+ response.each { |x| puts "Response #{i+=1}: #{x} " }
36
+ response.each { |x| assert_not_nil x }
37
+ assert_not_nil response
38
+ end
39
+
40
+
41
+ def test_search_by_name
42
+ puts "\n\n ---------------------model ID by name---------------------\n\n"
43
+ response = []
44
+ i = 0
45
+ response = @instance.search_by_name("Kolomeisky2003") #_MyosinV_Processivity")
46
+ response.each { |x| puts "Response #{i+=1}: #{x} " }
47
+ response.each { |x| assert_not_nil x }
48
+ assert_not_nil response
49
+ end
50
+
51
+ def test_search_by_incorrect_name
52
+ puts "\n\n ---------------------model ID by incorrect name---------------------\n\n"
53
+ response = []
54
+ i = 0
55
+ response = @instance.search_by_name("THIS IS NOT A VALID NAME!!!!!<P></P>") #_MyosinV_Processivity")
56
+ response.each { |x| puts "Response #{i+=1}: #{x} " }
57
+ response.each { |x| assert_not_nil x }
58
+ assert_not_nil response
59
+ end
6
60
 
7
- include SysMODB::SearchBiomodel
8
-
9
- def test_find_all_models
10
- puts "\n\n ---------------------find all models---------------------\n\n"
11
- response = []
12
- i=0
13
- response = get_all_models
14
- response.each {|x| puts "Response #{i+=1}: #{x[:key].to_s} "}
15
- response.each {|x| assert_not_nil x[:key] }
16
- assert_not_nil response
17
- end
18
-
19
-
20
- def test_search_by_ChEBIID
21
- puts "\n\n ---------------------search by chebiid---------------------\n\n"
22
- response = []
23
- i = 0
24
- response = search_by_ChEBIID("CHEBI:15422")
25
- response.each {|x| puts "Response #{i+=1}: #{x} "}
26
- response.each {|x| assert_not_nil x }
27
- assert_not_nil response
28
- end
29
-
30
- def test_search_by_name
31
- puts "\n\n ---------------------model ID by name---------------------\n\n"
32
- response = []
33
- i = 0
34
- response = search_by_name("Kolomeisky2003") #_MyosinV_Processivity")
35
- response.each {|x| puts "Response #{i+=1}: #{x} "}
36
- response.each {|x| assert_not_nil x }
37
- assert_not_nil response
38
- end
39
-
40
61
 
41
62
  def test_get_model_name_by_id
42
- puts "\n\n ---------------------model name by ID---------------------\n\n"
43
- response = get_model_name_by_id("BIOMD0000000190")
44
- puts response
45
- assert_not_nil response
63
+ puts "\n\n ---------------------model name by ID---------------------\n\n"
64
+ response = @instance.get_model_name_by_id("BIOMD0000000190")
65
+ puts response
66
+ assert_not_nil response
67
+ end
68
+
69
+ def test_get_model_name_by_incorrect_id
70
+ puts "\n\n ---------------------model name by incorrect ID---------------------\n\n"
71
+ response = @instance.get_model_name_by_id("THIS IS NOT A VALID ID!!!!!<P></P>")
72
+ puts response
73
+ assert_not_nil response
46
74
  end
47
75
 
48
76
 
77
+ def test_search_id_by_person
78
+ puts "\n\n ---------------------model ID by person---------------------\n\n"
79
+ response = []
80
+ i=0
81
+ response = @instance.search_by_person("Jim")
82
+ response.each { |x| puts "Response #{i+=1}: #{x} " }
83
+ response.each { |x| assert_not_nil x }
84
+ assert_not_nil response
85
+ end
49
86
 
50
- def test_get_models_id_by_person
51
- puts "\n\n ---------------------model ID by person---------------------\n\n"
52
- response = []
53
- i=0
54
- response = get_models_id_by_person("Jim")
55
- response.each {|x| puts "Response #{i+=1}: #{x} "}
56
- response.each {|x| assert_not_nil x }
57
- assert_not_nil response
87
+ def test_search_by_incorrect_person
88
+ puts "\n\n ---------------------model ID by incorrect person---------------------\n\n"
89
+ response = []
90
+ i=0
91
+ response = @instance.search_by_person("THIS IS NOT A VALID PERSONS NAME!!!!!<P></P>")
92
+ response.each { |x| puts "Response #{i+=1}: #{x} " }
93
+ response.each { |x| assert_not_nil x }
94
+ assert_not_nil response
58
95
  end
59
96
 
60
97
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: search_biomodel
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 15
5
5
  prerelease: false
6
6
  segments:
7
- - 1
7
+ - 2
8
8
  - 0
9
- - 3
10
- version: 1.0.3
9
+ - 0
10
+ version: 2.0.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Niall Beard
@@ -15,13 +15,13 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-07-05 00:00:00 +01:00
18
+ date: 2012-02-17 00:00:00 +00:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
- prerelease: false
23
22
  name: jeweler
24
- version_requirements: &id001 !ruby/object:Gem::Requirement
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
25
  none: false
26
26
  requirements:
27
27
  - - ~>
@@ -32,12 +32,12 @@ dependencies:
32
32
  - 6
33
33
  - 2
34
34
  version: 1.6.2
35
- requirement: *id001
36
35
  type: :development
36
+ version_requirements: *id001
37
37
  - !ruby/object:Gem::Dependency
38
- prerelease: false
39
38
  name: rcov
40
- version_requirements: &id002 !ruby/object:Gem::Requirement
39
+ prerelease: false
40
+ requirement: &id002 !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
43
  - - ">="
@@ -46,12 +46,12 @@ dependencies:
46
46
  segments:
47
47
  - 0
48
48
  version: "0"
49
- requirement: *id002
50
49
  type: :development
50
+ version_requirements: *id002
51
51
  - !ruby/object:Gem::Dependency
52
- prerelease: false
53
52
  name: savon
54
- version_requirements: &id003 !ruby/object:Gem::Requirement
53
+ prerelease: false
54
+ requirement: &id003 !ruby/object:Gem::Requirement
55
55
  none: false
56
56
  requirements:
57
57
  - - ~>
@@ -62,8 +62,8 @@ dependencies:
62
62
  - 9
63
63
  - 2
64
64
  version: 0.9.2
65
- requirement: *id003
66
65
  type: :development
66
+ version_requirements: *id003
67
67
  description: "Client package for creating, sending, recieving and consuming SOAP messages from BioModels search engine "
68
68
  email: beardn9@cs.man.ac.uk
69
69
  executables: []
@@ -75,6 +75,15 @@ extra_rdoc_files:
75
75
  - README.rdoc
76
76
  files:
77
77
  - .document
78
+ - .idea/.name
79
+ - .idea/.rakeTasks
80
+ - .idea/dictionaries/root.xml
81
+ - .idea/encodings.xml
82
+ - .idea/misc.xml
83
+ - .idea/modules.xml
84
+ - .idea/search_biomodel.iml
85
+ - .idea/vcs.xml
86
+ - .idea/workspace.xml
78
87
  - Gemfile
79
88
  - Gemfile.lock
80
89
  - LICENSE.txt
@@ -82,6 +91,8 @@ files:
82
91
  - Rakefile
83
92
  - VERSION
84
93
  - lib/search_biomodel.rb
94
+ - search_biomodel-1.1.1.gem
95
+ - search_biomodel-1.1.2.gem
85
96
  - search_biomodel.gemspec
86
97
  - test/helper.rb
87
98
  - test/test_search_biomodel.rb