effective_test_bot 1.1.28 → 1.1.29
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 720882b4c8bc15be729ff26a90638d345786b523862ae226b86c15f2de18e8a8
|
4
|
+
data.tar.gz: c495c1463653e9c3ab5c0ff6eefc1b935dff9ce1808bb8bb15855a3eae5beb11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f435286f63ddbe6990fa6bf09aef992b982df7542b7c2ea7cbfc60086fe8403d9b85003c22ebb0a3b77e6f856f991583895783f60c6a319dc1871debfb77eff3
|
7
|
+
data.tar.gz: 369ec84101fb1e56135d4b92939a6b296adbc9199bc7d1970ac7ceae7bd4f86cca4c068ff707df2a3c30c38bfe1b938d0d9e4553ccade05b536c22b3bd04e4d8
|
@@ -5,12 +5,14 @@ module EffectiveTestBotControllerHelper
|
|
5
5
|
def assign_test_bot_payload(payload = {})
|
6
6
|
payload.merge!({ response_code: response.code, assigns: test_bot_view_assigns, flash: flash.to_hash })
|
7
7
|
|
8
|
-
|
8
|
+
media_type = (response.respond_to?(:media_type) ? response.media_type : response.content_type).to_s
|
9
|
+
|
10
|
+
if media_type.start_with?('text/html') && response.body[BODY_TAG].present?
|
9
11
|
payload = view_context.content_tag(:script, build_payload_javascript(payload), id: 'test_bot_payload')
|
10
12
|
|
11
13
|
split = response.body.split(BODY_TAG)
|
12
14
|
response.body = "#{split.first}#{payload}#{BODY_TAG}#{split.last if split.size > 1}"
|
13
|
-
elsif
|
15
|
+
elsif media_type.start_with?('text/javascript') && response.body.present?
|
14
16
|
payload = build_payload_javascript(payload)
|
15
17
|
|
16
18
|
response.body = "#{response.body};#{payload}"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_test_bot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.29
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-11-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -191,7 +191,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
191
191
|
- !ruby/object:Gem::Version
|
192
192
|
version: '0'
|
193
193
|
requirements: []
|
194
|
-
rubygems_version: 3.1.
|
194
|
+
rubygems_version: 3.1.2
|
195
195
|
signing_key:
|
196
196
|
specification_version: 4
|
197
197
|
summary: A shared library of rails model & system tests that should pass in every
|