storyblok 3.1.0 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +3 -0
  3. data/Gemfile +1 -1
  4. data/lib/storyblok/client.rb +18 -4
  5. data/lib/storyblok/version.rb +1 -1
  6. metadata +2 -31
  7. data/Gemfile.lock +0 -128
  8. data/coverage/.last_run.json +0 -5
  9. data/coverage/.resultset.json +0 -547
  10. data/coverage/.resultset.json.lock +0 -0
  11. data/coverage/assets/0.10.2/application.css +0 -799
  12. data/coverage/assets/0.10.2/application.js +0 -1707
  13. data/coverage/assets/0.10.2/colorbox/border.png +0 -0
  14. data/coverage/assets/0.10.2/colorbox/controls.png +0 -0
  15. data/coverage/assets/0.10.2/colorbox/loading.gif +0 -0
  16. data/coverage/assets/0.10.2/colorbox/loading_background.png +0 -0
  17. data/coverage/assets/0.10.2/favicon_green.png +0 -0
  18. data/coverage/assets/0.10.2/favicon_red.png +0 -0
  19. data/coverage/assets/0.10.2/favicon_yellow.png +0 -0
  20. data/coverage/assets/0.10.2/loading.gif +0 -0
  21. data/coverage/assets/0.10.2/magnify.png +0 -0
  22. data/coverage/assets/0.10.2/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  23. data/coverage/assets/0.10.2/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  24. data/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  25. data/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  26. data/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  27. data/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  28. data/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  29. data/coverage/assets/0.10.2/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  30. data/coverage/assets/0.10.2/smoothness/images/ui-icons_222222_256x240.png +0 -0
  31. data/coverage/assets/0.10.2/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
  32. data/coverage/assets/0.10.2/smoothness/images/ui-icons_454545_256x240.png +0 -0
  33. data/coverage/assets/0.10.2/smoothness/images/ui-icons_888888_256x240.png +0 -0
  34. data/coverage/assets/0.10.2/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
  35. data/coverage/index.html +0 -3380
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fd63f68ec8b4a15eb75df4240e3ab65117e44bf4f149d81814fd019f919d2b3f
4
- data.tar.gz: 5de614478e045a878c41755fd342798860d8980d492687fd904dae34a94d5f34
3
+ metadata.gz: 63796aff8477f2b79ef4324fba6b7f8047afc427d40fdb94bc654da62104b233
4
+ data.tar.gz: 59a2d5e72ab9f5ed341517e6699f1f91724b6e1195a91fcb1624e2781961493e
5
5
  SHA512:
6
- metadata.gz: c6ba6fa2345e29b5a9fc8d23bdbac78a89a60322dca1e7a578c7e74e3ea487d94ffd3f5f5218ed3efd708d918a07f2db54a20d509a39977012fc068528542b6c
7
- data.tar.gz: e9774ef478fa2429a50e2c41fc4193c54404f18ed65b1bdb4863a42ede67b38193bf400670bd8e49c8d8bc4ff51f68979ef0cca5f4c66af46e9fe5f2bf322c53
6
+ metadata.gz: 36835f923209b8ee31ad737899676f3e380dfdad681b1cdb748dc096df910b14dcdf0a344ef2bca4bb41cc9eb5d3949e4adfac33e4c8dbf8d7ab5f4b437af7cb
7
+ data.tar.gz: 36fcccbf5de2048faf484c30c3157463c229cf1f03d5a847816611e43267ea1aeb3e4c8bd5898584562091a288acfb70b2ea088d015fa81848ddd0187d240cdf
data/.gitignore CHANGED
@@ -1,3 +1,6 @@
1
+ # Ignore bundler config.
2
+ /.bundle
3
+
1
4
  pkg
2
5
  doc/
3
6
  .yardoc/
data/Gemfile CHANGED
@@ -2,7 +2,7 @@ source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
4
 
5
- gem "redis"
5
+ gem "redis", "~> 4.4.0"
6
6
  gem "storyblok-richtext-renderer"
7
7
 
8
8
  gem "rubocop", require: false
@@ -40,9 +40,15 @@ module Storyblok
40
40
  validate_configuration!
41
41
 
42
42
  if configuration[:oauth_token]
