Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cdo
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mpim-sw
cdo
Commits
b08dd7e1
Commit
b08dd7e1
authored
12 years ago
by
Ralf Mueller
Browse files
Options
Downloads
Patches
Plain Diff
Add CDO version number a method for ruby bindings
parent
b8b54ec8
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
contrib/ruby/lib/cdo.rb
+9
-2
9 additions, 2 deletions
contrib/ruby/lib/cdo.rb
contrib/ruby/test/test_cdo.rb
+3
-0
3 additions, 0 deletions
contrib/ruby/test/test_cdo.rb
with
12 additions
and
2 deletions
contrib/ruby/lib/cdo.rb
+
9
−
2
View file @
b08dd7e1
...
...
@@ -15,7 +15,10 @@ require 'pp'
# ==============================================================================
# CDO calling mechnism
module
Cdo
State
=
{
VERSION
=
"1.0.10"
Stats
=
{
:debug
=>
false
,
:returnArray
=>
false
,
:operators
=>
[]
...
...
@@ -126,7 +129,11 @@ module Cdo
State
[
:debug
]
end
def
Cdo
.
version
"1.0.10rc1"
cmd
=
@@CDO
+
' 2>&1'
help
=
IO
.
popen
(
cmd
).
readlines
.
map
{
|
l
|
l
.
chomp
.
lstrip
}
regexp
=
%r{CDO version (
\d
.*), Copyright}
line
=
help
.
find
{
|
v
|
v
=~
regexp
}
version
=
regexp
.
match
(
line
)[
1
]
end
def
Cdo
.
setReturnArray
(
value
=
true
)
if
value
...
...
This diff is collapsed.
Click to expand it.
contrib/ruby/test/test_cdo.rb
+
3
−
0
View file @
b08dd7e1
...
...
@@ -44,6 +44,9 @@ class TestCdo < Test::Unit::TestCase
values
=
Cdo
.
outputkey
(
"level"
,
:in
=>
"-stdatm,0,10000"
)
assert_equal
([
"0"
,
"10000"
,
"0"
,
"10000"
],
values
)
end
def
test_CDO_version
assert
(
"1.4.3.1"
<
Cdo
.
version
,
"Version to low:
#{
Cdo
.
version
}
"
)
end
def
test_args
#Cdo.Debug = true
#MyTempfile.setPersist(true)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment