joosy 1.2.0.alpha.12 → 1.2.0.alpha.13
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.
- checksums.yaml +4 -4
- data/bower.json +1 -1
- data/lib/joosy.js +1 -1
- data/package.json +1 -1
- data/spec/joosy/core/router_spec.coffee +3 -0
- data/src/joosy/core/router.coffee +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86784de6b810fdda417c04e5f2a32be2f50cdf20
|
4
|
+
data.tar.gz: 807001da677b51db11ad5cf032ee1be57b70bc13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca1a9f7eb9081e2cf6cac92401a4dc5daf15fa29cec19091441b85b774302b86f97104801fc252cf11bcfcafd464b0b3ce2db26b12d219d530c9cd184ee24008
|
7
|
+
data.tar.gz: 4dfd4f85e19997aa299ea7eadc2b59980d9cc93728b718deaccc00e1c8da62adca862ee0fef36ba485d4657c23aa003c4ae98f9092fd298de3708e4275e19c7d
|
data/bower.json
CHANGED
data/lib/joosy.js
CHANGED
@@ -3409,7 +3409,7 @@ Joosy.Router = {
|
|
3409
3409
|
__respondRoute: function(hash) {
|
3410
3410
|
var found, fullPath, params, path, queryArray, regex, route, urlParams, vals, _ref;
|
3411
3411
|
Joosy.Modules.Log.debug("Router> Answering '" + hash + "'");
|
3412
|
-
fullPath = hash.replace(RegExp("
|
3412
|
+
fullPath = hash.replace(RegExp("^\\#(" + this.prefix + ")?"), '');
|
3413
3413
|
if (this.restrictPattern && fullPath.match(this.restrictPattern) === null) {
|
3414
3414
|
this.trigger('restricted', fullPath);
|
3415
3415
|
return;
|
data/package.json
CHANGED
@@ -98,6 +98,9 @@ describe "Joosy.Router", ->
|
|
98
98
|
Joosy.Router.__respondRoute '/'
|
99
99
|
expect(spies.root.callCount).toEqual 1
|
100
100
|
|
101
|
+
Joosy.Router.__respondRoute '#/'
|
102
|
+
expect(spies.root.callCount).toEqual 2
|
103
|
+
|
101
104
|
Joosy.Router.__respondRoute '/page'
|
102
105
|
expect(Joosy.Application.setCurrentPage.callCount).toEqual 1
|
103
106
|
expect(Joosy.Application.setCurrentPage.args.last()).toEqual [TestPage, Object.extended()]
|
@@ -221,7 +221,7 @@ Joosy.Router =
|
|
221
221
|
#
|
222
222
|
__respondRoute: (hash) ->
|
223
223
|
Joosy.Modules.Log.debug "Router> Answering '#{hash}'"
|
224
|
-
fullPath = hash.replace
|
224
|
+
fullPath = hash.replace ///^\#(#{@prefix})?///, ''
|
225
225
|
|
226
226
|
if (@restrictPattern && fullPath.match(@restrictPattern) == null)
|
227
227
|
@trigger 'restricted', fullPath
|