rmagick 2.15.4 → 2.16.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rmagick might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 79bd6595ef81cd3743a21521e9a4bed46dbcf52b
4
- data.tar.gz: 659d7eff32093a2a9d1738509a0c4c3376466d29
3
+ metadata.gz: cdb0b76b421e905281ea36ab502157f8127ef7f4
4
+ data.tar.gz: 7055d7ca36c20dfe2368b86274fcae3b092ce4af
5
5
  SHA512:
6
- metadata.gz: 72eb476772660c07483bf8748716d1a95412c3d64988c65385dee9b48b4177a9e42beb583a031233689446fb3aa2987d1da672ed18fe88bf96618ea28da5fb6e
7
- data.tar.gz: b67cb2bcccb97b2e4ef53b65fdfabde8cacf18dfcba388d49a476d6f96d27d2685aeef6e15e1268aa68465277e3752a45fe4f7c1bbc26bb8ebad091056953ca4
6
+ metadata.gz: 3e48587349334725feb46115787fe620396220163f61822724f818645d89538b3a0a898f03b9d3af20a959ed023619ac3d268d8597f34b3dacc4ce7e2af7fd95
7
+ data.tar.gz: 830620183fb702cd38df0bd0d227e1a3d094198cb4d8a6d94b6354c4a854412ae795700f25584e4470c8078fe52a8208275f758fdb249aa2dc109261316b665b
@@ -22,6 +22,8 @@ env:
22
22
  before_install:
23
23
  - source before_install_$TRAVIS_OS_NAME.sh
24
24
 
25
+ install: bundle install --verbose
26
+
25
27
  rvm:
26
28
  - 1.8
27
29
  - 1.9
@@ -3,6 +3,10 @@
3
3
  All notable changes to this project are documented in this file.
4
4
  This project adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
+ ## RMagick 2.16.0
7
+
8
+ - Support ImageMagick 6.9+ - @ZipoKing
9
+
6
10
  ## RMagick 2.15.4
7
11
 
8
12
  - Improved C extension building process - @u338steven
@@ -36,6 +36,8 @@ On Ubuntu, you can run:
36
36
 
37
37
  bc. sudo apt-get install libmagickwand-dev
38
38
 
