weatai 0.1.4 → 0.1.5
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 +4 -4
- data/.gitignore +3 -0
- data/lib/weatai/instant.rb +10 -8
- data/lib/weatai/version.rb +1 -1
- metadata +2 -5
- data/cassettes/all_record.yml +0 -80262
- data/spec/fixtures/data.yml +0 -253
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eef72662d9f1d3b9baf52a4a6f2a4de5961f0e7f
|
4
|
+
data.tar.gz: d1753bdae6aa21c03b186231add3fc27a1210c8e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e76959a35a09c2b152be9bc4d369fb012042a875b0470b35879fb92fce09ff3036634d7d6e2be53a3fc5dd1d615b6857d27bab5ba74ef5e80f9fb4cdce00c629
|
7
|
+
data.tar.gz: d4b5b56cefc710b57c6b8a6683022086d4f41212de178984887c5b6b8da2a86666c9eb85281779d2fbf1055740accf123395af81266f5e81cf1c736606e20758
|
data/.gitignore
CHANGED
data/lib/weatai/instant.rb
CHANGED
@@ -18,19 +18,21 @@ module CWB
|
|
18
18
|
all_location2 = CWB::Rain.instant_rain
|
19
19
|
all_location3 = CWB::PSI.instant_psi
|
20
20
|
all_location4 = {}
|
21
|
+
n=1
|
21
22
|
station.each do |item|
|
22
23
|
location = {}
|
23
|
-
|
24
|
-
location['
|
25
|
-
location['
|
26
|
-
location['
|
27
|
-
location['
|
28
|
-
location['
|
29
|
-
location['MIN_10'] = all_location2[item]['MIN_10']
|
24
|
+
location['Station'] = item
|
25
|
+
location['City'] = all_location2[item]['city']
|
26
|
+
location['Town'] = all_location2[item]['town']
|
27
|
+
location['Temp'] = all_location1[item]['TEMP']
|
28
|
+
location['Humd'] = all_location1[item]['HUMD']
|
29
|
+
location['Last 10 minutes Rainfall'] = all_location2[item]['MIN_10']
|
30
30
|
location['Daily Accumulated Rainfall'] = all_location2[item]['Daily Accumulated Rainfall']
|
31
31
|
location['PSI'] = all_location3[location['city']]['PSI'] if location['city'].in?(all_location3.keys.uniq)
|
32
32
|
location['Status'] = all_location3[location['city']]['Status'] if location['city'].in?(all_location3.keys.uniq)
|
33
|
-
|
33
|
+
location['Time'] = all_location1[item]['time']
|
34
|
+
all_location4.store(n, location)
|
35
|
+
n+=1
|
34
36
|
end
|
35
37
|
all_location4
|
36
38
|
end
|
data/lib/weatai/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: weatai
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- soainfinite888
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http
|
@@ -186,7 +186,6 @@ files:
|
|
186
186
|
- README.md
|
187
187
|
- Rakefile
|
188
188
|
- bin/weatai
|
189
|
-
- cassettes/all_record.yml
|
190
189
|
- config/credentials.yml.example
|
191
190
|
- lib/weatai.rb
|
192
191
|
- lib/weatai/cwb.rb
|
@@ -195,7 +194,6 @@ files:
|
|
195
194
|
- lib/weatai/cwb_rain.rb
|
196
195
|
- lib/weatai/instant.rb
|
197
196
|
- lib/weatai/version.rb
|
198
|
-
- spec/fixtures/data.yml
|
199
197
|
- spec/spec_helper.rb
|
200
198
|
- spec/weatai_spec.rb
|
201
199
|
- weatai.gemspec
|
@@ -224,6 +222,5 @@ signing_key:
|
|
224
222
|
specification_version: 4
|
225
223
|
summary: Get weather content from central weather bureau(Taiwan);
|
226
224
|
test_files:
|
227
|
-
- spec/fixtures/data.yml
|
228
225
|
- spec/spec_helper.rb
|
229
226
|
- spec/weatai_spec.rb
|