eyeballs 0.5.8 → 0.5.8.1
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.
- data/Rakefile +2 -2
- data/app.rb +4 -0
- data/eyeballs.gemspec +1 -1
- data/src/drivers/jquery/adapters/o_O.rest.js +11 -4
- data/test/unit/test_rest.html +7 -0
- metadata +3 -2
data/Rakefile
CHANGED
@@ -27,7 +27,7 @@ begin
|
|
27
27
|
require 'jeweler'
|
28
28
|
Jeweler::Tasks.new do |s|
|
29
29
|
s.name = "eyeballs"
|
30
|
-
s.version = "0.5.8"
|
30
|
+
s.version = "0.5.8.1"
|
31
31
|
s.author = "Paul Campbell"
|
32
32
|
s.email = "paul@rslw.com"
|
33
33
|
s.homepage = "http://www.github.com/paulca/eyeballs.js"
|
@@ -44,4 +44,4 @@ rescue LoadError
|
|
44
44
|
puts "Jeweler not available. Install it with: sudo gem install jeweler"
|
45
45
|
end
|
46
46
|
|
47
|
-
Jeweler::GemcutterTasks.new
|
47
|
+
Jeweler::GemcutterTasks.new
|
data/app.rb
CHANGED
data/eyeballs.gemspec
CHANGED
@@ -101,11 +101,18 @@ o_O.rest = {
|
|
101
101
|
{
|
102
102
|
var url = this.figure_url(options, model) + '/' + id;
|
103
103
|
$.get(url, function(response){
|
104
|
-
|
105
|
-
|
104
|
+
if(typeof response === 'object')
|
105
|
+
{
|
106
|
+
var retrieved_object = response;
|
106
107
|
}
|
107
|
-
|
108
|
-
|
108
|
+
else
|
109
|
+
{
|
110
|
+
try{
|
111
|
+
var retrieved_object = JSON.parse(response);
|
112
|
+
}
|
113
|
+
catch(e){
|
114
|
+
var retrieved_object = model.initialize({id: id});
|
115
|
+
}
|
109
116
|
}
|
110
117
|
if(typeof callback === 'function')
|
111
118
|
{
|
data/test/unit/test_rest.html
CHANGED
@@ -154,6 +154,13 @@
|
|
154
154
|
});
|
155
155
|
})
|
156
156
|
|
157
|
+
asyncTest('pulling something in by itself', 1, function(){
|
158
|
+
Review.find(2, {success: function(found_review){
|
159
|
+
equals(found_review.title, 'funtimes');
|
160
|
+
start();
|
161
|
+
}})
|
162
|
+
})
|
163
|
+
|
157
164
|
asyncTest('pulling something in with prefix', 1, function(){
|
158
165
|
Review.find(1, {url:'/my/reviews', success: function(found_review){
|
159
166
|
equals(found_review.title, 'Prefixed');
|
metadata
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eyeballs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 69
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 5
|
9
9
|
- 8
|
10
|
-
|
10
|
+
- 1
|
11
|
+
version: 0.5.8.1
|
11
12
|
platform: ruby
|
12
13
|
authors:
|
13
14
|
- Paul Campbell
|