43
- @rest_client = RestClient::Resource.new(base_url, :headers => {
44
- :authorization => configuration[:oauth_token]
45
- })
43
+ @configuration[:api_version] = 1
44
+ @rest_client = RestClient::Resource.new(
45
+ base_url,
46
+ headers: {
47
+ authorization: configuration[:oauth_token],
48
+ 'SB-Agent-Version': Storyblok::VERSION,
49
+ 'SB-Agent': 'SB-RB'
50
+ }
51
+ )
46
52
  end
47
53
 
48
54
  @renderer = Richtext::HtmlRenderer.new
@@ -232,7 +238,15 @@ module Storyblok
232
238
  retries_left = 3
233
239
 
234
240
  begin
235
- res = RestClient.get "#{endpoint}?#{query_string}"
241
+ # rubocop:disable Lint/UselessAssignment
242
+ res = RestClient.get(
243
+ "#{endpoint}?#{query_string}",
244
+ headers={
245
+ 'SB-Agent-Version': Storyblok::VERSION,
246
+ 'SB-Agent': 'SB-RB'
247
+ }
248
+ )
249
+ # rubocop:enable Lint/UselessAssignment
236
250
  rescue RestClient::TooManyRequests
237
251
  if retries_left != 0
238
252
  retries_left -= 1
@@ -1,4 +1,4 @@
1
1
  module Storyblok
2
2
  # Gem Version
3
- VERSION = "3.1.0"
3
+ VERSION = "3.2.0"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: storyblok
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Storyblok (Alexander Feiglstorfer)
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-02 00:00:00.000000000 Z
11
+ date: 2023-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -147,36 +147,7 @@ files:
147
147
  - ".rubocop_strict.yml"
148
148
  - ".rubocop_todo.yml"
149
149
  - Gemfile
150
- - Gemfile.lock
151
150
  - README.md
152
- - coverage/.last_run.json
153
- - coverage/.resultset.json
154
- - coverage/.resultset.json.lock
155
- - coverage/assets/0.10.2/application.css
156
- - coverage/assets/0.10.2/application.js
157
- - coverage/assets/0.10.2/colorbox/border.png
158
- - coverage/assets/0.10.2/colorbox/controls.png
159
- - coverage/assets/0.10.2/colorbox/loading.gif
160
- - coverage/assets/0.10.2/colorbox/loading_background.png
161
- - coverage/assets/0.10.2/favicon_green.png
162
- - coverage/assets/0.10.2/favicon_red.png
163
- - coverage/assets/0.10.2/favicon_yellow.png
164
- - coverage/assets/0.10.2/loading.gif
165
- - coverage/assets/0.10.2/magnify.png
166
- - coverage/assets/0.10.2/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png
167
- - coverage/assets/0.10.2/smoothness/images/ui-bg_flat_75_ffffff_40x100.png
168
- - coverage/assets/0.10.2/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
169
- - coverage/assets/0.10.2/smoothness/images/ui-bg_glass_65_ffffff_1x400.png
170
- - coverage/assets/0.10.2/smoothness/images/ui-bg_glass_75_dadada_1x400.png
171
- - coverage/assets/0.10.2/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png
172
- - coverage/assets/0.10.2/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png
173
- - coverage/assets/0.10.2/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png
174
- - coverage/assets/0.10.2/smoothness/images/ui-icons_222222_256x240.png
175
- - coverage/assets/0.10.2/smoothness/images/ui-icons_2e83ff_256x240.png
176
- - coverage/assets/0.10.2/smoothness/images/ui-icons_454545_256x240.png
177
- - coverage/assets/0.10.2/smoothness/images/ui-icons_888888_256x240.png
178
- - coverage/assets/0.10.2/smoothness/images/ui-icons_cd0a0a_256x240.png
179
- - coverage/index.html
180
151
  - examples/cache.rb
181
152
  - examples/example_queries.rb
182
153
  - examples/management_api.rb
