contentstack_utils 1.2.0 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/check-branch.yml +2 -2
- data/.github/workflows/issues-jira.yml +31 -0
- data/.github/workflows/policy-scan.yml +46 -0
- data/.github/workflows/release-gem.yml +4 -8
- data/.github/workflows/sca-scan.yml +1 -1
- data/.talismanrc +5 -0
- data/CHANGELOG.md +4 -0
- data/CODEOWNERS +11 -1
- data/Gemfile.lock +58 -46
- data/LICENSE +1 -1
- data/contentstack_utils.gemspec +9 -9
- data/lib/contentstack_utils/model/options.rb +2 -0
- data/lib/contentstack_utils/version.rb +2 -2
- data/spec/lib/utils_spec.rb +20 -0
- data/spec/mock/json_to_html_mock.rb +99 -1
- metadata +20 -20
- data/.github/workflows/jira.yml +0 -28
- data/.github/workflows/sast-scan.yml +0 -11
- data/.github/workflows/secrets-scan.yml +0 -11
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 26efd48cc6402749d20a2d68650a14fdb9ebaec45805af1eab883f6147276806
|
|
4
|
+
data.tar.gz: 69a031322142a21ff93243451ca14ae9474f79d7c8c354a9704d86f0370f2da7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ef64aeb62b58e4ae6aef98c0a1448ca4e98196cb6fb0cf634416ebbf84969f8b86735dc4bf552ad660d69fcabd5de15f1ae34bbc7d6ff7245ab647ebfac74413
|
|
7
|
+
data.tar.gz: ca0c3505a7ee5949375df10e1912418270668728fabdb81df02ef8248e70488ddde0633be46734b99d4902260ca13aade805ad2c7fa0b9952e58cf7917455782
|
|
@@ -8,13 +8,13 @@ jobs:
|
|
|
8
8
|
runs-on: ubuntu-latest
|
|
9
9
|
steps:
|
|
10
10
|
- name: Comment PR
|
|
11
|
-
if: github.base_ref == 'master' && github.head_ref != '
|
|
11
|
+
if: github.base_ref == 'master' && github.head_ref != 'staging'
|
|
12
12
|
uses: thollander/actions-comment-pull-request@v2
|
|
13
13
|
with:
|
|
14
14
|
message: |
|
|
15
15
|
We regret to inform you that you are currently not able to merge your changes into the master branch due to restrictions applied by our SRE team. To proceed with merging your changes, we kindly request that you create a pull request from the next branch. Our team will then review the changes and work with you to ensure a successful merge into the master branch.
|
|
16
16
|
- name: Check branch
|
|
17
|
-
if: github.base_ref == 'master' && github.head_ref != '
|
|
17
|
+
if: github.base_ref == 'master' && github.head_ref != 'staging'
|
|
18
18
|
run: |
|
|
19
19
|
echo "ERROR: We regret to inform you that you are currently not able to merge your changes into the master branch due to restrictions applied by our SRE team. To proceed with merging your changes, we kindly request that you create a pull request from the next branch. Our team will then review the changes and work with you to ensure a successful merge into the master branch."
|
|
20
20
|
exit 1
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: Create Jira Ticket for Github Issue
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
issues:
|
|
5
|
+
types: [opened]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
issue-jira:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
|
|
12
|
+
- name: Login to Jira
|
|
13
|
+
uses: atlassian/gajira-login@master
|
|
14
|
+
env:
|
|
15
|
+
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
|
|
16
|
+
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
|
|
17
|
+
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
|
|
18
|
+
|
|
19
|
+
- name: Create Jira Issue
|
|
20
|
+
id: create_jira
|
|
21
|
+
uses: atlassian/gajira-create@master
|
|
22
|
+
with:
|
|
23
|
+
project: ${{ secrets.JIRA_PROJECT }}
|
|
24
|
+
issuetype: ${{ secrets.JIRA_ISSUE_TYPE }}
|
|
25
|
+
summary: Github | Issue | ${{ github.event.repository.name }} | ${{ github.event.issue.title }}
|
|
26
|
+
description: |
|
|
27
|
+
*GitHub Issue:* ${{ github.event.issue.html_url }}
|
|
28
|
+
|
|
29
|
+
*Description:*
|
|
30
|
+
${{ github.event.issue.body }}
|
|
31
|
+
fields: "${{ secrets.ISSUES_JIRA_FIELDS }}"
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
name: Checks the security policy and configurations
|
|
2
|
+
on:
|
|
3
|
+
pull_request:
|
|
4
|
+
types: [opened, synchronize, reopened]
|
|
5
|
+
jobs:
|
|
6
|
+
security-policy:
|
|
7
|
+
if: github.event.repository.visibility == 'public'
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
defaults:
|
|
10
|
+
run:
|
|
11
|
+
shell: bash
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@master
|
|
14
|
+
- name: Checks for SECURITY.md policy file
|
|
15
|
+
run: |
|
|
16
|
+
if ! [[ -f "SECURITY.md" || -f ".github/SECURITY.md" ]]; then exit 1; fi
|
|
17
|
+
security-license:
|
|
18
|
+
if: github.event.repository.visibility == 'public'
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
defaults:
|
|
21
|
+
run:
|
|
22
|
+
shell: bash
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@master
|
|
25
|
+
- name: Checks for License file
|
|
26
|
+
run: |
|
|
27
|
+
expected_license_files=("LICENSE" "LICENSE.txt" "LICENSE.md" "License.txt")
|
|
28
|
+
license_file_found=false
|
|
29
|
+
current_year=$(date +"%Y")
|
|
30
|
+
|
|
31
|
+
for license_file in "${expected_license_files[@]}"; do
|
|
32
|
+
if [ -f "$license_file" ]; then
|
|
33
|
+
license_file_found=true
|
|
34
|
+
# check the license file for the current year, if not exists, exit with error
|
|
35
|
+
if ! grep -q "$current_year" "$license_file"; then
|
|
36
|
+
echo "License file $license_file does not contain the current year."
|
|
37
|
+
exit 2
|
|
38
|
+
fi
|
|
39
|
+
break
|
|
40
|
+
fi
|
|
41
|
+
done
|
|
42
|
+
|
|
43
|
+
if [ "$license_file_found" = false ]; then
|
|
44
|
+
echo "No license file found. Please add a license file to the repository."
|
|
45
|
+
exit 1
|
|
46
|
+
fi
|
|
@@ -14,18 +14,14 @@ jobs:
|
|
|
14
14
|
|
|
15
15
|
steps:
|
|
16
16
|
- uses: actions/checkout@v3
|
|
17
|
-
- name: Set up Ruby 2.
|
|
18
|
-
uses:
|
|
17
|
+
- name: Set up Ruby 2.7
|
|
18
|
+
uses: ruby/setup-ruby@v1
|
|
19
19
|
with:
|
|
20
|
-
ruby-version: 2.
|
|
20
|
+
ruby-version: '2.7'
|
|
21
21
|
|
|
22
22
|
- name: Publish to RubyGems
|
|
23
23
|
run: |
|
|
24
|
-
mkdir -p $HOME/.gem
|
|
25
|
-
touch $HOME/.gem/credentials
|
|
26
|
-
chmod 0600 $HOME/.gem/credentials
|
|
27
|
-
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
|
28
24
|
gem build *.gemspec
|
|
29
25
|
gem push *.gem
|
|
30
26
|
env:
|
|
31
|
-
GEM_HOST_API_KEY:
|
|
27
|
+
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_AUTH_TOKEN }}
|
data/.talismanrc
ADDED
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.2.2](https://github.com/contentstack/contentstack-utils-ruby/tree/v1.2.2) (2026-01-05)
|
|
4
|
+
- Fixed snyk security issues
|
|
5
|
+
## [1.2.1](https://github.com/contentstack/contentstack-utils-ruby/tree/v1.2.1) (2024-02-27)
|
|
6
|
+
- Support for JSON RTE with fragment in nested list
|
|
3
7
|
## [1.2.0](https://github.com/contentstack/contentstack-utils-ruby/tree/v1.2.0) (2023-06-20)
|
|
4
8
|
- Support for nested assets in the the image and br tag
|
|
5
9
|
## [1.1.3](https://github.com/contentstack/contentstack-utils-ruby/tree/v1.1.3) (2023-03-16)
|
data/CODEOWNERS
CHANGED
|
@@ -1 +1,11 @@
|
|
|
1
|
-
* @contentstack/
|
|
1
|
+
* @contentstack/devex-pr-reviewers
|
|
2
|
+
|
|
3
|
+
.github/workflows/sca-scan.yml @contentstack/security-admin
|
|
4
|
+
|
|
5
|
+
.github/workflows/codeql-anaylsis.yml @contentstack/security-admin
|
|
6
|
+
|
|
7
|
+
**/.snyk @contentstack/security-admin
|
|
8
|
+
|
|
9
|
+
.github/workflows/policy-scan.yml @contentstack/security-admin
|
|
10
|
+
|
|
11
|
+
.github/workflows/issues-jira.yml @contentstack/security-admin
|
data/Gemfile.lock
CHANGED
|
@@ -1,75 +1,87 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
contentstack_utils (1.2.
|
|
5
|
-
activesupport (>=
|
|
6
|
-
nokogiri (
|
|
4
|
+
contentstack_utils (1.2.2)
|
|
5
|
+
activesupport (>= 7.0)
|
|
6
|
+
nokogiri (>= 1.11)
|
|
7
7
|
|
|
8
8
|
GEM
|
|
9
9
|
remote: https://rubygems.org/
|
|
10
10
|
specs:
|
|
11
|
-
activesupport (7.
|
|
12
|
-
|
|
11
|
+
activesupport (7.2.3)
|
|
12
|
+
base64
|
|
13
|
+
benchmark (>= 0.3)
|
|
14
|
+
bigdecimal
|
|
15
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
16
|
+
connection_pool (>= 2.2.5)
|
|
17
|
+
drb
|
|
13
18
|
i18n (>= 1.6, < 2)
|
|
19
|
+
logger (>= 1.4.2)
|
|
14
20
|
minitest (>= 5.1)
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
21
|
+
securerandom (>= 0.3)
|
|
22
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
|
23
|
+
addressable (2.8.8)
|
|
24
|
+
public_suffix (>= 2.0.2, < 8.0)
|
|
25
|
+
base64 (0.3.0)
|
|
26
|
+
benchmark (0.5.0)
|
|
27
|
+
bigdecimal (4.0.1)
|
|
28
|
+
concurrent-ruby (1.3.6)
|
|
29
|
+
connection_pool (2.5.5)
|
|
30
|
+
crack (1.0.1)
|
|
31
|
+
bigdecimal
|
|
20
32
|
rexml
|
|
21
|
-
diff-lcs (1.
|
|
22
|
-
docile (1.4.
|
|
23
|
-
|
|
24
|
-
|
|
33
|
+
diff-lcs (1.6.2)
|
|
34
|
+
docile (1.4.1)
|
|
35
|
+
drb (2.2.3)
|
|
36
|
+
hashdiff (1.2.1)
|
|
37
|
+
i18n (1.14.8)
|
|
25
38
|
concurrent-ruby (~> 1.0)
|
|
26
|
-
|
|
27
|
-
minitest (5.
|
|
28
|
-
nokogiri (1.
|
|
29
|
-
mini_portile2 (~> 2.8.2)
|
|
39
|
+
logger (1.7.0)
|
|
40
|
+
minitest (5.27.0)
|
|
41
|
+
nokogiri (1.18.10-arm64-darwin)
|
|
30
42
|
racc (~> 1.4)
|
|
31
|
-
public_suffix (
|
|
32
|
-
racc (1.
|
|
33
|
-
rake (13.
|
|
34
|
-
rexml (3.
|
|
35
|
-
rspec (3.
|
|
36
|
-
rspec-core (~> 3.
|
|
37
|
-
rspec-expectations (~> 3.
|
|
38
|
-
rspec-mocks (~> 3.
|
|
39
|
-
rspec-core (3.
|
|
40
|
-
rspec-support (~> 3.
|
|
41
|
-
rspec-expectations (3.
|
|
43
|
+
public_suffix (6.0.2)
|
|
44
|
+
racc (1.8.1)
|
|
45
|
+
rake (13.3.1)
|
|
46
|
+
rexml (3.4.4)
|
|
47
|
+
rspec (3.13.2)
|
|
48
|
+
rspec-core (~> 3.13.0)
|
|
49
|
+
rspec-expectations (~> 3.13.0)
|
|
50
|
+
rspec-mocks (~> 3.13.0)
|
|
51
|
+
rspec-core (3.13.6)
|
|
52
|
+
rspec-support (~> 3.13.0)
|
|
53
|
+
rspec-expectations (3.13.5)
|
|
42
54
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
43
|
-
rspec-support (~> 3.
|
|
44
|
-
rspec-mocks (3.
|
|
55
|
+
rspec-support (~> 3.13.0)
|
|
56
|
+
rspec-mocks (3.13.7)
|
|
45
57
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
46
|
-
rspec-support (~> 3.
|
|
47
|
-
rspec-support (3.
|
|
48
|
-
|
|
58
|
+
rspec-support (~> 3.13.0)
|
|
59
|
+
rspec-support (3.13.6)
|
|
60
|
+
securerandom (0.4.1)
|
|
61
|
+
simplecov (0.22.0)
|
|
49
62
|
docile (~> 1.1)
|
|
50
63
|
simplecov-html (~> 0.11)
|
|
51
64
|
simplecov_json_formatter (~> 0.1)
|
|
52
|
-
simplecov-html (0.
|
|
65
|
+
simplecov-html (0.13.2)
|
|
53
66
|
simplecov_json_formatter (0.1.4)
|
|
54
67
|
tzinfo (2.0.6)
|
|
55
68
|
concurrent-ruby (~> 1.0)
|
|
56
|
-
webmock (3.
|
|
57
|
-
addressable (>= 2.
|
|
69
|
+
webmock (3.26.1)
|
|
70
|
+
addressable (>= 2.8.0)
|
|
58
71
|
crack (>= 0.3.2)
|
|
59
72
|
hashdiff (>= 0.4.0, < 2.0.0)
|
|
60
|
-
yard (0.9.
|
|
73
|
+
yard (0.9.38)
|
|
61
74
|
|
|
62
75
|
PLATFORMS
|
|
63
|
-
|
|
64
|
-
x64-mingw32
|
|
76
|
+
arm64-darwin-22
|
|
65
77
|
|
|
66
78
|
DEPENDENCIES
|
|
67
79
|
contentstack_utils!
|
|
68
|
-
rake (~> 13.0
|
|
69
|
-
rspec (~> 3.
|
|
70
|
-
simplecov (~> 0.
|
|
71
|
-
webmock (~> 3.
|
|
72
|
-
yard (~> 0.9.
|
|
80
|
+
rake (~> 13.0)
|
|
81
|
+
rspec (~> 3.13)
|
|
82
|
+
simplecov (~> 0.22)
|
|
83
|
+
webmock (~> 3.23)
|
|
84
|
+
yard (~> 0.9.36)
|
|
73
85
|
|
|
74
86
|
BUNDLED WITH
|
|
75
|
-
2.3.
|
|
87
|
+
2.3.26
|
data/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2012-
|
|
3
|
+
Copyright (c) 2012-2026 Contentstack. All Rights Reserved
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
data/contentstack_utils.gemspec
CHANGED
|
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
|
|
|
9
9
|
s.authors = [%q{Contentstack}]
|
|
10
10
|
s.email = ["support@contentstack.com"]
|
|
11
11
|
|
|
12
|
-
s.required_ruby_version = '>=
|
|
12
|
+
s.required_ruby_version = '>= 3.0'
|
|
13
13
|
|
|
14
14
|
s.license = "MIT"
|
|
15
15
|
s.homepage = "https://github.com/contentstack/contentstack-utils-ruby"
|
|
@@ -21,12 +21,12 @@ Gem::Specification.new do |s|
|
|
|
21
21
|
s.test_files = s.files.grep(%r{^spec/})
|
|
22
22
|
s.require_paths = ["lib"]
|
|
23
23
|
|
|
24
|
-
s.add_dependency 'activesupport', '>=
|
|
25
|
-
s.add_dependency 'nokogiri', '
|
|
24
|
+
s.add_dependency 'activesupport', '>= 7.0'
|
|
25
|
+
s.add_dependency 'nokogiri', '>= 1.11'
|
|
26
26
|
|
|
27
|
-
s.add_development_dependency 'rake', '~> 13.0
|
|
28
|
-
s.add_development_dependency 'rspec', '~> 3.
|
|
29
|
-
s.add_development_dependency 'webmock', '~> 3.
|
|
30
|
-
s.add_development_dependency 'simplecov', '~> 0.
|
|
31
|
-
s.add_development_dependency 'yard', '~> 0.9.
|
|
32
|
-
end
|
|
27
|
+
s.add_development_dependency 'rake', '~> 13.0'
|
|
28
|
+
s.add_development_dependency 'rspec', '~> 3.13'
|
|
29
|
+
s.add_development_dependency 'webmock', '~> 3.23'
|
|
30
|
+
s.add_development_dependency 'simplecov', '~> 0.22'
|
|
31
|
+
s.add_development_dependency 'yard', '~> 0.9.36'
|
|
32
|
+
end
|
|
@@ -105,6 +105,8 @@ module ContentstackUtils
|
|
|
105
105
|
renderString = "<blockquote>#{inner_html}</blockquote>"
|
|
106
106
|
when 'code'
|
|
107
107
|
renderString = "<code>#{inner_html}</code>"
|
|
108
|
+
when 'fragment'
|
|
109
|
+
renderString = "<fragment>#{inner_html}</fragment>"
|
|
108
110
|
when 'reference'
|
|
109
111
|
if (node["attrs"]['type'] === 'asset')
|
|
110
112
|
renderString = "<img src=#{node["attrs"]['asset-link']} alt=#{node["attrs"]['asset-name']} />"
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
module ContentstackUtils
|
|
2
|
-
VERSION = "1.2.
|
|
3
|
-
end
|
|
2
|
+
VERSION = "1.2.2"
|
|
3
|
+
end
|
data/spec/lib/utils_spec.rb
CHANGED
|
@@ -522,6 +522,26 @@ RSpec.describe ContentstackUtils do
|
|
|
522
522
|
expect(arrayResult).to eq [UnorderListHtml]
|
|
523
523
|
end
|
|
524
524
|
|
|
525
|
+
it 'Should return Order List string for OrderListJson with Fragment doc' do
|
|
526
|
+
entry = getGQLJSONRTE(OrderListFragmentJson)
|
|
527
|
+
|
|
528
|
+
result = ContentstackUtils::GQL.json_to_html(entry['single_rte'], ContentstackUtils::Model::Options.new())
|
|
529
|
+
arrayResult = ContentstackUtils::GQL.json_to_html(entry['multiple_rte'], ContentstackUtils::Model::Options.new())
|
|
530
|
+
|
|
531
|
+
expect(result).to eq OrderListFragmentHtml
|
|
532
|
+
expect(arrayResult).to eq [OrderListFragmentHtml]
|
|
533
|
+
end
|
|
534
|
+
|
|
535
|
+
it 'Should return Unorder List string for UnorderListJson with Fragment doc' do
|
|
536
|
+
entry = getGQLJSONRTE(UnorderListFragmentJson)
|
|
537
|
+
|
|
538
|
+
result = ContentstackUtils::GQL.json_to_html(entry['single_rte'], ContentstackUtils::Model::Options.new())
|
|
539
|
+
arrayResult = ContentstackUtils::GQL.json_to_html(entry['multiple_rte'], ContentstackUtils::Model::Options.new())
|
|
540
|
+
|
|
541
|
+
expect(result).to eq UnorderListFragmentHtml
|
|
542
|
+
expect(arrayResult).to eq [UnorderListFragmentHtml]
|
|
543
|
+
end
|
|
544
|
+
|
|
525
545
|
it 'Should return image string for ImgJson doc' do
|
|
526
546
|
entry = getGQLJSONRTE(ImgJson)
|
|
527
547
|
|
|
@@ -9,6 +9,8 @@ H5Html = "<h5>Mauris venenatis dui id massa sollicitudin, non bibendum nunc dict
|
|
|
9
9
|
H6Html = "<h6>Nunc porta diam vitae purus semper, ut consequat lorem vehicula.</h6>"
|
|
10
10
|
OrderListHtml = "<ol><li>Morbi in quam molestie, fermentum diam vitae, bibendum ipsum.</li><li>Pellentesque mattis lacus in quam aliquam congue</li><li>Integer feugiat leo dignissim, lobortis enim vitae, mollis lectus.</li><li>Sed in ante lacinia, molestie metus eu, fringilla sapien.</li></ol>"
|
|
11
11
|
UnorderListHtml = "<ul><li>Sed quis metus sed mi hendrerit mollis vel et odio.</li><li>Integer vitae sem dignissim, elementum libero vel, fringilla massa.</li><li>Integer imperdiet arcu sit amet tortor faucibus aliquet.</li><li>Aenean scelerisque velit vitae dui vehicula, at congue massa sagittis.</li></ul>"
|
|
12
|
+
OrderListFragmentHtml = "<ol><li><fragment>List Item 1</fragment><ol><li>List Item 1.1</li><li>List Item 1.2</li><li>List Item 1.3</li></ol></li></ol>"
|
|
13
|
+
UnorderListFragmentHtml = "<ul><li><fragment>List Item 1</fragment><ul><li>List Item 1.1</li><li>List Item 1.2</li><li>List Item 1.3</li></ul></li></ul>"
|
|
12
14
|
ImgHtml = "<img src='https://images.contentstack.com/v3/Donald.jog.png' />"
|
|
13
15
|
TableHtml = "<table><thead><tr><th><p>Header 1</p></th><th><p>Header 2</p></th></tr></thead><tbody><tr><td><p>Body row 1 data 1</p></td><td><p>Body row 1 data 2</p></td></tr><tr><td><p>Body row 2 data 1</p></td><td><p>Body row 2 data 2</p></td></tr></tbody></table>"
|
|
14
16
|
BlockquoteHtml = "<blockquote>Praesent eu ex sed nibh venenatis pretium.</blockquote>"
|
|
@@ -144,4 +146,100 @@ JSON_EMBEDDED_ITEMS_ENTRY= {
|
|
|
144
146
|
}
|
|
145
147
|
}
|
|
146
148
|
|
|
147
|
-
EmbedEdges = '{"edges":[{"node":{"system":{"content_type_uid":"sys_assets","uid":"entry_uid_5"},"created_at":"2020-08-19T09:13:05.864Z","updated_at":"2020-09-10T09:35:28.393Z","created_by":"created_at_date","updated_by":"created_at_date","content_type":"image/png","file_size":"36743","filename":"svg-logo-text.png","url":"/v3/svg-logo-text.png","_version":7,"title":"svg-logo-text.png","description":""}},{"node":{"system":{"content_type_uid":"sys_assets","uid":"asset_uid_1"},"created_at":"2020-08-19T09:13:32.785Z","updated_at":"2020-08-19T09:13:32.785Z","created_by":"created_at_date","updated_by":"created_at_date","content_type":"application/pdf","file_size":"13264","filename":"title","url":"/v3/dummy.pdf","_version":1,"title":"dummy.pdf"}},{"node":{"title":"Update this title","url":"","locale":"en-us","system":{"uid":"entry_uid_1","content_type_uid":"content_block"},"_version":5,"_in_progress":false,"multi_line":"","rich_text_editor":""}},{"node":{"title":"updated title","rich_text_editor":[""],"locale":"en-us","system":{"uid":"entry_uid_3","content_type_uid":"embeddedrte"},"_in_progress":false}},{"node":{"title":"Entry with embedded entry","rich_text_editor":[""],"locale":"en-us","system":{"uid":"entry_uid_2","content_type_uid":"embeddedrte"},"_in_progress":false}},{"node":{"system":{"uid":"entry_uid_6","content_type_uid":"sys_assets"},"content_type":"image/png","file_size":"36743","filename":"svg-logo-text.png","url":"/v3/svg-logo-text.png","title":"svg-logo-text.png","description":""}},{"node":{"title":"Update this title","url":"","locale":"en-us","system":{"uid":"entry_uid_1","content_type_uid":"content_block"},"_version":5,"_in_progress":false,"multi_line":"","rich_text_editor":""}},{"node":{"title":"updated title","rich_text_editor":[""],"locale":"en-us","system":{"uid":"entry_uid_3","content_type_uid":"embeddedrte"},"_in_progress":false}},{"node":{"title":"Entry with embedded entry","rich_text_editor":[""],"locale":"en-us","system":{"uid":"entry_uid_2","content_type_uid":"embeddedrte"},"_in_progress":false}}]}'
|
|
149
|
+
EmbedEdges = '{"edges":[{"node":{"system":{"content_type_uid":"sys_assets","uid":"entry_uid_5"},"created_at":"2020-08-19T09:13:05.864Z","updated_at":"2020-09-10T09:35:28.393Z","created_by":"created_at_date","updated_by":"created_at_date","content_type":"image/png","file_size":"36743","filename":"svg-logo-text.png","url":"/v3/svg-logo-text.png","_version":7,"title":"svg-logo-text.png","description":""}},{"node":{"system":{"content_type_uid":"sys_assets","uid":"asset_uid_1"},"created_at":"2020-08-19T09:13:32.785Z","updated_at":"2020-08-19T09:13:32.785Z","created_by":"created_at_date","updated_by":"created_at_date","content_type":"application/pdf","file_size":"13264","filename":"title","url":"/v3/dummy.pdf","_version":1,"title":"dummy.pdf"}},{"node":{"title":"Update this title","url":"","locale":"en-us","system":{"uid":"entry_uid_1","content_type_uid":"content_block"},"_version":5,"_in_progress":false,"multi_line":"","rich_text_editor":""}},{"node":{"title":"updated title","rich_text_editor":[""],"locale":"en-us","system":{"uid":"entry_uid_3","content_type_uid":"embeddedrte"},"_in_progress":false}},{"node":{"title":"Entry with embedded entry","rich_text_editor":[""],"locale":"en-us","system":{"uid":"entry_uid_2","content_type_uid":"embeddedrte"},"_in_progress":false}},{"node":{"system":{"uid":"entry_uid_6","content_type_uid":"sys_assets"},"content_type":"image/png","file_size":"36743","filename":"svg-logo-text.png","url":"/v3/svg-logo-text.png","title":"svg-logo-text.png","description":""}},{"node":{"title":"Update this title","url":"","locale":"en-us","system":{"uid":"entry_uid_1","content_type_uid":"content_block"},"_version":5,"_in_progress":false,"multi_line":"","rich_text_editor":""}},{"node":{"title":"updated title","rich_text_editor":[""],"locale":"en-us","system":{"uid":"entry_uid_3","content_type_uid":"embeddedrte"},"_in_progress":false}},{"node":{"title":"Entry with embedded entry","rich_text_editor":[""],"locale":"en-us","system":{"uid":"entry_uid_2","content_type_uid":"embeddedrte"},"_in_progress":false}}]}'
|
|
150
|
+
|
|
151
|
+
OrderListFragmentJson = {
|
|
152
|
+
"type": "ol",
|
|
153
|
+
"children": [
|
|
154
|
+
{
|
|
155
|
+
"type": "li",
|
|
156
|
+
"children": [
|
|
157
|
+
{
|
|
158
|
+
"type": "fragment",
|
|
159
|
+
"children": [
|
|
160
|
+
{
|
|
161
|
+
"text": "List Item 1"
|
|
162
|
+
}
|
|
163
|
+
]
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"type": "ol",
|
|
167
|
+
"children": [
|
|
168
|
+
{
|
|
169
|
+
"type": "li",
|
|
170
|
+
"children": [
|
|
171
|
+
{
|
|
172
|
+
"text": "List Item 1.1"
|
|
173
|
+
}
|
|
174
|
+
]
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"type": "li",
|
|
178
|
+
"children": [
|
|
179
|
+
{
|
|
180
|
+
"text": "List Item 1.2"
|
|
181
|
+
}
|
|
182
|
+
]
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"type": "li",
|
|
186
|
+
"children": [
|
|
187
|
+
{
|
|
188
|
+
"text": "List Item 1.3"
|
|
189
|
+
}
|
|
190
|
+
]
|
|
191
|
+
}
|
|
192
|
+
]
|
|
193
|
+
}
|
|
194
|
+
]
|
|
195
|
+
}
|
|
196
|
+
]
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
UnorderListFragmentJson = {
|
|
200
|
+
"type": "ul",
|
|
201
|
+
"children": [
|
|
202
|
+
{
|
|
203
|
+
"type": "li",
|
|
204
|
+
"children": [
|
|
205
|
+
{
|
|
206
|
+
"type": "fragment",
|
|
207
|
+
"children": [
|
|
208
|
+
{
|
|
209
|
+
"text": "List Item 1"
|
|
210
|
+
}
|
|
211
|
+
]
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"type": "ul",
|
|
215
|
+
"children": [
|
|
216
|
+
{
|
|
217
|
+
"type": "li",
|
|
218
|
+
"children": [
|
|
219
|
+
{
|
|
220
|
+
"text": "List Item 1.1"
|
|
221
|
+
}
|
|
222
|
+
]
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"type": "li",
|
|
226
|
+
"children": [
|
|
227
|
+
{
|
|
228
|
+
"text": "List Item 1.2"
|
|
229
|
+
}
|
|
230
|
+
]
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"type": "li",
|
|
234
|
+
"children": [
|
|
235
|
+
{
|
|
236
|
+
"text": "List Item 1.3"
|
|
237
|
+
}
|
|
238
|
+
]
|
|
239
|
+
}
|
|
240
|
+
]
|
|
241
|
+
}
|
|
242
|
+
]
|
|
243
|
+
}
|
|
244
|
+
]
|
|
245
|
+
}
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: contentstack_utils
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Contentstack
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-01-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -16,26 +16,26 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '
|
|
19
|
+
version: '7.0'
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - ">="
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: '
|
|
26
|
+
version: '7.0'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: nokogiri
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
|
-
- - "
|
|
31
|
+
- - ">="
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
33
|
version: '1.11'
|
|
34
34
|
type: :runtime
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
|
-
- - "
|
|
38
|
+
- - ">="
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
40
|
version: '1.11'
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
@@ -44,70 +44,70 @@ dependencies:
|
|
|
44
44
|
requirements:
|
|
45
45
|
- - "~>"
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: 13.0
|
|
47
|
+
version: '13.0'
|
|
48
48
|
type: :development
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
52
|
- - "~>"
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: 13.0
|
|
54
|
+
version: '13.0'
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
56
|
name: rspec
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
58
58
|
requirements:
|
|
59
59
|
- - "~>"
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
|
-
version: 3.
|
|
61
|
+
version: '3.13'
|
|
62
62
|
type: :development
|
|
63
63
|
prerelease: false
|
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
65
|
requirements:
|
|
66
66
|
- - "~>"
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
|
-
version: 3.
|
|
68
|
+
version: '3.13'
|
|
69
69
|
- !ruby/object:Gem::Dependency
|
|
70
70
|
name: webmock
|
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
|
72
72
|
requirements:
|
|
73
73
|
- - "~>"
|
|
74
74
|
- !ruby/object:Gem::Version
|
|
75
|
-
version: 3.
|
|
75
|
+
version: '3.23'
|
|
76
76
|
type: :development
|
|
77
77
|
prerelease: false
|
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
79
|
requirements:
|
|
80
80
|
- - "~>"
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
|
-
version: 3.
|
|
82
|
+
version: '3.23'
|
|
83
83
|
- !ruby/object:Gem::Dependency
|
|
84
84
|
name: simplecov
|
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
|
86
86
|
requirements:
|
|
87
87
|
- - "~>"
|
|
88
88
|
- !ruby/object:Gem::Version
|
|
89
|
-
version: 0.
|
|
89
|
+
version: '0.22'
|
|
90
90
|
type: :development
|
|
91
91
|
prerelease: false
|
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
93
|
requirements:
|
|
94
94
|
- - "~>"
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
|
-
version: 0.
|
|
96
|
+
version: '0.22'
|
|
97
97
|
- !ruby/object:Gem::Dependency
|
|
98
98
|
name: yard
|
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
|
100
100
|
requirements:
|
|
101
101
|
- - "~>"
|
|
102
102
|
- !ruby/object:Gem::Version
|
|
103
|
-
version: 0.9.
|
|
103
|
+
version: 0.9.36
|
|
104
104
|
type: :development
|
|
105
105
|
prerelease: false
|
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
|
107
107
|
requirements:
|
|
108
108
|
- - "~>"
|
|
109
109
|
- !ruby/object:Gem::Version
|
|
110
|
-
version: 0.9.
|
|
110
|
+
version: 0.9.36
|
|
111
111
|
description: Contentstack Ruby client for the Content Delivery API
|
|
112
112
|
email:
|
|
113
113
|
- support@contentstack.com
|
|
@@ -117,13 +117,13 @@ extra_rdoc_files: []
|
|
|
117
117
|
files:
|
|
118
118
|
- ".github/workflows/check-branch.yml"
|
|
119
119
|
- ".github/workflows/codeql-analysis.yml"
|
|
120
|
-
- ".github/workflows/jira.yml"
|
|
120
|
+
- ".github/workflows/issues-jira.yml"
|
|
121
|
+
- ".github/workflows/policy-scan.yml"
|
|
121
122
|
- ".github/workflows/release-gem.yml"
|
|
122
|
-
- ".github/workflows/sast-scan.yml"
|
|
123
123
|
- ".github/workflows/sca-scan.yml"
|
|
124
|
-
- ".github/workflows/secrets-scan.yml"
|
|
125
124
|
- ".gitignore"
|
|
126
125
|
- ".ruby-version"
|
|
126
|
+
- ".talismanrc"
|
|
127
127
|
- ".yardopts"
|
|
128
128
|
- CHANGELOG.md
|
|
129
129
|
- CODEOWNERS
|
|
@@ -162,7 +162,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
162
162
|
requirements:
|
|
163
163
|
- - ">="
|
|
164
164
|
- !ruby/object:Gem::Version
|
|
165
|
-
version: '
|
|
165
|
+
version: '3.0'
|
|
166
166
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
167
167
|
requirements:
|
|
168
168
|
- - ">="
|
data/.github/workflows/jira.yml
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
name: Create JIRA ISSUE
|
|
2
|
-
on:
|
|
3
|
-
pull_request:
|
|
4
|
-
types: [opened]
|
|
5
|
-
jobs:
|
|
6
|
-
security:
|
|
7
|
-
if: ${{ github.actor == 'dependabot[bot]' || github.actor == 'snyk-bot' || contains(github.event.pull_request.head.ref, 'snyk-fix-') || contains(github.event.pull_request.head.ref, 'snyk-upgrade-')}}
|
|
8
|
-
runs-on: ubuntu-latest
|
|
9
|
-
steps:
|
|
10
|
-
- uses: actions/checkout@v2
|
|
11
|
-
- name: Login into JIRA
|
|
12
|
-
uses: atlassian/gajira-login@master
|
|
13
|
-
env:
|
|
14
|
-
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
|
|
15
|
-
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
|
|
16
|
-
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
|
|
17
|
-
- name: Create a JIRA Issue
|
|
18
|
-
id: create
|
|
19
|
-
uses: atlassian/gajira-create@master
|
|
20
|
-
with:
|
|
21
|
-
project: ${{ secrets.JIRA_PROJECT }}
|
|
22
|
-
issuetype: ${{ secrets.JIRA_ISSUE_TYPE }}
|
|
23
|
-
summary: |
|
|
24
|
-
${{ github.event.pull_request.title }}
|
|
25
|
-
description: |
|
|
26
|
-
PR: ${{ github.event.pull_request.html_url }}
|
|
27
|
-
|
|
28
|
-
fields: "${{ secrets.JIRA_FIELDS }}"
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
name: SAST Scan
|
|
2
|
-
on:
|
|
3
|
-
pull_request:
|
|
4
|
-
types: [opened, synchronize, reopened]
|
|
5
|
-
jobs:
|
|
6
|
-
security:
|
|
7
|
-
runs-on: ubuntu-latest
|
|
8
|
-
steps:
|
|
9
|
-
- uses: actions/checkout@v2
|
|
10
|
-
- name: Horusec Scan
|
|
11
|
-
run: docker run -v /var/run/docker.sock:/var/run/docker.sock -v $(pwd):/src horuszup/horusec-cli:latest horusec start -p /src -P $(pwd)
|