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
139ef81e
Commit
139ef81e
authored
May 21, 2017
by
Ivan Lan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'lan/update_city_forecast' into 'master'
Update city forecast See merge request
!9
parents
586215ef
ee2c7014
Show 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 @
139ef81e
...
...
@@ -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 @
139ef81e
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 @
139ef81e
...
...
@@ -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 @
139ef81e
...
...
@@ -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