data/Gemfile.lock DELETED
@@ -1,128 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- storyblok (3.0.1)
5
- rest-client (>= 1.8.0, < 3)
6
- storyblok-richtext-renderer (>= 0.0.4, < 1)
7
-
8
- GEM
9
- remote: https://rubygems.org/
10
- specs:
11
- activesupport (6.0.4.7)
12
- concurrent-ruby (~> 1.0, >= 1.0.2)
13
- i18n (>= 0.7, < 2)
14
- minitest (~> 5.1)
15
- tzinfo (~> 1.1)
16
- zeitwerk (~> 2.2, >= 2.2.2)
17
- addressable (2.8.0)
18
- public_suffix (>= 2.0.2, < 5.0)
19
- ast (2.4.1)
20
- coderay (1.1.3)
21
- concurrent-ruby (1.1.9)
22
- crack (0.4.5)
23
- rexml
24
- diff-lcs (1.4.4)
25
- docile (1.4.0)
26
- domain_name (0.5.20190701)
27
- unf (>= 0.0.5, < 1.0.0)
28
- hashdiff (1.0.1)
29
- http-accept (1.7.0)
30
- http-cookie (1.0.4)
31
- domain_name (~> 0.5)
32
- i18n (1.10.0)
33
- concurrent-ruby (~> 1.0)
34
- jaro_winkler (1.5.4)
35
- json (2.6.1)
36
- method_source (1.0.0)
37
- mime-types (3.4.1)
38
- mime-types-data (~> 3.2015)
39
- mime-types-data (3.2022.0105)
40
- minitest (5.15.0)
41
- netrc (0.11.0)
42
- parallel (1.19.2)
43
- parser (2.7.1.4)
44
- ast (~> 2.4.1)
45
- pry (0.13.1)
46
- coderay (~> 1.1)
47
- method_source (~> 1.0)
48
- public_suffix (4.0.6)
49
- rack (2.2.3)
50
- rainbow (3.0.0)
51
- redis (4.5.1)
52
- rest-client (2.1.0)
53
- http-accept (>= 1.7.0, < 2.0)
54
- http-cookie (>= 1.0.2, < 2.0)
55
- mime-types (>= 1.16, < 4.0)
56
- netrc (~> 0.8)
57
- rexml (3.2.5)
58
- rspec (3.10.0)
59
- rspec-core (~> 3.10.0)
60
- rspec-expectations (~> 3.10.0)
61
- rspec-mocks (~> 3.10.0)
62
- rspec-core (3.10.1)
63
- rspec-support (~> 3.10.0)
64
- rspec-expectations (3.10.1)
65
- diff-lcs (>= 1.2.0, < 2.0)
66
- rspec-support (~> 3.10.0)
67
- rspec-mocks (3.10.2)
68
- diff-lcs (>= 1.2.0, < 2.0)
69
- rspec-support (~> 3.10.0)
70
- rspec-support (3.10.3)
71
- rubocop (0.81.0)
72
- jaro_winkler (~> 1.5.1)
73
- parallel (~> 1.10)
74
- parser (>= 2.7.0.1)
75
- rainbow (>= 2.2.2, < 4.0)
76
- rexml
77
- ruby-progressbar (~> 1.7)
78
- unicode-display_width (>= 1.4.0, < 2.0)
79
- rubocop-performance (1.5.2)
80
- rubocop (>= 0.71.0)
81
- rubocop-rails (2.5.2)
82
- activesupport
83
- rack (>= 1.1)
84
- rubocop (>= 0.72.0)
85
- rubocop-rspec (1.38.1)
86
- rubocop (>= 0.68.1)
87
- ruby-progressbar (1.10.1)
88
- simplecov (0.17.1)
89
- docile (~> 1.1)
90
- json (>= 1.8, < 3)
91
- simplecov-html (~> 0.10.0)
92
- simplecov-html (0.10.2)
93
- storyblok-richtext-renderer (0.0.6)
94
- thread_safe (0.3.6)
95
- tzinfo (1.2.9)
96
- thread_safe (~> 0.1)
97
- unf (0.1.4)
98
- unf_ext
99
- unf_ext (0.0.8.1)
100
- unicode-display_width (1.7.0)
101
- vcr (6.0.0)
102
- webmock (3.14.0)
103
- addressable (>= 2.8.0)
104
- crack (>= 0.3.2)
105
- hashdiff (>= 0.4.0, < 2.0.0)
106
- zeitwerk (2.5.4)
107
-
108
- PLATFORMS
109
- ruby
110
-
111
- DEPENDENCIES
112
- bundler (~> 1.5)
113
- hashdiff (~> 1.0.1)
114
- pry
115
- redis
116
- rspec (~> 3)
117
- rubocop
118
- rubocop-performance
119
- rubocop-rails
120
- rubocop-rspec
121
- simplecov (< 0.18.0)
122
- storyblok!
123
- storyblok-richtext-renderer
124
- vcr (= 6.0.0)
125
- webmock (= 3.14.0)
126
-
127
- BUNDLED WITH
128
- 1.17.3
@@ -1,5 +0,0 @@
1
- {
2
- "result": {
3
- "covered_percent": 53.06
4
- }
5
- }