contentstack 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/codeql-analysis.yml +68 -68
  3. data/.github/workflows/jira.yml +28 -0
  4. data/.github/workflows/release-gem.yml +31 -0
  5. data/.github/workflows/sast-scan.yml +10 -10
  6. data/.github/workflows/sca-scan.yml +15 -13
  7. data/.github/workflows/secrets-scan.yml +10 -10
  8. data/.gitignore +11 -11
  9. data/.yardopts +6 -6
  10. data/CHANGELOG.md +108 -78
  11. data/CODEOWNERS +1 -1
  12. data/CODE_OF_CONDUCT.md +73 -73
  13. data/Gemfile +2 -2
  14. data/Gemfile.lock +29 -24
  15. data/LICENSE.txt +21 -21
  16. data/README.md +197 -197
  17. data/SECURITY.md +27 -27
  18. data/contentstack.gemspec +29 -29
  19. data/lib/contentstack/api.rb +191 -212
  20. data/lib/contentstack/asset.rb +68 -68
  21. data/lib/contentstack/asset_collection.rb +27 -27
  22. data/lib/contentstack/client.rb +91 -91
  23. data/lib/contentstack/content_type.rb +53 -53
  24. data/lib/contentstack/entry.rb +221 -221
  25. data/lib/contentstack/entry_collection.rb +44 -44
  26. data/lib/contentstack/error.rb +6 -6
  27. data/lib/contentstack/query.rb +653 -653
  28. data/lib/contentstack/region.rb +5 -5
  29. data/lib/contentstack/sync_result.rb +29 -29
  30. data/lib/contentstack/version.rb +2 -2
  31. data/lib/contentstack.rb +31 -31
  32. data/lib/util.rb +110 -110
  33. data/rakefile.rb +3 -3
  34. data/spec/asset_collection_spec.rb +15 -15
  35. data/spec/asset_spec.rb +47 -47
  36. data/spec/content_type_spec.rb +80 -80
  37. data/spec/contentstack_spec.rb +38 -38
  38. data/spec/entry_collection_spec.rb +41 -41
  39. data/spec/entry_spec.rb +101 -101
  40. data/spec/fixtures/asset.json +1 -1
  41. data/spec/fixtures/asset_collection.json +1 -1
  42. data/spec/fixtures/category_content_type.json +1 -1
  43. data/spec/fixtures/category_entry.json +1 -1
  44. data/spec/fixtures/category_entry_collection.json +1 -1
  45. data/spec/fixtures/category_entry_collection_without_count.json +1 -1
  46. data/spec/fixtures/content_types.json +1 -1
  47. data/spec/fixtures/product_entry.json +1 -1
  48. data/spec/fixtures/product_entry_collection.json +1 -1
  49. data/spec/fixtures/sync_init.json +2974 -2974
  50. data/spec/query_spec.rb +205 -205
  51. data/spec/spec_helper.rb +180 -180
  52. data/spec/sync_spec.rb +26 -26
  53. metadata +9 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e9d052813dd2aa06d66dbda39f4c26d0a963721339e7ea33c35af69fa16bfba1
4
- data.tar.gz: bd7612b96005d0382166828a3c386033d60ff27867cb5b9c66424758672a6116
3
+ metadata.gz: b7a7360e621556ac733041fcaf7832d721ea41a15ee9b997ac0e73685624ee1c
4
+ data.tar.gz: e22cf32aa656a20fe24b42b8e77e44c3659f49db80b9aa926b95b3d52c8caa4b
5
5
  SHA512:
