real_data_tests 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: 4834f12223bd9db7628aac93a05735a50cb61921313e2bf3b7d496e538dee461
4
- data.tar.gz: a8f6de663a143bc42469f953cc64eb49e2f9bc328f70990e885f87be2cac0305
3
+ metadata.gz: a8d2dd0beed227113467c6660eaa2101c603ef7c127ad3bd7fb19c835a641b1b
4
+ data.tar.gz: ac0e5fdb541110b7a523a6fa8a894d49d1c10ab9eeab86003f9ae13ebbf1968a
5
5
  SHA512:
6
- metadata.gz: f00434ab2a006d6a4d0c92263ab160f1cfaf7fd38a110f36bd91280bf00d317708a136cbd2f54d2cc87151a3d9dba3130f4c58c21bb77bcedcc2135690a96179
7
- data.tar.gz: 645da39c079e2d1c7953f6588127b3144e98738dbaef82f720b11ea34dbd8dd9a582e0f6d70a0105df3a883a7e78ff2613d61d6c1cc24648e3849a9830b35ae3
6
+ metadata.gz: e048bb72149153484dc179e7628ea3fc41e083906e7cbbd8c1a970b147aa1a232c5d32a6d26553de22c8c3b21a281913515bf1c51b43700c80ba0ac3dc35ffe6
7
+ data.tar.gz: 3859be802e7aea039691af38cc309bb56c81832bb5740d510e9f6438d10873a66d1efa8aae167a8cdc2a7e3f24b8b4c26f92d2481303d948797bbbd6a5d08d4d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.2.1] - 2025-01-13
4
+ ### Fixed
5
+ - Fixed JSONB field handling to output '{}' instead of empty string for blank values
6
+ - Added test coverage for JSONB field handling in PgDumpGenerator
7
+
3
8
  ## [0.2.0] - 2025-01-13
4
9
  ### Added
5
10
  - New preset system for managing different test data configurations
@@ -138,8 +138,14 @@ module RealDataTests
138
138
  value.to_s
139
139
  when :boolean
140
140
  value.to_s
141
- when :array, :json, :jsonb
142
- parse_and_format_special_type(value, column_info)
141
+ when :jsonb, :json
142
+ if value.blank?
143
+ "'{}'" # Return empty JSON object for blank JSONB/JSON fields
144
+ else
145
+ sanitize_string(value.is_a?(String) ? value : value.to_json)
146
+ end
147
+ when :array
148
+ parse_and_format_array(value, column_info[:sql_type])
143
149
  else
144
150
  if column_info[:array]
145
151
  parse_and_format_array(value, column_info[:sql_type])
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RealDataTests
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: real_data_tests
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
  - Kevin Dias
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-01-12 00:00:00.000000000 Z
11
+ date: 2025-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails