From d09a95513e0b54dca18264b63944ae31b2368bda Mon Sep 17 00:00:00 2001 From: Jeremy Nicoll Date: Thu, 3 May 2018 13:17:16 -0700 Subject: [PATCH] Uses ruby-vips > 2 --- Gemfile | 2 +- Gemfile.lock | 64 ++++++++++++++++++---------------------- carrierwave-vips.gemspec | 6 ++-- lib/carrierwave/vips.rb | 4 +-- 4 files changed, 34 insertions(+), 42 deletions(-) diff --git a/Gemfile b/Gemfile index e33b566..801c17a 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec gem 'ruby-vips', :require => 'vips' -gem 'carrierwave', git: 'https://github.com/carrierwaveuploader/carrierwave.git' +gem 'carrierwave', '>= 0.11.0' gem 'rspec', '~> 3.5.0' gem 'activerecord', '~> 5.0.0' gem 'sqlite3' diff --git a/Gemfile.lock b/Gemfile.lock index 2d288c1..131203b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,52 +1,44 @@ -GIT - remote: https://github.com/carrierwaveuploader/carrierwave.git - revision: a94b68cf848d6bd6ea5fbc2ce7d772456e4a5914 - specs: - carrierwave (0.11.0) - activemodel (>= 4.0.0) - activesupport (>= 4.0.0) - mime-types (>= 1.16) - PATH remote: . specs: - carrierwave-vips (1.1.3) + carrierwave-vips (2.0.0) carrierwave (>= 0.11.0) - ruby-vips (~> 1.0, >= 1.0.2) + ruby-vips (~> 2.0, >= 2.0.2) GEM remote: https://rubygems.org/ specs: - activemodel (5.0.0.1) - activesupport (= 5.0.0.1) - activerecord (5.0.0.1) - activemodel (= 5.0.0.1) - activesupport (= 5.0.0.1) + activemodel (5.0.7) + activesupport (= 5.0.7) + activerecord (5.0.7) + activemodel (= 5.0.7) + activesupport (= 5.0.7) arel (~> 7.0) - activesupport (5.0.0.1) + activesupport (5.0.7) concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (~> 0.7) + i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) - arel (7.1.1) - concurrent-ruby (1.0.2) - diff-lcs (1.2.5) - glib2 (3.0.9) - pkg-config - gobject-introspection (3.0.9) - glib2 (= 3.0.9) - i18n (0.7.0) + arel (7.1.4) + carrierwave (1.2.2) + activemodel (>= 4.0.0) + activesupport (>= 4.0.0) + mime-types (>= 1.16) + concurrent-ruby (1.0.5) + diff-lcs (1.3) + ffi (1.9.23) + i18n (1.0.1) + concurrent-ruby (~> 1.0) mime-types (3.1) mime-types-data (~> 3.2015) mime-types-data (3.2016.0521) - minitest (5.9.0) - pkg-config (1.1.7) + minitest (5.11.3) rmagick (2.16.0) rspec (3.5.0) rspec-core (~> 3.5.0) rspec-expectations (~> 3.5.0) rspec-mocks (~> 3.5.0) - rspec-core (3.5.3) + rspec-core (3.5.4) rspec-support (~> 3.5.0) rspec-expectations (3.5.0) diff-lcs (>= 1.2.0, < 2.0) @@ -55,11 +47,11 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.5.0) rspec-support (3.5.0) - ruby-vips (1.0.2) - gobject-introspection (~> 3.0) - sqlite3 (1.3.11) - thread_safe (0.3.5) - tzinfo (1.2.2) + ruby-vips (2.0.12) + ffi (~> 1.9) + sqlite3 (1.3.13) + thread_safe (0.3.6) + tzinfo (1.2.5) thread_safe (~> 0.1) PLATFORMS @@ -67,7 +59,7 @@ PLATFORMS DEPENDENCIES activerecord (~> 5.0.0) - carrierwave! + carrierwave (>= 0.11.0) carrierwave-vips! rmagick rspec (~> 3.5.0) @@ -75,4 +67,4 @@ DEPENDENCIES sqlite3 BUNDLED WITH - 1.12.5 + 1.16.1 diff --git a/carrierwave-vips.gemspec b/carrierwave-vips.gemspec index 44b4940..c4663e7 100644 --- a/carrierwave-vips.gemspec +++ b/carrierwave-vips.gemspec @@ -1,7 +1,7 @@ Gem::Specification.new do |s| s.name = 'carrierwave-vips' - s.version = '1.1.3' - s.date = '2016-10-26' + s.version = '1.2.0' + s.date = '2018-05-03' s.summary = "Adds VIPS support to CarrierWave" s.description = "Adds VIPS support to CarrierWave" s.authors = ["Jeremy Nicoll"] @@ -9,7 +9,7 @@ Gem::Specification.new do |s| s.files = ["lib/carrierwave-vips.rb", "lib/carrierwave/vips.rb"] s.homepage = 'https://github.com/eltiare/carrierwave-vips' - s.add_runtime_dependency 'ruby-vips', '~> 1.0', '>= 1.0.2' + s.add_runtime_dependency 'ruby-vips', '~> 2.0', '>= 2.0.2' s.add_runtime_dependency 'carrierwave', '>= 0.11.0' s.add_development_dependency 'rmagick' diff --git a/lib/carrierwave/vips.rb b/lib/carrierwave/vips.rb index 4ec2a53..6985b98 100644 --- a/lib/carrierwave/vips.rb +++ b/lib/carrierwave/vips.rb @@ -68,8 +68,8 @@ def auto_orient else raise('Invalid value for Orientation: ' + o.to_s) end - image.set('exif-Orientation', '') - image.set('exif-ifd0-Orientation', '') + image.set_type GObject::GSTR_TYPE, 'exif-Orientation', '' + image.set_type GObject::GSTR_TYPE, 'exif-ifd0-Orientation', '' end end