cdo 1.2.2 → 1.2.3
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.
- checksums.yaml +4 -4
- data/gemspec +1 -1
- data/lib/cdo.rb +3 -2
- data/test/test_cdo.rb +7 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eef819d14c01a9fa0dfdfef9a6753c74fd1b8759
|
4
|
+
data.tar.gz: 41b9ed1d2a5441fa063aaa7f3c341e825662b2d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: add6ac2a46680acb6e77c5c0b644d8949007693f537039a908ac4d879ae0e7de3cd3df5778a4bbb3576a26242b31b1e8adba4141aa3f658c3ddcf702681e1c36
|
7
|
+
data.tar.gz: e929e98ff52046e8b2dab8592e504c512b8ff6eacd96a153711890b4c6e7c527a4e57a19e289ff58f81fa1abffd388e4b0bdbcd847cf33276ed307bebaafd503
|
data/gemspec
CHANGED
@@ -3,7 +3,7 @@ $:.unshift File.join(File.dirname(__FILE__),"..","lib")
|
|
3
3
|
|
4
4
|
spec = Gem::Specification.new do |s|
|
5
5
|
s.name = "cdo"
|
6
|
-
s.version = '1.2.
|
6
|
+
s.version = '1.2.3'
|
7
7
|
s.platform = Gem::Platform::RUBY
|
8
8
|
s.files = ["lib/cdo.rb"] + ["gemspec","COPYING","README.rdoc","ChangeLog"]
|
9
9
|
s.test_file = "test/test_cdo.rb"
|
data/lib/cdo.rb
CHANGED
@@ -17,7 +17,7 @@ require 'open3'
|
|
17
17
|
# CDO calling mechnism
|
18
18
|
module Cdo
|
19
19
|
|
20
|
-
VERSION = "1.2.
|
20
|
+
VERSION = "1.2.3"
|
21
21
|
|
22
22
|
State = {
|
23
23
|
:debug => false,
|
@@ -180,7 +180,7 @@ module Cdo
|
|
180
180
|
return unless (State[:libs].nil? or force)
|
181
181
|
_, _, stderr, _ = Open3.popen3(@@CDO + " -V")
|
182
182
|
supported = stderr.readlines.map(&:chomp)
|
183
|
-
with = supported.grep(/with/)[0].split(':')[1].split.map(&:downcase)
|
183
|
+
with = supported.grep(/(with|Features)/)[0].split(':')[1].split.map(&:downcase)
|
184
184
|
libs = supported.grep(/library version/).map {|l|
|
185
185
|
l.strip.split(':').map {|l|
|
186
186
|
l.split.first.downcase
|
@@ -254,6 +254,7 @@ module Cdo
|
|
254
254
|
puts "Will use #{cdo} instead of #@@CDO" if Cdo.debug
|
255
255
|
@@CDO = cdo
|
256
256
|
Cdo.getOperators(true)
|
257
|
+
Cdo.getSupportedLibs(true)
|
257
258
|
end
|
258
259
|
|
259
260
|
def Cdo.getCdo
|
data/test/test_cdo.rb
CHANGED
@@ -67,10 +67,10 @@ class TestCdo < Test::Unit::TestCase
|
|
67
67
|
(1...info.size).each {|i| assert_equal(0.0,info[i].split[-1].to_f)}
|
68
68
|
end
|
69
69
|
def test_operator_options
|
70
|
+
Cdo.debug=true
|
70
71
|
targetLevels = [0,10,50,100,200,400,1000]
|
71
|
-
|
72
|
-
|
73
|
-
[0,1].each {|i| assert_equal(targetLevels.map(&:to_s),levels[i].split)}
|
72
|
+
levels = Cdo.showlevel(:input => " -stdatm,#{targetLevels.join(',')}")
|
73
|
+
[0,1].each {|i| assert_equal(targetLevels.join(' '),levels[i])}
|
74
74
|
end
|
75
75
|
def test_CDO_options
|
76
76
|
names = Cdo.showname(:input => "-stdatm,0",:options => "-f nc")
|
@@ -305,6 +305,10 @@ class TestCdo < Test::Unit::TestCase
|
|
305
305
|
assert_equal(false,Cdo.hasLib?("boost"))
|
306
306
|
if 'thingol' == `hostname`.chomp
|
307
307
|
assert_equal('1.10.0',Cdo.libsVersion("grib_api")) if Cdo.hasLib?("grib_api")
|
308
|
+
Cdo.debug = true
|
309
|
+
assert(! Cdo.libs.has_key?('magics'),"Magics support shoud not be build in the system wide installation")
|
310
|
+
Cdo.setCdo('../../src/cdo')
|
311
|
+
assert(Cdo.libs.has_key?('magics'),"Magics support is expected in the local development binary")
|
308
312
|
end
|
309
313
|
assert_raise ArgumentError do
|
310
314
|
Cdo.libsVersion("foo")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cdo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ralf Mueller
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-09-
|
11
|
+
date: 2013-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Easy access to the Climate Data operators
|
14
14
|
email: stark.dreamdetective@gmail.com
|