lcbo 0.9.4 → 0.9.5

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.
@@ -126,11 +126,7 @@ module LCBO
126
126
 
127
127
  def as_hash
128
128
  @as_hash ||= begin
129
- fields.reduce({}) do |hsh, field|
130
- value = send(field)
131
- hsh[field] = value.is_a?(String) ? value.encode('utf-8') : value
132
- hsh
133
- end
129
+ fields.reduce({}) { |hsh, field| hsh.merge(field => send(field)) }
134
130
  end
135
131
  end
136
132
 
@@ -21,8 +21,7 @@ module LCBO
21
21
  if html.valid_encoding?
22
22
  html
23
23
  else
24
- html.force_encoding('ISO-8859-1')
25
- html.encode('UTF-8')
24
+ html.encode('UTF-8', 'ISO-8859-1')
26
25
  end.gsub("\r\n", "\n")
27
26
  end
28
27
 
data/lib/lcbo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module LCBO
2
- VERSION = '0.9.4'
2
+ VERSION = '0.9.5'
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 9
8
- - 4
9
- version: 0.9.4
8
+ - 5
9
+ version: 0.9.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Carsten Nielsen
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-11-24 00:00:00 -05:00
17
+ date: 2010-11-30 00:00:00 -05:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency