cable_ready 2.0.3 → 2.0.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/Gemfile.lock +2 -4
- data/lib/cable_ready/channel.rb +0 -31
- data/lib/cable_ready/version.rb +1 -1
- data/vendor/assets/javascripts/cable_ready.js +2 -1
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 779e11b0325199c47491d12d6ab7b36b1dd55c2e
|
4
|
+
data.tar.gz: 61bf1fc1058234fd202c9c07f9114508a67d3a36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d54794aa9e80edfb308ac0974a7f735587faef19a45ed4f933754a55d40b2de01bf7911c2da0c074264742708799a5655b220685220e1169b01605a266ae7557
|
7
|
+
data.tar.gz: c9b9d60e86b820579c4726ee9d4393e308d0f8c3a029d374295ced2d94dca8febe5a3cdfc723291a56d9388ee712364535180e773b70dabab910b1e1e769aaba
|
data/Gemfile.lock
CHANGED
@@ -1,9 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
cable_ready (2.0.
|
4
|
+
cable_ready (2.0.4)
|
5
5
|
activesupport (>= 5.0.0)
|
6
|
-
htmlcompressor (~> 0.3.1)
|
7
6
|
|
8
7
|
GEM
|
9
8
|
remote: https://rubygems.org/
|
@@ -26,7 +25,6 @@ GEM
|
|
26
25
|
tins (~> 1.6)
|
27
26
|
debug_inspector (0.0.3)
|
28
27
|
docile (1.1.5)
|
29
|
-
htmlcompressor (0.3.1)
|
30
28
|
i18n (0.9.1)
|
31
29
|
concurrent-ruby (~> 1.0)
|
32
30
|
interception (0.5)
|
@@ -89,4 +87,4 @@ DEPENDENCIES
|
|
89
87
|
sinatra
|
90
88
|
|
91
89
|
BUNDLED WITH
|
92
|
-
1.
|
90
|
+
1.16.0
|
data/lib/cable_ready/channel.rb
CHANGED
@@ -1,9 +1,6 @@
|
|
1
|
-
require "htmlcompressor"
|
2
|
-
|
3
1
|
module CableReady
|
4
2
|
class Channel
|
5
3
|
attr_reader :name, :operations
|
6
|
-
attr_accessor :compress_html
|
7
4
|
|
8
5
|
# Example Operations Payload:
|
9
6
|
#
|
@@ -100,7 +97,6 @@ module CableReady
|
|
100
97
|
def initialize(name)
|
101
98
|
@name = name
|
102
99
|
@operations = stub
|
103
|
-
@compress_html = true
|
104
100
|
end
|
105
101
|
|
106
102
|
def clear
|
@@ -119,12 +115,10 @@ module CableReady
|
|
119
115
|
end
|
120
116
|
|
121
117
|
def morph(options={})
|
122
|
-
options[:html] = html_compressor.compress(options[:html].to_s) if compress_html
|
123
118
|
operations[:morph] << options
|
124
119
|
end
|
125
120
|
|
126
121
|
def inner_html(options={})
|
127
|
-
options[:html] = html_compressor.compress(options[:html].to_s) if compress_html
|
128
122
|
operations[:inner_html] << options
|
129
123
|
end
|
130
124
|
|
@@ -133,7 +127,6 @@ module CableReady
|
|
133
127
|
end
|
134
128
|
|
135
129
|
def insert_adjacent_html(options={})
|
136
|
-
options[:html] = html_compressor.compress(options[:html].to_s) if compress_html
|
137
130
|
operations[:insert_adjacent_html] << options
|
138
131
|
end
|
139
132
|
|
@@ -146,7 +139,6 @@ module CableReady
|
|
146
139
|
end
|
147
140
|
|
148
141
|
def replace(options={})
|
149
|
-
options[:html] = html_compressor.compress(options[:html].to_s) if compress_html
|
150
142
|
operations[:replace] << options
|
151
143
|
end
|
152
144
|
|
@@ -194,28 +186,5 @@ module CableReady
|
|
194
186
|
set_dataset_property: []
|
195
187
|
}
|
196
188
|
end
|
197
|
-
|
198
|
-
def html_compressor
|
199
|
-
@html_compressor ||= HtmlCompressor::Compressor.new(
|
200
|
-
enabled: true,
|
201
|
-
remove_multi_spaces: true,
|
202
|
-
remove_comments: true,
|
203
|
-
remove_intertag_spaces: false,
|
204
|
-
remove_quotes: true,
|
205
|
-
compress_css: false,
|
206
|
-
compress_javascript: false,
|
207
|
-
simple_doctype: false,
|
208
|
-
remove_script_attributes: true,
|
209
|
-
remove_style_attributes: true,
|
210
|
-
remove_link_attributes: true,
|
211
|
-
remove_form_attributes: false,
|
212
|
-
remove_input_attributes: true,
|
213
|
-
remove_javascript_protocol: true,
|
214
|
-
remove_http_protocol: false,
|
215
|
-
remove_https_protocol: false,
|
216
|
-
preserve_line_breaks: false,
|
217
|
-
simple_boolean_attributes: true
|
218
|
-
)
|
219
|
-
end
|
220
189
|
end
|
221
190
|
end
|
data/lib/cable_ready/version.rb
CHANGED
@@ -176,7 +176,8 @@ var perform = exports.perform = function perform(operations) {
|
|
176
176
|
var entries = operations[name];
|
177
177
|
for (var i = 0; i < entries.length; i++) {
|
178
178
|
try {
|
179
|
-
|
179
|
+
var config = entries[i];
|
180
|
+
DOMOperations[name](config);
|
180
181
|
} catch (e) {
|
181
182
|
console.log("CableReady detected an error in " + name + "! " + e.message);
|
182
183
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cable_ready
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Hopkins
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -24,20 +24,6 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 5.0.0
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: htmlcompressor
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 0.3.1
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: 0.3.1
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: rake
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|