6
- metadata.gz: bd282b3954a34b18df200adea469dba22ba4ec56705a5682857efc45f7057979be6c5e7312d9b68a3e5e5a6e33057127eb6787a5e9bf04d7fc96ab008a0febac
7
- data.tar.gz: fe7742a7f855b3d34cb510cefc839f07d6e4d8f2acc097701e757c0337842f530c292d13d20f814dae5becc63917b907beaa50102603b91d1262c17b8f8c5f6c
6
+ metadata.gz: 2ff65aa625f1a31141a1b80263112adfdce440c32ef3a22d6c0d7dbd68f47afdbd9475dac5f0c0b4b49e0ab9e9fba6c09b7495c44b6e22a1f5199436266d47f3
7
+ data.tar.gz: 86377d001cb0f3972d1820cbd50cf0cb4a1538ab9f870306cbe00e29004b29b237f5759eac18d66a3b193005b9530de5cf12a149263bd41f9d579f60231e4bb5
@@ -1,68 +1,68 @@
1
- # For most projects, this workflow file will not need changing; you simply need
2
- # to commit it to your repository.
3
- #
4
- # You may wish to alter this file to override the set of languages analyzed,
5
- # or to provide custom queries or build logic.
6
- #
7
- # ******** NOTE ********
8
- # We have attempted to detect the languages in your repository. Please check
9
- # the `language` matrix defined below to confirm you have the correct set of
10
- # supported CodeQL languages.
11
- #
12
- name: "CodeQL"
13
-
14
- on:
15
- pull_request:
16
- # The branches below must be a subset of the branches above
17
- branches: '*'
18
-
19
- jobs:
20
- analyze:
21
- name: Analyze
22
- runs-on: ubuntu-latest
23
- permissions:
24
- actions: read
25
- contents: read
26
- security-events: write
27
-
28
- strategy:
29
- fail-fast: false
30
- matrix:
31
- language: [ 'ruby' ]
32
- # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
33
- # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
34
-
35
- steps:
36
- - name: Checkout repository
37
- uses: actions/checkout@v3
38
-
39
- # Initializes the CodeQL tools for scanning.
40
- - name: Initialize CodeQL
41
- uses: github/codeql-action/init@v2
42
- with:
43
- languages: ${{ matrix.language }}
44
- # If you wish to specify custom queries, you can do so here or in a config file.
45
- # By default, queries listed here will override any specified in a config file.
46
- # Prefix the list here with "+" to use these queries and those in the config file.
47
-
48
- # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
49
- # queries: security-extended,security-and-quality
50
-
51
-
52
- # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
53
- # If this step fails, then you should remove it and run the build manually (see below)
54
- - name: Autobuild
55
- uses: github/codeql-action/autobuild@v2
56
-
57
- # ℹ️ Command-line programs to run using the OS shell.
58
- # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
59
-
60
- # If the Autobuild fails above, remove it and uncomment the following three lines.
61
- # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
62
-
63
- # - run: |
64
- # echo "Run, Build Application using script"
65
- # ./location_of_script_within_repo/buildscript.sh
66
-
67
- - name: Perform CodeQL Analysis
68
- uses: github/codeql-action/analyze@v2
1
+ # For most projects, this workflow file will not need changing; you simply need
2
+ # to commit it to your repository.
3
+ #
4
+ # You may wish to alter this file to override the set of languages analyzed,
5
+ # or to provide custom queries or build logic.
6
+ #
7
+ # ******** NOTE ********
8
+ # We have attempted to detect the languages in your repository. Please check
9
+ # the `language` matrix defined below to confirm you have the correct set of
10
+ # supported CodeQL languages.
11
+ #
12
+ name: "CodeQL"
13
+
14
+ on:
15
+ pull_request:
16
+ # The branches below must be a subset of the branches above
17
+ branches: '*'
18
+
19
+ jobs:
20
+ analyze:
21
+ name: Analyze
22
+ runs-on: ubuntu-latest
23
+ permissions:
24
+ actions: read
25
+ contents: read
26
+ security-events: write
27
+
28
+ strategy:
29
+ fail-fast: false
30
+ matrix:
31
+ language: [ 'ruby' ]
32
+ # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
33
+ # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
34
+
35
+ steps:
36
+ - name: Checkout repository
37
+ uses: actions/checkout@v3
38
+
39
+ # Initializes the CodeQL tools for scanning.
40
+ - name: Initialize CodeQL
41
+ uses: github/codeql-action/init@v2
42
+ with:
43
+ languages: ${{ matrix.language }}
44
+ # If you wish to specify custom queries, you can do so here or in a config file.
45
+ # By default, queries listed here will override any specified in a config file.
46
+ # Prefix the list here with "+" to use these queries and those in the config file.
47
+
48
+ # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
49
+ # queries: security-extended,security-and-quality
50
+
51
+
52
+ # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
53
+ # If this step fails, then you should remove it and run the build manually (see below)
54
+ - name: Autobuild
55
+ uses: github/codeql-action/autobuild@v2
56
+
57
+ # ℹ️ Command-line programs to run using the OS shell.
58
+ # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
59
+
60
+ # If the Autobuild fails above, remove it and uncomment the following three lines.
61
+ # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
62
+
63
+ # - run: |
64
+ # echo "Run, Build Application using script"
65
+ # ./location_of_script_within_repo/buildscript.sh
66
+
67
+ - name: Perform CodeQL Analysis
68
+ uses: github/codeql-action/analyze@v2
@@ -0,0 +1,28 @@
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 }}"
@@ -0,0 +1,31 @@
1
+ name: Ruby Gem
2
+
3
+ on:
4
+ release:
5
+ types: [created]
6
+
7
+ jobs:
8
+ build:
9
+ name: Build + Publish
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ contents: read
13
+ packages: write
14
+
15
+ steps:
16
+ - uses: actions/checkout@v3
17
+ - name: Set up Ruby 2.6
18
+ uses: actions/setup-ruby@v1
19
+ with:
20
+ ruby-version: 2.6.x
21
+
22
+ - name: Publish to RubyGems
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
+ gem build *.gemspec
29
+ gem push *.gem
30
+ env:
31
+ GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
@@ -1,11 +1,11 @@
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
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
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)
@@ -1,13 +1,15 @@
1
- name: Source Composition Analysis 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@master
10
- - name: Run Snyk to check for vulnerabilities
11
- uses: snyk/actions/node@master
12
- env:
13
- SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
1
+ name: Source Composition Analysis 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@master
10
+ - name: Run Snyk to check for vulnerabilities
11
+ uses: snyk/actions/ruby@master
12
+ env:
13
+ SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
14
+ with:
15
+ args: --fail-on=all
@@ -1,11 +1,11 @@
1
- name: Secrets 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: Gittyleaks
1
+ name: Secrets 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: Gittyleaks
11
11
  uses: gupy-io/gittyleaks-action@v0.1
