uec_express_api 0.0.2 → 0.0.3

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.
@@ -1,3 +1,3 @@
1
1
  module UecExpressApi
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -58,7 +58,11 @@ class UECExpressApi
58
58
  def updated(doc)
59
59
  elements = doc/:p
60
60
  if elements
61
- @updated = elements.last.inner_html.to_s.encode('utf-8', 'sjis')
61
+ begin
62
+ @updated = elements.last.inner_html.to_s.encode('utf-8', 'sjis')
63
+ rescue
64
+ @updated = elements.last.inner_html.to_s
65
+ end
62
66
  end
63
67
  end
64
68
 
@@ -68,7 +72,11 @@ class UECExpressApi
68
72
  next if i == 0
69
73
  ex = {}
70
74
  (element/:td).each_with_index do |e, j|
71
- ex[express_pass[j]] = e.inner_html.to_s.encode('utf-8', 'sjis')
75
+ begin
76
+ ex[express_pass[j]] = e.inner_html.to_s.encode('utf-8', 'sjis')
77
+ rescue
78
+ ex[express_pass[j]] = e.inner_html.to_s
79
+ end
72
80
  end
73
81
  @express << ex
74
82
  end
data/test.rb ADDED
@@ -0,0 +1,4 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/lib/uec_express_api')
2
+
3
+ app=UECExpressApi.new()
4
+ app.to_s
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uec_express_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-04 00:00:00.000000000 Z
12
+ date: 2012-12-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: hpricot
@@ -58,6 +58,7 @@ files:
58
58
  - Rakefile
59
59
  - lib/uec_express_api.rb
60
60
  - lib/uec_express_api/version.rb
61
+ - test.rb
61
62
  - uec_express_api.gemspec
62
63
  homepage: http://henteko07.hatenablog.com/
63
64
  licenses: []