wasserstand 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -29,7 +29,7 @@ module Wasserstand
29
29
  datum = item.xpath('datum').text
30
30
  uhrzeit = item.xpath('uhrzeit').text
31
31
 
32
- messdatum = Time.parse("#{datum} #{uhrzeit}")
32
+ messdatum = TZInfo::Timezone.get('Europe/Berlin').local_to_utc(Time.parse("#{datum} #{uhrzeit}"))
33
33
  wert = item.xpath('messwert').text.sub(',', '.').to_f
34
34
  tendenz = item.xpath('tendenz').text.downcase.to_sym
35
35
 
@@ -1,3 +1,3 @@
1
1
  module Wasserstand
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -24,7 +24,7 @@ class TestWasserstand < MiniTest::Unit::TestCase
24
24
  def test_single_measurement
25
25
  konstanz_measurements = Waterway['BODENSEE'].levels['KONSTANZ'].measurements
26
26
 
27
- assert_equal(Time.parse('2012-09-13 20:00:00 +0200'), konstanz_measurements.last.date)
27
+ assert_equal(Time.parse('2012-09-13 18:00:00 UTC'), konstanz_measurements.last.date)
28
28
  assert_equal(380.7, konstanz_measurements.last.value)
29
29
  assert_equal(:gleich, konstanz_measurements.last.trend)
30
30
  end
data/wasserstand.gemspec CHANGED
@@ -17,6 +17,7 @@ Gem::Specification.new do |gem|
17
17
 
18
18
  gem.add_runtime_dependency 'require_all'
19
19
  gem.add_runtime_dependency 'nokogiri'
20
+ gem.add_runtime_dependency 'tzinfo'
20
21
  gem.add_development_dependency 'minitest'
21
22
  gem.add_development_dependency 'rake'
22
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wasserstand
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -43,6 +43,22 @@ dependencies:
43
43
  - - ! '>='
44
44
  - !ruby/object:Gem::Version
45
45
  version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: tzinfo
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
46
62
  - !ruby/object:Gem::Dependency
47
63
  name: minitest
48
64
  requirement: !ruby/object:Gem::Requirement