baiduserp 2.0.8 → 2.0.9
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/lib/baiduserp/parser.rb +13 -1
- data/lib/baiduserp/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7c2aeaaec2e67bb6c2bd2db8939fa42626189a3
|
4
|
+
data.tar.gz: fa0e91f7e071c02b9874f0a7a1bcc62177233a94
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9fa3532f07dbdc5442437d052df57ca36e9fe9b689eaf0e660f1acf3fb07e2093fa7604fc9626330887250d5c2475030853a8a7e3d33a1a5e1994468e4cb126
|
7
|
+
data.tar.gz: ced9c4bbcd9e657f120ed7299ea2d84c849394a9dfe8ce79bf64c122d76480d3482f29d2d799a54dc803b569f0e622f08fb0a2ec7d874aa5815d76a789e29990
|
data/lib/baiduserp/parser.rb
CHANGED
@@ -19,7 +19,19 @@ module Baiduserp
|
|
19
19
|
self.methods.each do |m|
|
20
20
|
next unless m =~ /^_parse_/
|
21
21
|
#p m
|
22
|
-
|
22
|
+
begin
|
23
|
+
@serp[m.to_s.sub('_parse_','').to_sym] = self.send m,@file
|
24
|
+
rescue Exception => e
|
25
|
+
issue_file = "/tmp/baiduserp_issue_#{Time.now.strftime("%Y%m%d%H%M%S")}.html"
|
26
|
+
open(issue_file,'w').puts(html)
|
27
|
+
puts "Notice:"
|
28
|
+
puts "Baiduserp gem have a bug, please email to zmingqian@qq.com to report it."
|
29
|
+
puts "Please attach file #{issue_file} in the email and the error information below, thanks!"
|
30
|
+
puts e.message
|
31
|
+
puts e.inspect
|
32
|
+
puts e.backtrace
|
33
|
+
raise "Baiduserp Parser Get An Error!"
|
34
|
+
end
|
23
35
|
#p @serp.keys
|
24
36
|
end
|
25
37
|
|
data/lib/baiduserp/version.rb
CHANGED