kontent-delivery-sdk-ruby 2.0.12 → 2.0.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.md +21 -21
  3. data/README.md +575 -543
  4. data/bin/console +14 -14
  5. data/bin/setup +8 -8
  6. data/lib/delivery/builders/image_transformation_builder.rb +271 -271
  7. data/lib/delivery/builders/url_builder.rb +120 -117
  8. data/lib/delivery/client/delivery_client.rb +176 -155
  9. data/lib/delivery/client/delivery_query.rb +302 -286
  10. data/lib/delivery/client/request_manager.rb +125 -121
  11. data/lib/delivery/models/content_item.rb +153 -153
  12. data/lib/delivery/models/content_type.rb +41 -41
  13. data/lib/delivery/models/pagination.rb +22 -22
  14. data/lib/delivery/models/taxonomy_group.rb +39 -39
  15. data/lib/delivery/query_parameters/filters.rb +158 -158
  16. data/lib/delivery/query_parameters/parameter_base.rb +46 -46
  17. data/lib/delivery/query_parameters/query_string.rb +78 -78
  18. data/lib/delivery/resolvers/content_link_resolver.rb +102 -102
  19. data/lib/delivery/resolvers/inline_content_item_resolver.rb +75 -75
  20. data/lib/delivery/resolvers/linked_item_resolver.rb +37 -37
  21. data/lib/delivery/responses/delivery_element_response.rb +34 -34
  22. data/lib/delivery/responses/delivery_item_listing_response.rb +54 -54
  23. data/lib/delivery/responses/delivery_item_response.rb +40 -40
  24. data/lib/delivery/responses/delivery_items_feed_response.rb +58 -0
  25. data/lib/delivery/responses/delivery_taxonomy_listing_response.rb +47 -47
  26. data/lib/delivery/responses/delivery_taxonomy_response.rb +33 -33
  27. data/lib/delivery/responses/delivery_type_listing_response.rb +46 -46
  28. data/lib/delivery/responses/delivery_type_response.rb +32 -32
  29. data/lib/delivery/responses/response_base.rb +39 -39
  30. data/lib/delivery/tests/401.json +5 -5
  31. data/lib/delivery/tests/429.json +4 -4
  32. data/lib/delivery/tests/fake_responder.rb +110 -84
  33. data/lib/delivery/tests/filtering/items_gt.json +565 -565
  34. data/lib/delivery/tests/filtering/items_with_count.json +4985 -4985
  35. data/lib/delivery/tests/filtering/multiple.json +282 -282
  36. data/lib/delivery/tests/filtering/pagination_about_us.json +646 -646
  37. data/lib/delivery/tests/generic/items.json +4984 -4984
  38. data/lib/delivery/tests/generic/items/about_us.json +227 -227
  39. data/lib/delivery/tests/generic/items/aeropress_filters.json +138 -138
  40. data/lib/delivery/tests/generic/items/coffee_processing_techniques.json +168 -168
  41. data/lib/delivery/tests/generic/items/empty_rich_text.json +24 -0
  42. data/lib/delivery/tests/generic/items/rich_text_complex_tables.json +81 -0
  43. data/lib/delivery/tests/generic/items/where_does_coffee_come_from_.json +620 -620
  44. data/lib/delivery/tests/generic/taxonomies.json +126 -126
  45. data/lib/delivery/tests/generic/types.json +780 -780
  46. data/lib/delivery/tests/generic/types/brewer/elements/product_status.json +5 -5
  47. data/lib/delivery/tests/items_feed/articles_feed_1.json +39 -0
  48. data/lib/delivery/tests/items_feed/articles_feed_2.json +78 -0
  49. data/lib/delivery/tests/items_feed/articles_feed_3.json +104 -0
  50. data/lib/delivery/version.rb +7 -7
  51. data/lib/kontent-delivery-sdk-ruby.rb +20 -19
  52. metadata +40 -15
