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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f3053aff58ec0b00bb2eb0306d50e34fa11bbab7
4
- data.tar.gz: 4f1374b52f8d4b2043e869a71badccefb6d691bd
3
+ metadata.gz: eef72662d9f1d3b9baf52a4a6f2a4de5961f0e7f
4
+ data.tar.gz: d1753bdae6aa21c03b186231add3fc27a1210c8e
5
5
  SHA512:
6
- metadata.gz: e80be20a15a89ef033483b20666413f9ec81a8aab5358b3b18319ad413416e1e6a4ecb7eb8c5495050fbf7a11f35f69bfd6e0406e92c672a29f849cc71543d4a
7
- data.tar.gz: 22533e6aec8c6484237e54f9dbaef38a595252ee9b81e1fddce4a8a820af08d8bb7162f217258c80104b0a085f466ed7a1e5489448cddb02168616a156a18ca2
6
+ metadata.gz: e76959a35a09c2b152be9bc4d369fb012042a875b0470b35879fb92fce09ff3036634d7d6e2be53a3fc5dd1d615b6857d27bab5ba74ef5e80f9fb4cdce00c629
7
+ data.tar.gz: d4b5b56cefc710b57c6b8a6683022086d4f41212de178984887c5b6b8da2a86666c9eb85281779d2fbf1055740accf123395af81266f5e81cf1c736606e20758
data/.gitignore CHANGED
@@ -1,5 +1,8 @@
1
1
  coverage/
2
2
  config/
3
3
  cassettes/
4
+
5
+ spec/fixtures
6
+ spec/coverage/
4
7
  *.gem
5
8
  Gemfile.lock
@@ -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
- place = item
24
- location['time'] = all_location1[item]['time']
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['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
- all_location4.store(place, location)
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
@@ -1,3 +1,3 @@
1
1
  module CWB
2
- VERSION = '0.1.4'
2
+ VERSION = '0.1.5'
3
3
  end
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
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-14 00:00:00.000000000 Z
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