eyeballs 0.5.15 → 0.5.16

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ Thu Mar 3
2
+ - - - - -
3
+ - Add support for xhr in ajax
4
+
1
5
  Wed Feb 2
2
6
  - - - - -
3
7
  - Array.indexOf has no support in IE. Who knew?
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.15"
30
+ s.version = "0.5.16"
31
31
  s.author = "Paul Campbell"
32
32
  s.email = "paul@rslw.com"
33
33
  s.homepage = "http://www.github.com/paulca/eyeballs.js"
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{eyeballs}
8
- s.version = "0.5.15"
8
+ s.version = "0.5.16"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Paul Campbell"]
12
- s.date = %q{2011-02-02}
12
+ s.date = %q{2011-03-03}
13
13
  s.default_executable = %q{eyeballs}
14
14
  s.email = %q{paul@rslw.com}
15
15
  s.executables = ["eyeballs"]
@@ -75,7 +75,7 @@ Gem::Specification.new do |s|
75
75
  ]
76
76
  s.homepage = %q{http://www.github.com/paulca/eyeballs.js}
77
77
  s.require_paths = ["lib"]
78
- s.rubygems_version = %q{1.4.2}
78
+ s.rubygems_version = %q{1.5.0}
79
79
  s.summary = %q{A lightweight javascript MVC framework.}
80
80
  s.test_files = [
81
81
  "spec/app_generator_spec.rb",
@@ -30,7 +30,7 @@ o_O.model = {
30
30
  }
31
31
  }
32
32
 
33
- var run_callback = function(callback, method, object, response){
33
+ var run_callback = function(callback, method, object, response, xhr){
34
34
  try{
35
35
  if(typeof callback === 'function' && method === 'success')
36
36
  {
@@ -38,7 +38,7 @@ o_O.model = {
38
38
  }
39
39
  if(typeof callback === 'object' && typeof callback[method] === 'function')
40
40
  {
41
- callback[method](object, response);
41
+ callback[method](object, response, xhr);
42
42
  }
43
43
  }
44
44
  catch(e)
@@ -49,7 +49,7 @@ o_O.model = {
49
49
  }
50
50
  else
51
51
  {
52
- alert(e);
52
+ alert(e.name + "\n" + e.message);
53
53
  }
54
54
  }
55
55
  }
@@ -176,7 +176,7 @@ o_O.model = {
176
176
  {
177
177
  attributes['id'] = o_O.uuid();
178
178
  }
179
- if(!attributes['new_record'])
179
+ if(attributes['new_record'] !== false)
180
180
  {
181
181
  attributes['new_record'] = true;
182
182
  }
@@ -190,7 +190,7 @@ o_O.model = {
190
190
  {
191
191
  run_callback(callback, 'loading', this.initialize({id: id}))
192
192
  var model = this;
193
- return this.adapter.find(this, id, function(returned_object, response){
193
+ return this.adapter.find(this, id, function(returned_object, response, xhr){
194
194
  found_object = model.initialize(returned_object);
195
195
  if(!found_object['new_record'])
196
196
  {
@@ -198,11 +198,11 @@ o_O.model = {
198
198
  }
199
199
  if(found_object.id)
200
200
  {
201
- run_callback(callback, 'success', found_object, response);
201
+ run_callback(callback, 'success', found_object, response, xhr);
202
202
  }
203
203
  else
204
204
  {
205
- run_callback(callback, 'failure', found_object, response);
205
+ run_callback(callback, 'failure', found_object, response, xhr);
206
206
  }
207
207
  }, callback);
208
208
  }
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eyeballs
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 43
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 15
10
- version: 0.5.15
9
+ - 16
10
+ version: 0.5.16
11
11
  platform: ruby
12
12
  authors:
13
13
  - Paul Campbell
@@ -15,14 +15,12 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-02 00:00:00 +00:00
18
+ date: 2011-03-03 00:00:00 +00:00
19
19
  default_executable: eyeballs
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
- prerelease: false
23
- name: sinatra
24
22
  type: :runtime
25
- version_requirements: &id001 !ruby/object:Gem::Requirement
23
+ requirement: &id001 !ruby/object:Gem::Requirement
26
24
  none: false
27
25
  requirements:
28
26
  - - ">="
@@ -31,12 +29,12 @@ dependencies:
31
29
  segments:
32
30
  - 0
33
31
  version: "0"
34
- requirement: *id001
35
- - !ruby/object:Gem::Dependency
32
+ name: sinatra
33
+ version_requirements: *id001
36
34
  prerelease: false
37
- name: thor
35
+ - !ruby/object:Gem::Dependency
38
36
  type: :runtime
39
- version_requirements: &id002 !ruby/object:Gem::Requirement
37
+ requirement: &id002 !ruby/object:Gem::Requirement
40
38
  none: false
41
39
  requirements:
42
40
  - - ">="
@@ -45,12 +43,12 @@ dependencies:
45
43
  segments:
46
44
  - 0
47
45
  version: "0"
48
- requirement: *id002
49
- - !ruby/object:Gem::Dependency
46
+ name: thor
47
+ version_requirements: *id002
50
48
  prerelease: false
51
- name: activesupport
49
+ - !ruby/object:Gem::Dependency
52
50
  type: :runtime
53
- version_requirements: &id003 !ruby/object:Gem::Requirement
51
+ requirement: &id003 !ruby/object:Gem::Requirement
54
52
  none: false
55
53
  requirements:
56
54
  - - ">="
@@ -59,12 +57,12 @@ dependencies:
59
57
  segments:
60
58
  - 0
61
59
  version: "0"
62
- requirement: *id003
63
- - !ruby/object:Gem::Dependency
60
+ name: activesupport
61
+ version_requirements: *id003
64
62
  prerelease: false
65
- name: jeweler
63
+ - !ruby/object:Gem::Dependency
66
64
  type: :development
67
- version_requirements: &id004 !ruby/object:Gem::Requirement
65
+ requirement: &id004 !ruby/object:Gem::Requirement
68
66
  none: false
69
67
  requirements:
70
68
  - - ">="
@@ -73,12 +71,12 @@ dependencies:
73
71
  segments:
74
72
  - 0
75
73
  version: "0"
76
- requirement: *id004
77
- - !ruby/object:Gem::Dependency
74
+ name: jeweler
75
+ version_requirements: *id004
78
76
  prerelease: false
79
- name: rake
77
+ - !ruby/object:Gem::Dependency
80
78
  type: :development
81
- version_requirements: &id005 !ruby/object:Gem::Requirement
79
+ requirement: &id005 !ruby/object:Gem::Requirement
82
80
  none: false
83
81
  requirements:
84
82
  - - ">="
@@ -87,12 +85,12 @@ dependencies:
87
85
  segments:
88
86
  - 0
89
87
  version: "0"
90
- requirement: *id005
91
- - !ruby/object:Gem::Dependency
88
+ name: rake
89
+ version_requirements: *id005
92
90
  prerelease: false
93
- name: thor
91
+ - !ruby/object:Gem::Dependency
94
92
  type: :runtime
95
- version_requirements: &id006 !ruby/object:Gem::Requirement
93
+ requirement: &id006 !ruby/object:Gem::Requirement
96
94
  none: false
97
95
  requirements:
98
96
  - - ">="
@@ -101,12 +99,12 @@ dependencies:
101
99
  segments:
102
100
  - 0
103
101
  version: "0"
104
- requirement: *id006
105
- - !ruby/object:Gem::Dependency
102
+ name: thor
103
+ version_requirements: *id006
106
104
  prerelease: false
107
- name: activesupport
105
+ - !ruby/object:Gem::Dependency
108
106
  type: :runtime
109
- version_requirements: &id007 !ruby/object:Gem::Requirement
107
+ requirement: &id007 !ruby/object:Gem::Requirement
110
108
  none: false
111
109
  requirements:
112
110
  - - ">="
@@ -115,7 +113,9 @@ dependencies:
115
113
  segments:
116
114
  - 0
117
115
  version: "0"
118
- requirement: *id007
116
+ name: activesupport
117
+ version_requirements: *id007
118
+ prerelease: false
119
119
  description:
120
120
  email: paul@rslw.com
121
121
  executables:
@@ -216,7 +216,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
216
216
  requirements: []
217
217
 
218
218
  rubyforge_project:
219
- rubygems_version: 1.4.2
219
+ rubygems_version: 1.5.0
220
220
  signing_key:
221
221
  specification_version: 3
222
222
  summary: A lightweight javascript MVC framework.