bemi-rails 0.2.0 → 0.2.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: fa3333de9e0a741dd9ea055875b359e3cc5762e0cb8cda2ca7993fb013e761ad
4
- data.tar.gz: 24080ca04dee07312adb7e41bf08286aae441ec404fc8bc1d06ed64693041c27
3
+ metadata.gz: f19aaf859eda061205bee3a1a49aa3985982a80ebb90b94fb44160431753f058
4
+ data.tar.gz: 947da8058a12c7171e312dc8a2069e6b303b16af670247c287830336def82dad
5
5
  SHA512:
6
- metadata.gz: d927d26dc83bdc1d1d0f44353506729c885b2de498f077fda655556f76ca14fb6dde5fb01f0c72e9f4a372e7970510bc9f16b4f60066539e0fe2bc3325259c77
7
- data.tar.gz: ba9d3e21f4d365e4dc419a6444fe3fddfe8bd98e753eb08f24064be20d3883e864d514ab2cc89b050657410a835c4fdfebed82ac0cdaa44f7f154d3081eb7d35
6
+ metadata.gz: fe752060e2291a4e39cf126a5984a4453db821055e49a80d81e4efd4dfc0d96717d4a6ebdf18cc3800869409438e81bac1b291292497c0c8412d4eb5df9417a6
7
+ data.tar.gz: 238dfc3d2ed1ce9a0aa6fbdcbf0697009dcd1a29b6858aa01b7518751d3ac0da36e84637b6945c22ca63e6eaf0971aaa1e52981dbb8b8a479d0bf6b8b0800cd4
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ #### [v0.2.1](https://github.com/BemiHQ/bemi-rails/compare/v0.2.0...v0.2.1) - 2024-04-16
2
+
3
+ - Validate context type to make sure it's a hash or hash-like object
4
+
1
5
  #### [v0.2.0](https://github.com/BemiHQ/bemi-rails/compare/v0.1.0...v0.2.0) - 2024-04-16
2
6
 
3
7
  - Fix compatibility with ActiveRecord versions prior to 7.1
data/lib/bemi/context.rb CHANGED
@@ -37,6 +37,9 @@ class Bemi
37
37
  end
38
38
 
39
39
  def serialized_context
40
+ return if context.nil?
41
+ return if !context.is_a?(Hash) && !context.respond_to?(:has_key?)
42
+
40
43
  result = context.to_json
41
44
  result if result.size <= MAX_CONTEXT_SIZE
42
45
  end
data/lib/bemi/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Bemi
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bemi-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - exAspArk