Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
weather-model
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
weather-model
Commits
ee2c7014
Commit
ee2c7014
authored
May 21, 2017
by
ivan Lan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update city forecast
parent
586215ef
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
5 deletions
+8
-5
1_create_city_forecasts.rb
db/migrate/1_create_city_forecasts.rb
+1
-1
2_create_auto_station_ten_mins.rb
db/migrate/2_create_auto_station_ten_mins.rb
+1
-1
forecast.rb
lib/weather-model/source_schemas/forecast.rb
+4
-2
weather-model_spec.rb
spec/weather-model_spec.rb
+2
-1
No files found.
db/migrate/1_create_city_forecasts.rb
View file @
ee2c7014
...
...
@@ -4,7 +4,7 @@ class CreateCityForecasts < ActiveRecord::Migration[5.0]
t
.
datetime
:datetime
t
.
integer
:temp_low
t
.
integer
:temp_high
t
.
string
:weather_text
t
.
string
:weather_text
1
t
.
string
:weather_text2
t
.
string
:weather_pic
t
.
string
:cityname
...
...
db/migrate/2_create_auto_station_ten_mins.rb
View file @
ee2c7014
class
Create
TenMinAutoStatio
ns
<
ActiveRecord
::
Migration
[
5.0
]
class
Create
AutoStationTenMi
ns
<
ActiveRecord
::
Migration
[
5.0
]
def
up
create_table
:auto_station_ten_mins
do
|
t
|
t
.
datetime
:datetime
...
...
lib/weather-model/source_schemas/forecast.rb
View file @
ee2c7014
...
...
@@ -9,7 +9,8 @@ module WeatherModel
cityname: :string
,
temp_high: :string
,
temp_low: :string
,
weather_text: :string
,
weather_text1: :string
,
weather_text2: :string
,
weather_pic: :string
,
win_dir: :string
,
win_speed: :string
,
...
...
@@ -28,7 +29,8 @@ module WeatherModel
cityname:
'上海'
,
temp_high:
'100'
,
temp_low:
'0'
,
weather_text:
'酷热严寒'
,
weather_text1:
'酷热'
,
weather_text2:
'严寒'
,
weather_pic:
'http://xxx.com'
,
win_dir:
'东南西北风'
,
win_speed:
'1级'
,
...
...
spec/weather-model_spec.rb
View file @
ee2c7014
...
...
@@ -45,7 +45,8 @@ RSpec.describe WeatherModel do
cityname:
'shanghai'
,
temp_high:
'100'
,
temp_low:
'0'
,
weather_text:
'酷热严寒'
,
weather_text1:
'酷热'
,
weather_text1:
'严寒'
,
weather_pic:
'http://xxx.com'
,
win_dir:
'东南西北风'
,
win_speed:
'1级'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment