ruby-vips 2.0.17 → 2.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/.github/ISSUE_TEMPLATE/bug_report.md +42 -0
  3. data/.github/workflows/test.yml +80 -0
  4. data/.standard.yml +17 -0
  5. data/.yardopts +0 -1
  6. data/CHANGELOG.md +26 -0
  7. data/Gemfile +3 -1
  8. data/README.md +12 -11
  9. data/Rakefile +13 -21
  10. data/TODO +4 -8
  11. data/VERSION +1 -1
  12. data/example/annotate.rb +6 -6
  13. data/example/connection.rb +18 -9
  14. data/example/daltonize8.rb +6 -6
  15. data/example/draw_lines.rb +30 -0
  16. data/example/example1.rb +4 -4
  17. data/example/example2.rb +6 -6
  18. data/example/example3.rb +5 -5
  19. data/example/example4.rb +2 -2
  20. data/example/example5.rb +4 -4
  21. data/example/inheritance_with_refcount.rb +46 -39
  22. data/example/progress.rb +3 -3
  23. data/example/thumb.rb +6 -6
  24. data/example/trim8.rb +1 -1
  25. data/example/watermark.rb +2 -2
  26. data/example/wobble.rb +1 -1
  27. data/lib/ruby-vips.rb +1 -1
  28. data/lib/vips.rb +127 -76
  29. data/lib/vips/blend_mode.rb +29 -25
  30. data/lib/vips/connection.rb +4 -4
  31. data/lib/vips/gobject.rb +18 -11
  32. data/lib/vips/gvalue.rb +54 -54
  33. data/lib/vips/image.rb +289 -165
  34. data/lib/vips/interpolate.rb +3 -2
  35. data/lib/vips/methods.rb +484 -107
  36. data/lib/vips/mutableimage.rb +173 -0
  37. data/lib/vips/object.rb +86 -93
  38. data/lib/vips/operation.rb +161 -82
  39. data/lib/vips/region.rb +6 -6
  40. data/lib/vips/source.rb +11 -12
  41. data/lib/vips/sourcecustom.rb +7 -8
  42. data/lib/vips/target.rb +12 -13
  43. data/lib/vips/targetcustom.rb +9 -10
  44. data/lib/vips/version.rb +1 -1
  45. data/ruby-vips.gemspec +26 -22
  46. metadata +29 -49
  47. data/.rubocop.yml +0 -22
  48. data/.rubocop_todo.yml +0 -473
  49. data/.travis.yml +0 -57
  50. data/install-vips.sh +0 -26
