weatherbug 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/lib/weatherbug.rb CHANGED
@@ -26,6 +26,7 @@ module WeatherBug
26
26
  HashMethods.valid_one_only(lookup_options, [:zip_code, :city_code])
27
27
  HashMethods.valid_one_only(lookup_options, [:postal_code, :city_code])
28
28
  HashMethods.valid_needs(lookup_options, :zip_code, :postal_code) if lookup_options.has_key?(:postal_code)
29
+ lookup_options[:include_pws] = '1' if lookup_options.has_key?(:include_pws)
29
30
  response = make_request('StationList', HashMethods.convert_symbols(lookup_options))
30
31
 
31
32
  response.xpath('/aws:weather/aws:station').map { |station| WeatherBug::Station.from_document(station) }
@@ -38,6 +39,7 @@ module WeatherBug
38
39
  HashMethods.valid_needs(lookup_options, :zip_code, :postal_code) if lookup_options.has_key?(:postal_code)
39
40
  params = HashMethods.convert_symbols(lookup_options)
40
41
  params['ListType'] = '1'
42
+ lookup_options[:include_pws] = '1' if lookup_options.has_key?(:include_pws)
41
43
  response = make_request('StationList', params)
42
44
 
43
45
  WeatherBug::Station.from_document response.xpath('/aws:weather/aws:station').first
@@ -1,6 +1,6 @@
1
1
  module WeatherBug
2
2
 
3
- VERSION = [0, 0, 3]
3
+ VERSION = [0, 0, 4]
4
4
 
5
5
  def self.version
6
6
  VERSION.join('.')
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: weatherbug
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
9
+ - 4
10
+ version: 0.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - John Crepezzi