data/.gitignore CHANGED
@@ -1,12 +1,12 @@
1
- contentstack-*
2
- build_doc.sh
3
- test
4
- doc
5
- spec-integration
6
- coverage
7
- \.yardoc
8
- .DS_Store
9
- .bundle/
10
- **/rspec_results.html
11
- vendor/
1
+ contentstack-*
2
+ build_doc.sh
3
+ test
4
+ doc
5
+ spec-integration
6
+ coverage
7
+ \.yardoc
8
+ .DS_Store
9
+ .bundle/
10
+ **/rspec_results.html
11
+ vendor/
12
12
  .dccache
data/.yardopts CHANGED
@@ -1,6 +1,6 @@
1
- README.rdoc
2
- lib/contentstack/*
3
- lib/contentstack.rb
4
- --exclude lib/contentstack/util.rb
5
- --exclude lib/contentstack/api.rb
6
- --exclude lib/contentstack/version.rb
1
+ README.rdoc
2
+ lib/contentstack/*
3
+ lib/contentstack.rb
4
+ --exclude lib/contentstack/util.rb
5
+ --exclude lib/contentstack/api.rb
6
+ --exclude lib/contentstack/version.rb
data/CHANGELOG.md CHANGED
@@ -1,79 +1,109 @@
1
- ## CHANGELOG
2
- ------------------------------------------------
3
- ## Version 0.4.3
4
- ### Date: 17th-Sept-2021
5
- ### Dependency update
6
- - Issue for Monkey patching resolved. Implemented Refine to extend class within module scope.
7
-
8
- ------------------------------------------------
9
- ## Version 0.4.2
10
- ### Date: 2nd-Sept-2021
11
- ### Dependency update
12
- - Added URI open on open uri deprecation
13
-
14
- ------------------------------------------------
15
- ## Version 0.4.1
16
- ### Date: 2nd-Jun-2021
17
- ### Dependency update
18
- - Updated gemspec dependency
19
-
20
- ------------------------------------------------
21
-
22
- ## Version 0.4.0
23
- ### Date: 16th-Apr-2021
24
- ### New Features
25
- - Embedded feature Support added
26
-
27
- ------------------------------------------------
28
-
29
- ## Version 0.3.0
30
- ### Date: 17th-Mar-2021
31
- ### New Features
32
- - Sync API module support added
33
-
34
- ------------------------------------------------
35
- ## Version 0.2.0
36
-
37
- ### New Features
38
- - Entry
39
- - locale - function for passing locale is added
40
- - only - function for getting only specified field
41
- - except - function for getting field except specified field
42
- - include_reference - function for including reference in entry
43
- - include_schema - function for including schema along with entry added
44
- - include_content_type - function for including content type details along with entry added
45
- - include_owner - function for getting owner of entry
46
- - include_fallback - function for getting published fallback locale content, if specified locale content is not published
47
-
48
- - Query
49
- - include_fallback - function for getting published fallback locale content, if specified locale content is not published
50
-
51
-
52
- ------------------------------------------------
53
-
54
- ## Version 0.1.0
55
-
56
- ### Bug
57
- - Stack Tokens Moved to Headers
58
-
59
- ------------------------------------------------
60
-
61
- ## Version 0.0.4
62
-
63
- ### Enhancement
64
- - Region support added
65
-
66
- ------------------------------------------------
67
-
68
- ## Version 0.0.3
69
-
70
- ### Enhancement
71
- - Query - function for passing locale is added.
72
-
73
- ------------------------------------------------
74
-
75
- ## Version 0.0.1
76
-
77
- - Initial release
78
-
1
+ ## CHANGELOG
2
+
3
+ ## Version 0.6.2
4
+ ### Date: 27th-Feb-2023
5
+ ### Package Update
6
+ - Dependency gem update.
7
+
8
+ ------------------------------------------------
9
+ ## Version 0.6.1
10
+ ### Date: 9th-Sept-2022
11
+ ### Bug
12
+ - Live Preview feature for entry with reference update.
13
+
14
+ ------------------------------------------------
15
+ ## Version 0.6.0
16
+ ### Date: 17th-Aug-2022
17
+ ### New Features
18
+ - Proxy and Retry functionality support added.
19
+
20
+ ------------------------------------------------
21
+ ## Version 0.5.1
22
+ ### Date: 21st-Apr-2022
23
+ ### Package Update
24
+ - API request with URI.OPEN issue resolved.
25
+
26
+ ------------------------------------------------
27
+ ## Version 0.5.0
28
+ ### Date: 8th-Dec-2021
29
+ ### New Feature
30
+ - Live Preview feature support added.
31
+
32
+ ------------------------------------------------
33
+ ## Version 0.4.3
34
+ ### Date: 17th-Sept-2021
35
+ ### Dependency update
36
+ - Issue for Monkey patching resolved. Implemented Refine to extend class within module scope.
37
+
38
+ ------------------------------------------------
39
+ ## Version 0.4.2
40
+ ### Date: 2nd-Sept-2021
41
+ ### Dependency update
42
+ - Added URI open on open uri deprecation
43
+
44
+ ------------------------------------------------
45
+ ## Version 0.4.1
46
+ ### Date: 2nd-Jun-2021
47
+ ### Dependency update
48
+ - Updated gemspec dependency
49
+
50
+ ------------------------------------------------
51
+
52
+ ## Version 0.4.0
53
+ ### Date: 16th-Apr-2021
54
+ ### New Features
55
+ - Embedded feature Support added
56
+
57
+ ------------------------------------------------
58
+
59
+ ## Version 0.3.0
60
+ ### Date: 17th-Mar-2021
61
+ ### New Features
62
+ - Sync API module support added
63
+
64
+ ------------------------------------------------
65
+ ## Version 0.2.0
66
+
67
+ ### New Features
68
+ - Entry
69
+ - locale - function for passing locale is added
70
+ - only - function for getting only specified field
71
+ - except - function for getting field except specified field
72
+ - include_reference - function for including reference in entry
73
+ - include_schema - function for including schema along with entry added
74
+ - include_content_type - function for including content type details along with entry added
75
+ - include_owner - function for getting owner of entry
76
+ - include_fallback - function for getting published fallback locale content, if specified locale content is not published
77
+
78
+ - Query
79
+ - include_fallback - function for getting published fallback locale content, if specified locale content is not published
80
+
81
+
82
+ ------------------------------------------------
83
+
84
+ ## Version 0.1.0
85
+
86
+ ### Bug
87
+ - Stack Tokens Moved to Headers
88
+
89
+ ------------------------------------------------
90
+
91
+ ## Version 0.0.4
92
+
93
+ ### Enhancement
94
+ - Region support added
95
+
96
+ ------------------------------------------------
97
+
98
+ ## Version 0.0.3
99
+
100
+ ### Enhancement
101
+ - Query - function for passing locale is added.
102
+
103
+ ------------------------------------------------
104
+
105
+ ## Version 0.0.1
106
+
107
+ - Initial release
108
+
79
109
  ------------------------------------------------
data/CODEOWNERS CHANGED
@@ -1 +1 @@
1
- * @contentstack/security-admin @contentstack/sdk-admin
1
+ * @contentstack/security-admin @contentstack/sdk-admin