ruboty-rainfall_jp 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/ruboty/rainfall_jp.rb +4 -4
- data/lib/ruboty/rainfall_jp/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 987a60a739430ac5d4a6f0bfc6f15beed2c3177ad07bb9205f85320b99db4f57
|
4
|
+
data.tar.gz: d9eeaa0c30caeaf7fac0504eda82cdb60867c5671be6e2e15bcb31728464b7b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d90fe2e808681706eb3f16a1c5b894e7519b045d8fc11649cf8944e01f741e923169432c2c62372b5309ce6c9ac3d2b899630c993ae235c2312073ed637b9445
|
7
|
+
data.tar.gz: f7f4a6e75a6020b75cf608cf4c80aa5a266ed82b11a3c250e1a68d90f28c376e52fa0395654c141cf9d82046b0411c807e632fc81c1a91a73cd3e9f6c398a17f
|
data/lib/ruboty/rainfall_jp.rb
CHANGED
@@ -40,8 +40,8 @@ module Ruboty
|
|
40
40
|
private
|
41
41
|
|
42
42
|
def fetch_location_name_and_coodinated_geometry(query)
|
43
|
-
url = "
|
44
|
-
response = JSON.parse(
|
43
|
+
url = "https://map.yahooapis.jp/geocode/V1/geoCoder?appid=#{YAHOO_JAPAN_APP_ID}&output=json&query=#{CGI.escape(query)}"
|
44
|
+
response = JSON.parse(OpenURI.open_uri(url).read)
|
45
45
|
features = response["Feature"]
|
46
46
|
if features.nil? || features.first.nil?
|
47
47
|
return nil
|
@@ -50,8 +50,8 @@ module Ruboty
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def fetch_rainfall(geometry)
|
53
|
-
url = "
|
54
|
-
response = JSON.parse(
|
53
|
+
url = "https://map.yahooapis.jp/weather/V1/place?appid=#{YAHOO_JAPAN_APP_ID}&output=json&coordinates=#{geometry}"
|
54
|
+
response = JSON.parse(OpenURI.open_uri(url).read)
|
55
55
|
features = response["Feature"]
|
56
56
|
if features.nil? || features.first.nil?
|
57
57
|
return nil
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruboty-rainfall_jp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shimpei Makimoto
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruboty
|
@@ -88,8 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
requirements: []
|
91
|
-
|
92
|
-
rubygems_version: 2.6.6
|
91
|
+
rubygems_version: 3.0.3
|
93
92
|
signing_key:
|
94
93
|
specification_version: 4
|
95
94
|
summary: A Ruboty plugin to check rainfall forecast in Japan
|