turbo_reflex 0.0.20 → 0.0.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/turbo_reflex/runner.rb +14 -7
- data/lib/turbo_reflex/version.rb +1 -1
- data/package.json +1 -1
- data/tags +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a7328a5d0699434ae297cf74bd329fff233f070838fdf432cc97639346d10fc
|
4
|
+
data.tar.gz: 3d81fc83f65dce19ae4feebf8ddf2b70cb1e8f9cbea30fe326375b5eb231e7b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49cbf87cb1923f54495f888ceee1520ba889a02d85b84f85014ed2a74a1bbdd0039d975675e1d8f12a028cf4a4a5a526603e0645b081d957d435553736ade6b8
|
7
|
+
data.tar.gz: 39bdf7de08fb53445a261737dd4c87c142c727408c5ae29b80f257bb025087c31ff14ccdc3029d8e5ddbe76e22823ea9df0703acb6dc5375fc8b1e70da4bd2b0
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
</h1>
|
9
9
|
<p align="center">
|
10
10
|
<a href="http://blog.codinghorror.com/the-best-code-is-no-code-at-all/">
|
11
|
-
<img alt="Lines of Code" src="https://img.shields.io/badge/loc-
|
11
|
+
<img alt="Lines of Code" src="https://img.shields.io/badge/loc-1188-47d299.svg" />
|
12
12
|
</a>
|
13
13
|
<a href="https://codeclimate.com/github/hopsoft/turbo_reflex/maintainability">
|
14
14
|
<img src="https://api.codeclimate.com/v1/badges/fe1162a742fe83a4fdfd/maintainability" />
|
data/lib/turbo_reflex/runner.rb
CHANGED
@@ -213,9 +213,9 @@ class TurboReflex::Runner
|
|
213
213
|
|
214
214
|
def response_type
|
215
215
|
body = (response_body.try(:join) || response_body.to_s).strip
|
216
|
-
return :body if body.match?(/<\/\s*body
|
217
|
-
return :frame if body.match?(/<\/\s*turbo-frame
|
218
|
-
return :stream if body.match?(/<\/\s*turbo-stream
|
216
|
+
return :body if body.match?(/<\/\s*body/i)
|
217
|
+
return :frame if body.match?(/<\/\s*turbo-frame/i)
|
218
|
+
return :stream if body.match?(/<\/\s*turbo-stream/i)
|
219
219
|
:unknown
|
220
220
|
end
|
221
221
|
|
@@ -267,11 +267,18 @@ class TurboReflex::Runner
|
|
267
267
|
sanitized_content = content_sanitizer.sanitize(content).html_safe
|
268
268
|
return if sanitized_content.blank?
|
269
269
|
|
270
|
-
case response_type
|
271
|
-
when :body
|
272
|
-
|
273
|
-
|
270
|
+
html = case response_type
|
271
|
+
when :body
|
272
|
+
match = response.body.match(/<\/\s*body/i).to_s
|
273
|
+
response.body.sub match, [sanitized_content, match].join
|
274
|
+
when :frame
|
275
|
+
match = response.body.match(/<\/\s*turbo-frame/i).to_s
|
276
|
+
response.body.sub match, [sanitized_content, match].join
|
277
|
+
else
|
278
|
+
[response.body, sanitized_content].join
|
274
279
|
end
|
280
|
+
|
281
|
+
response.body = html
|
275
282
|
rescue => error
|
276
283
|
Rails.logger.error "TurboReflex::Runner failed to append to the response! #{error.message}"
|
277
284
|
end
|
data/lib/turbo_reflex/version.rb
CHANGED
data/package.json
CHANGED
data/tags
CHANGED
@@ -216620,7 +216620,7 @@ VDash node_modules/parse-srcset/tests/he.js /^ var decodeMap = {'Aacute':'\\xC1'
|
|
216620
216620
|
VDash node_modules/simple-html-tokenizer/dist/es6/index.js /^ Aacute: "Á", aacute: "á", Abreve: "Ă", abreve: "ă", ac: "∾", acd: "∿", acE: "∾̳",/;" p variable:namedCharRefs
|
216621
216621
|
VDash node_modules/simple-html-tokenizer/dist/simple-html-tokenizer.js /^ Aacute: "Á", aacute: "á", Abreve: "Ă", abreve: "ă", ac: "∾", acd: "∿", acE: "∾/;" p variable:anonymousFunction3825d8d70300.namedCharRefs
|
216622
216622
|
VDash node_modules/simple-html-tokenizer/dist/types/generated/html5-named-char-refs.d.ts /^ VDash: string;$/;" C
|
216623
|
-
VERSION lib/turbo_reflex/version.rb /^ VERSION = "0.0.
|
216623
|
+
VERSION lib/turbo_reflex/version.rb /^ VERSION = "0.0.22"$/;" C module:TurboReflex
|
216624
216624
|
VERSION node_modules/@angular/compiler/esm2015/src/output/source_map.js /^const VERSION = 3;$/;" C
|
216625
216625
|
VERSION node_modules/@angular/compiler/esm2015/src/version.js /^export const VERSION = new Version('8.2.14');$/;" C
|
216626
216626
|
VERSION node_modules/@angular/compiler/esm5/src/output/source_map.js /^var VERSION = 3;$/;" v
|
@@ -468457,7 +468457,7 @@ version node_modules/yaml/dist/index.js /^ version: '1.2'$/;" p variable:defaul
|
|
468457
468457
|
version node_modules/yaml/dist/test-events.js /^ version: '1.2'$/;" p variable:testEvents.anonymousObjecta2b129440205
|
468458
468458
|
version node_modules/yaml/package.json /^ "version": "1.8.3",$/;" s
|
468459
468459
|
version node_modules/yocto-queue/package.json /^ "version": "0.1.0",$/;" s
|
468460
|
-
version package.json /^ "version": "0.0.
|
468460
|
+
version package.json /^ "version": "0.0.21",$/;" s
|
468461
468461
|
versionIncluded node_modules/prettier-standard/src/vendor/node_modules/resolve/lib/core.js /^function versionIncluded(specifierValue) {$/;" f
|
468462
468462
|
versionIncluded node_modules/resolve/lib/core.js /^function versionIncluded(specifierValue) {$/;" f
|
468463
468463
|
versionInfo node_modules/graphql/version.d.ts /^export const versionInfo: {$/;" C
|