pinkman 0.9.3.7 → 0.9.4
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.js +2 -1
- data/app/assets/javascripts/pinkman_base/cable.coffee +1 -0
- data/app/assets/javascripts/pinkman_base/common.coffee +5 -2
- data/app/assets/javascripts/pinkman_base/controller.coffee +12 -0
- data/lib/pinkman/serializer/base.rb +5 -0
- data/lib/pinkman/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 51416ffae341b3d93834cc600d0d225ec819de18
|
|
4
|
+
data.tar.gz: f5fc0f065898c5f0a7490848871aba72275a545b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b7bb64b6305ea9d1f2879713216c6cd89220f4d861c62ce2ee9d116f21262289ccd87261d780e25b6a1ad3eb395726024781ce5658b106f1dc97ae070eeddf9b
|
|
7
|
+
data.tar.gz: 12ab107a03bd43f1f97b17108452b7cd740880b5862a72019f6f1ca9173442a98aff944a23223241fa11bc090e633333181e915c7c8f86b3a24a75148ebdee5f
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Pinkman.cable = ActionCable.createConsumer() if ActionCable?
|
|
@@ -93,6 +93,10 @@ class window.PinkmanCommon
|
|
|
93
93
|
$('#'+target).append(content)
|
|
94
94
|
options.callback(object,content) if options.callback? and typeof options.callback == 'function'
|
|
95
95
|
Pinkman.render(newOptions)
|
|
96
|
+
else if options? and Pinkman.isString(options)
|
|
97
|
+
@append
|
|
98
|
+
template: options + '-template'
|
|
99
|
+
target: options
|
|
96
100
|
|
|
97
101
|
watch: () ->
|
|
98
102
|
@_watching = yes
|
|
@@ -120,6 +124,5 @@ class window.PinkmanCommon
|
|
|
120
124
|
anyErrorsOn: (args...) ->
|
|
121
125
|
@hasErrorOn(args...)
|
|
122
126
|
|
|
123
|
-
|
|
124
127
|
_data: ->
|
|
125
|
-
{ pink_obj: @json(), scope: Pinkman.scope(this) }
|
|
128
|
+
{ pink_obj: @json(), scope: Pinkman.scope(this) }
|
|
@@ -73,6 +73,18 @@ class window.PinkmanController extends window.PinkmanObject
|
|
|
73
73
|
endBottom: () ->
|
|
74
74
|
Pinkman._bottomTriggered = false
|
|
75
75
|
|
|
76
|
+
|
|
77
|
+
subscribe: (channel,opt) ->
|
|
78
|
+
throw 'ActionCable not found.' unless Pinkman.cable?
|
|
79
|
+
throw 'Channel not specificied.' unless channel? and channel != ''
|
|
80
|
+
try
|
|
81
|
+
callback = if typeof opt == 'function' then opt else opt['callback']
|
|
82
|
+
catch
|
|
83
|
+
throw 'Callback not found.'
|
|
84
|
+
params = if (typeof opt == 'object' and opt['params']?) then opts['params'] else new Object
|
|
85
|
+
params.channel = channel
|
|
86
|
+
Pinkman.cable.subscriptions.create params, received: callback
|
|
87
|
+
|
|
76
88
|
scrolling: (callback) ->
|
|
77
89
|
if $("##{@id}").length
|
|
78
90
|
$(window).scroll ->
|
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: 0.9.
|
|
4
|
+
version: 0.9.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Agilso Oliveira
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-
|
|
11
|
+
date: 2017-08-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -182,6 +182,7 @@ files:
|
|
|
182
182
|
- app/assets/javascripts/pinkman/engines/handlebars.js
|
|
183
183
|
- app/assets/javascripts/pinkman/engines/hogan.js
|
|
184
184
|
- app/assets/javascripts/pinkman/engines/markup.js
|
|
185
|
+
- app/assets/javascripts/pinkman_base/cable.coffee
|
|
185
186
|
- app/assets/javascripts/pinkman_base/collection.coffee
|
|
186
187
|
- app/assets/javascripts/pinkman_base/common.coffee
|
|
187
188
|
- app/assets/javascripts/pinkman_base/controller.coffee
|