File tree Expand file tree Collapse file tree 5 files changed +41
-23
lines changed
Expand file tree Collapse file tree 5 files changed +41
-23
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## [ 1.2.3] ( https://github.com/contentstack/contentstack-utils-ruby/tree/v1.2.3 ) (2026-03-30)
4+ - Fixed GQL JSON test helper parsing for hash-based fixtures by serializing Ruby hashes to JSON.
5+ - Normalized non-doc fragment list fixtures into doc-root shape to keep nested list fragment specs stable.
6+
37## [ 1.2.2] ( https://github.com/contentstack/contentstack-utils-ruby/tree/v1.2.2 ) (2026-01-05)
48 - Fixed snyk security issues
59## [ 1.2.1] ( https://github.com/contentstack/contentstack-utils-ruby/tree/v1.2.1 ) (2024-02-27)
Original file line number Diff line number Diff line change 11PATH
22 remote: .
33 specs:
4- contentstack_utils (1.2.2 )
5- activesupport (>= 7 .0 )
6- nokogiri (>= 1.11 )
4+ contentstack_utils (1.2.3 )
5+ activesupport (>= 8 .0 )
6+ nokogiri (>= 1.19 )
77
88GEM
99 remote: https://rubygems.org/
1010 specs:
11- activesupport (7.2 .3 )
11+ activesupport (8.1 .3 )
1212 base64
13- benchmark (>= 0.3 )
1413 bigdecimal
1514 concurrent-ruby (~> 1.0 , >= 1.3.1 )
1615 connection_pool (>= 2.2.5 )
1716 drb
1817 i18n (>= 1.6 , < 2 )
18+ json
1919 logger (>= 1.4.2 )
2020 minitest (>= 5.1 )
2121 securerandom (>= 0.3 )
2222 tzinfo (~> 2.0 , >= 2.0.5 )
23- addressable (2.8.8 )
23+ uri (>= 0.13.1 )
24+ addressable (2.8.9 )
2425 public_suffix (>= 2.0.2 , < 8.0 )
2526 base64 (0.3.0 )
26- benchmark (0.5.0 )
2727 bigdecimal (4.0.1 )
2828 concurrent-ruby (1.3.6 )
29- connection_pool (2.5.5 )
29+ connection_pool (3.0.2 )
3030 crack (1.0.1 )
3131 bigdecimal
3232 rexml
3636 hashdiff (1.2.1 )
3737 i18n (1.14.8 )
3838 concurrent-ruby (~> 1.0 )
39+ json (2.19.3 )
3940 logger (1.7.0 )
40- minitest (5.27.0 )
41- nokogiri (1.18.10-arm64-darwin )
41+ minitest (6.0.2 )
42+ drb (~> 2.0 )
43+ prism (~> 1.5 )
44+ nokogiri (1.19.2-arm64-darwin )
4245 racc (~> 1.4 )
43- public_suffix (6.0.2 )
46+ prism (1.9.0 )
47+ public_suffix (7.0.5 )
4448 racc (1.8.1 )
4549 rake (13.3.1 )
4650 rexml (3.4.4 )
5357 rspec-expectations (3.13.5 )
5458 diff-lcs (>= 1.2.0 , < 2.0 )
5559 rspec-support (~> 3.13.0 )
56- rspec-mocks (3.13.7 )
60+ rspec-mocks (3.13.8 )
5761 diff-lcs (>= 1.2.0 , < 2.0 )
5862 rspec-support (~> 3.13.0 )
59- rspec-support (3.13.6 )
63+ rspec-support (3.13.7 )
6064 securerandom (0.4.1 )
6165 simplecov (0.22.0 )
6266 docile (~> 1.1 )
6670 simplecov_json_formatter (0.1.4 )
6771 tzinfo (2.0.6 )
6872 concurrent-ruby (~> 1.0 )
69- webmock (3.26.1 )
73+ uri (1.1.1 )
74+ webmock (3.26.2 )
7075 addressable (>= 2.8.0 )
7176 crack (>= 0.3.2 )
7277 hashdiff (>= 0.4.0 , < 2.0.0 )
7378 yard (0.9.38 )
7479
7580PLATFORMS
7681 arm64-darwin-22
82+ arm64-darwin-25
7783
7884DEPENDENCIES
7985 contentstack_utils !
8086 rake (~> 13.0 )
8187 rspec (~> 3.13 )
8288 simplecov (~> 0.22 )
8389 webmock (~> 3.23 )
84- yard (~> 0.9.36 )
90+ yard (~> 0.9.38 )
8591
8692BUNDLED WITH
8793 2.3.26
Original file line number Diff line number Diff line change @@ -21,12 +21,12 @@ Gem::Specification.new do |s|
2121 s . test_files = s . files . grep ( %r{^spec/} )
2222 s . require_paths = [ "lib" ]
2323
24- s . add_dependency 'activesupport' , '>= 7 .0'
25- s . add_dependency 'nokogiri' , '>= 1.11 '
24+ s . add_dependency 'activesupport' , '>= 8 .0'
25+ s . add_dependency 'nokogiri' , '>= 1.19 '
2626
2727 s . add_development_dependency 'rake' , '~> 13.0'
2828 s . add_development_dependency 'rspec' , '~> 3.13'
2929 s . add_development_dependency 'webmock' , '~> 3.23'
3030 s . add_development_dependency 'simplecov' , '~> 0.22'
31- s . add_development_dependency 'yard' , '~> 0.9.36 '
31+ s . add_development_dependency 'yard' , '~> 0.9.38 '
3232end
Original file line number Diff line number Diff line change 11module ContentstackUtils
2- VERSION = "1.2.2 "
2+ VERSION = "1.2.3 "
33end
Original file line number Diff line number Diff line change @@ -17,14 +17,22 @@ def getJson(text)
1717end
1818
1919def getGQLJSONRTE ( node , item = '""' )
20+ normalized_node = node
21+ if node . is_a? ( Hash ) && node [ "type" ] != "doc" && node [ :type ] != "doc"
22+ normalized_node = { "type" => "doc" , "children" => [ node ] }
23+ end
24+
25+ node_payload = normalized_node . is_a? ( String ) ? normalized_node : JSON . generate ( normalized_node )
26+ item_payload = item . is_a? ( String ) ? item : JSON . generate ( item )
27+
2028 entry = "{
2129 \" single_rte\" : {
22- \" json\" : #{ node } ,
23- \" embedded_itemsConnection\" : #{ item }
30+ \" json\" : #{ node_payload } ,
31+ \" embedded_itemsConnection\" : #{ item_payload }
2432 },
2533 \" multiple_rte\" : {
26- \" json\" : [#{ node } ],
27- \" embedded_itemsConnection\" : #{ item }
34+ \" json\" : [#{ node_payload } ],
35+ \" embedded_itemsConnection\" : #{ item_payload }
2836 }
2937 }"
3038 getJson ( entry )
You can’t perform that action at this time.
0 commit comments