contentstack 0.6.3.1 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
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 +30 -30
  6. data/.github/workflows/sast-scan.yml +10 -10
  7. data/.github/workflows/sca-scan.yml +15 -15
  8. data/.github/workflows/secrets-scan.yml +10 -10
  9. data/.gitignore +11 -11
  10. data/.yardopts +6 -6
  11. data/CHANGELOG.md +129 -114
  12. data/CODEOWNERS +1 -1
  13. data/CODE_OF_CONDUCT.md +73 -73
  14. data/Gemfile +2 -2
  15. data/Gemfile.lock +79 -76
  16. data/LICENSE.txt +21 -21
  17. data/README.md +197 -197
  18. data/SECURITY.md +27 -27
  19. data/contentstack.gemspec +29 -29
  20. data/lib/contentstack/api.rb +191 -191
  21. data/lib/contentstack/asset.rb +68 -68
  22. data/lib/contentstack/asset_collection.rb +27 -27
  23. data/lib/contentstack/client.rb +122 -91
  24. data/lib/contentstack/content_type.rb +53 -53
  25. data/lib/contentstack/entry.rb +235 -221
  26. data/lib/contentstack/entry_collection.rb +44 -44
  27. data/lib/contentstack/error.rb +6 -6
  28. data/lib/contentstack/query.rb +665 -653
  29. data/lib/contentstack/region.rb +13 -5
  30. data/lib/contentstack/sync_result.rb +29 -29
  31. data/lib/contentstack/version.rb +2 -2
  32. data/lib/contentstack.rb +31 -31
  33. data/lib/util.rb +110 -110
  34. data/rakefile.rb +3 -3
  35. data/spec/asset_collection_spec.rb +15 -15
  36. data/spec/asset_spec.rb +47 -47
  37. data/spec/content_type_spec.rb +80 -80
  38. data/spec/contentstack_spec.rb +63 -38
  39. data/spec/entry_collection_spec.rb +41 -41
  40. data/spec/entry_spec.rb +116 -101
  41. data/spec/fixtures/asset.json +1 -1
  42. data/spec/fixtures/asset_collection.json +1 -1
  43. data/spec/fixtures/category_content_type.json +1 -1
  44. data/spec/fixtures/category_entry.json +1 -1
  45. data/spec/fixtures/category_entry_collection.json +1 -1
  46. data/spec/fixtures/category_entry_collection_without_count.json +1 -1
  47. data/spec/fixtures/content_types.json +1 -1
  48. data/spec/fixtures/product_entry.json +1 -1
  49. data/spec/fixtures/product_entry_collection.json +1 -1
  50. data/spec/fixtures/sync_init.json +2974 -2974
  51. data/spec/query_spec.rb +210 -205
  52. data/spec/spec_helper.rb +180 -180
  53. data/spec/sync_spec.rb +26 -26
  54. metadata +4 -3
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,79 @@
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
+
5
+ contentstack (0.7.0)
6
+ activesupport (>= 3.2)
7
+ contentstack_utils (~> 1.0)
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ activesupport (7.0.4.3)
13
+ concurrent-ruby (~> 1.0, >= 1.0.2)
14
+ i18n (>= 1.6, < 2)
15
+ minitest (>= 5.1)
16
+ tzinfo (~> 2.0)
17
+ addressable (2.8.4)
18
+ public_suffix (>= 2.0.2, < 6.0)
19
+ concurrent-ruby (1.2.2)
20
+ contentstack_utils (1.1.3.2)
21
+ activesupport (>= 3.2)
22
+ nokogiri (~> 1.11)
23
+ crack (0.4.5)
24
+ rexml
25
+ diff-lcs (1.5.0)
26
+ docile (1.4.0)
27
+ hashdiff (1.0.1)
28
+ i18n (1.12.0)
29
+ concurrent-ruby (~> 1.0)
30
+ mini_portile2 (2.8.1)
31
+ minitest (5.18.0)
32
+ nokogiri (1.14.3)
33
+ mini_portile2 (~> 2.8.0)
34
+ racc (~> 1.4)
35
+ nokogiri (1.14.3-x64-mingw32)
36
+ racc (~> 1.4)
37
+ public_suffix (5.0.1)
38
+ racc (1.6.2)
39
+ rexml (3.2.5)
40
+ rspec (3.10.0)
41
+ rspec-core (~> 3.10.0)
42
+ rspec-expectations (~> 3.10.0)
43
+ rspec-mocks (~> 3.10.0)
44
+ rspec-core (3.10.2)
45
+ rspec-support (~> 3.10.0)
46
+ rspec-expectations (3.10.2)
47
+ diff-lcs (>= 1.2.0, < 2.0)
48
+ rspec-support (~> 3.10.0)
49
+ rspec-mocks (3.10.3)
50
+ diff-lcs (>= 1.2.0, < 2.0)
51
+ rspec-support (~> 3.10.0)
52
+ rspec-support (3.10.3)
53
+ simplecov (0.21.2)
54
+ docile (~> 1.1)
55
+ simplecov-html (~> 0.11)
56
+ simplecov_json_formatter (~> 0.1)
57
+ simplecov-html (0.12.3)
58
+ simplecov_json_formatter (0.1.4)
59
+ tzinfo (2.0.6)
60
+ concurrent-ruby (~> 1.0)
61
+ webmock (3.11.3)
62
+ addressable (>= 2.3.6)
63
+ crack (>= 0.3.2)
64
+ hashdiff (>= 0.4.0, < 2.0.0)
65
+ yard (0.9.34)
66
+
67
+ PLATFORMS
68
+ ruby
69
+ x64-mingw32
70
+
71
+ DEPENDENCIES
72
+ contentstack!
73
+ rspec (~> 3.10.0)
74
+ simplecov (~> 0.21.1)
75
+ webmock (~> 3.11.0)
76
+ yard (~> 0.9.26)
77
+
78
+ BUNDLED WITH
79
+ 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-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.