39
+ *Note to Windows users:* Please make sure that you choose an ImageMagick version that matches the bitness of your Ruby version.
40
+
39
41
  h2(#install). Installing RMagick
40
42
 
41
43
  h4. Installing via Bundler
@@ -54,6 +56,14 @@ Run:
54
56
 
55
57
  bc. gem install rmagick
56
58
 
59
+ h4. Versioning
60
+
61
+ RMagick is versioned according to Semantic Versioning.
62
+ For stable version compatible with Ruby 1.8+, use `~> 2.0`.
63
+ Upcoming version 3 will work on Ruby 2.x only.
64
+
65
+ h2(#usage). Using RMagick
66
+
57
67
  Require RMagick in your project as follows:
58
68
 
59
69
  bc. require 'rmagick'
@@ -24,3 +24,9 @@ if [[ $TRAVIS_RUBY_VERSION =~ ^1.8 ]]; then
24
24
  echo "Set the stack size to unlimited to avoid segfault for Ruby 1.8"
25
25
  ulimit -s unlimited
26
26
  fi
27
+
28
+ # Fixes this error:
29
+ # NoMethodError: undefined method `spec' for nil:NilClass
30
+ # Travis uses Bundler 1.7.6 by default and it has this bug
31
+ # https://github.com/rubygems/rubygems/issues/1419
32
+ gem install bundler
@@ -649,10 +649,13 @@ title.annotate(montage, 0,0,0,40, 'Named Colors') {
649
649
  <h4>Description</h4>
650
650
 
651
651
  <p>Returns information for a specific string if rendered on a
652
- image. The <code>get_multiline_type_metrics</code> method is
653
- the same as <code>get_type_metrics</code>, except the former
654
- returns the maximum height and width for multiple lines of
655
- text. (Text lines are separated by "\n" characters.)</p>
652
+ image. Metrics are derived from either the <a href="#attributes">
653
+ annotate attributes</a> or from the <a href="info.html">image
654
+ info attributes</a>, but not from any drawing primitive methods.
655
+ The <code>get_multiline_type_metrics</code> method is the same as
656
+ <code>get_type_metrics</code>, except the former returns the
657
+ maximum height and width for multiple lines of text. (Text lines
658
+ are separated by "\n" characters.)</p>
656
659
 
657
660
  <p>The Magick++ documentation for its TypeMetric class provides
658
661
  this useful additional information. (I've changed it a bit to
@@ -21,6 +21,7 @@ module RMagick
21
21
  def configured_compile_options
22
22
  {
23
23
  :magick_config => $magick_config,
24
+ :with_magick_wand => $with_magick_wand,
24
25
  :pkg_config => $pkg_config,
25
26
  :magick_version => $magick_version,
26
27
  :local_libs => $LOCAL_LIBS,
@@ -57,6 +58,7 @@ module RMagick
57
58
  end
58
59
 
59
60
  # ugly way to handle which config tool we're going to use...
61
+ $with_magick_wand = false
60
62
  $magick_config = false
61
63
  $pkg_config = false
62
64
 
@@ -84,21 +86,50 @@ module RMagick
84
86
  end
85
87
  end
86
88
 
87
- # either set flags using Magick-config or pkg-config (new Debian default)
88
- if $magick_config
89
- # Save flags
90
- $CFLAGS = ENV['CFLAGS'].to_s + ' ' + `Magick-config --cflags`.chomp
91
- $CPPFLAGS = ENV['CPPFLAGS'].to_s + ' ' + `Magick-config --cppflags`.chomp
92
- $LDFLAGS = ENV['LDFLAGS'].to_s + ' ' + `Magick-config --ldflags`.chomp
93
- $LOCAL_LIBS = ENV['LIBS'].to_s + ' ' + `Magick-config --libs`.chomp
89
+ # From ImageMagick 6.9 binaries are split to two and we have to use
90
+ # MagickWand instead of MagickCore
91
+ checking_for("presence of MagickWand API (ImageMagick version >= #{Magick::MIN_WAND_VERSION})") do
92
+ $with_magick_wand = Gem::Version.new($magick_version) >= Gem::Version.new(Magick::MIN_WAND_VERSION)
93
+ if $with_magick_wand
94
+ Logging.message('Detected 6.9+ version, using MagickWand API')
95
+ else
96
+ Logging.message('Older version detected, using MagickCore API')
97
+ end
94
98
  end
95
99
 
96
- if $pkg_config
97
- # Save flags
98
- $CFLAGS = ENV['CFLAGS'].to_s + ' ' + `pkg-config --cflags MagickCore`.chomp
99
- $CPPFLAGS = ENV['CPPFLAGS'].to_s + ' ' + `pkg-config --cflags MagickCore`.chomp
100
- $LDFLAGS = ENV['LDFLAGS'].to_s + ' ' + `pkg-config --libs MagickCore`.chomp
101
- $LOCAL_LIBS = ENV['LIBS'].to_s + ' ' + `pkg-config --libs MagickCore`.chomp
100
+ # either set flags using Magick-config, MagickWand-config or pkg-config (new Debian default)
101
+ if $with_magick_wand
102
+ if $magick_config
103
+ # Save flags
104
+ $CFLAGS = ENV['CFLAGS'].to_s + ' ' + `MagickWand-config --cflags`.chomp
105
+ $CPPFLAGS = ENV['CPPFLAGS'].to_s + ' ' + `MagickWand-config --cppflags`.chomp
106
+ $LDFLAGS = ENV['LDFLAGS'].to_s + ' ' + `MagickWand-config --ldflags`.chomp
107
+ $LOCAL_LIBS = ENV['LIBS'].to_s + ' ' + `MagickWand-config --libs`.chomp
108
+ end
109
+
110
+ if $pkg_config
111
+ # Save flags
112
+ $CFLAGS = ENV['CFLAGS'].to_s + ' ' + `pkg-config --cflags MagickWand`.chomp
113
+ $CPPFLAGS = ENV['CPPFLAGS'].to_s + ' ' + `pkg-config --cflags MagickWand`.chomp
114
+ $LDFLAGS = ENV['LDFLAGS'].to_s + ' ' + `pkg-config --libs MagickWand`.chomp
115
+ $LOCAL_LIBS = ENV['LIBS'].to_s + ' ' + `pkg-config --libs MagickWand`.chomp
116
+ end
117
+ else
118
+ if $magick_config
119
+ # Save flags
120
+ $CFLAGS = ENV['CFLAGS'].to_s + ' ' + `Magick-config --cflags`.chomp
121
+ $CPPFLAGS = ENV['CPPFLAGS'].to_s + ' ' + `Magick-config --cppflags`.chomp
122
+ $LDFLAGS = ENV['LDFLAGS'].to_s + ' ' + `Magick-config --ldflags`.chomp
123
+ $LOCAL_LIBS = ENV['LIBS'].to_s + ' ' + `Magick-config --libs`.chomp
124
+ end
125
+
126
+ if $pkg_config
127
+ # Save flags
128
+ $CFLAGS = ENV['CFLAGS'].to_s + ' ' + `pkg-config --cflags MagickCore`.chomp
129
+ $CPPFLAGS = ENV['CPPFLAGS'].to_s + ' ' + `pkg-config --cflags MagickCore`.chomp
130
+ $LDFLAGS = ENV['LDFLAGS'].to_s + ' ' + `pkg-config --libs MagickCore`.chomp
131
+ $LOCAL_LIBS = ENV['LIBS'].to_s + ' ' + `pkg-config --libs MagickCore`.chomp
132
+ end
102
133
  end
103
134
 
104
135
  if RUBY_PLATFORM =~ /darwin/ # osx
@@ -1,5 +1,6 @@
1
1
  module Magick
2
- VERSION = '2.15.4'
2
+ VERSION = '2.16.0'
3
3
  MIN_RUBY_VERSION = '1.8.5'
4
4
  MIN_IM_VERSION = '6.4.9'
5
+ MIN_WAND_VERSION = '6.9.0'
5
6
  end
@@ -1812,7 +1812,6 @@ module Magick
1812
1812
  end
1813
1813
 
1814
1814
  def slice(*args)
1815
- current = get_current
1816
1815
  slice = @images.slice(*args)
1817
1816
  if slice
1818
1817
  ilist = self.class.new
@@ -2,6 +2,13 @@ require 'date'
2
2
  require 'English'
3
3
  require './lib/rmagick/version'
4
4
 
5
+ def v(version)
6
+ Gem::Version.new(version)
7
+ end
8
+
9
+ RUBY = v(RUBY_VERSION.dup)
10
+ RUBYGEMS = v(Gem::VERSION.dup)
11
+
5
12
  Gem::Specification.new do |s|
6
13
  s.name = 'rmagick'
7
14
  s.version = Magick::VERSION
@@ -29,14 +36,28 @@ Gem::Specification.new do |s|
29
36
  s.has_rdoc = false
30
37
  s.required_ruby_version = ">= #{Magick::MIN_RUBY_VERSION}"
31
38
  s.requirements << "ImageMagick #{Magick::MIN_IM_VERSION} or later"
32
- s.add_development_dependency 'rake-compiler'
39
+
33
40
  s.add_development_dependency 'rspec', '~> 3.2.0'
34
41
 
35
- if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('1.9.2')
42
+ if RUBY < v('1.9.0')
43
+ s.add_development_dependency 'rake', '~> 10.0'
44
+ end
45
+
46
+ if RUBY < v('2.0.0')
47
+ s.add_development_dependency 'json', '~> 1.0'
48
+ end
49
+
50
+ if RUBY >= v('1.9.2')
36
51
  s.add_development_dependency 'rubocop', '~> 0.33.0'
37
52
  end
38
53
 
39
- if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.2.0')
54
+ if RUBY >= v('2.2.0')
40
55
  s.add_development_dependency 'test-unit', '~> 2'
41
56
  end
57
+
58
+ if RUBYGEMS < v('1.8.25')
59
+ s.add_development_dependency 'rake-compiler', '~> 0.8.0'
60
+ else
61
+ s.add_development_dependency 'rake-compiler'
62
+ end
42
63
  end
@@ -0,0 +1,10 @@
1
+ box: centos:6
2
+ build:
3
+ steps:
4
+ - script:
5
+ name: deps
6
+ code: sudo yum install -y ruby ruby-devel rubygems ImageMagick-devel gcc git
7
+ - bundle-install
8
+ - script:
9
+ name: tests
10
+ code: bundle exec rake
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rmagick
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.15.4
4
+ version: 2.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Hunter
@@ -11,50 +11,64 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2015-08-14 00:00:00.000000000 Z
14
+ date: 2016-08-15 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
- name: rake-compiler
17
+ name: rspec
18
18
  requirement: !ruby/object:Gem::Requirement
19
19
  requirements:
20
- - - ">="
20
+ - - "~>"
21
21
  - !ruby/object:Gem::Version
22
- version: '0'
22
+ version: 3.2.0
23
23
  type: :development
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - ">="
27
+ - - "~>"
28
28
  - !ruby/object:Gem::Version
29
- version: '0'
29
+ version: 3.2.0
30
30
  - !ruby/object:Gem::Dependency
31
- name: rspec
31
+ name: rubocop
32
32
  requirement: !ruby/object:Gem::Requirement
33
33
  requirements:
34
34
  - - "~>"
35
35
  - !ruby/object:Gem::Version
36
- version: 3.2.0
36
+ version: 0.33.0
37
37
  type: :development
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
41
  - - "~>"
42
42
  - !ruby/object:Gem::Version
43
- version: 3.2.0
43
+ version: 0.33.0
44
44
  - !ruby/object:Gem::Dependency
45
- name: rubocop
45
+ name: test-unit
46
46
  requirement: !ruby/object:Gem::Requirement
47
47
  requirements:
48
48
  - - "~>"
49
49
  - !ruby/object:Gem::Version
50
- version: 0.33.0
50
+ version: '2'
51
51
  type: :development
52
52
  prerelease: false
53
53
  version_requirements: !ruby/object:Gem::Requirement
54
54
  requirements:
55
55
  - - "~>"
56
56
  - !ruby/object:Gem::Version
57
- version: 0.33.0
57
+ version: '2'
58
+ - !ruby/object:Gem::Dependency
59
+ name: rake-compiler
60
+ requirement: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: '0'
65
+ type: :development
66
+ prerelease: false
67
+ version_requirements: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ version: '0'
58
72
  description: RMagick is an interface between Ruby and ImageMagick.
59
73
  email: github@benjaminfleischer.com
60
74
  executables: []
@@ -452,6 +466,7 @@ files:
452
466
  - test/srgb.icm
453
467
  - test/test_all_basic.rb
454
468
  - test/tmpnam_test.rb
469
+ - wercker.yml
455
470
  homepage: https://github.com/rmagick/rmagick
456
471
  licenses:
457
472
  - MIT
@@ -475,7 +490,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
475
490
  requirements:
476
491
  - ImageMagick 6.4.9 or later
477
492
  rubyforge_project: rmagick
478
- rubygems_version: 2.4.7
493
+ rubygems_version: 2.5.1
479
494
  signing_key:
480
495
  specification_version: 4
481
496
  summary: Ruby binding to ImageMagick
@@ -505,4 +520,3 @@ test_files:
505
520
  - test/srgb.icm
506
521
  - test/test_all_basic.rb
507
522
  - test/tmpnam_test.rb
508
- has_rdoc: false