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 +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/real_data_tests/pg_dump_generator.rb +8 -2
- data/lib/real_data_tests/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8d2dd0beed227113467c6660eaa2101c603ef7c127ad3bd7fb19c835a641b1b
|
4
|
+
data.tar.gz: ac0e5fdb541110b7a523a6fa8a894d49d1c10ab9eeab86003f9ae13ebbf1968a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 :
|
142
|
-
|
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])
|
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.
|
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-
|
11
|
+
date: 2025-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|