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.
- checksums.yaml +4 -4
- data/.github/workflows/check-branch.yml +20 -0
- data/.github/workflows/codeql-analysis.yml +68 -68
- data/.github/workflows/jira.yml +28 -28
- data/.github/workflows/release-gem.yml +30 -30
- data/.github/workflows/sast-scan.yml +10 -10
- data/.github/workflows/sca-scan.yml +15 -15
- data/.github/workflows/secrets-scan.yml +10 -10
- data/.gitignore +11 -11
- data/.yardopts +6 -6
- data/CHANGELOG.md +129 -114
- data/CODEOWNERS +1 -1
- data/CODE_OF_CONDUCT.md +73 -73
- data/Gemfile +2 -2
- data/Gemfile.lock +79 -76
- data/LICENSE.txt +21 -21
- data/README.md +197 -197
- data/SECURITY.md +27 -27
- data/contentstack.gemspec +29 -29
- data/lib/contentstack/api.rb +191 -191
- data/lib/contentstack/asset.rb +68 -68
- data/lib/contentstack/asset_collection.rb +27 -27
- data/lib/contentstack/client.rb +122 -91
- data/lib/contentstack/content_type.rb +53 -53
- data/lib/contentstack/entry.rb +235 -221
- data/lib/contentstack/entry_collection.rb +44 -44
- data/lib/contentstack/error.rb +6 -6
- data/lib/contentstack/query.rb +665 -653
- data/lib/contentstack/region.rb +13 -5
- data/lib/contentstack/sync_result.rb +29 -29
- data/lib/contentstack/version.rb +2 -2
- data/lib/contentstack.rb +31 -31
- data/lib/util.rb +110 -110
- data/rakefile.rb +3 -3
- data/spec/asset_collection_spec.rb +15 -15
- data/spec/asset_spec.rb +47 -47
- data/spec/content_type_spec.rb +80 -80
- data/spec/contentstack_spec.rb +63 -38
- data/spec/entry_collection_spec.rb +41 -41
- data/spec/entry_spec.rb +116 -101
- data/spec/fixtures/asset.json +1 -1
- data/spec/fixtures/asset_collection.json +1 -1
- data/spec/fixtures/category_content_type.json +1 -1
- data/spec/fixtures/category_entry.json +1 -1
- data/spec/fixtures/category_entry_collection.json +1 -1
- data/spec/fixtures/category_entry_collection_without_count.json +1 -1
- data/spec/fixtures/content_types.json +1 -1
- data/spec/fixtures/product_entry.json +1 -1
- data/spec/fixtures/product_entry_collection.json +1 -1
- data/spec/fixtures/sync_init.json +2974 -2974
- data/spec/query_spec.rb +210 -205
- data/spec/spec_helper.rb +180 -180
- data/spec/sync_spec.rb +26 -26
- 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
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
nokogiri (1.
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
rspec-
|
43
|
-
|
44
|
-
|
45
|
-
rspec-support (~> 3.10.0)
|
46
|
-
rspec-
|
47
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
48
|
-
rspec-support (~> 3.10.0)
|
49
|
-
rspec-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
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.
|