contentstack 0.6.1 → 0.6.3

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.
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 +114 -78
  11. data/CODEOWNERS +1 -1
  12. data/CODE_OF_CONDUCT.md +73 -73
  13. data/Gemfile +2 -2
  14. data/Gemfile.lock +76 -77
  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 +7 -17
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e9d052813dd2aa06d66dbda39f4c26d0a963721339e7ea33c35af69fa16bfba1
4
- data.tar.gz: bd7612b96005d0382166828a3c386033d60ff27867cb5b9c66424758672a6116
3
+ metadata.gz: 5f134ac1da3352af160dbf0f78c7b526d20ba3f8867d6835b1974299677be506
4
+ data.tar.gz: e6df38e9c799dad976ae60241ae362a03c25f8cdccaee6b289ed4e9f3241e44c
5
5
  SHA512:
6
- metadata.gz: bd282b3954a34b18df200adea469dba22ba4ec56705a5682857efc45f7057979be6c5e7312d9b68a3e5e5a6e33057127eb6787a5e9bf04d7fc96ab008a0febac
7
- data.tar.gz: fe7742a7f855b3d34cb510cefc839f07d6e4d8f2acc097701e757c0337842f530c292d13d20f814dae5becc63917b907beaa50102603b91d1262c17b8f8c5f6c
6
+ metadata.gz: af40c3ea2af852a022028d2dce18bce015728a97574e3e309bb4aac95d995fb466d99b78c2b087a71d41c0063918a3822b379e7d90c55e4ed456cbe57bb50bf9
7
+ data.tar.gz: 33dce32017148b53d77e91a01a67caeadad38abbe7739c2760c183b0cae142552e1cc464b0100f23d3858fa51e10759a01830ced5df85f60b3d988b1bca7b1eb
@@ -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,115 @@
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.3
4
+ ### Date: 16th-Mar-2023
5
+ ### Package Update
6
+ - Dependency gem max version issue resolved.
7
+
8
+ ------------------------------------------------
9
+ ## Version 0.6.2
10
+ ### Date: 27th-Feb-2023
11
+ ### Package Update
12
+ - Dependency gem update.
13
+
14
+ ------------------------------------------------
15
+ ## Version 0.6.1
16
+ ### Date: 9th-Sept-2022
17
+ ### Bug
18
+ - Live Preview feature for entry with reference update.
19
+
20
+ ------------------------------------------------
21
+ ## Version 0.6.0
22
+ ### Date: 17th-Aug-2022
23
+ ### New Features
24
+ - Proxy and Retry functionality support added.
25
+
26
+ ------------------------------------------------
27
+ ## Version 0.5.1
28
+ ### Date: 21st-Apr-2022
29
+ ### Package Update
30
+ - API request with URI.OPEN issue resolved.
31
+
32
+ ------------------------------------------------
33
+ ## Version 0.5.0
34
+ ### Date: 8th-Dec-2021
35
+ ### New Feature
36
+ - Live Preview feature support added.
37
+
38
+ ------------------------------------------------
39
+ ## Version 0.4.3
40
+ ### Date: 17th-Sept-2021
41
+ ### Dependency update
42
+ - Issue for Monkey patching resolved. Implemented Refine to extend class within module scope.
43
+
44
+ ------------------------------------------------
45
+ ## Version 0.4.2
46
+ ### Date: 2nd-Sept-2021
47
+ ### Dependency update
48
+ - Added URI open on open uri deprecation
49
+
50
+ ------------------------------------------------
51
+ ## Version 0.4.1
52
+ ### Date: 2nd-Jun-2021
53
+ ### Dependency update
54
+ - Updated gemspec dependency
55
+
56
+ ------------------------------------------------
57
+
58
+ ## Version 0.4.0
59
+ ### Date: 16th-Apr-2021
60
+ ### New Features
61
+ - Embedded feature Support added
62
+
63
+ ------------------------------------------------
64
+
65
+ ## Version 0.3.0
66
+ ### Date: 17th-Mar-2021
67
+ ### New Features
68
+ - Sync API module support added
69
+
70
+ ------------------------------------------------
71
+ ## Version 0.2.0
72
+
73
+ ### New Features
74
+ - Entry
75
+ - locale - function for passing locale is added
76
+ - only - function for getting only specified field
77
+ - except - function for getting field except specified field
78
+ - include_reference - function for including reference in entry
79
+ - include_schema - function for including schema along with entry added
80
+ - include_content_type - function for including content type details along with entry added
81
+ - include_owner - function for getting owner of entry
82
+ - include_fallback - function for getting published fallback locale content, if specified locale content is not published
83
+
84
+ - Query
85
+ - include_fallback - function for getting published fallback locale content, if specified locale content is not published
86
+
87
+
88
+ ------------------------------------------------
89
+
90
+ ## Version 0.1.0
91
+
92
+ ### Bug
93
+ - Stack Tokens Moved to Headers
94
+
95
+ ------------------------------------------------
96
+
97
+ ## Version 0.0.4
98
+
99
+ ### Enhancement
100
+ - Region support added
101
+
102
+ ------------------------------------------------
103
+
104
+ ## Version 0.0.3
105
+
106
+ ### Enhancement
107
+ - Query - function for passing locale is added.
108
+
109
+ ------------------------------------------------
110
+
111
+ ## Version 0.0.1
112
+
113
+ - Initial release
114
+
79
115
  ------------------------------------------------
data/CODEOWNERS CHANGED
@@ -1 +1 @@
1
- * @contentstack/security-admin @contentstack/sdk-admin
1
+ * @contentstack/security-admin @contentstack/sdk-admin