hot-coffee-ruby-twitter 0.1.5 → 0.1.6

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.
Files changed (3) hide show
  1. data/lib/twitter.rb +1 -1
  2. data/lib/twitter/common.rb +12 -4
  3. metadata +1 -1
data/lib/twitter.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  require 'twitter/rest_api'
2
2
 
3
3
  module Twitter
4
- VERSION = '0.1.5'
4
+ VERSION = '0.1.6'
5
5
  end
@@ -10,11 +10,19 @@ module Twitter
10
10
  params.to_a.map {|v| v.join('=')}.join('&')
11
11
  end
12
12
 
13
- def self.unescapeHTML(statuses)
14
- statuses.each_with_index do |status, index|
15
- statuses[index]['text'] = CGI.unescapeHTML(status['text'])
13
+ def self.unescapeHTML(response)
14
+ if response.is_a? Array
15
+ response.each_with_index do |status, index|
16
+ if status.is_a? Hash and status.has_key? 'text'
17
+ response[index]['text'] = CGI.unescapeHTML(status['text'])
18
+ end
19
+ end
20
+ else
21
+ if response.is_a? Hash and response.has_key? 'text'
22
+ response['text'] = CGI.unescapeHTML(response['text'])
23
+ end
16
24
  end
17
- statuses
25
+ response
18
26
  end
19
27
  end
20
28
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hot-coffee-ruby-twitter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - hot_coffee