air_quality_index 0.2.1 → 0.2.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c5b61c65fd170880568e180d35649d27f4931d17
4
- data.tar.gz: 236072dcfa10b5c6a53a3f123e7b30e75609a9ab
3
+ metadata.gz: 7e71fcc37c3e184fdd9cf3546e47a8c91bc1b1cf
4
+ data.tar.gz: 1c750a0c3254baccbc64b789b9f14a94c830088b
5
5
  SHA512:
6
- metadata.gz: 3d5a3bd0b3ebc30577e7936583959f2a1f5ea5b85f85c3ceaddec2f32aecbafc946d9bf634573e27143795a667172fd45b0ed38a3ccaf37f6689fb5ac9890589
7
- data.tar.gz: 494db92f88cd736beed76cb56ff7b73e0313b78ea29b23583825644bd276a969ade484e5571b8b14d1fed49fec5cf18bd1c63d8fb12f72dc6613be4a5be746dd
6
+ metadata.gz: f182f7c28b92f7bc325a956cd42782311e3b7ae13af7cc606da911110205023fa128a24ca81fe9b2a3d875977fe0a4502f0d5cbcc0aa807eaaeaa5e45cc7121c
7
+ data.tar.gz: 6f6c2d97b90f49ef2ba935fe42ad2657c8e09e9260162654b747cdc1e90cf2503cdf8f577c4099f60c1461556ca49248b1cf54a3f69935ee93b2a611dd274292
@@ -1,6 +1,6 @@
1
1
  class AirQualityIndex::City
2
2
 
3
- attr_accessor :location_city, :location_state, :todays_index, :location_city, :location_state, :current_aqi_index, :current_health_msg, :current_pm, :current_pm_msg, :current_ozone, :current_ozone_msg, :current_aqi_timestamp, :today_aqi, :today_aqi_msg, :today_ozone, :tomorrow_aqi, :tomorrow_aqi_msg, :tomorrow_ozone, :location_name_full, :index, :message, :link
3
+ attr_accessor :location_city, :location_state, :todays_index, :location_city, :location_state, :current_aqi_index, :current_health_msg, :current_aqi_msg, :current_pm, :current_pm_msg, :current_ozone, :current_ozone_msg, :current_aqi_timestamp, :today_aqi, :today_aqi_msg, :today_ozone, :tomorrow_aqi, :tomorrow_aqi_msg, :tomorrow_ozone, :location_name_full, :index, :message, :link
4
4
 
5
5
 
6
6
  end
@@ -88,7 +88,7 @@ class AirQualityIndex::LocalAQI
88
88
  if city.nil?
89
89
  @city = AirQualityIndex::City.new
90
90
  else
91
- @city = ranked_city
91
+ @city = city
92
92
  end
93
93
 
94
94
  #store location information
@@ -97,6 +97,7 @@ class AirQualityIndex::LocalAQI
97
97
 
98
98
  #store aqi index
99
99
  self.doc.at('.TblInvisible').css('tr td').children[1].nil?? self.city.current_aqi_index = unavailable_msg : self.city.current_aqi_index = self.doc.at('.TblInvisible').css('tr td').children[1].text.strip
100
+ self.doc.search("td.AQDataLg").nil?? self.city.current_aqi_msg = unavailable_msg : self.city.current_aqi_msg = self.doc.search("td.AQDataLg")[0].text.strip
100
101
  self.doc.search("td.HealthMessage")[0].nil?? self.city.current_health_msg = unavailable_msg : self.city.current_health_msg = self.doc.search("td.HealthMessage")[0].text.strip[/(?<=Health Message: ).*/]
101
102
 
102
103
  #store current aqi/ozone data
@@ -141,7 +142,7 @@ class AirQualityIndex::LocalAQI
141
142
 
142
143
  Current Conditions in #{self.city.location_city}, #{self.city.location_state} (#{self.city.current_aqi_timestamp}):
143
144
 
144
- AQI: #{self.city.current_aqi_index}
145
+ AQI: #{self.city.current_aqi_index} (#{self.city.current_aqi_msg})
145
146
  Health Message: #{self.city.current_health_msg}
146
147
 
147
148
  Ozone: #{self.city.current_ozone} (#{self.city.current_ozone_msg})
@@ -1,3 +1,3 @@
1
1
  module AirQualityIndex
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: air_quality_index
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - "'Jameson Bass'"
@@ -55,6 +55,7 @@ files:
55
55
  - Rakefile
56
56
  - air_quality_index-0.1.0.gem
57
57
  - air_quality_index-0.2.0.gem
58
+ - air_quality_index-0.2.1.gem
58
59
  - air_quality_index.gemspec
59
60
  - bin/air-quality-index
60
61
  - bin/console