overlord 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.
@@ -9,6 +9,10 @@ currently won't work outside that framework.
9
9
  === Installation
10
10
  Installing the gem should install the dependencies
11
11
  sudo gem install overlord
12
+
13
+ In case it doesn't install dependencies:
14
+ sudo gem install httparty
15
+ sudo gem install crack
12
16
 
13
17
  === Settings
14
18
  This gem requires some configuration before it will work in your Rails application:
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.5
1
+ 0.1.6
@@ -34,7 +34,22 @@ module Overlord
34
34
  header_params["Referer"] = ref if ref
35
35
  # to_params comes from the httparty gem
36
36
  buffer = open("#{uri}?#{options[:query].to_params}", header_params).read
37
- JSON.parse(buffer)
37
+
38
+ # Try the standard parser
39
+ begin
40
+ return JSON.parse(buffer)
41
+ rescue => ex
42
+ puts ex
43
+ end
44
+
45
+ # Try the crack parser
46
+ begin
47
+ return Crack::JSON.parse(json)
48
+ rescue => ex
49
+ puts ex
50
+ end
51
+
52
+ {}
38
53
  end
39
54
 
40
55
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{overlord}
8
- s.version = "0.1.5"
8
+ s.version = "0.1.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Justin Ball", "Joel Duffin"]
12
- s.date = %q{2009-12-08}
12
+ s.date = %q{2009-12-10}
13
13
  s.description = %q{Code to interact with the google ajax apis on the server and the client.}
14
14
  s.email = %q{justin@tatemae.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: overlord
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
  - Justin Ball
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2009-12-08 00:00:00 -07:00
13
+ date: 2009-12-10 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency