storyblok 3.0.1 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +282 -0
- data/.rubocop_strict.yml +30 -0
- data/.rubocop_todo.yml +405 -0
- data/Gemfile +8 -3
- data/Gemfile.lock +92 -20
- data/README.md +72 -32
- data/coverage/.last_run.json +5 -0
- data/coverage/.resultset.json +547 -0
- data/coverage/.resultset.json.lock +0 -0
- data/coverage/assets/0.10.2/application.css +799 -0
- data/coverage/assets/0.10.2/application.js +1707 -0
- data/coverage/assets/0.10.2/colorbox/border.png +0 -0
- data/coverage/assets/0.10.2/colorbox/controls.png +0 -0
- data/coverage/assets/0.10.2/colorbox/loading.gif +0 -0
- data/coverage/assets/0.10.2/colorbox/loading_background.png +0 -0
- data/coverage/assets/0.10.2/favicon_green.png +0 -0
- data/coverage/assets/0.10.2/favicon_red.png +0 -0
- data/coverage/assets/0.10.2/favicon_yellow.png +0 -0
- data/coverage/assets/0.10.2/loading.gif +0 -0
- data/coverage/assets/0.10.2/magnify.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-icons_222222_256x240.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-icons_454545_256x240.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-icons_888888_256x240.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/coverage/index.html +3380 -0
- data/examples/cache.rb +5 -6
- data/examples/example_queries.rb +6 -6
- data/examples/management_api.rb +2 -4
- data/examples/renderer.rb +11 -12
- data/examples/tree.rb +12 -12
- data/lib/storyblok/cache/redis.rb +0 -1
- data/lib/storyblok/client.rb +135 -131
- data/lib/storyblok/links.rb +16 -17
- data/lib/storyblok/version.rb +1 -1
- data/lib/storyblok.rb +3 -3
- metadata +38 -13
- data/.DS_Store +0 -0
- data/.ruby-version +0 -1
- data/lib/.DS_Store +0 -0
- data/lib/storyblok/.DS_Store +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd63f68ec8b4a15eb75df4240e3ab65117e44bf4f149d81814fd019f919d2b3f
|
4
|
+
data.tar.gz: 5de614478e045a878c41755fd342798860d8980d492687fd904dae34a94d5f34
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6ba6fa2345e29b5a9fc8d23bdbac78a89a60322dca1e7a578c7e74e3ea487d94ffd3f5f5218ed3efd708d918a07f2db54a20d509a39977012fc068528542b6c
|
7
|
+
data.tar.gz: e9774ef478fa2429a50e2c41fc4193c54404f18ed65b1bdb4863a42ede67b38193bf400670bd8e49c8d8bc4ff51f68979ef0cca5f4c66af46e9fe5f2bf322c53
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,282 @@
|
|
1
|
+
# This Code Style was heavily inspired by this article https://evilmartians.com/chronicles/rubocoping-with-legacy-bring-your-ruby-code-up-to-standard
|
2
|
+
# the only missing part is related to add https://github.com/testdouble/standard, right now cannot be nicely done due a some incompatible issues
|
3
|
+
# between our ruby version(2.3.1),rubocop, rubocop-performance, rubocop-rspec, rubocop-rails and the gem standard, so as soon we update our ruby
|
4
|
+
# I think we may adopt the https://github.com/testdouble/standard
|
5
|
+
# In replacement(and maybe temporarily) from standard(gem), we added the style from file from rails~6 https://github.com/rails/rails/blob/c74c52c4b00301bb564c4593f76b76b5ce657de5/.rubocop.yml
|
6
|
+
# To not force a huge update on our current code base to fit at this style code, was generated the '.rubocop_todo.yml' file
|
7
|
+
# where are listed tech debits from our current code base, this way only new code will be check by rubocop
|
8
|
+
# making possible us upgrade slowly our code base to match to our new code style and removing the lines from '.rubocop_todo.yml' file
|
9
|
+
|
10
|
+
inherit_mode:
|
11
|
+
merge:
|
12
|
+
- Exclude
|
13
|
+
|
14
|
+
inherit_from:
|
15
|
+
- .rubocop_rspec.yml
|
16
|
+
- .rubocop_strict.yml
|
17
|
+
|
18
|
+
require:
|
19
|
+
- rubocop-performance
|
20
|
+
- rubocop-rails
|
21
|
+
|
22
|
+
AllCops:
|
23
|
+
TargetRubyVersion: 2.6
|
24
|
+
# RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
|
25
|
+
# to ignore them, so only the ones explicitly set in this file are enabled.
|
26
|
+
DisabledByDefault: true
|
27
|
+
Exclude:
|
28
|
+
- '**/tmp/**/*'
|
29
|
+
- '**/templates/**/*'
|
30
|
+
- '**/vendor/**/*'
|
31
|
+
- 'actionpack/lib/action_dispatch/journey/parser.rb'
|
32
|
+
- 'actionmailbox/test/dummy/**/*'
|
33
|
+
- 'actiontext/test/dummy/**/*'
|
34
|
+
- '**/node_modules/**/*'
|
35
|
+
|
36
|
+
Performance:
|
37
|
+
Exclude:
|
38
|
+
- '**/test/**/*'
|
39
|
+
|
40
|
+
Rails/IndexBy:
|
41
|
+
Enabled: true
|
42
|
+
|
43
|
+
Rails/IndexWith:
|
44
|
+
Enabled: true
|
45
|
+
|
46
|
+
# Prefer &&/|| over and/or.
|
47
|
+
Style/AndOr:
|
48
|
+
Enabled: true
|
49
|
+
|
50
|
+
Layout/LineLength:
|
51
|
+
Enabled: true
|
52
|
+
Max: 120
|
53
|
+
|
54
|
+
# Align `when` with `case`.
|
55
|
+
Layout/CaseIndentation:
|
56
|
+
Enabled: true
|
57
|
+
|
58
|
+
Layout/ClosingHeredocIndentation:
|
59
|
+
Enabled: true
|
60
|
+
|
61
|
+
# Align comments with method definitions.
|
62
|
+
Layout/CommentIndentation:
|
63
|
+
Enabled: true
|
64
|
+
|
65
|
+
Layout/ElseAlignment:
|
66
|
+
Enabled: true
|
67
|
+
|
68
|
+
# Align `end` with the matching keyword or starting expression except for
|
69
|
+
# assignments, where it should be aligned with the LHS.
|
70
|
+
Layout/EndAlignment:
|
71
|
+
Enabled: true
|
72
|
+
EnforcedStyleAlignWith: variable
|
73
|
+
AutoCorrect: true
|
74
|
+
|
75
|
+
Layout/EmptyLineAfterMagicComment:
|
76
|
+
Enabled: true
|
77
|
+
|
78
|
+
Layout/EmptyLinesAroundAccessModifier:
|
79
|
+
Enabled: true
|
80
|
+
EnforcedStyle: only_before
|
81
|
+
|
82
|
+
Layout/EmptyLinesAroundBlockBody:
|
83
|
+
Enabled: true
|
84
|
+
|
85
|
+
# In a regular class definition, no empty lines around the body.
|
86
|
+
Layout/EmptyLinesAroundClassBody:
|
87
|
+
Enabled: true
|
88
|
+
|
89
|
+
# In a regular method definition, no empty lines around the body.
|
90
|
+
Layout/EmptyLinesAroundMethodBody:
|
91
|
+
Enabled: true
|
92
|
+
|
93
|
+
# In a regular module definition, no empty lines around the body.
|
94
|
+
Layout/EmptyLinesAroundModuleBody:
|
95
|
+
Enabled: true
|
96
|
+
|
97
|
+
# Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
|
98
|
+
Style/HashSyntax:
|
99
|
+
Enabled: true
|
100
|
+
|
101
|
+
Layout/FirstArgumentIndentation:
|
102
|
+
Enabled: true
|
103
|
+
|
104
|
+
# Method definitions after `private` or `protected` isolated calls need one
|
105
|
+
# extra level of indentation.
|
106
|
+
Layout/IndentationConsistency:
|
107
|
+
Enabled: true
|
108
|
+
EnforcedStyle: indented_internal_methods
|
109
|
+
|
110
|
+
# Two spaces, no tabs (for indentation).
|
111
|
+
Layout/IndentationWidth:
|
112
|
+
Enabled: true
|
113
|
+
|
114
|
+
Layout/LeadingCommentSpace:
|
115
|
+
Enabled: true
|
116
|
+
|
117
|
+
Layout/SpaceAfterColon:
|
118
|
+
Enabled: true
|
119
|
+
|
120
|
+
Layout/SpaceAfterComma:
|
121
|
+
Enabled: true
|
122
|
+
|
123
|
+
Layout/SpaceAfterSemicolon:
|
124
|
+
Enabled: true
|
125
|
+
|
126
|
+
Layout/SpaceAroundEqualsInParameterDefault:
|
127
|
+
Enabled: true
|
128
|
+
|
129
|
+
Layout/SpaceAroundKeyword:
|
130
|
+
Enabled: true
|
131
|
+
|
132
|
+
Layout/SpaceBeforeComma:
|
133
|
+
Enabled: true
|
134
|
+
|
135
|
+
Layout/SpaceBeforeComment:
|
136
|
+
Enabled: true
|
137
|
+
|
138
|
+
Layout/SpaceBeforeFirstArg:
|
139
|
+
Enabled: true
|
140
|
+
|
141
|
+
Style/DefWithParentheses:
|
142
|
+
Enabled: true
|
143
|
+
|
144
|
+
# Defining a method with parameters needs parentheses.
|
145
|
+
Style/MethodDefParentheses:
|
146
|
+
Enabled: true
|
147
|
+
|
148
|
+
Style/FrozenStringLiteralComment:
|
149
|
+
Enabled: true
|
150
|
+
EnforcedStyle: always
|
151
|
+
Exclude:
|
152
|
+
- 'actionview/test/**/*.builder'
|
153
|
+
- 'actionview/test/**/*.ruby'
|
154
|
+
- 'actionpack/test/**/*.builder'
|
155
|
+
- 'actionpack/test/**/*.ruby'
|
156
|
+
- 'activestorage/db/migrate/**/*.rb'
|
157
|
+
- 'activestorage/db/update_migrate/**/*.rb'
|
158
|
+
- 'actionmailbox/db/migrate/**/*.rb'
|
159
|
+
- 'actiontext/db/migrate/**/*.rb'
|
160
|
+
|
161
|
+
Style/RedundantFreeze:
|
162
|
+
Enabled: true
|
163
|
+
|
164
|
+
# Use `foo {}` not `foo{}`.
|
165
|
+
Layout/SpaceBeforeBlockBraces:
|
166
|
+
Enabled: true
|
167
|
+
|
168
|
+
# Use `foo { bar }` not `foo {bar}`.
|
169
|
+
Layout/SpaceInsideBlockBraces:
|
170
|
+
Enabled: true
|
171
|
+
EnforcedStyleForEmptyBraces: space
|
172
|
+
|
173
|
+
# Use `{ a: 1 }` not `{a:1}`.
|
174
|
+
Layout/SpaceInsideHashLiteralBraces:
|
175
|
+
Enabled: true
|
176
|
+
|
177
|
+
Layout/SpaceInsideParens:
|
178
|
+
Enabled: true
|
179
|
+
|
180
|
+
# Check quotes usage according to lint rule below.
|
181
|
+
Style/StringLiterals:
|
182
|
+
Enabled: true
|
183
|
+
EnforcedStyle: double_quotes
|
184
|
+
|
185
|
+
# Detect hard tabs, no hard tabs.
|
186
|
+
Layout/IndentationStyle:
|
187
|
+
Enabled: true
|
188
|
+
|
189
|
+
# Empty lines should not have any spaces.
|
190
|
+
Layout/TrailingEmptyLines:
|
191
|
+
Enabled: true
|
192
|
+
|
193
|
+
# No trailing whitespace.
|
194
|
+
Layout/TrailingWhitespace:
|
195
|
+
Enabled: true
|
196
|
+
|
197
|
+
# Use quotes for string literals when they are enough.
|
198
|
+
Style/RedundantPercentQ:
|
199
|
+
Enabled: true
|
200
|
+
|
201
|
+
Lint/AmbiguousOperator:
|
202
|
+
Enabled: true
|
203
|
+
|
204
|
+
Lint/AmbiguousRegexpLiteral:
|
205
|
+
Enabled: true
|
206
|
+
|
207
|
+
Lint/ErbNewArguments:
|
208
|
+
Enabled: true
|
209
|
+
|
210
|
+
# Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
|
211
|
+
Lint/RequireParentheses:
|
212
|
+
Enabled: true
|
213
|
+
|
214
|
+
Lint/ShadowingOuterLocalVariable:
|
215
|
+
Enabled: true
|
216
|
+
|
217
|
+
Lint/RedundantStringCoercion:
|
218
|
+
Enabled: true
|
219
|
+
|
220
|
+
Lint/UriEscapeUnescape:
|
221
|
+
Enabled: true
|
222
|
+
|
223
|
+
Lint/UselessAssignment:
|
224
|
+
Enabled: true
|
225
|
+
|
226
|
+
Lint/DeprecatedClassMethods:
|
227
|
+
Enabled: true
|
228
|
+
|
229
|
+
Style/ParenthesesAroundCondition:
|
230
|
+
Enabled: true
|
231
|
+
|
232
|
+
Style/HashTransformKeys:
|
233
|
+
Enabled: true
|
234
|
+
|
235
|
+
Style/HashTransformValues:
|
236
|
+
Enabled: true
|
237
|
+
|
238
|
+
Style/RedundantBegin:
|
239
|
+
Enabled: true
|
240
|
+
|
241
|
+
Style/RedundantReturn:
|
242
|
+
Enabled: true
|
243
|
+
AllowMultipleReturnValues: true
|
244
|
+
|
245
|
+
Style/Semicolon:
|
246
|
+
Enabled: true
|
247
|
+
AllowAsExpressionSeparator: true
|
248
|
+
|
249
|
+
# Prefer Foo.method over Foo::method
|
250
|
+
Style/ColonMethodCall:
|
251
|
+
Enabled: true
|
252
|
+
|
253
|
+
Style/TrivialAccessors:
|
254
|
+
Enabled: true
|
255
|
+
|
256
|
+
Performance/FlatMap:
|
257
|
+
Enabled: true
|
258
|
+
|
259
|
+
Performance/RedundantMerge:
|
260
|
+
Enabled: true
|
261
|
+
|
262
|
+
Performance/StartWith:
|
263
|
+
Enabled: true
|
264
|
+
|
265
|
+
Performance/EndWith:
|
266
|
+
Enabled: true
|
267
|
+
|
268
|
+
Performance/RegexpMatch:
|
269
|
+
Enabled: true
|
270
|
+
|
271
|
+
Performance/ReverseEach:
|
272
|
+
Enabled: true
|
273
|
+
|
274
|
+
Performance/UnfreezeString:
|
275
|
+
Enabled: true
|
276
|
+
|
277
|
+
# Disabled until we update rubocop
|
278
|
+
# Performance/DeletePrefix:
|
279
|
+
# Enabled: true
|
280
|
+
|
281
|
+
# Performance/DeleteSuffix:
|
282
|
+
# Enabled: true
|
data/.rubocop_strict.yml
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# Original file https://gist.githubusercontent.com/palkan/ee1d0247be2076e38020a9a6fbae68d5/raw/b5a0b74ac2f5e0023219b82e3d17ad6104df2b2f/.rubocop_strict.yml
|
2
|
+
# Inherit from TODO here to make sure we enforce the rules below
|
3
|
+
# (and TODO is ignored)
|
4
|
+
inherit_mode:
|
5
|
+
merge:
|
6
|
+
- Exclude
|
7
|
+
|
8
|
+
inherit_from:
|
9
|
+
- .rubocop_todo.yml
|
10
|
+
|
11
|
+
Lint/Debugger: # don't leave binding.pry
|
12
|
+
Enabled: true
|
13
|
+
Exclude: []
|
14
|
+
|
15
|
+
RSpec/Focus: # run ALL tests on CI
|
16
|
+
Enabled: true
|
17
|
+
Exclude: []
|
18
|
+
|
19
|
+
Rails/Output: # Don't leave puts-debugging # https://stackoverflow.com/a/7316253/5001358
|
20
|
+
Enabled: true
|
21
|
+
Exclude: []
|
22
|
+
|
23
|
+
Rails/FindEach: # each could badly affect the performance, use find_each
|
24
|
+
Enabled: true
|
25
|
+
Exclude: []
|
26
|
+
|
27
|
+
Rails/UniqBeforePluck: # uniq.pluck and not pluck.uniq
|
28
|
+
Enabled: true
|
29
|
+
Exclude: []
|
30
|
+
|