Skip to content

Commit

Permalink
Upgraded label
Browse files Browse the repository at this point in the history
  • Loading branch information
onewheelskyward committed Sep 6, 2017
1 parent 9a65ef6 commit e68823b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/lita/handlers/onewheel_aqi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def get_aqi(response)
if aqi['data']['iaqi']['pm25']
reply += 'pm25: ' + color_str(aqi['data']['iaqi']['pm25']['v'].to_s) + ' '
ugm3 = pm25_to_ugm3 aqi['data']['iaqi']['pm25']['v'].to_s
reply += "µgm3(est): #{ugm3} "
reply += "µg/m³(est): #{ugm3} "
end
if aqi['data']['iaqi']['pm10']
reply += 'pm10: ' + color_str(aqi['data']['iaqi']['pm10']['v'].to_s) + ' '
Expand Down Expand Up @@ -165,7 +165,7 @@ def get_aqi_deets(response)
if aqi['data']['iaqi']['pm25']
reply += 'pm25: ' + color_str(aqi['data']['iaqi']['pm25']['v'].to_s) + ' '
ugm3 = pm25_to_ugm3 aqi['data']['iaqi']['pm25']['v']
reply += "µgm3(est): #{ugm3} "
reply += "µg/m³(est): #{ugm3} "
end
if aqi['data']['iaqi']['pm10']
reply += 'pm10: ' + color_str(aqi['data']['iaqi']['pm10']['v'].to_s) + ' '
Expand Down
2 changes: 1 addition & 1 deletion lita-onewheel-aqi.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |spec|
spec.name = 'lita-onewheel-aqi'
spec.version = '2.0.11'
spec.version = '2.0.12'
spec.authors = ['Andrew Kreps']
spec.email = ['andrew.kreps@gmail.com']
spec.description = 'AQI data retrieval bot'
Expand Down
4 changes: 2 additions & 2 deletions spec/lita/handlers/onewheel_aqi_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@

it 'queries the aqi' do
send_command 'aqi'
expect(replies.last).to include("AQI for Portland, OR, USA, ⚠️ 08Moderate ⚠️ pm25: 0876 µgm3(est): 23.99 pm10: 0340 updated 0860 minutes ago. 14(http://aqicn.org/city/usa/oregon/government-camp-multorpor-visibility/)")
expect(replies.last).to include("AQI for Portland, OR, USA, ⚠️ 08Moderate ⚠️ pm25: 0876 µg/m³(est): 23.99 pm10: 0340 updated 0860 minutes ago. 14(http://aqicn.org/city/usa/oregon/government-camp-multorpor-visibility/)")
end

it 'queries the aqideets' do
send_command 'aqideets'
expect(replies.last).to eq("AQI for Portland, OR, USA, ⚠️ 08Moderate ⚠️ humidity: 11% pressure: 1014mb pm25: 0876 µgm3(est): 23.99 pm10: 0340 temp: 34.65C updated 0860 minutes ago. 14(http://aqicn.org/city/usa/oregon/government-camp-multorpor-visibility/)")
expect(replies.last).to eq("AQI for Portland, OR, USA, ⚠️ 08Moderate ⚠️ humidity: 11% pressure: 1014mb pm25: 0876 µg/m³(est): 23.99 pm10: 0340 temp: 34.65C updated 0860 minutes ago. 14(http://aqicn.org/city/usa/oregon/government-camp-multorpor-visibility/)")
end
end

0 comments on commit e68823b

Please sign in to comment.