eyeballs 0.5.9 → 0.5.10
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +6 -1
- data/Rakefile +1 -1
- data/eyeballs.gemspec +2 -2
- data/src/drivers/jquery/modules/o_O.routes.js +20 -2
- data/src/drivers/jquery/modules/o_O.support.js +1 -1
- data/test/unit/test_routing.html +3 -3
- metadata +4 -4
data/CHANGELOG
CHANGED
data/Rakefile
CHANGED
data/eyeballs.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{eyeballs}
|
8
|
-
s.version = "0.5.
|
8
|
+
s.version = "0.5.10"
|
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{2010-09-
|
12
|
+
s.date = %q{2010-09-30}
|
13
13
|
s.default_executable = %q{eyeballs}
|
14
14
|
s.email = %q{paul@rslw.com}
|
15
15
|
s.executables = ["eyeballs"]
|
@@ -58,7 +58,6 @@ o_O.routes = {
|
|
58
58
|
|
59
59
|
draw: function(callback){
|
60
60
|
$(function(){
|
61
|
-
|
62
61
|
callback(o_O.routes.router());
|
63
62
|
if(location.hash.o_O_trim() == '')
|
64
63
|
{
|
@@ -70,7 +69,17 @@ o_O.routes = {
|
|
70
69
|
}
|
71
70
|
|
72
71
|
var route_on_hash = function(){
|
73
|
-
var
|
72
|
+
var parts = location.hash.split('?')
|
73
|
+
var hash = parts[0].replace(/^(#)/, '').o_O_trim('/');
|
74
|
+
var query_string_parts;
|
75
|
+
if(typeof parts[1] === 'string')
|
76
|
+
{
|
77
|
+
query_string_parts = parts[1].replace('&', '&').split('&');
|
78
|
+
}
|
79
|
+
else
|
80
|
+
{
|
81
|
+
query_string_parts = '';
|
82
|
+
}
|
74
83
|
if(o_O.routes.urls.indexOf(hash) >= 0)
|
75
84
|
{
|
76
85
|
o_O.routes.rules[hash].action(o_O.routes.rules[hash].with_args);
|
@@ -88,6 +97,15 @@ o_O.routes = {
|
|
88
97
|
{
|
89
98
|
params[rule.matchers[j].replace(/^:/, '')] = match[j+1];
|
90
99
|
}
|
100
|
+
|
101
|
+
if(query_string_parts.length > 0)
|
102
|
+
{
|
103
|
+
for(k = 0; k < query_string_parts.length; k++)
|
104
|
+
{
|
105
|
+
var param_parts = query_string_parts[k].split('=')
|
106
|
+
params[param_parts[0]] = param_parts[1];
|
107
|
+
}
|
108
|
+
}
|
91
109
|
if(attr)
|
92
110
|
{
|
93
111
|
return params[attr];
|
data/test/unit/test_routing.html
CHANGED
@@ -47,7 +47,7 @@
|
|
47
47
|
return 'awesome!'
|
48
48
|
},
|
49
49
|
sending_params: function(params){
|
50
|
-
$('div#with_params').html(params('test'));
|
50
|
+
$('div#with_params').html(params('test') + params('other_test'));
|
51
51
|
}
|
52
52
|
});
|
53
53
|
|
@@ -117,7 +117,7 @@
|
|
117
117
|
asyncTest('withparams',function(){
|
118
118
|
$('a#with-params').trigger('click');
|
119
119
|
setTimeout(function(){
|
120
|
-
equals($('div#with_params').html(), '
|
120
|
+
equals($('div#with_params').html(), 'somethingelse', "should pass the params");
|
121
121
|
start();
|
122
122
|
},100)
|
123
123
|
})
|
@@ -168,7 +168,7 @@
|
|
168
168
|
<a id="index-link" data-ajax-history="true" href="/reviews/index">Hello!</a>
|
169
169
|
<a id="namespaced-index-link" data-ajax-history="true" href="/my/action">Hello!</a>
|
170
170
|
|
171
|
-
<a id="with-params" data-ajax-history="true" href="/reviews/something">Hello!</a>
|
171
|
+
<a id="with-params" data-ajax-history="true" href="/reviews/something?other_test=else">Hello!</a>
|
172
172
|
|
173
173
|
<div id="index">
|
174
174
|
</div>
|
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:
|
4
|
+
hash: 31
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 0.5.
|
9
|
+
- 10
|
10
|
+
version: 0.5.10
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Paul Campbell
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-09-
|
18
|
+
date: 2010-09-30 00:00:00 +01:00
|
19
19
|
default_executable: eyeballs
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|