data/.rubocop.yml DELETED
@@ -1,22 +0,0 @@
1
- inherit_from: .rubocop_todo.yml
2
-
3
- AllCops:
4
- TargetRubyVersion: 2.6
5
-
6
- Gemspec/OrderedDependencies:
7
- Enabled: false
8
-
9
- # we have some long kw arg calls
10
- Layout/AlignHash:
11
- EnforcedLastArgumentHashStyle: ignore_implicit
12
-
13
- # methods.rb is autogenerated and we don't expect the doc comments to align
14
- Layout/CommentIndentation:
15
- Exclude:
16
- - 'lib/vips/methods.rb'
17
- Layout/EmptyLinesAroundClassBody:
18
- Exclude:
19
- - 'lib/vips/methods.rb'
20
- Layout/TrailingWhitespace:
21
- Exclude:
22
- - 'lib/vips/methods.rb'
data/.rubocop_todo.yml DELETED
@@ -1,473 +0,0 @@
1
- # This configuration was generated by
2
- # `rubocop --auto-gen-config`
3
- # on 2019-10-02 15:42:13 +0100 using RuboCop version 0.75.0.
4
- # The point is for the user to remove these configuration records
5
- # one by one as the offenses are removed from the code base.
6
- # Note that changes in the inspected code, or installation of new
7
- # versions of RuboCop, may require this file to be generated again.
8
-
9
- # Offense count: 42
10
- # Cop supports --auto-correct.
11
- # Configuration parameters: EnforcedStyle, IndentationWidth.
12
- # SupportedStyles: with_first_argument, with_fixed_indentation
13
- Layout/AlignArguments:
14
- Exclude:
15
- - 'example/inheritance_with_refcount.rb'
16
- - 'lib/vips.rb'
17
- - 'lib/vips/gvalue.rb'
18
- - 'lib/vips/image.rb'
19
- - 'lib/vips/object.rb'
20
- - 'spec/vips_spec.rb'
21
-
22
- # Offense count: 5
23
- Lint/IneffectiveAccessModifier:
24
- Exclude:
25
- - 'lib/vips/image.rb'
26
-
27
- # Offense count: 7
28
- # Configuration parameters: ContextCreatingMethods, MethodCreatingMethods.
29
- Lint/UselessAccessModifier:
30
- Exclude:
31
- - 'lib/vips/image.rb'
32
- - 'lib/vips/object.rb'
33
- - 'lib/vips/operation.rb'
34
-
35
- # Offense count: 6
36
- Lint/UselessComparison:
37
- Exclude:
38
- - 'spec/image_spec.rb'
39
-
40
- # Offense count: 7
41
- Metrics/AbcSize:
42
- Max: 113
43
-
44
- # Offense count: 6
45
- # Configuration parameters: CountComments, ExcludedMethods.
46
- # ExcludedMethods: refine
47
- Metrics/BlockLength:
48
- Max: 508
49
-
50
- # Offense count: 3
51
- # Configuration parameters: CountComments.
52
- Metrics/ClassLength:
53
- Max: 515
54
-
55
- # Offense count: 6
56
- Metrics/CyclomaticComplexity:
57
- Max: 27
58
-
59
- # Offense count: 11
60
- # Configuration parameters: CountComments, ExcludedMethods.
61
- Metrics/MethodLength:
62
- Max: 128
63
-
64
- # Offense count: 1
65
- # Configuration parameters: CountComments.
66
- Metrics/ModuleLength:
67
- Max: 131
68
-
69
- # Offense count: 4
70
- Metrics/PerceivedComplexity:
71
- Max: 31
72
-
73
- # Offense count: 9
74
- Naming/AccessorMethodName:
75
- Exclude:
76
- - 'example/inheritance_with_refcount.rb'
77
- - 'lib/vips.rb'
78
- - 'lib/vips/image.rb'
79
- - 'lib/vips/operation.rb'
80
-
81
- # Offense count: 1
82
- # Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms.
83
- # AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
84
- Naming/FileName:
85
- Exclude:
86
- - 'lib/ruby-vips.rb'
87
-
88
- # Offense count: 1
89
- # Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist, MethodDefinitionMacros.
90
- # NamePrefix: is_, has_, have_
91
- # NamePrefixBlacklist: is_, has_, have_
92
- # NameWhitelist: is_a?
93
- # MethodDefinitionMacros: define_method, define_singleton_method
94
- Naming/PredicateName:
95
- Exclude:
96
- - 'spec/**/*'
97
- - 'lib/vips/image.rb'
98
-
99
- # Offense count: 6
100
- # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
101
- # AllowedNames: io, id, to, by, on, in, at, ip, db
102
- Naming/UncommunicativeMethodParamName:
103
- Exclude:
104
- - 'lib/vips.rb'
105
- - 'lib/vips/image.rb'
106
-
107
- # Offense count: 1
108
- # Cop supports --auto-correct.
109
- # Configuration parameters: EnforcedStyle.
110
- # SupportedStyles: prefer_alias, prefer_alias_method
111
- Style/Alias:
112
- Exclude:
113
- - 'lib/vips/image.rb'
114
-
115
- # Offense count: 1
116
- # Cop supports --auto-correct.
117
- # Configuration parameters: EnforcedStyle.
118
- # SupportedStyles: always, conditionals
119
- Style/AndOr:
120
- Exclude:
121
- - 'example/example2.rb'
122
-
123
- # Offense count: 3
124
- # Cop supports --auto-correct.
125
- # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods, AllowBracesOnProceduralOneLiners.
126
- # SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
127
- # ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
128
- # FunctionalMethods: let, let!, subject, watch
129
- # IgnoredMethods: lambda, proc, it
130
- Style/BlockDelimiters:
131
- Exclude:
132
- - 'example/inheritance_with_refcount.rb'
133
- - 'lib/vips.rb'
134
- - 'lib/vips/operation.rb'
135
-
136
- # Offense count: 5
137
- Style/ClassVars:
138
- Exclude:
139
- - 'lib/vips/image.rb'
140
-
141
- # Offense count: 173
142
- # Cop supports --auto-correct.
143
- Style/ColonMethodCall:
144
- Enabled: false
145
-
146
- # Offense count: 47
147
- Style/Documentation:
148
- Exclude:
149
- - 'spec/**/*'
150
- - 'test/**/*'
151
- - 'example/inheritance_with_refcount.rb'
152
- - 'example/wobble.rb'
153
- - 'lib/vips.rb'
154
- - 'lib/vips/gobject.rb'
155
- - 'lib/vips/gvalue.rb'
156
- - 'lib/vips/image.rb'
157
- - 'lib/vips/interpolate.rb'
158
- - 'lib/vips/object.rb'
159
- - 'lib/vips/operation.rb'
160
- - 'lib/vips/region.rb'
161
-
162
- # Offense count: 2
163
- # Cop supports --auto-correct.
164
- Style/Encoding:
165
- Exclude:
166
- - 'Rakefile'
167
- - 'ruby-vips.gemspec'
168
-
169
- # Offense count: 1
170
- # Cop supports --auto-correct.
171
- Style/EvenOdd:
172
- Exclude:
173
- - 'lib/vips/image.rb'
174
-
175
- # Offense count: 2
176
- # Cop supports --auto-correct.
177
- Style/ExpandPathArguments:
178
- Exclude:
179
- - 'ruby-vips.gemspec'
180
- - 'spec/spec_helper.rb'
181
-
182
- # Offense count: 51
183
- # Cop supports --auto-correct.
184
- # Configuration parameters: EnforcedStyle.
185
- # SupportedStyles: always, never
186
- Style/FrozenStringLiteralComment:
187
- Enabled: false
188
-
189
- # Offense count: 5
190
- # Configuration parameters: AllowedVariables.
191
- Style/GlobalVars:
192
- Exclude:
193
- - 'example/inheritance_with_refcount.rb'
194
-
195
- # Offense count: 5
196
- # Configuration parameters: MinBodyLength.
197
- Style/GuardClause:
198
- Exclude:
199
- - 'example/inheritance_with_refcount.rb'
200
- - 'lib/vips.rb'
201
-
202
- # Offense count: 21
203
- # Cop supports --auto-correct.
204
- # Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
205
- # SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
206
- Style/HashSyntax:
207
- Exclude:
208
- - 'Rakefile'
209
- - 'example/annotate.rb'
210
- - 'example/daltonize8.rb'
211
- - 'example/example3.rb'
212
- - 'example/example5.rb'
213
- - 'spec/image_spec.rb'
214
- - 'spec/spec_helper.rb'
215
-
216
- # Offense count: 30
217
- # Cop supports --auto-correct.
218
- Style/IfUnlessModifier:
219
- Exclude:
220
- - 'example/daltonize8.rb'
221
- - 'example/example2.rb'
222
- - 'example/example5.rb'
223
- - 'example/inheritance_with_refcount.rb'
224
- - 'lib/vips.rb'
225
- - 'lib/vips/gvalue.rb'
226
- - 'lib/vips/image.rb'
227
- - 'lib/vips/operation.rb'
228
- - 'ruby-vips.gemspec'
229
-
230
- # Offense count: 4
231
- # Cop supports --auto-correct.
232
- # Configuration parameters: EnforcedStyle.
233
- # SupportedStyles: call, braces
234
- Style/LambdaCall:
235
- Exclude:
236
- - 'lib/vips/image.rb'
237
-
238
- # Offense count: 9
239
- # Cop supports --auto-correct.
240
- Style/LineEndConcatenation:
241
- Exclude:
242
- - 'lib/vips/gvalue.rb'
243
- - 'lib/vips/image.rb'
244
- - 'lib/vips/operation.rb'
245
-
246
- # Offense count: 81
247
- # Cop supports --auto-correct.
248
- # Configuration parameters: EnforcedStyle.
249
- # SupportedStyles: require_parentheses, require_no_parentheses, require_no_parentheses_except_multiline
250
- Style/MethodDefParentheses:
251
- Exclude:
252
- - 'example/inheritance_with_refcount.rb'
253
- - 'lib/vips.rb'
254
- - 'lib/vips/gobject.rb'
255
- - 'lib/vips/gvalue.rb'
256
- - 'lib/vips/image.rb'
257
- - 'lib/vips/interpolate.rb'
258
- - 'lib/vips/object.rb'
259
- - 'lib/vips/operation.rb'
260
-
261
- # Offense count: 2
262
- Style/MethodMissingSuper:
263
- Exclude:
264
- - 'lib/vips/image.rb'
265
-
266
- # Offense count: 2
267
- Style/MissingRespondToMissing:
268
- Exclude:
269
- - 'lib/vips/image.rb'
270
-
271
- # Offense count: 1
272
- # Cop supports --auto-correct.
273
- # Configuration parameters: EnforcedStyle, Autocorrect.
274
- # SupportedStyles: module_function, extend_self
275
- Style/ModuleFunction:
276
- Exclude:
277
- - 'spec/spec_helper.rb'
278
-
279
- # Offense count: 5
280
- Style/MultilineTernaryOperator:
281
- Exclude:
282
- - 'lib/vips/image.rb'
283
-
284
- # Offense count: 1
285
- Style/MultipleComparison:
286
- Exclude:
287
- - 'lib/vips/image.rb'
288
-
289
- # Offense count: 6
290
- # Cop supports --auto-correct.
291
- # Configuration parameters: EnforcedStyle.
292
- # SupportedStyles: literals, strict
293
- Style/MutableConstant:
294
- Exclude:
295
- - 'example/inheritance_with_refcount.rb'
296
- - 'lib/vips.rb'
297
- - 'lib/vips/object.rb'
298
- - 'lib/vips/operation.rb'
299
- - 'lib/vips/version.rb'
300
-
301
- # Offense count: 6
302
- # Cop supports --auto-correct.
303
- # Configuration parameters: Whitelist.
304
- # Whitelist: be, be_a, be_an, be_between, be_falsey, be_kind_of, be_instance_of, be_truthy, be_within, eq, eql, end_with, include, match, raise_error, respond_to, start_with
305
- Style/NestedParenthesizedCalls:
306
- Exclude:
307
- - 'lib/vips/image.rb'
308
-
309
- # Offense count: 2
310
- # Cop supports --auto-correct.
311
- # Configuration parameters: EnforcedStyle, MinBodyLength.
312
- # SupportedStyles: skip_modifier_ifs, always
313
- Style/Next:
314
- Exclude:
315
- - 'lib/vips/operation.rb'
316
-
317
- # Offense count: 15
318
- # Cop supports --auto-correct.
319
- # Configuration parameters: EnforcedStyle.
320
- # SupportedStyles: predicate, comparison
321
- Style/NilComparison:
322
- Exclude:
323
- - 'lib/vips/gvalue.rb'
324
- - 'lib/vips/image.rb'
325
- - 'lib/vips/interpolate.rb'
326
- - 'lib/vips/operation.rb'
327
-
328
- # Offense count: 2
329
- # Cop supports --auto-correct.
330
- # Configuration parameters: IncludeSemanticChanges.
331
- Style/NonNilCheck:
332
- Exclude:
333
- - 'lib/vips.rb'
334
- - 'lib/vips/operation.rb'
335
-
336
- # Offense count: 4
337
- # Cop supports --auto-correct.
338
- # Configuration parameters: Strict.
339
- Style/NumericLiterals:
340
- MinDigits: 9
341
-
342
- # Offense count: 10
343
- # Cop supports --auto-correct.
344
- # Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods.
345
- # SupportedStyles: predicate, comparison
346
- Style/NumericPredicate:
347
- Exclude:
348
- - 'spec/**/*'
349
- - 'lib/vips/image.rb'
350
- - 'lib/vips/operation.rb'
351
-
352
- # Offense count: 4
353
- # Cop supports --auto-correct.
354
- # Configuration parameters: EnforcedStyle.
355
- # SupportedStyles: short, verbose
356
- Style/PreferredHashMethods:
357
- Exclude:
358
- - 'lib/vips/operation.rb'
359
-
360
- # Offense count: 2
361
- # Cop supports --auto-correct.
362
- Style/Proc:
363
- Exclude:
364
- - 'lib/vips.rb'
365
- - 'lib/vips/operation.rb'
366
-
367
- # Offense count: 1
368
- # Cop supports --auto-correct.
369
- Style/RedundantConditional:
370
- Exclude:
371
- - 'lib/vips/gvalue.rb'
372
-
373
- # Offense count: 13
374
- # Cop supports --auto-correct.
375
- # Configuration parameters: AllowMultipleReturnValues.
376
- Style/RedundantReturn:
377
- Exclude:
378
- - 'lib/vips/gvalue.rb'
379
- - 'lib/vips/image.rb'
380
- - 'lib/vips/object.rb'
381
- - 'lib/vips/operation.rb'
382
-
383
- # Offense count: 4
384
- # Cop supports --auto-correct.
385
- Style/RedundantSelf:
386
- Exclude:
387
- - 'example/inheritance_with_refcount.rb'
388
- - 'lib/vips/gobject.rb'
389
-
390
- # Offense count: 1
391
- # Cop supports --auto-correct.
392
- Style/SelfAssignment:
393
- Exclude:
394
- - 'example/daltonize8.rb'
395
-
396
- # Offense count: 2
397
- # Cop supports --auto-correct.
398
- # Configuration parameters: EnforcedStyle.
399
- # SupportedStyles: use_perl_names, use_english_names
400
- Style/SpecialGlobalVars:
401
- Exclude:
402
- - 'example/inheritance_with_refcount.rb'
403
- - 'lib/vips.rb'
404
-
405
- # Offense count: 2
406
- # Cop supports --auto-correct.
407
- Style/StderrPuts:
408
- Exclude:
409
- - 'Rakefile'
410
-
411
- # Offense count: 192
412
- # Cop supports --auto-correct.
413
- # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
414
- # SupportedStyles: single_quotes, double_quotes
415
- Style/StringLiterals:
416
- Exclude:
417
- - 'Rakefile'
418
- - 'example/annotate.rb'
419
- - 'example/example1.rb'
420
- - 'example/example2.rb'
421
- - 'example/example3.rb'
422
- - 'example/example4.rb'
423
- - 'example/inheritance_with_refcount.rb'
424
- - 'lib/vips.rb'
425
- - 'lib/vips/gvalue.rb'
426
- - 'lib/vips/image.rb'
427
- - 'lib/vips/object.rb'
428
- - 'lib/vips/operation.rb'
429
- - 'lib/vips/version.rb'
430
- - 'ruby-vips.gemspec'
431
- - 'spec/vips_spec.rb'
432
-
433
- # Offense count: 15
434
- # Cop supports --auto-correct.
435
- # Configuration parameters: MinSize.
436
- # SupportedStyles: percent, brackets
437
- Style/SymbolArray:
438
- EnforcedStyle: brackets
439
-
440
- # Offense count: 1
441
- # Cop supports --auto-correct.
442
- # Configuration parameters: EnforcedStyleForMultiline.
443
- # SupportedStylesForMultiline: comma, consistent_comma, no_comma
444
- Style/TrailingCommaInHashLiteral:
445
- Exclude:
446
- - 'lib/vips/image.rb'
447
-
448
- # Offense count: 1
449
- # Cop supports --auto-correct.
450
- Style/RedundantInterpolation:
451
- Exclude:
452
- - 'lib/vips/image.rb'
453
-
454
- # Offense count: 1
455
- # Cop supports --auto-correct.
456
- # Configuration parameters: MinSize, WordRegex.
457
- # SupportedStyles: percent, brackets
458
- Style/WordArray:
459
- EnforcedStyle: brackets
460
-
461
- # Offense count: 6
462
- # Cop supports --auto-correct.
463
- Style/ZeroLengthPredicate:
464
- Exclude:
465
- - 'lib/vips/image.rb'
466
- - 'lib/vips/operation.rb'
467
-
468
- # Offense count: 107
469
- # Cop supports --auto-correct.
470
- # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
471
- # URISchemes: http, https
472
- Metrics/LineLength:
473
- Max: 179