lita-cwb 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6b2baf2f2b60a57f28cc81102d390276af8f5f48
4
- data.tar.gz: ef518266d33b5cfb6549403266e5fafad6002477
3
+ metadata.gz: f650ffbfe5aa9304c779a982d4c3e2c420f0cc5a
4
+ data.tar.gz: fee0a8e5e6af0a1fe992ca1765d51f939631372f
5
5
  SHA512:
6
- metadata.gz: b093e48577c42a1f45d3208015b3cc0228bc5f31f6de15669b825f612e40e2c4859dc6cfad450e95a9f51499557d77832da0d96fcfdb46d56b048ff81cca3ed9
7
- data.tar.gz: 565b5c412da38daa7294fe78f80f84f0bb441aaab60b7a4f90b79df7b042180fd8b6ac4dcaf39f625aa3ca0bcde256d3c14ce54715e58372b90f9a6e8d11270c
6
+ metadata.gz: 1cff7a01ba7cb61ab80127c411fb6162985bdb3d52f7e2aaa53291f05e70cc21183738c9c95bee7478fe3b439e5b1a7aa749ab687ace1bac0cf002ab11a739c8
7
+ data.tar.gz: 29cdbd3725a07259116f07f56ba81f1c95c0da2a2225b93651ad98cfb5422af16589074936c4701f091fce3e6435adec040e0255fd59a551797c3c7218333071
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # lita-cwb
2
2
 
3
- TODO: Add a description of the plugin.
3
+ *lita-cwb* is a Lita handler with Open Data from Central Weather Bureau (中央氣象局)
4
4
 
5
5
  ## Installation
6
6
 
@@ -16,4 +16,4 @@ TODO: Describe any configuration attributes the plugin exposes.
16
16
 
17
17
  ## Usage
18
18
 
19
- TODO: Describe the plugin's features and how to use them.
19
+ * lita> `cwb f [WHERE]` - Show me forecast information for location WHERE (e.g: '台北市')
@@ -61,10 +61,13 @@ module Lita
61
61
  return
62
62
  end
63
63
 
64
- data = Nokogiri::XML(open(uri))
64
+ data = Nokogiri::XML(open(uri)) do |config|
65
+ config.strict.noblanks
66
+ end
67
+
65
68
  response.reply data.css("dataset location locationName").text
66
- data.css("dataset parameterSet parameter").each do |params|
67
- response.reply params.css("parameterValue").text
69
+ data.css("dataset parameterSet parameter").each do |param|
70
+ response.reply param.css("parameterValue").text
68
71
  end
69
72
  end
70
73
  end
data/lita-cwb.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "lita-cwb"
3
- spec.version = "0.1.0"
3
+ spec.version = "0.1.1"
4
4
  spec.authors = ["Huei-Horng Yo"]
5
5
  spec.email = ["hiroshi@ghostsinthelab.org"]
6
6
  spec.description = "Lita handler with Open Data from Central Weather Bureau"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-cwb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Huei-Horng Yo