pinkman 1.1.2 → 1.2.0
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/app/assets/javascripts/pinkman_base/router.coffee +11 -9
- data/lib/pinkman/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f86938283023ea352bf26a15f24d6fab77bfec2a92cec7ad839ec338b3eb4e4e
|
4
|
+
data.tar.gz: 66bdc74ad7b9e3e15f02549bcd63ef280c73d884017a47d06e44d0c6bdd3a77d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ce750515695c361e2c306a1466e2105e21f9f26de207f83a93b03fa405ab9a90fef47d4aed2b7de8bb1054838626738091da7e86c555888cc873a4953110595
|
7
|
+
data.tar.gz: 1a00bb98b28bc45eb77eee2dded5af6308e9afc65f1558af9d81ff44f035072af09eb18574df9ae11023fa068f59731e1ad6ac3b8793d3d654dc2443f6f06442
|
@@ -100,7 +100,7 @@ class window.PinkmanRouteMatcher extends Pinkman.object
|
|
100
100
|
@controllers.each (c) =>
|
101
101
|
# console.log 'dentro dos controllers desse router'
|
102
102
|
c.setParams(@params())
|
103
|
-
c.build(yes,this)
|
103
|
+
c.build(yes, this)
|
104
104
|
, =>
|
105
105
|
callback(this.route, this.url) if typeof callback == 'function'
|
106
106
|
else
|
@@ -131,13 +131,13 @@ class window.PinkmanRouteMatcher extends Pinkman.object
|
|
131
131
|
.sortBy('staticDepth','desc').first()
|
132
132
|
return(PinkmanCache.cache("p-router-#{url}", r))
|
133
133
|
|
134
|
-
setup: (route,url) ->
|
134
|
+
setup: (route, url) ->
|
135
135
|
if route? and url?
|
136
136
|
# console.log "PinkmanRouterMatcher#setup - url arg: #{url}"
|
137
137
|
urlPath = new PinkmanPath(url)
|
138
138
|
route.path.matchParams(urlPath)
|
139
|
-
@set('url',url)
|
140
|
-
@set('path',urlPath)
|
139
|
+
@set('url', url)
|
140
|
+
@set('path', urlPath)
|
141
141
|
@set 'route', route
|
142
142
|
@set 'controller', @route.controller
|
143
143
|
@set('controllers', Pinkman.controllers.select(id: @controller))
|
@@ -257,7 +257,7 @@ class window.PinkmanRouter
|
|
257
257
|
r.initialize (args...) =>
|
258
258
|
@analytics.send(args...) if @_config.analytics?
|
259
259
|
callback() if typeof callback == 'function'
|
260
|
-
@_config.
|
260
|
+
@_config.after(@currentMatcher, @previousMatcher) if typeof @_config.after == 'function'
|
261
261
|
Pinkman.routes.set('current',r.route)
|
262
262
|
unless Pinkman.router._config.freeze or (r.options? and r.options.freeze)
|
263
263
|
# console.log 'topo'
|
@@ -268,17 +268,19 @@ class window.PinkmanRouter
|
|
268
268
|
true
|
269
269
|
|
270
270
|
# Search path throughout routes. On match, activate respective controllers: clears template and execute main(s) function(s)
|
271
|
-
@activate: (path,callback,options) ->
|
271
|
+
@activate: (path, callback, options) ->
|
272
272
|
r = Pinkman.routes.match(path)
|
273
273
|
if r? and r
|
274
|
+
@previousMatcher = @currentMatcher if @currentMatcher?
|
275
|
+
@currentMatcher = r
|
274
276
|
# console.log r
|
275
277
|
r.options = options
|
276
|
-
@_config.
|
278
|
+
@_config.before(@currentMatcher, @previousMatcher) if $p.isFunction(@_config.before)
|
277
279
|
if @_config.transition? and typeof @_config.transition == 'function'
|
278
280
|
@_config.transition =>
|
279
|
-
@render(r,callback)
|
281
|
+
@render(r, callback)
|
280
282
|
else
|
281
|
-
@render(r,callback)
|
283
|
+
@render(r, callback)
|
282
284
|
else
|
283
285
|
# console.log 'route not found'
|
284
286
|
false
|
data/lib/pinkman/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pinkman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Agilso Oliveira
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03-
|
11
|
+
date: 2019-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|