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/README.md CHANGED
@@ -1,197 +1,197 @@
1
- # **Ruby SDK for Contentstack**
2
-
3
- Contentstack is a headless CMS with an API-first approach. It is a CMS that developers can use to build powerful cross-platform applications in their favorite languages. Build your application frontend, and Contentstack will take care of the rest. [Read More](https://www.contentstack.com/).
4
-
5
- Contentstack provides Ruby SDK to build application on top of Ruby on Rails. Given below is the detailed guide and helpful resources to get started with our Ruby SDK.
6
-
7
- ## **Prerequisite**
8
-
9
- You need ruby v2.0 or later installed to use the Contentstack Ruby SDK.
10
-
11
- ## **Setup and Installation**
12
-
13
- Add the following code to your application's Gemfile and bundle:
14
-
15
- gem 'contentstack'
16
-
17
- Or you can run this command in your terminal (you might need administrator privileges to perform this installation):
18
-
19
- gem install contentstack
20
-
21
- To start using the SDK in your application, you will need to initialize the stack by providing the values for the keys given in the code snippet below.
22
- ```ruby
23
- # with default region
24
- client = Contentstack::Client.new("api_key", "delivery_token", "enviroment_name")
25
-
26
- # with specific region
27
- client = Contentstack::Client.new("api_key", "delivery_token", "enviroment_name",{"region": Contentstack::Region::EU})
28
-
29
- # with custom host
30
- client = Contentstack::Client.new("api_key", "delivery_token", "enviroment_name",{"host": "https://custom-cdn.contentstack.com"})
31
- ```
32
-
33
- ## **Key Concepts for using Contentstack**
34
-
35
- ### **Stack**
36
-
37
- A stack is like a container that holds the content of your app. Learn more about [stacks](https://www.contentstack.com/docs/guide/stack).
38
-
39
- ### **Content Type**
40
-
41
- Content type lets you define the structure or blueprint of a page or a section of your digital property. It is a form-like page that gives Content Managers an interface to input and upload content. [Read more](https://www.contentstack.com/docs/guide/content-types).
42
-
43
- ### **Entry**
44
-
45
- An entry is the actual piece of content created using one of the defined content types. Learn more about [Entries](https://www.contentstack.com/docs/guide/content-management#working-with-entries).
46
-
47
- ### **Asset**
48
-
49
- Assets refer to all the media files (images, videos, PDFs, audio files, and so on) uploaded to Contentstack. These files can be used in multiple entries. Read more about [Assets](https://www.contentstack.com/docs/guide/content-management#working-with-assets).
50
-
51
- ### **Environment**
52
-
53
- A publishing environment corresponds to one or more deployment servers or a content delivery destination where the entries need to be published. Learn how to work with [Environments](https://www.contentstack.com/docs/guide/environments).
54
-
55
- ## **Contentstack Ruby SDK: 5-minute Quickstart**
56
-
57
- ### **Initializing your SDK**
58
-
59
- To initialize the SDK, you need to provide values for the keys given in the snippet below:
60
- ```ruby
61
- @stack = Contentstack::Client.new("api_key", "delivery_token", "enviroment_name")
62
- ```
63
-
64
- To get the API credentials mentioned above, log in to your Contentstack account and then in your top panel navigation, go to Settings > Stack to view the API Key and Access Token.
65
-
66
- ### **Querying content from your stack**
67
-
68
- To fetch all entries of of a content type, use the query given below:
69
- ```ruby
70
- @entry = stack.content_type(<<CONTENT_TYPE_UID>>).query();
71
- ```
72
-
73
- To fetch a specific entry from a content type, use the following query:
74
- ```ruby
75
- @entry = stack.content_type(<<CONTENT_TYPE_UID>>).entry(<<ENTRY_UID>>);
76
- ```
77
-
78
- ### Get Multiple Entries
79
- To retrieve multiple entries of a content type, specify the content type UID. You can also specify search parameters to filter results:
80
- ```ruby
81
- @query = @stack.content_type('blog').query
82
- @entries = @query.where('title', 'welcome')
83
- .include_schema
84
- .include_count
85
- .fetch
86
- puts "Total Entries -- #{@entries.count}"
87
- @entries.each{|entry| puts "#{entry.get('title')}" }
88
- ```
89
-
90
- To retrieve localized versions of entries, you can use the query attribute:
91
- ```ruby
92
- entry = @stack.content_type('content_type_uid').query.locale('locale_code').fetch()
93
- ```
94
- > Note: Currently, the above query works in case of retrieving localized versions of multiple entries only.
95
-
96
- ## **Advanced Queries**
97
-
98
- You can query for content types, entries, assets and more using our Ruby API Reference.
99
-
100
- [Ruby API Reference Doc](http://www.rubydoc.info/gems/contentstack)
101
-
102
- ### Paginating Responses
103
- In a single instance, the [Get Multiple Entries](https://www.contentstack.com/docs/developers/ruby/get-started-with-ruby-sdk/#get-multiple-entries) query will retrieve only the first 100 items of the specified content type. You can paginate and retrieve the rest of the items in batches using the [skip](https://www.rubydoc.info/gems/contentstack/Contentstack/Query#skip-instance_method) and [limit](https://www.rubydoc.info/gems/contentstack/Contentstack/Query#limit-instance_method) parameters in subsequent requests.
104
-
105
- ```ruby
106
- @stack = Contentstack::Client.new("api_key", "delivery_token", "environment")
107
- @entries = @stack.content_type('category').query
108
- .limit(20)
109
- .skip(50)
110
- .fetch
111
- ```
112
-
113
- > Note: Currently, the Ruby SDK does not support multiple content types referencing in a single query. For more information on how to query entries and assets, refer the Queries section of our Content Delivery API documentation.
114
-
115
- ## **Working with Images**
116
-
117
- We have introduced Image Delivery APIs that let you retrieve images and then manipulate and optimize them for your digital properties. It lets you perform a host of other actions such as crop, trim, resize, rotate, overlay, and so on.
118
-
119
- For example, if you want to crop an image (with width as 300 and height as 400), you simply need to append query parameters at the end of the image URL, such as, https://images.contentstack.io/v3/download?crop=300,400. There are several more parameters that you can use for your images.
120
-
121
- [Read Image Delivery API documentation](https://www.contentstack.com/docs/developers/apis/image-delivery-api/).
122
-
123
-
124
- ## **Using the Sync API with Ruby SDK**
125
-
126
- The Sync API takes care of syncing your Contentstack data with your app and ensures that the data is always up-to-date by providing delta updates. Contentstack’s Ruby SDK supports Sync API, which you can use to build powerful apps. Read through to understand how to use the Sync API with Contentstack Ruby SDK.
127
- [Read Sync API documentation](https://www.contentstack.com/docs/platforms/ruby#using-the-sync-api-with-ruby-sdk).
128
-
129
- ### Initial sync
130
-
131
- The Initial Sync process performs a complete sync of your app data. It returns all the published entries and assets of the specified stack in response.
132
-
133
- To start the Initial Sync process, use the syncStack method.
134
-
135
- ```ruby
136
- @sync_result = @stack.sync({init: true})
137
- # @sync_result.items: contains sync data
138
- # @sync_result.pagination_token: for fetching the next batch of entries using pagination token
139
- # @sync_result.sync_token: for performing subsequent sync after initial sync
140
- ```
141
-
142
- The response also contains a sync token, which you need to store, since this token is used to get subsequent delta updates later, as shown in the Subsequent Sync section below.
143
-
144
- You can also fetch custom results in initial sync by using advanced sync queries.
145
-
146
- ### Sync pagination
147
-
148
- If the result of the initial sync (or subsequent sync) contains more than 100 records, the response would be paginated. It provides pagination token in the response. You will need to use this token to get the next batch of data.
149
-
150
- ```ruby
151
- @sync_result = @stack.sync({pagination_token : "<pagination_token>"})
152
- # @sync_result.items: contains sync data
153
- # @sync_result.pagination_token: For fetching the next batch of entries using pagination token
154
- # @sync_result.sync_token: For performing subsequent sync after initial sync
155
- ```
156
-
157
- ### Subsequent sync
158
-
159
- You can use the sync token (that you receive after initial sync) to get the updated content next time. The sync token fetches only the content that was added after your last sync, and the details of the content that was deleted or updated.
160
-
161
- ```ruby
162
- @sync_result = @stack.sync({sync_token : "<sync_token>"})
163
- # @sync_result.items: contains sync data
164
- # @sync_result.pagination_token: For fetching the next batch of entries using pagination token
165
- # @sync_result.sync_token: For performing subsequent sync after initial sync
166
- ```
167
-
168
- ### Advanced sync queries
169
-
170
- You can use advanced sync queries to fetch custom results while performing initial sync.
171
- [Read advanced sync queries documentation](https://www.contentstack.com/docs/guide/synchronization/using-the-sync-api-with-ruby-sdk#advanced-sync-queries)
172
-
173
-
174
- ```ruby
175
- @sync_result = @stack.sync({init : true, locale: "<locale>" content_type_uid: "<content_type_uid>"})
176
- # @sync_result.items: contains sync data
177
- # @sync_result.pagination_token: For fetching the next batch of entries using pagination token
178
- # @sync_result.sync_token: For performing subsequent sync after initial sync
179
- ```
180
- ## **Helpful Links**
181
-
182
- * [Contentstack Website](https://www.contentstack.com)
183
-
184
- * [Official Documentation](http://contentstack.com/docs)
185
-
186
- * [Content Delivery API Docs](https://contentstack.com/docs/apis/content-delivery-api/)
187
-
188
- ## **The MIT License (MIT)**
189
-
190
- Copyright © 2012-2021 [Contentstack](https://www.contentstack.com). All Rights Reserved
191
-
192
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
193
-
194
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
195
-
196
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
197
-
1
+ # **Ruby SDK for Contentstack**
2
+
3
+ Contentstack is a headless CMS with an API-first approach. It is a CMS that developers can use to build powerful cross-platform applications in their favorite languages. Build your application frontend, and Contentstack will take care of the rest. [Read More](https://www.contentstack.com/).
4
+
5
+ Contentstack provides Ruby SDK to build application on top of Ruby on Rails. Given below is the detailed guide and helpful resources to get started with our Ruby SDK.
6
+
7
+ ## **Prerequisite**
8
+
9
+ You need ruby v2.0 or later installed to use the Contentstack Ruby SDK.
10
+
11
+ ## **Setup and Installation**
12
+
13
+ Add the following code to your application's Gemfile and bundle:
14
+
15
+ gem 'contentstack'
16
+
17
+ Or you can run this command in your terminal (you might need administrator privileges to perform this installation):
18
+
19
+ gem install contentstack
20
+
21
+ To start using the SDK in your application, you will need to initialize the stack by providing the values for the keys given in the code snippet below.
22
+ ```ruby
23
+ # with default region
24
+ client = Contentstack::Client.new("api_key", "delivery_token", "enviroment_name")
25
+
26
+ # with specific region
27
+ client = Contentstack::Client.new("api_key", "delivery_token", "enviroment_name",{"region": Contentstack::Region::EU})
28
+
29
+ # with custom host
30
+ client = Contentstack::Client.new("api_key", "delivery_token", "enviroment_name",{"host": "https://custom-cdn.contentstack.com"})
31
+ ```
32
+
33
+ ## **Key Concepts for using Contentstack**
34
+
35
+ ### **Stack**
36
+
37
+ A stack is like a container that holds the content of your app. Learn more about [stacks](https://www.contentstack.com/docs/guide/stack).
38
+
39
+ ### **Content Type**
40
+
41
+ Content type lets you define the structure or blueprint of a page or a section of your digital property. It is a form-like page that gives Content Managers an interface to input and upload content. [Read more](https://www.contentstack.com/docs/guide/content-types).
42
+
43
+ ### **Entry**
44
+
45
+ An entry is the actual piece of content created using one of the defined content types. Learn more about [Entries](https://www.contentstack.com/docs/guide/content-management#working-with-entries).
46
+
47
+ ### **Asset**
48
+
49
+ Assets refer to all the media files (images, videos, PDFs, audio files, and so on) uploaded to Contentstack. These files can be used in multiple entries. Read more about [Assets](https://www.contentstack.com/docs/guide/content-management#working-with-assets).
50
+
51
+ ### **Environment**
52
+
53
+ A publishing environment corresponds to one or more deployment servers or a content delivery destination where the entries need to be published. Learn how to work with [Environments](https://www.contentstack.com/docs/guide/environments).
54
+
55
+ ## **Contentstack Ruby SDK: 5-minute Quickstart**
56
+
57
+ ### **Initializing your SDK**
58
+
59
+ To initialize the SDK, you need to provide values for the keys given in the snippet below:
60
+ ```ruby
61
+ @stack = Contentstack::Client.new("api_key", "delivery_token", "enviroment_name")
62
+ ```
63
+
64
+ To get the API credentials mentioned above, log in to your Contentstack account and then in your top panel navigation, go to Settings > Stack to view the API Key and Access Token.
65
+
66
+ ### **Querying content from your stack**
67
+
68
+ To fetch all entries of of a content type, use the query given below:
69
+ ```ruby
70
+ @entry = stack.content_type(<<CONTENT_TYPE_UID>>).query();
71
+ ```
72
+
73
+ To fetch a specific entry from a content type, use the following query:
74
+ ```ruby
75
+ @entry = stack.content_type(<<CONTENT_TYPE_UID>>).entry(<<ENTRY_UID>>);
76
+ ```
77
+
78
+ ### Get Multiple Entries
79
+ To retrieve multiple entries of a content type, specify the content type UID. You can also specify search parameters to filter results:
80
+ ```ruby
81
+ @query = @stack.content_type('blog').query
82
+ @entries = @query.where('title', 'welcome')
83
+ .include_schema
84
+ .include_count
85
+ .fetch
86
+ puts "Total Entries -- #{@entries.count}"
87
+ @entries.each{|entry| puts "#{entry.get('title')}" }
88
+ ```
89
+
90
+ To retrieve localized versions of entries, you can use the query attribute:
91
+ ```ruby
92
+ entry = @stack.content_type('content_type_uid').query.locale('locale_code').fetch()
93
+ ```
94
+ > Note: Currently, the above query works in case of retrieving localized versions of multiple entries only.
95
+
96
+ ## **Advanced Queries**
97
+
98
+ You can query for content types, entries, assets and more using our Ruby API Reference.
99
+
100
+ [Ruby API Reference Doc](http://www.rubydoc.info/gems/contentstack)
101
+
102
+ ### Paginating Responses
103
+ In a single instance, the [Get Multiple Entries](https://www.contentstack.com/docs/developers/ruby/get-started-with-ruby-sdk/#get-multiple-entries) query will retrieve only the first 100 items of the specified content type. You can paginate and retrieve the rest of the items in batches using the [skip](https://www.rubydoc.info/gems/contentstack/Contentstack/Query#skip-instance_method) and [limit](https://www.rubydoc.info/gems/contentstack/Contentstack/Query#limit-instance_method) parameters in subsequent requests.
104
+
105
+ ```ruby
106
+ @stack = Contentstack::Client.new("api_key", "delivery_token", "environment")
107
+ @entries = @stack.content_type('category').query
108
+ .limit(20)
109
+ .skip(50)
110
+ .fetch
111
+ ```
112
+
113
+ > Note: Currently, the Ruby SDK does not support multiple content types referencing in a single query. For more information on how to query entries and assets, refer the Queries section of our Content Delivery API documentation.
114
+
115
+ ## **Working with Images**
116
+
117
+ We have introduced Image Delivery APIs that let you retrieve images and then manipulate and optimize them for your digital properties. It lets you perform a host of other actions such as crop, trim, resize, rotate, overlay, and so on.
118
+
119
+ For example, if you want to crop an image (with width as 300 and height as 400), you simply need to append query parameters at the end of the image URL, such as, https://images.contentstack.io/v3/download?crop=300,400. There are several more parameters that you can use for your images.
120
+
121
+ [Read Image Delivery API documentation](https://www.contentstack.com/docs/developers/apis/image-delivery-api/).
122
+
123
+
124
+ ## **Using the Sync API with Ruby SDK**
125
+
126
+ The Sync API takes care of syncing your Contentstack data with your app and ensures that the data is always up-to-date by providing delta updates. Contentstack’s Ruby SDK supports Sync API, which you can use to build powerful apps. Read through to understand how to use the Sync API with Contentstack Ruby SDK.
127
+ [Read Sync API documentation](https://www.contentstack.com/docs/platforms/ruby#using-the-sync-api-with-ruby-sdk).
128
+
129
+ ### Initial sync
130
+
131
+ The Initial Sync process performs a complete sync of your app data. It returns all the published entries and assets of the specified stack in response.
132
+
133
+ To start the Initial Sync process, use the syncStack method.
134
+
135
+ ```ruby
136
+ @sync_result = @stack.sync({init: true})
137
+ # @sync_result.items: contains sync data
138
+ # @sync_result.pagination_token: for fetching the next batch of entries using pagination token
139
+ # @sync_result.sync_token: for performing subsequent sync after initial sync
140
+ ```
141
+
142
+ The response also contains a sync token, which you need to store, since this token is used to get subsequent delta updates later, as shown in the Subsequent Sync section below.
143
+
144
+ You can also fetch custom results in initial sync by using advanced sync queries.
145
+
146
+ ### Sync pagination
147
+
148
+ If the result of the initial sync (or subsequent sync) contains more than 100 records, the response would be paginated. It provides pagination token in the response. You will need to use this token to get the next batch of data.
149
+
150
+ ```ruby
151
+ @sync_result = @stack.sync({pagination_token : "<pagination_token>"})
152
+ # @sync_result.items: contains sync data
153
+ # @sync_result.pagination_token: For fetching the next batch of entries using pagination token
154
+ # @sync_result.sync_token: For performing subsequent sync after initial sync
155
+ ```
156
+
157
+ ### Subsequent sync
158
+
159
+ You can use the sync token (that you receive after initial sync) to get the updated content next time. The sync token fetches only the content that was added after your last sync, and the details of the content that was deleted or updated.
160
+
161
+ ```ruby
162
+ @sync_result = @stack.sync({sync_token : "<sync_token>"})
163
+ # @sync_result.items: contains sync data
164
+ # @sync_result.pagination_token: For fetching the next batch of entries using pagination token
165
+ # @sync_result.sync_token: For performing subsequent sync after initial sync
166
+ ```
167
+
168
+ ### Advanced sync queries
169
+
170
+ You can use advanced sync queries to fetch custom results while performing initial sync.
171
+ [Read advanced sync queries documentation](https://www.contentstack.com/docs/guide/synchronization/using-the-sync-api-with-ruby-sdk#advanced-sync-queries)
172
+
173
+
174
+ ```ruby
175
+ @sync_result = @stack.sync({init : true, locale: "<locale>" content_type_uid: "<content_type_uid>"})
176
+ # @sync_result.items: contains sync data
177
+ # @sync_result.pagination_token: For fetching the next batch of entries using pagination token
178
+ # @sync_result.sync_token: For performing subsequent sync after initial sync
179
+ ```
180
+ ## **Helpful Links**
181
+
182
+ * [Contentstack Website](https://www.contentstack.com)
183
+
184
+ * [Official Documentation](http://contentstack.com/docs)
185
+
186
+ * [Content Delivery API Docs](https://contentstack.com/docs/apis/content-delivery-api/)
187
+
188
+ ## **The MIT License (MIT)**
189
+
190
+ Copyright © 2012-2021 [Contentstack](https://www.contentstack.com). All Rights Reserved
191
+
192
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
193
+
194
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
195
+
196
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
197
+
data/SECURITY.md CHANGED
@@ -1,27 +1,27 @@
1
- ## Security
2
-
3
- Contentstack takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations.
4
-
5
- If you believe you have found a security vulnerability in any Contentstack-owned repository, please report it to us as described below.
6
-
7
- ## Reporting Security Issues
8
-
9
- **Please do not report security vulnerabilities through public GitHub issues.**
10
-
11
- Send email to [security@contentstack.com](mailto:security@contentstack.com).
12
-
13
- You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message.
14
-
15
- Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
16
-
17
- * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
18
- * Full paths of source file(s) related to the manifestation of the issue
19
- * The location of the affected source code (tag/branch/commit or direct URL)
20
- * Any special configuration required to reproduce the issue
21
- * Step-by-step instructions to reproduce the issue
22
- * Proof-of-concept or exploit code (if possible)
23
- * Impact of the issue, including how an attacker might exploit the issue
24
-
25
- This information will help us triage your report more quickly.
26
-
27
- [https://www.contentstack.com/trust/](https://www.contentstack.com/trust/)
1
+ ## Security
2
+
3
+ Contentstack takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations.
4
+
5
+ If you believe you have found a security vulnerability in any Contentstack-owned repository, please report it to us as described below.
6
+
7
+ ## Reporting Security Issues
8
+
9
+ **Please do not report security vulnerabilities through public GitHub issues.**
10
+
11
+ Send email to [security@contentstack.com](mailto:security@contentstack.com).
12
+
13
+ You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message.
14
+
15
+ Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
16
+
17
+ * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
18
+ * Full paths of source file(s) related to the manifestation of the issue
19
+ * The location of the affected source code (tag/branch/commit or direct URL)
20
+ * Any special configuration required to reproduce the issue
21
+ * Step-by-step instructions to reproduce the issue
22
+ * Proof-of-concept or exploit code (if possible)
23
+ * Impact of the issue, including how an attacker might exploit the issue
24
+
25
+ This information will help us triage your report more quickly.
26
+
27
+ [https://www.contentstack.com/trust/](https://www.contentstack.com/trust/)
data/contentstack.gemspec CHANGED
@@ -1,30 +1,30 @@
1
- lib = File.expand_path('../lib', __FILE__)
2
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
-
4
- require 'contentstack/version'
5
- Gem::Specification.new do |s|
6
- s.name = %q{contentstack}
7
- s.version = Contentstack::VERSION.dup
8
- s.date = Time.now
9
- s.authors = [%q{Contentstack}]
10
- s.email = ["support@contentstack.com"]
11
-
12
- s.required_ruby_version = '>= 2.0'
13
-
14
- s.license = "MIT"
15
- s.homepage = "https://github.com/contentstack/contentstack-ruby"
16
-
17
- s.summary = %q{Contentstack Ruby client for the Content Delivery API}
18
- s.description = %q{Contentstack Ruby client for the Content Delivery API}
19
-
20
- s.files = `git ls-files`.split("\n")
21
- s.require_paths = ["lib"]
22
-
23
- s.add_dependency 'activesupport', '>= 3.2'
24
- s.add_dependency 'contentstack_utils' , '~> 1.0'
25
-
26
- s.add_development_dependency 'rspec', '~> 3.10.0'
27
- s.add_development_dependency 'webmock', '~> 3.11.0'
28
- s.add_development_dependency 'simplecov', '~> 0.21.1'
29
- s.add_development_dependency 'yard', '~> 0.9.26'
1
+ lib = File.expand_path('../lib', __FILE__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+
4
+ require 'contentstack/version'
5
+ Gem::Specification.new do |s|
6
+ s.name = %q{contentstack}
7
+ s.version = Contentstack::VERSION.dup
8
+ s.date = Time.now
9
+ s.authors = [%q{Contentstack}]
10
+ s.email = ["support@contentstack.com"]
11
+
12
+ s.required_ruby_version = '>= 2.0'
13
+
14
+ s.license = "MIT"
15
+ s.homepage = "https://github.com/contentstack/contentstack-ruby"
16
+
17
+ s.summary = %q{Contentstack Ruby client for the Content Delivery API}
18
+ s.description = %q{Contentstack Ruby client for the Content Delivery API}
19
+
20
+ s.files = `git ls-files`.split("\n")
21
+ s.require_paths = ["lib"]
22
+
23
+ s.add_dependency 'activesupport', '>= 3.2'
24
+ s.add_dependency 'contentstack_utils' , '~> 1.0'
25
+
26
+ s.add_development_dependency 'rspec', '~> 3.10.0'
27
+ s.add_development_dependency 'webmock', '~> 3.11.0'
28
+ s.add_development_dependency 'simplecov', '~> 0.21.1'
29
+ s.add_development_dependency 'yard', '~> 0.9.26'
30
30
  end