tw_hospital 0.0.1.9 → 0.0.2

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: 48b5ad567ddb11ed563e1cb83e1981061b75f434
4
- data.tar.gz: f069975044405b0444b176aff1ab39900f3689eb
3
+ metadata.gz: 3fccdce498884b35c9c8486602e442fdbd7347ff
4
+ data.tar.gz: 45ee949473eeb8178b004619608de1e1eab3e52e
5
5
  SHA512:
6
- metadata.gz: 77f96e176545691a3a53ffccf5cdba07dba185164afdef8ff9ae47d5f2a8f4338a8afc7d47b0cadd439821578411173df6d796604cd2639a1a1ffc52dedd4f3f
7
- data.tar.gz: 5a7d46de5db3be034b523b0fc4077c9214bc5738dbe9e773a2695ed8e42a0fe2a773ac946cececb50a6b05cf1586ae86670b3a6cfacadcbbc8d77a3496606a6e
6
+ metadata.gz: 9d0ced029f8710485bb83f1cb8ad27fd1c5191ab2480cbeb407c2f7a08b8f56f2956df331629f4d593379411237abdf65cc275dc292068fdfb0ac10e9705084d
7
+ data.tar.gz: f8c69c654eaedc8c127210f171267de624f86a5655c690979961c23d65ed19b0f491f53096494b5a0c939e3902513f93aa095abeafe672d4acc0e1402de42eb2
data/lib/module/shh.rb CHANGED
@@ -6,7 +6,7 @@ module Shh
6
6
  html = open(url).read
7
7
  html.encode!("big5")
8
8
  page = Nokogiri::HTML.parse html
9
- hash[:hospital] = "ssh"
9
+ hash[:hospital] = "shh"
10
10
  hash[:to_119] = page.css("#off").text.strip
11
11
  hash[:wait_see] = page.css("#Label1").text.strip
12
12
  hash[:wait_push_bed] = page.css("#Label2").text.strip
data/lib/module/sltung.rb CHANGED
@@ -11,7 +11,6 @@ module Sltung
11
11
  page = Nokogiri::HTML(open(url))
12
12
  text = page.css("body div.wrapper div span").text
13
13
  hash = self.get_situation(text)
14
- hash[:hospital] = "sltung"
15
14
  # hash[:to_119] = page.css("#GridView1 tr:nth-child(2) td:nth-child(2)").text.strip
16
15
  # hash[:wait_see] = page.css("#GridView1 tr:nth-child(3) td:nth-child(2)").text.strip
17
16
  # hash[:wait_push_bed] = page.css("#GridView1 tr:nth-child(4) td:nth-child(2)").text.strip
@@ -22,6 +21,7 @@ module Sltung
22
21
 
23
22
  def self.get_situation(text)
24
23
  hash = {}
24
+ hash[:hospital] = "sltung"
25
25
  text.split(":").each_with_index do |each_text, index|
26
26
  next if index == 0
27
27
  if index == 1
@@ -1,3 +1,3 @@
1
1
  module TwHospital
2
- VERSION = "0.0.1.9"
2
+ VERSION = "0.0.2"
3
3
  end
data/lib/tw_hospital.rb CHANGED
@@ -65,10 +65,7 @@ module TwHospital
65
65
  json << Edah.crawl
66
66
  json << Cgmh_ks.crawl
67
67
  json << Tzuchi_hl.crawl
68
- filename = Time.now.strftime("%Y-%m-%d %H:%M:%S") unless filename
69
- File.open("#{filename}.json", "w") do |f|
70
- f.write(JSON.pretty_generate(json))
71
- end
68
+ return json
72
69
  end
73
70
 
74
71
  def TwHospital.schedule_fetch_all
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tw_hospital
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.9
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - JackHou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-02 00:00:00.000000000 Z
11
+ date: 2015-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -134,7 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
134
134
  version: '0'
135
135
  requirements: []
136
136
  rubyforge_project:
137
- rubygems_version: 2.4.3
137
+ rubygems_version: 2.0.14
138
138
  signing_key:
139
139
  specification_version: 4
140
140
  summary: This gem would fetch all tw hospital emergency data.