contentstack 0.6.3.1 → 0.8.0

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 (54) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/check-branch.yml +20 -0
  3. data/.github/workflows/codeql-analysis.yml +68 -68
  4. data/.github/workflows/jira.yml +28 -28
  5. data/.github/workflows/release-gem.yml +27 -31
  6. data/.github/workflows/sca-scan.yml +15 -15
  7. data/.gitignore +11 -11
  8. data/.yardopts +6 -6
  9. data/CHANGELOG.md +135 -114
  10. data/CODEOWNERS +1 -1
  11. data/CODE_OF_CONDUCT.md +73 -73
  12. data/Gemfile +2 -2
  13. data/Gemfile.lock +84 -76
  14. data/LICENSE.txt +21 -21
  15. data/README.md +197 -197
  16. data/SECURITY.md +27 -27
  17. data/contentstack.gemspec +29 -29
  18. data/lib/contentstack/api.rb +191 -191
  19. data/lib/contentstack/asset.rb +68 -68
  20. data/lib/contentstack/asset_collection.rb +27 -27
  21. data/lib/contentstack/client.rb +127 -92
  22. data/lib/contentstack/content_type.rb +53 -53
  23. data/lib/contentstack/entry.rb +235 -221
  24. data/lib/contentstack/entry_collection.rb +44 -44
  25. data/lib/contentstack/error.rb +6 -6
  26. data/lib/contentstack/query.rb +665 -653
  27. data/lib/contentstack/region.rb +15 -6
  28. data/lib/contentstack/sync_result.rb +29 -29
  29. data/lib/contentstack/version.rb +3 -3
  30. data/lib/contentstack.rb +31 -31
  31. data/lib/util.rb +110 -110
  32. data/rakefile.rb +3 -3
  33. data/spec/asset_collection_spec.rb +15 -15
  34. data/spec/asset_spec.rb +47 -47
  35. data/spec/content_type_spec.rb +80 -80
  36. data/spec/contentstack_spec.rb +69 -39
  37. data/spec/entry_collection_spec.rb +41 -41
  38. data/spec/entry_spec.rb +116 -101
  39. data/spec/fixtures/asset.json +1 -1
  40. data/spec/fixtures/asset_collection.json +1 -1
  41. data/spec/fixtures/category_content_type.json +1 -1
  42. data/spec/fixtures/category_entry.json +1 -1
  43. data/spec/fixtures/category_entry_collection.json +1 -1
  44. data/spec/fixtures/category_entry_collection_without_count.json +1 -1
  45. data/spec/fixtures/content_types.json +1 -1
  46. data/spec/fixtures/product_entry.json +1 -1
  47. data/spec/fixtures/product_entry_collection.json +1 -1
  48. data/spec/fixtures/sync_init.json +2974 -2974
  49. data/spec/query_spec.rb +210 -205
  50. data/spec/spec_helper.rb +180 -180
  51. data/spec/sync_spec.rb +26 -26
  52. metadata +7 -8
  53. data/.github/workflows/sast-scan.yml +0 -11
  54. data/.github/workflows/secrets-scan.yml +0 -11
