rbexy 1.0.0 → 1.0.1

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: 20306c3d1c288a652a8a9d4d455c9378a22165ef7c07240e234159794cd02d18
4
- data.tar.gz: 4c8e6b19cd8f47744aba8e2850fbc73425678252628a7c6c46e31abf66937e97
3
+ metadata.gz: 203d3f0d86ddbf38e11477ca082fec2bd1e4bc1e2843b4a74e08ea593f35a276
4
+ data.tar.gz: b41f015a023954be101bc01339eeee51f13893fc39918906a4e9d62b4bbfca6c
5
5
  SHA512:
6
- metadata.gz: 70920c8f7a9da04edccbe8de30b6b12ad10e9bfe3d6a4657d412e74cad1f23c705c3bd213c81d15859b18457917f4dd5672030fd4d0072dd06bbf894c2d8eb15
7
- data.tar.gz: 0aa89cce16b4011a91b2ffeb89472ec687b40bcd9f97f061dd85e7f01507fe034e4b3388fb14da066921c98846187f3c77b154b3d1d03b145716a7e50e9a4657
6
+ metadata.gz: d038e97f116998e004329938a371d510c7c96d034ab16a1bab0755971397d9020eb7c0459e2bf4f5e95acf9d9a6008b0d9cab208a36f9cab6d2fb7db8e953652
7
+ data.tar.gz: 503b6f70c7e2c7cfaa76e5dc77382cba4c6ecead1b7837d1870a025a71cf638a09bb1f96a5c74a7b8ac8aa7ef9cbcc030d1d109214fb8406d65eb46211c6fb3b
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rbexy (1.0.0)
4
+ rbexy (1.0.1)
5
5
  actionview (>= 5.0, < 7.0)
6
6
  activesupport (>= 5.0, < 7.0)
7
7
  railties (>= 5.0, < 7.0)
@@ -1,3 +1,3 @@
1
1
  module Rbexy
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
@@ -8,12 +8,16 @@ module Rbexy
8
8
  @rbexy_context ||= [{}]
9
9
  end
10
10
 
11
- def rbexy_prep_output(*content)
12
- return if content.length == 0
13
- content = content.first
11
+ def rbexy_prep_output(*value)
12
+ return if value.length == 0
13
+ value = value.first
14
14
 
15
- value = content.is_a?(Array) ? content.join.html_safe : content
15
+ value = rbexy_is_html_safe_array?(value) ? value.join.html_safe : value
16
16
  [nil, false].include?(value) ? "" : value.to_s
17
17
  end
18
+
19
+ def rbexy_is_html_safe_array?(value)
20
+ value.is_a?(Array) && value.all? { |v| v.respond_to?(:html_safe?) && v.html_safe? }
21
+ end
18
22
  end
19
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbexy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Giancola