threetaps-client 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.5
1
+ 1.0.6
@@ -37,6 +37,7 @@ class GeocoderClient < Client
37
37
  params << geocoder_requests.collect{|request| "#{request.to_params}"}.join(',')
38
38
  params << "]"
39
39
  response = execute_post('geocoder/geocode', params)
40
+ p decode(response)
40
41
  GeocoderResponse.from_array(decode(response))
41
42
  end
42
43
  end
@@ -9,7 +9,7 @@ class GeocoderRequest < Struct.new(:latitude, :longitude, :country, :state, :cit
9
9
  result << "\"city\":\"#{CGI.escape city}\"" unless city.nil?
10
10
  result << "\"locality\":\"#{CGI.escape locality}\"" unless locality.nil?
11
11
  result << "\"postal\":\"#{CGI.escape postal}\"" unless postal.nil?
12
- result << "\"tex\":\"#{CGI.escape text}\"" unless text.nil?
12
+ result << "\"text\":\"#{CGI.escape text}\"" unless text.nil?
13
13
  '{' + result.join(", ") + '}'
14
14
  end
15
15
 
@@ -46,14 +46,14 @@ class Posting < SuperModel::Base
46
46
  end
47
47
 
48
48
  def to_json
49
- posting = "{"+'source:'+"'#{self.source}'" + ',category:' + "'#{self.category}'" + ',location:' + "'#{self.location}'" + ',heading:' + "'#{CGI.escape self.heading.to_json}'"
49
+ posting = "{"+'source:'+"'#{self.source}'" + ',category:' + "'#{self.category}'" + ',location:' + "'#{self.location}'" + ',heading:' + "'#{CGI.escape self.heading.to_s[0,255].to_json}'"
50
50
  if self.timestamp
51
51
  posting << ",timestamp: '#{(self.timestamp.utc.to_s(:db)).gsub(/\s/,"+")}'"
52
52
  else
53
53
  posting << ",timestamp: '#{(Time.now.utc.to_s(:db)).gsub(/\s/,"+")}'"
54
54
  end
55
55
  posting << ',images:' + "[#{images.collect{ |image| "'#{image}'"}.join(',')}]"
56
- posting << ',body:' + "'#{CGI.escape self.body.to_json}'" unless self.body.blank?
56
+ posting << ',body:' + "'#{CGI.escape self.body.gsub!("\"","").to_json}'" unless self.body.blank?
57
57
  posting << ',price:' + "#{self.price.to_f}"
58
58
  posting << ',currency:' + "'#{self.currency}'"
59
59
  posting << ',accountName:' + "'#{self.accountName}'"
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{threetaps-client}
8
- s.version = "1.0.5"
8
+ s.version = "1.0.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["3taps.com"]
12
- s.date = %q{2011-04-12}
12
+ s.date = %q{2011-04-18}
13
13
  s.description = %q{A Ruby gem for accessing the 3taps API. See more at http://developers.3taps.net}
14
14
  s.email = %q{developers@3taps.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: threetaps-client
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 5
10
- version: 1.0.5
9
+ - 6
10
+ version: 1.0.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - 3taps.com
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-04-12 00:00:00 Z
18
+ date: 2011-04-18 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  requirement: &id001 !ruby/object:Gem::Requirement