data/CODE_OF_CONDUCT.md CHANGED
@@ -1,73 +1,73 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- In the interest of fostering an open and welcoming environment, we as
6
- contributors and maintainers pledge to making participation in our project and
7
- our community a harassment-free experience for everyone, regardless of age, body
8
- size, disability, ethnicity, gender identity and expression, level of experience,
9
- nationality, personal appearance, race, religion, or sexual identity and
10
- orientation.
11
-
12
- ## Our Standards
13
-
14
- Examples of behavior that contributes to creating a positive environment
15
- include:
16
-
17
- * Using welcoming and inclusive language
18
- * Being respectful of differing viewpoints and experiences
19
- * Gracefully accepting constructive criticism
20
- * Focusing on what is best for the community
21
- * Showing empathy towards other community members
22
-
23
- Examples of unacceptable behavior by participants include:
24
-
25
- * The use of sexualized language or imagery and unwelcome sexual attention or advances
26
- * Trolling, insulting/derogatory comments, and personal or political attacks
27
- * Public or private harassment
28
- * Publishing others' private information, such as a physical or electronic
29
- address, without explicit permission
30
- * Other conduct which could reasonably be considered inappropriate in a
31
- professional setting
32
-
33
- ## Our Responsibilities
34
-
35
- Project maintainers are responsible for clarifying the standards of acceptable
36
- behavior and are expected to take appropriate and fair corrective action in
37
- response to any instances of unacceptable behavior.
38
-
39
- Project maintainers have the right and responsibility to remove, edit, or
40
- reject comments, commits, code, wiki edits, issues, and other contributions
41
- that are not aligned to this Code of Conduct, or to ban temporarily or
42
- permanently any contributor for other behaviors that they deem inappropriate,
43
- threatening, offensive, or harmful.
44
-
45
- ## Scope
46
-
47
- This Code of Conduct applies both within project spaces and in public spaces
48
- when an individual is representing the project or its community. Examples of
49
- representing a project or community include using an official project e-mail
50
- address, posting via an official social media account, or acting as an appointed
51
- representative at an online or offline event. Representation of a project may be
52
- further defined and clarified by project maintainers.
53
-
54
- ## Enforcement
55
-
56
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
57
- reported by contacting the project team at amit.erandole@gmail.com. All
58
- complaints will be reviewed and investigated and will result in a response that
59
- is deemed necessary and appropriate to the circumstances. The project team is
60
- obligated to maintain confidentiality with regard to the reporter of an incident.
61
- Further details of specific enforcement policies may be posted separately.
62
-
63
- Project maintainers who do not follow or enforce the Code of Conduct in good
64
- faith may face temporary or permanent repercussions as determined by other
65
- members of the project's leadership.
66
-
67
- ## Attribution
68
-
69
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
70
- available at [http://contributor-covenant.org/version/1/4][version]
71
-
72
- [homepage]: http://contributor-covenant.org
73
- [version]: http://contributor-covenant.org/version/1/4/
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or advances
26
+ * Trolling, insulting/derogatory comments, and personal or political attacks
27
+ * Public or private harassment
28
+ * Publishing others' private information, such as a physical or electronic
29
+ address, without explicit permission
30
+ * Other conduct which could reasonably be considered inappropriate in a
31
+ professional setting
32
+
33
+ ## Our Responsibilities
34
+
35
+ Project maintainers are responsible for clarifying the standards of acceptable
36
+ behavior and are expected to take appropriate and fair corrective action in
37
+ response to any instances of unacceptable behavior.
38
+
39
+ Project maintainers have the right and responsibility to remove, edit, or
40
+ reject comments, commits, code, wiki edits, issues, and other contributions
41
+ that are not aligned to this Code of Conduct, or to ban temporarily or
42
+ permanently any contributor for other behaviors that they deem inappropriate,
43
+ threatening, offensive, or harmful.
44
+
45
+ ## Scope
46
+
47
+ This Code of Conduct applies both within project spaces and in public spaces
48
+ when an individual is representing the project or its community. Examples of
49
+ representing a project or community include using an official project e-mail
50
+ address, posting via an official social media account, or acting as an appointed
51
+ representative at an online or offline event. Representation of a project may be
52
+ further defined and clarified by project maintainers.
53
+
54
+ ## Enforcement
55
+
56
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
57
+ reported by contacting the project team at amit.erandole@gmail.com. All
58
+ complaints will be reviewed and investigated and will result in a response that
59
+ is deemed necessary and appropriate to the circumstances. The project team is
60
+ obligated to maintain confidentiality with regard to the reporter of an incident.
61
+ Further details of specific enforcement policies may be posted separately.
62
+
63
+ Project maintainers who do not follow or enforce the Code of Conduct in good
64
+ faith may face temporary or permanent repercussions as determined by other
65
+ members of the project's leadership.
66
+
67
+ ## Attribution
68
+
69
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
70
+ available at [http://contributor-covenant.org/version/1/4][version]
71
+
72
+ [homepage]: http://contributor-covenant.org
73
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile CHANGED
@@ -1,3 +1,3 @@
1
- # Gemfile
2
- source "https://rubygems.org"
1
+ # Gemfile
2
+ source "https://rubygems.org"
3
3
  gemspec
data/Gemfile.lock CHANGED
@@ -1,76 +1,84 @@
1
- PATH
2
- remote: .
3
- specs:
4
- contentstack (0.6.3)
5
- activesupport (~> 3.2)
6
- contentstack_utils (~> 1.0)
7
-
8
- GEM
9
- remote: https://rubygems.org/
10
- specs:
11
- activesupport (3.2.22.5)
12
- i18n (~> 0.6, >= 0.6.4)
13
- multi_json (~> 1.0)
14
- addressable (2.8.1)
15
- public_suffix (>= 2.0.2, < 6.0)
16
- concurrent-ruby (1.2.2)
17
- contentstack_utils (1.1.2)
18
- activesupport (>= 3.2, < 7.0.4)
19
- nokogiri (~> 1.11, >= 1.11.0)
20
- crack (0.4.5)
21
- rexml
22
- diff-lcs (1.5.0)
23
- docile (1.4.0)
24
- hashdiff (1.0.1)
25
- i18n (0.9.5)
26
- concurrent-ruby (~> 1.0)
27
- mini_portile2 (2.8.1)
28
- multi_json (1.15.0)
29
- nokogiri (1.13.10)
30
- mini_portile2 (~> 2.8.0)
31
- racc (~> 1.4)
32
- nokogiri (1.13.10-x64-mingw32)
33
- racc (~> 1.4)
34
- public_suffix (5.0.1)
35
- racc (1.6.2)
36
- rexml (3.2.5)
37
- rspec (3.10.0)
38
- rspec-core (~> 3.10.0)
39
- rspec-expectations (~> 3.10.0)
40
- rspec-mocks (~> 3.10.0)
41
- rspec-core (3.10.2)
42
- rspec-support (~> 3.10.0)
43
- rspec-expectations (3.10.2)
44
- diff-lcs (>= 1.2.0, < 2.0)
45
- rspec-support (~> 3.10.0)
46
- rspec-mocks (3.10.3)
47
- diff-lcs (>= 1.2.0, < 2.0)
48
- rspec-support (~> 3.10.0)
49
- rspec-support (3.10.3)
50
- simplecov (0.21.2)
51
- docile (~> 1.1)
52
- simplecov-html (~> 0.11)
53
- simplecov_json_formatter (~> 0.1)
54
- simplecov-html (0.12.3)
55
- simplecov_json_formatter (0.1.4)
56
- webmock (3.11.3)
57
- addressable (>= 2.3.6)
58
- crack (>= 0.3.2)
59
- hashdiff (>= 0.4.0, < 2.0.0)
60
- webrick (1.7.0)
61
- yard (0.9.28)
62
- webrick (~> 1.7.0)
63
-
64
- PLATFORMS
65
- ruby
66
- x64-mingw32
67
-
68
- DEPENDENCIES
69
- contentstack!
70
- rspec (~> 3.10.0)
71
- simplecov (~> 0.21.1)
72
- webmock (~> 3.11.0)
73
- yard (~> 0.9.26)
74
-
75
- BUNDLED WITH
76
- 2.3.13
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ contentstack (0.8.0)
5
+ activesupport (>= 3.2)
6
+ contentstack_utils (~> 1.0)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ activesupport (7.1.3.2)
12
+ base64
13
+ bigdecimal
14
+ concurrent-ruby (~> 1.0, >= 1.0.2)
15
+ connection_pool (>= 2.2.5)
16
+ drb
17
+ i18n (>= 1.6, < 2)
18
+ minitest (>= 5.1)
19
+ mutex_m
20
+ tzinfo (~> 2.0)
21
+ addressable (2.8.6)
22
+ public_suffix (>= 2.0.2, < 6.0)
23
+ base64 (0.2.0)
24
+ bigdecimal (3.1.8)
25
+ concurrent-ruby (1.2.3)
26
+ connection_pool (2.4.1)
27
+ contentstack_utils (1.2.0)
28
+ activesupport (>= 3.2)
29
+ nokogiri (~> 1.11)
30
+ crack (1.0.0)
31
+ bigdecimal
32
+ rexml
33
+ diff-lcs (1.5.1)
34
+ docile (1.4.0)
35
+ drb (2.2.1)
36
+ hashdiff (1.1.0)
37
+ i18n (1.14.5)
38
+ concurrent-ruby (~> 1.0)
39
+ minitest (5.22.3)
40
+ mutex_m (0.2.0)
41
+ nokogiri (1.15.6-arm64-darwin)
42
+ racc (~> 1.4)
43
+ public_suffix (5.0.5)
44
+ racc (1.7.3)
45
+ rexml (3.2.6)
46
+ rspec (3.10.0)
47
+ rspec-core (~> 3.10.0)
48
+ rspec-expectations (~> 3.10.0)
49
+ rspec-mocks (~> 3.10.0)
50
+ rspec-core (3.10.2)
51
+ rspec-support (~> 3.10.0)
52
+ rspec-expectations (3.10.2)
53
+ diff-lcs (>= 1.2.0, < 2.0)
54
+ rspec-support (~> 3.10.0)
55
+ rspec-mocks (3.10.3)
56
+ diff-lcs (>= 1.2.0, < 2.0)
57
+ rspec-support (~> 3.10.0)
58
+ rspec-support (3.10.3)
59
+ simplecov (0.21.2)
60
+ docile (~> 1.1)
61
+ simplecov-html (~> 0.11)
62
+ simplecov_json_formatter (~> 0.1)
63
+ simplecov-html (0.12.3)
64
+ simplecov_json_formatter (0.1.4)
65
+ tzinfo (2.0.6)
66
+ concurrent-ruby (~> 1.0)
67
+ webmock (3.11.3)
68
+ addressable (>= 2.3.6)
69
+ crack (>= 0.3.2)
70
+ hashdiff (>= 0.4.0, < 2.0.0)
71
+ yard (0.9.36)
72
+
73
+ PLATFORMS
74
+ arm64-darwin-22
75
+
76
+ DEPENDENCIES
77
+ contentstack!
78
+ rspec (~> 3.10.0)
79
+ simplecov (~> 0.21.1)
80
+ webmock (~> 3.11.0)
81
+ yard (~> 0.9.26)
82
+
83
+ BUNDLED WITH
84
+ 2.3.13
data/LICENSE.txt CHANGED
@@ -1,21 +1,21 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2012-2023 Contentstack. All Rights Reserved
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2012-2024 Contentstack. All Rights Reserved
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.