ruby-vips 2.0.3 → 2.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e080fa314558d90863e7390d94086790422d4a40
4
- data.tar.gz: 98f69bed55a1da2ac83593a68ec10cb7c582a0a6
3
+ metadata.gz: 2446e29083185a98ac3bb6188f4aea09e5e0cd4e
4
+ data.tar.gz: ef6ef9641798e39418476661573f9227bab6d946
5
5
  SHA512:
6
- metadata.gz: 46c212d684b0976f2c96ebd31b6d5568965b1accb99d8c2d26794b5d674755b87684cbd71a0222bc9d3810008f3f2c56f8613927c2e3f870113c62cec692b7f1
7
- data.tar.gz: 84eb1bbb0194291e6f231420c9d2047f0c03bf91d2918a9028020476c665b7928b1b0e3f982b2d469c10bedc9728e72117ccdcbeb8611f6ad8d8d2d327986255
6
+ metadata.gz: acf05666f8e861380016b9d9e86ec7a3e617964b9c77b72ff5fe284e6c0cbd9f23b9888c5031bc67b522e189047cd6823583fb4bc055b0f73399d286e69f54d5
7
+ data.tar.gz: 3d699ef4ba6799dd787d4a534cb8858a4c1ed3aa88237825b390e1c746d7e608f4ed8a9e50a2af18de22b8314cc0074a8afbd4fe83f379fc0b9070c4826beb6b
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## master
4
4
 
5
+ ## Version 2.0.4 (2017-09-02)
6
+
7
+ * add a test for `get_fields`, since it appeared in libvips 8.5 (thanks zverok)
8
+
5
9
  ## Version 2.0.3 (2017-09-02)
6
10
 
7
11
  * add `get_fields`
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.3
1
+ 2.0.4
data/lib/vips/image.rb CHANGED
@@ -29,7 +29,15 @@ module Vips
29
29
  attach_function :vips_image_get_typeof, [:pointer, :string], :GType
30
30
  attach_function :vips_image_get,
31
31
  [:pointer, :string, GObject::GValue.ptr], :int
32
- attach_function :vips_image_get_fields, [:pointer], :pointer
32
+
33
+ # vips_image_get_fields was added in libvips 8.5
34
+ begin
35
+ attach_function :vips_image_get_fields, [:pointer], :pointer
36
+ HAS_IMAGE_GET_FIELDS = true
37
+ rescue FFI::NotFoundError
38
+ HAS_IMAGE_GET_FIELDS = false
39
+ end
40
+
33
41
  attach_function :vips_image_set,
34
42
  [:pointer, :string, GObject::GValue.ptr], :void
35
43
  attach_function :vips_image_remove, [:pointer, :string], :void
@@ -498,6 +506,11 @@ module Vips
498
506
  #
499
507
  # @return [[String]] array of field names
500
508
  def get_fields
509
+ # vips_image_get_fields() was added in libvips 8.5
510
+ if not Vips::HAS_IMAGE_GET_FIELDS
511
+ return []
512
+ end
513
+
501
514
  array = Vips::vips_image_get_fields self
502
515
 
503
516
  names = []
data/lib/vips/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Vips
2
- VERSION = "2.0.3"
2
+ VERSION = "2.0.4"
3
3
  end
4
4
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-vips
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: 2.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Cupitt