delivery-sdk-ruby 2.0.2 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/delivery/client/delivery_client.rb +1 -1
- data/lib/delivery/client/delivery_query.rb +2 -2
- data/lib/delivery/query_parameters/filters.rb +1 -1
- data/lib/delivery/query_parameters/parameter_base.rb +1 -1
- data/lib/delivery/query_parameters/query_string.rb +1 -1
- data/lib/delivery/tests/filtering/items_gt.json +4 -4
- data/lib/delivery/tests/filtering/multiple.json +2 -2
- data/lib/delivery/tests/filtering/pagination_about_us.json +3 -3
- data/lib/delivery/tests/generic/items.json +25 -25
- data/lib/delivery/tests/generic/items/about_us.json +1 -1
- data/lib/delivery/tests/generic/items/aeropress_filters.json +1 -1
- data/lib/delivery/tests/generic/items/coffee_processing_techniques.json +1 -1
- data/lib/delivery/tests/generic/items/where_does_coffee_come_from_.json +4 -4
- data/lib/delivery/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a7dbaddcc37b0a2aa9cfa1e878268dc1b6a0e4a531311d55df21637fd894cc2
|
4
|
+
data.tar.gz: 0a7279fc59185d249fa476a0fd18932c5c303c91f53467f24b262bc576379695
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc4b6b840685453ebec26f98fd9f386c8ca1cd143ef90d7aa32d1e157c5f22c63edc419c384b19ae0dcdd4b6daba3ea5e60594a5b9f5b886dde38fe6f21cdb11
|
7
|
+
data.tar.gz: f66bbd1e8992b1ed6a69d38ab1aea40ba32f1a51f1ce0d1c09c0d010e695270402f55394f93a3140d3f800d08d4446b36f4b28c904aaea26cb64c3498b872546
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
[![Build Status](https://api.travis-ci.com/Kentico/kontent-delivery-sdk-ruby.svg?branch=master)](https://travis-ci.com/Kentico/kontent-delivery-sdk-ruby)
|
2
2
|
[![Join the chat at https://kentico-community.slack.com](https://img.shields.io/badge/join-slack-E6186D.svg)](https://kentico-community.slack.com)
|
3
|
-
[![Stack Overflow](https://img.shields.io/badge/Stack%20Overflow-ASK%20NOW-FE7A16.svg?logo=stackoverflow&logoColor=white)](https://stackoverflow.com/tags/kentico-
|
3
|
+
[![Stack Overflow](https://img.shields.io/badge/Stack%20Overflow-ASK%20NOW-FE7A16.svg?logo=stackoverflow&logoColor=white)](https://stackoverflow.com/tags/kentico-kontent)
|
4
4
|
[![Version](https://img.shields.io/gem/v/kontent-delivery-sdk-ruby.svg?style=flat)](https://rubygems.org/gems/kontent-delivery-sdk-ruby)
|
5
5
|
[![Maintainability](https://api.codeclimate.com/v1/badges/b2e3fae28a2b2601d815/maintainability)](https://codeclimate.com/github/Kentico/kontent-delivery-sdk-ruby/maintainability)
|
6
6
|
[![Test coverage](https://api.codeclimate.com/v1/badges/b2e3fae28a2b2601d815/test_coverage)](https://codeclimate.com/github/Kentico/delivery-sdk-ruby/test_coverage)
|
@@ -9,7 +9,7 @@
|
|
9
9
|
|
10
10
|
![Banner](https://github.com/Kentico/kontent-delivery-sdk-ruby/blob/master/banner.png)
|
11
11
|
|
12
|
-
The Delivery Ruby SDK can be used in Ruby/Rails projects to retrieve content from Kentico
|
12
|
+
The Delivery Ruby SDK can be used in Ruby/Rails projects to retrieve content from Kentico Kontent. This is a community project and not an official Kentico SDK. If you find a bug in the SDK or have a feature request, please submit a GitHub issue.
|
13
13
|
|
14
14
|
See [How to setup a development environment on Windows](https://github.com/Kentico/kontent-delivery-sdk-ruby/wiki/How-to-setup-development-environment-on-Windows) for local development.
|
15
15
|
|
@@ -23,7 +23,7 @@ class ApplicationController < ActionController::Base
|
|
23
23
|
PROJECT_ID = '<your-project-id>'.freeze
|
24
24
|
```
|
25
25
|
|
26
|
-
If you don't have the sample project installed in Kentico
|
26
|
+
If you don't have the sample project installed in Kentico Kontent, you can generate a new project [here](https://app.kontent.ai/sample-project-generator). Save the file, then open a terminal in the `/dancing_goat` directory and run the following commands:
|
27
27
|
|
28
28
|
```
|
29
29
|
bundle install
|
@@ -11,7 +11,7 @@ module Kentico
|
|
11
11
|
QUERY_TYPE_TAXONOMIES = 'QUERY_TYPE_TAXONOMIES'.freeze
|
12
12
|
QUERY_TYPE_ELEMENT = 'QUERY_TYPE_ELEMENT'.freeze
|
13
13
|
|
14
|
-
# Executes requests against the Kentico
|
14
|
+
# Executes requests against the Kentico Kontent Delivery API.
|
15
15
|
class DeliveryClient
|
16
16
|
attr_accessor :use_preview
|
17
17
|
|
@@ -5,7 +5,7 @@ require 'delivery/version'
|
|
5
5
|
module Kentico
|
6
6
|
module Kontent
|
7
7
|
module Delivery
|
8
|
-
# Responsible for executing REST requests to Kentico
|
8
|
+
# Responsible for executing REST requests to Kentico Kontent.
|
9
9
|
class DeliveryQuery
|
10
10
|
ERROR_PREVIEW = 'Preview is enabled for the query, but the key is null. '\
|
11
11
|
'You can set the preview_key attribute of the query, or '\
|
@@ -195,7 +195,7 @@ module Kentico
|
|
195
195
|
end
|
196
196
|
|
197
197
|
# Allows the request to bypass caching and return the latest content
|
198
|
-
# directly from Kentico
|
198
|
+
# directly from Kentico Kontent.
|
199
199
|
# See https://github.com/Kentico/kontent-delivery-sdk-ruby#requesting-the-latest-content
|
200
200
|
#
|
201
201
|
# * *Returns*:
|
@@ -11,7 +11,7 @@ module Kentico
|
|
11
11
|
#
|
12
12
|
# * *Args*:
|
13
13
|
# - *key* (+string+) The field to filter upon
|
14
|
-
# - *operator* (+string+) The Kentico
|
14
|
+
# - *operator* (+string+) The Kentico Kontent filter being applied to the field, in brackets
|
15
15
|
# - *values* (+Object+) One or more values which will appear as the value of the query string parameter
|
16
16
|
def initialize(key, operator, values)
|
17
17
|
super(key, operator, values)
|
@@ -12,7 +12,7 @@ module Kentico
|
|
12
12
|
#
|
13
13
|
# * *Args*:
|
14
14
|
# - *key* (+string+) The field to filter upon
|
15
|
-
# - *operator* (+string+) The Kentico
|
15
|
+
# - *operator* (+string+) The Kentico Kontent filter being applied to the field, in brackets
|
16
16
|
# - *values* (+Object+) One or more values which will appear as the value of the query string parameter
|
17
17
|
def initialize(key, operator, values)
|
18
18
|
self.key = key
|
@@ -15,7 +15,7 @@ module Kentico
|
|
15
15
|
# * *Args*:
|
16
16
|
# - *param* (+Object+) Either a string representing the key for the parameter, or a complete Kentico::Kontent::Delivery::QueryParameters::ParameterBase object
|
17
17
|
# - *values* (+string+) A string or array of strings representing the values for the parameter
|
18
|
-
# - *operator* (+string+) Kentico
|
18
|
+
# - *operator* (+string+) Kentico Kontent filtering parameter, placed after the key, before the equal sign
|
19
19
|
def set_param(param, values = '', operator = '')
|
20
20
|
parameter_base =
|
21
21
|
if param.is_a? String
|
@@ -120,7 +120,7 @@
|
|
120
120
|
"metadata__twitter_creator": {
|
121
121
|
"type": "text",
|
122
122
|
"name": "twitter:creator",
|
123
|
-
"value": "@
|
123
|
+
"value": "@kenticokontent"
|
124
124
|
},
|
125
125
|
"metadata__twitter_title": {
|
126
126
|
"type": "text",
|
@@ -256,7 +256,7 @@
|
|
256
256
|
"metadata__twitter_creator": {
|
257
257
|
"type": "text",
|
258
258
|
"name": "twitter:creator",
|
259
|
-
"value": "@
|
259
|
+
"value": "@kenticokontent"
|
260
260
|
},
|
261
261
|
"metadata__twitter_title": {
|
262
262
|
"type": "text",
|
@@ -392,7 +392,7 @@
|
|
392
392
|
"metadata__twitter_creator": {
|
393
393
|
"type": "text",
|
394
394
|
"name": "twitter:creator",
|
395
|
-
"value": "@
|
395
|
+
"value": "@kenticokontent"
|
396
396
|
},
|
397
397
|
"metadata__twitter_title": {
|
398
398
|
"type": "text",
|
@@ -528,7 +528,7 @@
|
|
528
528
|
"metadata__twitter_creator": {
|
529
529
|
"type": "text",
|
530
530
|
"name": "twitter:creator",
|
531
|
-
"value": "@
|
531
|
+
"value": "@kenticokontent"
|
532
532
|
},
|
533
533
|
"metadata__twitter_title": {
|
534
534
|
"type": "text",
|
@@ -109,7 +109,7 @@
|
|
109
109
|
"metadata__twitter_creator": {
|
110
110
|
"type": "text",
|
111
111
|
"name": "twitter:creator",
|
112
|
-
"value": "@
|
112
|
+
"value": "@kenticokontent"
|
113
113
|
},
|
114
114
|
"metadata__twitter_title": {
|
115
115
|
"type": "text",
|
@@ -245,7 +245,7 @@
|
|
245
245
|
"metadata__twitter_creator": {
|
246
246
|
"type": "text",
|
247
247
|
"name": "twitter:creator",
|
248
|
-
"value": "@
|
248
|
+
"value": "@kenticokontent"
|
249
249
|
},
|
250
250
|
"metadata__twitter_title": {
|
251
251
|
"type": "text",
|
@@ -68,7 +68,7 @@
|
|
68
68
|
"metadata__twitter_creator": {
|
69
69
|
"type": "text",
|
70
70
|
"name": "twitter:creator",
|
71
|
-
"value": "@
|
71
|
+
"value": "@kenticokontent"
|
72
72
|
},
|
73
73
|
"metadata__twitter_title": {
|
74
74
|
"type": "text",
|
@@ -215,7 +215,7 @@
|
|
215
215
|
"metadata__twitter_creator": {
|
216
216
|
"type": "text",
|
217
217
|
"name": "twitter:creator",
|
218
|
-
"value": "@
|
218
|
+
"value": "@kenticokontent"
|
219
219
|
},
|
220
220
|
"metadata__twitter_title": {
|
221
221
|
"type": "text",
|
@@ -351,7 +351,7 @@
|
|
351
351
|
"metadata__twitter_creator": {
|
352
352
|
"type": "text",
|
353
353
|
"name": "twitter:creator",
|
354
|
-
"value": "@
|
354
|
+
"value": "@kenticokontent"
|
355
355
|
},
|
356
356
|
"metadata__twitter_title": {
|
357
357
|
"type": "text",
|
@@ -68,7 +68,7 @@
|
|
68
68
|
"metadata__twitter_creator": {
|
69
69
|
"type": "text",
|
70
70
|
"name": "twitter:creator",
|
71
|
-
"value": "@
|
71
|
+
"value": "@kenticokontent"
|
72
72
|
},
|
73
73
|
"metadata__twitter_title": {
|
74
74
|
"type": "text",
|
@@ -215,7 +215,7 @@
|
|
215
215
|
"metadata__twitter_creator": {
|
216
216
|
"type": "text",
|
217
217
|
"name": "twitter:creator",
|
218
|
-
"value": "@
|
218
|
+
"value": "@kenticokontent"
|
219
219
|
},
|
220
220
|
"metadata__twitter_title": {
|
221
221
|
"type": "text",
|
@@ -351,7 +351,7 @@
|
|
351
351
|
"metadata__twitter_creator": {
|
352
352
|
"type": "text",
|
353
353
|
"name": "twitter:creator",
|
354
|
-
"value": "@
|
354
|
+
"value": "@kenticokontent"
|
355
355
|
},
|
356
356
|
"metadata__twitter_title": {
|
357
357
|
"type": "text",
|
@@ -641,7 +641,7 @@
|
|
641
641
|
"metadata__twitter_creator": {
|
642
642
|
"type": "text",
|
643
643
|
"name": "twitter:creator",
|
644
|
-
"value": "@
|
644
|
+
"value": "@kenticokontent"
|
645
645
|
},
|
646
646
|
"metadata__twitter_title": {
|
647
647
|
"type": "text",
|
@@ -792,7 +792,7 @@
|
|
792
792
|
"metadata__twitter_creator": {
|
793
793
|
"type": "text",
|
794
794
|
"name": "twitter:creator",
|
795
|
-
"value": "@
|
795
|
+
"value": "@kenticokontent"
|
796
796
|
},
|
797
797
|
"metadata__twitter_title": {
|
798
798
|
"type": "text",
|
@@ -958,7 +958,7 @@
|
|
958
958
|
"metadata__twitter_creator": {
|
959
959
|
"type": "text",
|
960
960
|
"name": "twitter:creator",
|
961
|
-
"value": "@
|
961
|
+
"value": "@kenticokontent"
|
962
962
|
},
|
963
963
|
"metadata__twitter_title": {
|
964
964
|
"type": "text",
|
@@ -1106,7 +1106,7 @@
|
|
1106
1106
|
"metadata__twitter_creator": {
|
1107
1107
|
"type": "text",
|
1108
1108
|
"name": "twitter:creator",
|
1109
|
-
"value": "@
|
1109
|
+
"value": "@kenticokontent"
|
1110
1110
|
},
|
1111
1111
|
"metadata__twitter_title": {
|
1112
1112
|
"type": "text",
|
@@ -1242,7 +1242,7 @@
|
|
1242
1242
|
"metadata__twitter_creator": {
|
1243
1243
|
"type": "text",
|
1244
1244
|
"name": "twitter:creator",
|
1245
|
-
"value": "@
|
1245
|
+
"value": "@kenticokontent"
|
1246
1246
|
},
|
1247
1247
|
"metadata__twitter_title": {
|
1248
1248
|
"type": "text",
|
@@ -1378,7 +1378,7 @@
|
|
1378
1378
|
"metadata__twitter_creator": {
|
1379
1379
|
"type": "text",
|
1380
1380
|
"name": "twitter:creator",
|
1381
|
-
"value": "@
|
1381
|
+
"value": "@kenticokontent"
|
1382
1382
|
},
|
1383
1383
|
"metadata__twitter_title": {
|
1384
1384
|
"type": "text",
|
@@ -1520,7 +1520,7 @@
|
|
1520
1520
|
"metadata__twitter_creator": {
|
1521
1521
|
"type": "text",
|
1522
1522
|
"name": "twitter:creator",
|
1523
|
-
"value": "@
|
1523
|
+
"value": "@kenticokontent"
|
1524
1524
|
},
|
1525
1525
|
"metadata__twitter_title": {
|
1526
1526
|
"type": "text",
|
@@ -1650,7 +1650,7 @@
|
|
1650
1650
|
"metadata__twitter_creator": {
|
1651
1651
|
"type": "text",
|
1652
1652
|
"name": "twitter:creator",
|
1653
|
-
"value": "@
|
1653
|
+
"value": "@kenticokontent"
|
1654
1654
|
},
|
1655
1655
|
"metadata__twitter_title": {
|
1656
1656
|
"type": "text",
|
@@ -1985,7 +1985,7 @@
|
|
1985
1985
|
"metadata__twitter_creator": {
|
1986
1986
|
"type": "text",
|
1987
1987
|
"name": "twitter:creator",
|
1988
|
-
"value": "@
|
1988
|
+
"value": "@kenticokontent"
|
1989
1989
|
},
|
1990
1990
|
"metadata__twitter_title": {
|
1991
1991
|
"type": "text",
|
@@ -2396,7 +2396,7 @@
|
|
2396
2396
|
"metadata__twitter_creator": {
|
2397
2397
|
"type": "text",
|
2398
2398
|
"name": "twitter:creator",
|
2399
|
-
"value": "@
|
2399
|
+
"value": "@kenticokontent"
|
2400
2400
|
},
|
2401
2401
|
"metadata__twitter_title": {
|
2402
2402
|
"type": "text",
|
@@ -2548,7 +2548,7 @@
|
|
2548
2548
|
"metadata__twitter_creator": {
|
2549
2549
|
"type": "text",
|
2550
2550
|
"name": "twitter:creator",
|
2551
|
-
"value": "@
|
2551
|
+
"value": "@kenticokontent"
|
2552
2552
|
},
|
2553
2553
|
"metadata__twitter_title": {
|
2554
2554
|
"type": "text",
|
@@ -2772,7 +2772,7 @@
|
|
2772
2772
|
"metadata__twitter_creator": {
|
2773
2773
|
"type": "text",
|
2774
2774
|
"name": "twitter:creator",
|
2775
|
-
"value": "@
|
2775
|
+
"value": "@kenticokontent"
|
2776
2776
|
},
|
2777
2777
|
"metadata__twitter_title": {
|
2778
2778
|
"type": "text",
|
@@ -2908,7 +2908,7 @@
|
|
2908
2908
|
"metadata__twitter_creator": {
|
2909
2909
|
"type": "text",
|
2910
2910
|
"name": "twitter:creator",
|
2911
|
-
"value": "@
|
2911
|
+
"value": "@kenticokontent"
|
2912
2912
|
},
|
2913
2913
|
"metadata__twitter_title": {
|
2914
2914
|
"type": "text",
|
@@ -3097,7 +3097,7 @@
|
|
3097
3097
|
"metadata__twitter_creator": {
|
3098
3098
|
"type": "text",
|
3099
3099
|
"name": "twitter:creator",
|
3100
|
-
"value": "@
|
3100
|
+
"value": "@kenticokontent"
|
3101
3101
|
},
|
3102
3102
|
"metadata__twitter_title": {
|
3103
3103
|
"type": "text",
|
@@ -3260,7 +3260,7 @@
|
|
3260
3260
|
"metadata__twitter_creator": {
|
3261
3261
|
"type": "text",
|
3262
3262
|
"name": "twitter:creator",
|
3263
|
-
"value": "@
|
3263
|
+
"value": "@kenticokontent"
|
3264
3264
|
},
|
3265
3265
|
"metadata__twitter_title": {
|
3266
3266
|
"type": "text",
|
@@ -3409,7 +3409,7 @@
|
|
3409
3409
|
"metadata__twitter_creator": {
|
3410
3410
|
"type": "text",
|
3411
3411
|
"name": "twitter:creator",
|
3412
|
-
"value": "@
|
3412
|
+
"value": "@kenticokontent"
|
3413
3413
|
},
|
3414
3414
|
"metadata__twitter_title": {
|
3415
3415
|
"type": "text",
|
@@ -3688,7 +3688,7 @@
|
|
3688
3688
|
"metadata__twitter_creator": {
|
3689
3689
|
"type": "text",
|
3690
3690
|
"name": "twitter:creator",
|
3691
|
-
"value": "@
|
3691
|
+
"value": "@kenticokontent"
|
3692
3692
|
},
|
3693
3693
|
"metadata__twitter_title": {
|
3694
3694
|
"type": "text",
|
@@ -3854,7 +3854,7 @@
|
|
3854
3854
|
"metadata__twitter_creator": {
|
3855
3855
|
"type": "text",
|
3856
3856
|
"name": "twitter:creator",
|
3857
|
-
"value": "@
|
3857
|
+
"value": "@kenticokontent"
|
3858
3858
|
},
|
3859
3859
|
"metadata__twitter_title": {
|
3860
3860
|
"type": "text",
|
@@ -4040,7 +4040,7 @@
|
|
4040
4040
|
"metadata__twitter_creator": {
|
4041
4041
|
"type": "text",
|
4042
4042
|
"name": "twitter:creator",
|
4043
|
-
"value": "@
|
4043
|
+
"value": "@kenticokontent"
|
4044
4044
|
},
|
4045
4045
|
"metadata__twitter_title": {
|
4046
4046
|
"type": "text",
|
@@ -4547,7 +4547,7 @@
|
|
4547
4547
|
"metadata__twitter_creator": {
|
4548
4548
|
"type": "text",
|
4549
4549
|
"name": "twitter:creator",
|
4550
|
-
"value": "@
|
4550
|
+
"value": "@kenticokontent"
|
4551
4551
|
},
|
4552
4552
|
"metadata__twitter_title": {
|
4553
4553
|
"type": "text",
|
@@ -4699,7 +4699,7 @@
|
|
4699
4699
|
"metadata__twitter_creator": {
|
4700
4700
|
"type": "text",
|
4701
4701
|
"name": "twitter:creator",
|
4702
|
-
"value": "@
|
4702
|
+
"value": "@kenticokontent"
|
4703
4703
|
},
|
4704
4704
|
"metadata__twitter_title": {
|
4705
4705
|
"type": "text",
|
@@ -4948,7 +4948,7 @@
|
|
4948
4948
|
"metadata__twitter_creator": {
|
4949
4949
|
"type": "text",
|
4950
4950
|
"name": "twitter:creator",
|
4951
|
-
"value": "@
|
4951
|
+
"value": "@kenticokontent"
|
4952
4952
|
},
|
4953
4953
|
"metadata__twitter_title": {
|
4954
4954
|
"type": "text",
|
@@ -133,7 +133,7 @@
|
|
133
133
|
"metadata__twitter_creator": {
|
134
134
|
"type": "text",
|
135
135
|
"name": "twitter:creator",
|
136
|
-
"value": "@
|
136
|
+
"value": "@kenticokontent"
|
137
137
|
},
|
138
138
|
"metadata__twitter_title": {
|
139
139
|
"type": "text",
|
@@ -283,7 +283,7 @@
|
|
283
283
|
"metadata__twitter_creator": {
|
284
284
|
"type": "text",
|
285
285
|
"name": "twitter:creator",
|
286
|
-
"value": "@
|
286
|
+
"value": "@kenticokontent"
|
287
287
|
},
|
288
288
|
"metadata__twitter_title": {
|
289
289
|
"type": "text",
|
@@ -438,7 +438,7 @@
|
|
438
438
|
"metadata__twitter_creator": {
|
439
439
|
"type": "text",
|
440
440
|
"name": "twitter:creator",
|
441
|
-
"value": "@
|
441
|
+
"value": "@kenticokontent"
|
442
442
|
},
|
443
443
|
"metadata__twitter_title": {
|
444
444
|
"type": "text",
|
@@ -590,7 +590,7 @@
|
|
590
590
|
"metadata__twitter_creator": {
|
591
591
|
"type": "text",
|
592
592
|
"name": "twitter:creator",
|
593
|
-
"value": "@
|
593
|
+
"value": "@kenticokontent"
|
594
594
|
},
|
595
595
|
"metadata__twitter_title": {
|
596
596
|
"type": "text",
|
data/lib/delivery/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: delivery-sdk-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.3
|
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-09-
|
11
|
+
date: 2019-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dotenv
|