merb-extjs-direct 0.0.2 → 0.0.3
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/History.txt +6 -2
- data/Manifest.txt +1 -0
- data/lib/merb-extjs-direct.rb +1 -1
- data/merb-extjs-direct.js +46 -0
- metadata +8 -9
data/History.txt
CHANGED
data/Manifest.txt
CHANGED
data/lib/merb-extjs-direct.rb
CHANGED
@@ -0,0 +1,46 @@
|
|
1
|
+
/**
|
2
|
+
* @overview merb-ext-direct.js
|
3
|
+
* A couple of minor overrides to the Ext.Direct package which simply redefines HTTP params to be
|
4
|
+
* Merb/Rails friendly. By default, Ext.Direct uses the words "action" and "method", where with Merb/Rails,
|
5
|
+
* we prefer "controller" and "action".
|
6
|
+
* This file should be included immediately after ext-all.js
|
7
|
+
*/
|
8
|
+
|
9
|
+
/**
|
10
|
+
* Ext.Direct.Transaction
|
11
|
+
*/
|
12
|
+
Ext.override(Ext.Direct.Transaction, {
|
13
|
+
/**
|
14
|
+
* toHash
|
15
|
+
* compile the Transaction object into a hash. re-arrange the action/method params to controller/action to
|
16
|
+
* be compatible with standard routing terminology. The Ext3 framework should be changed IMHO, since the words
|
17
|
+
* "action" and "method" are both verb-like whereas controller/action is more sentence-like (ie: noun/verb)
|
18
|
+
* @return {Object}
|
19
|
+
* @author Chris Scott
|
20
|
+
*/
|
21
|
+
toHash : function() {
|
22
|
+
return {
|
23
|
+
tid: this.tid,
|
24
|
+
xcontroller: this.action,
|
25
|
+
xaction: this.method,
|
26
|
+
data: this.data
|
27
|
+
}
|
28
|
+
}
|
29
|
+
});
|
30
|
+
|
31
|
+
/**
|
32
|
+
* Ext.direct.RemotingProvider
|
33
|
+
*/
|
34
|
+
Ext.override(Ext.direct.RemotingProvider, {
|
35
|
+
/**
|
36
|
+
* getCallData
|
37
|
+
* get data from Transaction#getHash instead of composing by hand.
|
38
|
+
* @param {Object} t
|
39
|
+
* @author Chris Scott
|
40
|
+
*/
|
41
|
+
getCallData: function(t){
|
42
|
+
var req = t.toHash();
|
43
|
+
req.type = 'rpc';
|
44
|
+
return req;
|
45
|
+
}
|
46
|
+
});
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: merb-extjs-direct
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- christocracy
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-04-
|
12
|
+
date: 2009-04-29 00:00:00 -04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -22,7 +22,7 @@ dependencies:
|
|
22
22
|
- !ruby/object:Gem::Version
|
23
23
|
version: 1.12.2
|
24
24
|
version:
|
25
|
-
description:
|
25
|
+
description: A series of components for implementing the Ext.Direct API specification in Merb. Ext.Direct in Merb utilizes merb-parts. Each part can define a CRUD api which router will dispatch requests to. Includes a Controller mixin for giving a controller the ability to act as an Ext.Direct RemotingProvider. This mixin turns the Controller into an Ext.Direct router.
|
26
26
|
email:
|
27
27
|
- chris.scott@extjs.com
|
28
28
|
executables: []
|
@@ -37,6 +37,7 @@ files:
|
|
37
37
|
- Manifest.txt
|
38
38
|
- README.rdoc
|
39
39
|
- Rakefile
|
40
|
+
- merb-extjs-direct.js
|
40
41
|
- lib/merb-extjs-direct.rb
|
41
42
|
- lib/merb-extjs-direct/xrequest.rb
|
42
43
|
- lib/merb-extjs-direct/xresponse.rb
|
@@ -44,9 +45,7 @@ files:
|
|
44
45
|
- lib/merb-extjs-direct/mixins/remoting_provider.rb
|
45
46
|
- test/test_merb-extjs-direct.rb
|
46
47
|
has_rdoc: true
|
47
|
-
homepage: http://
|
48
|
-
licenses: []
|
49
|
-
|
48
|
+
homepage: http://rubyforge.org/projects/merb-extjs/
|
50
49
|
post_install_message:
|
51
50
|
rdoc_options:
|
52
51
|
- --main
|
@@ -68,9 +67,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
68
67
|
requirements: []
|
69
68
|
|
70
69
|
rubyforge_project: merb-extjs
|
71
|
-
rubygems_version: 1.3.
|
70
|
+
rubygems_version: 1.3.1
|
72
71
|
signing_key:
|
73
|
-
specification_version:
|
74
|
-
summary:
|
72
|
+
specification_version: 2
|
73
|
+
summary: A series of components for implementing the Ext.Direct API specification in Merb
|
75
74
|
test_files:
|
76
75
|
- test/test_merb-extjs-direct.rb
|