@@ -1,6 +1,6 @@
1
- {
2
- "type": "taxonomy",
3
- "name": "Product status",
4
- "taxonomy_group": "product_status",
5
- "codename": "product_status"
1
+ {
2
+ "type": "taxonomy",
3
+ "name": "Product status",
4
+ "taxonomy_group": "product_status",
5
+ "codename": "product_status"
6
6
  }
@@ -0,0 +1,39 @@
1
+ {
2
+ "items": [{
3
+ "system": {
4
+ "id": "b2fea94c-73fd-42ec-a22f-f409878de187",
5
+ "name": "Origins of Arabica Bourbon",
6
+ "codename": "origins_of_arabica_bourbon",
7
+ "language": "en-US",
8
+ "type": "article",
9
+ "sitemap_locations": [],
10
+ "last_modified": "2019-03-27T13:21:49.151Z"
11
+ },
12
+ "elements": {
13
+ "title": {
14
+ "type": "text",
15
+ "name": "Title",
16
+ "value": "Origins of Arabica Bourbon"
17
+ },
18
+ "summary": {
19
+ "type": "text",
20
+ "name": "Summary",
21
+ "value": "This one particular type of coffee, the Arabica Bourbon, is now sold only in Japan. It has been brought back to life by enthusiasts after being almost forgotten for nearly sixty years."
22
+ },
23
+ "personas": {
24
+ "type": "taxonomy",
25
+ "name": "Personas",
26
+ "taxonomy_group": "personas",
27
+ "value": [{
28
+ "name": "Barista",
29
+ "codename": "barista"
30
+ }, {
31
+ "name": "Coffee blogger",
32
+ "codename": "coffee_blogger"
33
+ }
34
+ ]
35
+ }
36
+ }
37
+ }
38
+ ]
39
+ }
@@ -0,0 +1,78 @@
1
+ {
2
+ "items": [{
3
+ "system": {
4
+ "id": "3120ec15-a4a2-47ec-8ccd-c85ac8ac5ba5",
5
+ "name": "Which brewing fits you?",
6
+ "codename": "which_brewing_fits_you_",
7
+ "language": "en-US",
8
+ "type": "article",
9
+ "sitemap_locations": [],
10
+ "last_modified": "2019-03-27T13:24:54.042Z"
11
+ },
12
+ "elements": {
13
+ "title": {
14
+ "type": "text",
15
+ "name": "Title",
16
+ "value": "Which brewing fits you?"
17
+ },
18
+ "summary": {
19
+ "type": "text",
20
+ "name": "Summary",
21
+ "value": "We have put down three procedures with clearly written steps describing the process of making coffee. Read this article to convince yourself that brewing coffee is no science"
22
+ },
23
+ "personas": {
24
+ "type": "taxonomy",
25
+ "name": "Personas",
26
+ "taxonomy_group": "personas",
27
+ "value": [{
28
+ "name": "Coffee lover",
29
+ "codename": "coffee_lover"
30
+ }, {
31
+ "name": "Coffee blogger",
32
+ "codename": "coffee_blogger"
33
+ }, {
34
+ "name": "Barista",
35
+ "codename": "barista"
36
+ }
37
+ ]
38
+ }
39
+ }
40
+ }, {
41
+ "system": {
42
+ "id": "f4b3fc05-e988-4dae-9ac1-a94aba566474",
43
+ "name": "On Roasts",
44
+ "codename": "on_roasts",
45
+ "language": "en-US",
46
+ "type": "article",
47
+ "sitemap_locations": [],
48
+ "last_modified": "2019-03-27T13:21:11.38Z"
49
+ },
50
+ "elements": {
51
+ "title": {
52
+ "type": "text",
53
+ "name": "Title",
54
+ "value": "On Roasts"
55
+ },
56
+ "summary": {
57
+ "type": "text",
58
+ "name": "Summary",
59
+ "value": "Roasting coffee beans can take from 6 to 13 minutes. Different roasting times produce different types of coffee, with varying concentration of caffeine and intensity of the original flavor."
60
+ },
61
+ "personas": {
62
+ "type": "taxonomy",
63
+ "name": "Personas",
64
+ "taxonomy_group": "personas",
65
+ "value": [{
66
+ "name": "Barista",
67
+ "codename": "barista"
68
+ }, {
69
+ "name": "Coffee blogger",
70
+ "codename": "coffee_blogger"
71
+ }
72
+ ]
73
+ }
74
+ }
75
+ }
76
+ ],
77
+ "modular_content": {}
78
+ }
@@ -0,0 +1,104 @@
1
+ {
2
+ "items": [{
3
+ "system": {
4
+ "id": "cf106f4e-30a4-42ef-b313-b8ea3fd3e5c5",
5
+ "name": "Coffee Beverages Explained",
6
+ "codename": "coffee_beverages_explained",
7
+ "language": "en-US",
8
+ "type": "article",
9
+ "sitemap_locations": [],
10
+ "last_modified": "2019-03-27T13:12:58.578Z"
11
+ },
12
+ "elements": {
13
+ "title": {
14
+ "type": "text",
15
+ "name": "Title",
16
+ "value": "Coffee Beverages Explained"
17
+ },
18
+ "summary": {
19
+ "type": "text",
20
+ "name": "Summary",
21
+ "value": "Espresso and filtered coffee are the two main categories of coffee, based on the method of preparation. Learn about individual types of coffee that fall under these categories."
22
+ },
23
+ "personas": {
24
+ "type": "taxonomy",
25
+ "name": "Personas",
26
+ "taxonomy_group": "personas",
27
+ "value": [{
28
+ "name": "Coffee lover",
29
+ "codename": "coffee_lover"
30
+ }
31
+ ]
32
+ }
33
+ }
34
+ }, {
35
+ "system": {
36
+ "id": "117cdfae-52cf-4885-b271-66aef6825612",
37
+ "name": "Coffee processing techniques",
38
+ "codename": "coffee_processing_techniques",
39
+ "language": "en-US",
40
+ "type": "article",
41
+ "sitemap_locations": [],
42
+ "last_modified": "2019-03-27T13:13:35.312Z"
43
+ },
44
+ "elements": {
45
+ "title": {
46
+ "type": "text",
47
+ "name": "Title",
48
+ "value": "Coffee processing techniques"
49
+ },
50
+ "summary": {
51
+ "type": "text",
52
+ "name": "Summary",
53
+ "value": "Learn about the techniques of processing the products of coffee plants. Different methods are used in different parts of the world depending mainly on their weather conditions."
54
+ },
55
+ "personas": {
56
+ "type": "taxonomy",
57
+ "name": "Personas",
58
+ "taxonomy_group": "personas",
59
+ "value": [{
60
+ "name": "Coffee blogger",
61
+ "codename": "coffee_blogger"
62
+ }, {
63
+ "name": "Coffee lover",
64
+ "codename": "coffee_lover"
65
+ }
66
+ ]
67
+ }
68
+ }
69
+ }, {
70
+ "system": {
71
+ "id": "23f71096-fa89-4f59-a3f9-970e970944ec",
72
+ "name": "Donate with us",
73
+ "codename": "donate_with_us",
74
+ "language": "en-US",
75
+ "type": "article",
76
+ "sitemap_locations": [],
77
+ "last_modified": "2019-03-27T13:14:07.384Z"
78
+ },
79
+ "elements": {
80
+ "title": {
81
+ "type": "text",
82
+ "name": "Title",
83
+ "value": "Donate with us"
84
+ },
85
+ "summary": {
86
+ "type": "text",
87
+ "name": "Summary",
88
+ "value": "Dancing Goat regularly donates money to Children in Africa, a foundation helping children with food, accommodation, education, and other essentials. Donate with us and create a better world."
89
+ },
90
+ "personas": {
91
+ "type": "taxonomy",
92
+ "name": "Personas",
93
+ "taxonomy_group": "personas",
94
+ "value": [{
95
+ "name": "Cafe owner",
96
+ "codename": "cafe_owner"
97
+ }
98
+ ]
99
+ }
100
+ }
101
+ }
102
+ ],
103
+ "modular_content": {}
104
+ }
@@ -1,7 +1,7 @@
1
- module Kentico
2
- module Kontent
3
- module Delivery
4
- VERSION = '2.0.12'.freeze
5
- end
6
- end
7
- end
1
+ module Kentico
2
+ module Kontent
3
+ module Delivery
4
+ VERSION = '2.0.19'.freeze
5
+ end
6
+ end
7
+ end
@@ -1,19 +1,20 @@
1
- require File.dirname(__FILE__) + '/delivery/client/delivery_client'
2
- require File.dirname(__FILE__) + '/delivery/client/delivery_query'
3
- require File.dirname(__FILE__) + '/delivery/client/request_manager'
4
- require File.dirname(__FILE__) + '/delivery/models/content_item'
5
- require File.dirname(__FILE__) + '/delivery/models/content_type'
6
- require File.dirname(__FILE__) + '/delivery/models/taxonomy_group'
7
- require File.dirname(__FILE__) + '/delivery/query_parameters/filters'
8
- require File.dirname(__FILE__) + '/delivery/responses/delivery_item_listing_response'
9
- require File.dirname(__FILE__) + '/delivery/responses/delivery_item_response'
10
- require File.dirname(__FILE__) + '/delivery/responses/delivery_type_listing_response'
11
- require File.dirname(__FILE__) + '/delivery/responses/delivery_type_response'
12
- require File.dirname(__FILE__) + '/delivery/responses/delivery_taxonomy_listing_response'
13
- require File.dirname(__FILE__) + '/delivery/responses/delivery_taxonomy_response'
14
- require File.dirname(__FILE__) + '/delivery/responses/delivery_element_response'
15
- require File.dirname(__FILE__) + '/delivery/resolvers/content_link_resolver'
16
- require File.dirname(__FILE__) + '/delivery/resolvers/inline_content_item_resolver'
17
- require File.dirname(__FILE__) + '/delivery/resolvers/linked_item_resolver'
18
- require File.dirname(__FILE__) + '/delivery/builders/image_transformation_builder'
19
- require File.dirname(__FILE__) + '/delivery/tests/fake_responder'
1
+ require File.dirname(__FILE__) + '/delivery/client/delivery_client'
2
+ require File.dirname(__FILE__) + '/delivery/client/delivery_query'
3
+ require File.dirname(__FILE__) + '/delivery/client/request_manager'
4
+ require File.dirname(__FILE__) + '/delivery/models/content_item'
5
+ require File.dirname(__FILE__) + '/delivery/models/content_type'
6
+ require File.dirname(__FILE__) + '/delivery/models/taxonomy_group'
7
+ require File.dirname(__FILE__) + '/delivery/query_parameters/filters'
8
+ require File.dirname(__FILE__) + '/delivery/responses/delivery_item_listing_response'
9
+ require File.dirname(__FILE__) + '/delivery/responses/delivery_item_response'
10
+ require File.dirname(__FILE__) + '/delivery/responses/delivery_type_listing_response'
11
+ require File.dirname(__FILE__) + '/delivery/responses/delivery_type_response'
12
+ require File.dirname(__FILE__) + '/delivery/responses/delivery_taxonomy_listing_response'
13
+ require File.dirname(__FILE__) + '/delivery/responses/delivery_taxonomy_response'
14
+ require File.dirname(__FILE__) + '/delivery/responses/delivery_element_response'
15
+ require File.dirname(__FILE__) + '/delivery/responses/delivery_items_feed_response'
16
+ require File.dirname(__FILE__) + '/delivery/resolvers/content_link_resolver'
17
+ require File.dirname(__FILE__) + '/delivery/resolvers/inline_content_item_resolver'
18
+ require File.dirname(__FILE__) + '/delivery/resolvers/linked_item_resolver'
19
+ require File.dirname(__FILE__) + '/delivery/builders/image_transformation_builder'
20
+ require File.dirname(__FILE__) + '/delivery/tests/fake_responder'
metadata CHANGED
@@ -1,20 +1,23 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kontent-delivery-sdk-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.12
4
+ version: 2.0.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Dugre
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-12-20 00:00:00.000000000 Z
11
+ date: 2021-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dotenv
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.7'
20
+ - - ">="
18
21
  - !ruby/object:Gem::Version
19
22
  version: 2.7.0
20
23
  type: :runtime
@@ -22,6 +25,9 @@ dependencies:
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
27
  - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '2.7'
30
+ - - ">="
25
31
  - !ruby/object:Gem::Version
26
32
  version: 2.7.0
27
33
  - !ruby/object:Gem::Dependency
@@ -30,20 +36,20 @@ dependencies:
30
36
  requirements:
31
37
  - - "~>"
32
38
  - !ruby/object:Gem::Version
33
- version: 1.10.0
39
+ version: '1.11'
34
40
  - - ">="
35
41
  - !ruby/object:Gem::Version
36
- version: 1.8.4
42
+ version: 1.11.0
37
43
  type: :runtime
38
44
  prerelease: false
39
45
  version_requirements: !ruby/object:Gem::Requirement
40
46
  requirements:
41
47
  - - "~>"
42
48
  - !ruby/object:Gem::Version
43
- version: 1.10.0
49
+ version: '1.11'
44
50
  - - ">="
45
51
  - !ruby/object:Gem::Version
46
- version: 1.8.4
52
+ version: 1.11.0
47
53
  - !ruby/object:Gem::Dependency
48
54
  name: rest-client
49
55
  requirement: !ruby/object:Gem::Requirement
@@ -84,42 +90,54 @@ dependencies:
84
90
  requirements:
85
91
  - - "~>"
86
92
  - !ruby/object:Gem::Version
87
- version: '10.0'
93
+ version: '12.3'
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: 12.3.3
88
97
  type: :development
89
98
  prerelease: false
90
99
  version_requirements: !ruby/object:Gem::Requirement
91
100
  requirements:
92
101
  - - "~>"
93
102
  - !ruby/object:Gem::Version
94
- version: '10.0'
103
+ version: '12.3'
104
+ - - ">="
105
+ - !ruby/object:Gem::Version
106
+ version: 12.3.3
95
107
  - !ruby/object:Gem::Dependency
96
108
  name: rspec
97
109
  requirement: !ruby/object:Gem::Requirement
98
110
  requirements:
99
111
  - - "~>"
100
112
  - !ruby/object:Gem::Version
101
- version: '3.0'
113
+ version: '3.8'
102
114
  type: :development
103
115
  prerelease: false
104
116
  version_requirements: !ruby/object:Gem::Requirement
105
117
  requirements:
106
118
  - - "~>"
107
119
  - !ruby/object:Gem::Version
108
- version: '3.0'
120
+ version: '3.8'
109
121
  - !ruby/object:Gem::Dependency
110
122
  name: simplecov
111
123
  requirement: !ruby/object:Gem::Requirement
112
124
  requirements:
113
- - - ">="
125
+ - - '='
114
126
  - !ruby/object:Gem::Version
115
- version: '0'
127
+ version: 0.17.1
128
+ - - "<"
129
+ - !ruby/object:Gem::Version
130
+ version: '0.18'
116
131
  type: :development
117
132
  prerelease: false
118
133
  version_requirements: !ruby/object:Gem::Requirement
119
134
  requirements:
120
- - - ">="
135
+ - - '='
136
+ - !ruby/object:Gem::Version
137
+ version: 0.17.1
138
+ - - "<"
121
139
  - !ruby/object:Gem::Version
122
- version: '0'
140
+ version: '0.18'
123
141
  description: Kentico Kontent Delivery SDK for Ruby
124
142
  email:
125
143
  - EricD@kentico.com
@@ -149,6 +167,7 @@ files:
149
167
  - lib/delivery/responses/delivery_element_response.rb
150
168
  - lib/delivery/responses/delivery_item_listing_response.rb
151
169
  - lib/delivery/responses/delivery_item_response.rb
170
+ - lib/delivery/responses/delivery_items_feed_response.rb
152
171
  - lib/delivery/responses/delivery_taxonomy_listing_response.rb
153
172
  - lib/delivery/responses/delivery_taxonomy_response.rb
154
173
  - lib/delivery/responses/delivery_type_listing_response.rb
@@ -165,10 +184,15 @@ files:
165
184
  - lib/delivery/tests/generic/items/about_us.json
166
185
  - lib/delivery/tests/generic/items/aeropress_filters.json
167
186
  - lib/delivery/tests/generic/items/coffee_processing_techniques.json
187
+ - lib/delivery/tests/generic/items/empty_rich_text.json
188
+ - lib/delivery/tests/generic/items/rich_text_complex_tables.json
168
189
  - lib/delivery/tests/generic/items/where_does_coffee_come_from_.json
169
190
  - lib/delivery/tests/generic/taxonomies.json
170
191
  - lib/delivery/tests/generic/types.json
171
192
  - lib/delivery/tests/generic/types/brewer/elements/product_status.json
193
+ - lib/delivery/tests/items_feed/articles_feed_1.json
194
+ - lib/delivery/tests/items_feed/articles_feed_2.json
195
+ - lib/delivery/tests/items_feed/articles_feed_3.json
172
196
  - lib/delivery/version.rb
173
197
  - lib/kontent-delivery-sdk-ruby.rb
174
198
  homepage: https://github.com/Kentico/kontent-delivery-sdk-ruby
@@ -194,7 +218,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
194
218
  - !ruby/object:Gem::Version
195
219
  version: '0'
196
220
  requirements: []
197
- rubygems_version: 3.1.2
221
+ rubyforge_project:
222
+ rubygems_version: 2.7.6
198
223
  signing_key:
199
224
  specification_version: 4
200
225
  summary: Kentico Kontent Delivery SDK for Ruby