buoy_data 1.0.0.beta.2 → 1.0.0.beta.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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0.beta.2
1
+ 1.0.0.beta.3
data/buoy_data.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{buoy_data}
8
- s.version = "1.0.0.beta.2"
8
+ s.version = "1.0.0.beta.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Adam Weller"]
12
- s.date = %q{2011-05-06}
12
+ s.date = %q{2011-05-12}
13
13
  s.description = %q{The goal of this gem is to provide marine buoy data from a variety of sources}
14
14
  s.email = %q{minch@trazzler.com}
15
15
  s.extra_rdoc_files = [
@@ -193,7 +193,8 @@ module BuoyData
193
193
  minutes = time[2..3]
194
194
  time = [ hour, minutes ].join(':')
195
195
  s = [ date, time ].join('T')
196
- t = Time.parse s if s
196
+ s = "#{s} UTC"
197
+ t = Time.parse(s).utc if s
197
198
  rescue
198
199
  end
199
200
  end
@@ -4,12 +4,28 @@ describe BuoyData::NoaaStation do
4
4
  let (:station) { BuoyData::NoaaStation.new }
5
5
 
6
6
  it "should scrape station" do
7
- data = station.scrape station_url
7
+ url = station_url
8
+ data = station.scrape url
8
9
  data.should_not be_empty
9
10
  data.should be_a(Hash)
10
11
 
11
12
  data[:wtmp].should be_a(Float)
12
- data[:source_updated_at].should be_a(Time)
13
+ source_updated_at = data[:source_updated_at]
14
+ source_updated_at.should be_a(Time)
15
+ source_updated_at.zone.should == 'UTC'
16
+ end
17
+
18
+ it "should scrape buoy" do
19
+ url = buoy_url
20
+ data = station.scrape url
21
+ data.should_not be_empty
22
+ data.should be_a(Hash)
23
+
24
+ data[:wtmp].should be_a(Float)
25
+ source_updated_at = data[:source_updated_at]
26
+ source_updated_at.should be_a(Time)
27
+ source_updated_at.zone.should == 'UTC'
28
+ p source_updated_at
13
29
  end
14
30
 
15
31
  def station_url
metadata CHANGED
@@ -7,8 +7,8 @@ version: !ruby/object:Gem::Version
7
7
  - 0
8
8
  - 0
9
9
  - beta
10
- - 2
11
- version: 1.0.0.beta.2
10
+ - 3
11
+ version: 1.0.0.beta.3
12
12
  platform: ruby
13
13
  authors:
14
14
  - Adam Weller
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-05-06 00:00:00 -04:00
19
+ date: 2011-05-12 00:00:00 -04:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency