Commit 139ef81e by Ivan Lan

Merge branch 'lan/update_city_forecast' into 'master'

Update city forecast See merge request !9
parents 586215ef ee2c7014
...@@ -4,7 +4,7 @@ class CreateCityForecasts < ActiveRecord::Migration[5.0] ...@@ -4,7 +4,7 @@ class CreateCityForecasts < ActiveRecord::Migration[5.0]
t.datetime :datetime t.datetime :datetime
t.integer :temp_low t.integer :temp_low
t.integer :temp_high t.integer :temp_high
t.string :weather_text t.string :weather_text1
t.string :weather_text2 t.string :weather_text2
t.string :weather_pic t.string :weather_pic
t.string :cityname t.string :cityname
......
class CreateTenMinAutoStations < ActiveRecord::Migration[5.0] class CreateAutoStationTenMins < ActiveRecord::Migration[5.0]
def up def up
create_table :auto_station_ten_mins do |t| create_table :auto_station_ten_mins do |t|
t.datetime :datetime t.datetime :datetime
......
...@@ -9,7 +9,8 @@ module WeatherModel ...@@ -9,7 +9,8 @@ module WeatherModel
cityname: :string, cityname: :string,
temp_high: :string, temp_high: :string,
temp_low: :string, temp_low: :string,
weather_text: :string, weather_text1: :string,
weather_text2: :string,
weather_pic: :string, weather_pic: :string,
win_dir: :string, win_dir: :string,
win_speed: :string, win_speed: :string,
...@@ -28,7 +29,8 @@ module WeatherModel ...@@ -28,7 +29,8 @@ module WeatherModel
cityname: '上海', cityname: '上海',
temp_high: '100', temp_high: '100',
temp_low: '0', temp_low: '0',
weather_text: '酷热严寒', weather_text1: '酷热',
weather_text2: '严寒',
weather_pic: 'http://xxx.com', weather_pic: 'http://xxx.com',
win_dir: '东南西北风', win_dir: '东南西北风',
win_speed: '1级', win_speed: '1级',
......
...@@ -45,7 +45,8 @@ RSpec.describe WeatherModel do ...@@ -45,7 +45,8 @@ RSpec.describe WeatherModel do
cityname: 'shanghai', cityname: 'shanghai',
temp_high: '100', temp_high: '100',
temp_low: '0', temp_low: '0',
weather_text: '酷热严寒', weather_text1: '酷热',
weather_text1: '严寒',
weather_pic: 'http://xxx.com', weather_pic: 'http://xxx.com',
win_dir: '东南西北风', win_dir: '东南西北风',
win_speed: '1级', win_speed: '1级',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment