wasserstand 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +17 -0
- data/.travis.yml +4 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +31 -0
- data/Rakefile +10 -0
- data/bin/wasserstand +16 -0
- data/lib/wasserstand/level.rb +18 -0
- data/lib/wasserstand/mapper.rb +39 -0
- data/lib/wasserstand/measurement.rb +17 -0
- data/lib/wasserstand/provider/pegel-online.rb +23 -0
- data/lib/wasserstand/version.rb +3 -0
- data/lib/wasserstand/waterway.rb +16 -0
- data/lib/wasserstand.rb +15 -0
- data/test/fixtures/pegelstaende_neu.xml +6647 -0
- data/test/helper.rb +2 -0
- data/test/unit/test_wasserstand.rb +18 -0
- data/wasserstand.gemspec +22 -0
- metadata +131 -0
data/test/helper.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestWasserstand < MiniTest::Unit::TestCase
|
4
|
+
include Wasserstand
|
5
|
+
|
6
|
+
def setup
|
7
|
+
url = File.join(File.dirname(__FILE__), '..', 'fixtures', 'pegelstaende_neu.xml')
|
8
|
+
Wasserstand.provider = Provider::PegelOnline.new(url)
|
9
|
+
end
|
10
|
+
|
11
|
+
def test_plain
|
12
|
+
assert Waterway['BODENSEE']
|
13
|
+
end
|
14
|
+
|
15
|
+
def test_levels
|
16
|
+
assert_equal(1, Waterway['BODENSEE'].level.size)
|
17
|
+
end
|
18
|
+
end
|
data/wasserstand.gemspec
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/wasserstand/version', __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.authors = ["Nicholas E. Rabenau"]
|
6
|
+
gem.email = ["nerab@gmx.net"]
|
7
|
+
gem.description = %q{Unofficial Ruby wrapper for Pegel Online}
|
8
|
+
gem.summary = %q{Wasserstand auf deutschen Flüssen}
|
9
|
+
gem.homepage = "http://github.com/nerab/wasserstand"
|
10
|
+
|
11
|
+
gem.files = `git ls-files`.split($\)
|
12
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
13
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
14
|
+
gem.name = "wasserstand"
|
15
|
+
gem.require_paths = ["lib"]
|
16
|
+
gem.version = Wasserstand::VERSION
|
17
|
+
|
18
|
+
gem.add_runtime_dependency 'require_all'
|
19
|
+
gem.add_runtime_dependency 'nokogiri', '~> 1.4'
|
20
|
+
gem.add_development_dependency 'minitest'
|
21
|
+
gem.add_development_dependency 'rake'
|
22
|
+
end
|
metadata
ADDED
@@ -0,0 +1,131 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: wasserstand
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Nicholas E. Rabenau
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-09-14 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: require_all
|
16
|
+
requirement: !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: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: nokogiri
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ~>
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '1.4'
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '1.4'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: minitest
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: rake
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
type: :development
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
description: Unofficial Ruby wrapper for Pegel Online
|
79
|
+
email:
|
80
|
+
- nerab@gmx.net
|
81
|
+
executables:
|
82
|
+
- wasserstand
|
83
|
+
extensions: []
|
84
|
+
extra_rdoc_files: []
|
85
|
+
files:
|
86
|
+
- .gitignore
|
87
|
+
- .travis.yml
|
88
|
+
- Gemfile
|
89
|
+
- LICENSE
|
90
|
+
- README.md
|
91
|
+
- Rakefile
|
92
|
+
- bin/wasserstand
|
93
|
+
- lib/wasserstand.rb
|
94
|
+
- lib/wasserstand/level.rb
|
95
|
+
- lib/wasserstand/mapper.rb
|
96
|
+
- lib/wasserstand/measurement.rb
|
97
|
+
- lib/wasserstand/provider/pegel-online.rb
|
98
|
+
- lib/wasserstand/version.rb
|
99
|
+
- lib/wasserstand/waterway.rb
|
100
|
+
- test/fixtures/pegelstaende_neu.xml
|
101
|
+
- test/helper.rb
|
102
|
+
- test/unit/test_wasserstand.rb
|
103
|
+
- wasserstand.gemspec
|
104
|
+
homepage: http://github.com/nerab/wasserstand
|
105
|
+
licenses: []
|
106
|
+
post_install_message:
|
107
|
+
rdoc_options: []
|
108
|
+
require_paths:
|
109
|
+
- lib
|
110
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
111
|
+
none: false
|
112
|
+
requirements:
|
113
|
+
- - ! '>='
|
114
|
+
- !ruby/object:Gem::Version
|
115
|
+
version: '0'
|
116
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
117
|
+
none: false
|
118
|
+
requirements:
|
119
|
+
- - ! '>='
|
120
|
+
- !ruby/object:Gem::Version
|
121
|
+
version: '0'
|
122
|
+
requirements: []
|
123
|
+
rubyforge_project:
|
124
|
+
rubygems_version: 1.8.24
|
125
|
+
signing_key:
|
126
|
+
specification_version: 3
|
127
|
+
summary: Wasserstand auf deutschen Flüssen
|
128
|
+
test_files:
|
129
|
+
- test/fixtures/pegelstaende_neu.xml
|
130
|
+
- test/helper.rb
|
131
|
+
- test/unit/test_wasserstand.rb
|