Commit 483adc13 authored by Antonio Terceiro's avatar Antonio Terceiro

Imported Upstream version 2.15.4

parent 61b613d5
# EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs
# @see http://editorconfig.org
root = true
[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = spaces
tab_width = 2
[{*.{rb,yml,sh,md}]
indent_size = 2
*.gem
*.rbc
.bundle
.config
.yardoc
Gemfile.lock
InstalledFiles
_yardoc
coverage
lib/bundler/man
pkg
rdoc
spec/reports
test/tmp
test/version_tmp
tmp
*.bundle
*.so
*.o
*.a
mkmf.log
ruby:
config_file: .rubocop.yml
--require spec_helper
# Custom configuration, edit with care! This gem needs to be backwards
# compatible with Ruby 1.8:
Style/HashSyntax:
EnforcedStyle: hash_rockets
Style/DeprecatedHashMethods:
Enabled: false
# TODO: How to warn if stabby proc is used?
Style/Lambda:
Enabled: false
Style/StringLiterals:
EnforcedStyle: single_quotes
Style/DotPosition:
EnforcedStyle: leading
# Auto-generated config to be cleaned up and deleted:
# Offense count: 2
# Cop supports --auto-correct.
Lint/BlockAlignment:
Enabled: false
Lint/FormatParameterMismatch:
Enabled: false
# Offense count: 1
Lint/HandleExceptions:
Enabled: false
# Offense count: 1
Lint/RescueException:
Enabled: false
# Offense count: 1
Lint/ShadowingOuterLocalVariable:
Enabled: false
# Offense count: 1
Lint/UnderscorePrefixedVariableName:
Enabled: false
# Offense count: 9
# Cop supports --auto-correct.
Lint/UnusedBlockArgument:
Enabled: false
# Offense count: 17
# Cop supports --auto-correct.
Lint/UnusedMethodArgument:
Enabled: false
# Offense count: 22
Lint/UselessAssignment:
Enabled: false
# Offense count: 183
Metrics/AbcSize:
Max: 559
# Offense count: 1
Metrics/BlockNesting:
Max: 4
# Offense count: 17
# Configuration parameters: CountComments.
Metrics/ClassLength:
Max: 1099
# Offense count: 22
Metrics/CyclomaticComplexity:
Max: 42
# Offense count: 844
# Configuration parameters: AllowURI, URISchemes.
Metrics/LineLength:
Max: 276
# Offense count: 178
# Configuration parameters: CountComments.
Metrics/MethodLength:
Max: 157
# Offense count: 13
# Configuration parameters: CountKeywordArgs.
Metrics/ParameterLists:
Max: 8
# Offense count: 14
Metrics/PerceivedComplexity:
Max: 41
Performance/StringReplacement:
Enabled: false
# Offense count: 4
Style/AccessorMethodName:
Enabled: false
Style/AlignArray:
Enabled: false
# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
Style/BarePercentLiterals:
Enabled: false
# Offense count: 7
Style/CaseEquality:
Enabled: false
# Offense count: 63
# Configuration parameters: IndentWhenRelativeTo, SupportedStyles, IndentOneStep.
Style/CaseIndentation:
Enabled: false
# Offense count: 13
Style/ClassAndModuleCamelCase:
Enabled: false
# Offense count: 6
# Configuration parameters: EnforcedStyle, SupportedStyles.
Style/ClassAndModuleChildren:
Enabled: false
# Offense count: 1
# Cop supports --auto-correct.
Style/ClosingParenthesisIndentation:
Enabled: false
Style/CollectionMethods:
Enabled: false
# Offense count: 5
# Cop supports --auto-correct.
Style/CommentIndentation:
Enabled: false
# Offense count: 126
Style/ConstantName:
Enabled: false
# Offense count: 62
Style/Documentation:
Enabled: false
Style/EmptyLinesAroundBlockBody:
Enabled: false
Style/ExtraSpacing:
Enabled: false
# Offense count: 23
# Configuration parameters: Exclude.
Style/FileName:
Enabled: false
# Offense count: 68
# Configuration parameters: EnforcedStyle, SupportedStyles.
Style/FormatString:
Enabled: false
# Offense count: 45
# Configuration parameters: AllowedVariables.
Style/GlobalVars:
Enabled: false
# Offense count: 8
# Configuration parameters: MinBodyLength.
Style/GuardClause:
Enabled: false
# Offense count: 29
# Cop supports --auto-correct.
# Configuration parameters: MaxLineLength.
Style/IfUnlessModifier:
Enabled: false
Style/IndentArray:
Enabled: false
Style/IndentationConsistency:
Enabled: false
# Offense count: 1049
# Cop supports --auto-correct.
# Configuration parameters: Width.
Style/IndentationWidth:
Enabled: false
# Offense count: 47
# Cop supports --auto-correct.
Style/LeadingCommentSpace:
Enabled: false
# Offense count: 4
# Configuration parameters: EnforcedStyle, SupportedStyles.
Style/MethodName:
Enabled: false
# Offense count: 9
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
Style/MultilineOperationIndentation:
Enabled: false
# Offense count: 1
Style/MultilineTernaryOperator:
Enabled: false
# Offense count: 3
# Configuration parameters: EnforcedStyle, MinBodyLength, SupportedStyles.
Style/Next:
Enabled: false
# Offense count: 21
# Cop supports --auto-correct.
Style/NumericLiterals:
MinDigits: 18
# Offense count: 1
Style/OpMethod:
Enabled: false
# Offense count: 9
# Cop supports --auto-correct.
# Configuration parameters: PreferredDelimiters.
Style/PercentLiteralDelimiters:
Enabled: false
# Offense count: 10
# Cop supports --auto-correct.
Style/PerlBackrefs:
Enabled: false
# Offense count: 4
# Configuration parameters: NamePrefix, NamePrefixBlacklist.
Style/PredicateName:
Enabled: false
# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, AllowInnerSlashes.
Style/RegexpLiteral:
Enabled: false
Style/RescueEnsureAlignment:
Enabled: false
# Offense count: 2
Style/RescueModifier:
Enabled: false
# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: AllowAsExpressionSeparator.
Style/Semicolon:
Enabled: false
# Offense count: 2
# Configuration parameters: Methods.
Style/SingleLineBlockParams:
Enabled: false
# Offense count: 7
# Cop supports --auto-correct.
Style/SingleSpaceBeforeFirstArg:
Enabled: false
# Offense count: 1114
# Cop supports --auto-correct.
Style/SpaceAfterComma:
Enabled: false
# Offense count: 91
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
Style/SpaceAroundEqualsInParameterDefault:
Enabled: false
# Offense count: 1066
# Cop supports --auto-correct.
# Configuration parameters: MultiSpaceAllowedForOperators.
Style/SpaceAroundOperators:
Enabled: false
# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
Style/SpaceBeforeBlockBraces:
Enabled: false
# Offense count: 204
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
Style/SpaceInsideBlockBraces:
Enabled: false
# Offense count: 6
# Cop supports --auto-correct.
Style/SpaceInsideBrackets:
Enabled: false
# Offense count: 68
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SupportedStyles.
Style/SpaceInsideHashLiteralBraces:
Enabled: false
# Offense count: 35
# Cop supports --auto-correct.
Style/SpaceInsideParens:
Enabled: false
# Offense count: 12
# Cop supports --auto-correct.
# Configuration parameters: IgnoredMethods.
Style/SymbolProc:
Enabled: false
# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyleForMultiline, SupportedStyles.
Style/TrailingComma:
Enabled: false
# Offense count: 2
# Configuration parameters: EnforcedStyle, SupportedStyles.
Style/VariableName:
Enabled: false
# Offense count: 7
# Cop supports --auto-correct.
# Configuration parameters: WordRegex.
Style/WordArray:
MinSize: 3
# https://github.com/colszowka/simplecov#using-simplecov-for-centralized-config
# see https://github.com/colszowka/simplecov/blob/master/lib/simplecov/defaults.rb
# vim: set ft=ruby
SimpleCov.profiles.define 'rmagick' do
load_profile 'test_frameworks'
add_group "Long files" do |src_file|
src_file.lines.count > 100
end
class MaxLinesFilter < SimpleCov::Filter
def matches?(source_file)
source_file.lines.count < filter_argument
end
end
add_group "Short files", MaxLinesFilter.new(5)
# Exclude these paths from analysis
add_filter 'bundle'
add_filter 'bin'
end
## RUN SIMPLECOV
if ENV['COVERAGE'] =~ /\Atrue\z/i
SimpleCov.start 'rmagick'
puts '[COVERAGE] Running with SimpleCov HTML Formatter'
SimpleCov.formatters = [SimpleCov::Formatter::HTMLFormatter]
end
language: ruby
os:
- linux
sudo: required
env:
# Currently successful release
- IMAGEMAGICK_VERSION=6.6.9-10
# Ubuntu's current stable release
- IMAGEMAGICK_VERSION=6.7.7-10
# Latest 6.7 release
- IMAGEMAGICK_VERSION=6.7.9-10
# Latest 6.8 release
- IMAGEMAGICK_VERSION=6.8.9-10
# Try with HDRI support, we don't mind if this fails currently.
- IMAGEMAGICK_VERSION=6.8.9-10 CONFIGURE_OPTIONS=--enable-hdri
# Latest release
- IMAGEMAGICK_VERSION=latest
before_install:
- source before_install_$TRAVIS_OS_NAME.sh
rvm:
- 1.8
- 1.9
- 2.0
- 2.1
- 2.2
matrix:
exclude:
- rvm: 1.8
env: IMAGEMAGICK_VERSION=6.7.9-10
- rvm: 1.8
env: IMAGEMAGICK_VERSION=6.7.7-10
- rvm: 1.8
env: IMAGEMAGICK_VERSION=6.8.9-10 CONFIGURE_OPTIONS=--enable-hdri
- rvm: 1.8
env: IMAGEMAGICK_VERSION=6.8.9-10
- rvm: 1.9
env: IMAGEMAGICK_VERSION=6.7.9-10
- rvm: 1.9
env: IMAGEMAGICK_VERSION=6.8.9-10 CONFIGURE_OPTIONS=--enable-hdri
- rvm: 2.0
env: IMAGEMAGICK_VERSION=6.7.7-10
- rvm: 2.0
env: IMAGEMAGICK_VERSION=6.7.9-10
- rvm: 2.0
env: IMAGEMAGICK_VERSION=6.8.9-10
- rvm: 2.0
env: IMAGEMAGICK_VERSION=6.8.9-10 CONFIGURE_OPTIONS=--enable-hdri
allow_failures:
- env: IMAGEMAGICK_VERSION=6.7.7-10
- env: IMAGEMAGICK_VERSION=6.7.9-10
rvm: 2.1
- env: IMAGEMAGICK_VERSION=6.7.9-10
rvm: 2.2
- env: IMAGEMAGICK_VERSION=6.8.9-10
rvm: 2.1
- env: IMAGEMAGICK_VERSION=6.8.9-10 CONFIGURE_OPTIONS=--enable-hdri
rvm: 2.1
- env: IMAGEMAGICK_VERSION=latest
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/a98c1112f5d60f97a532
on_success: change # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: false # default: false
This diff is collapsed.
# Contributor Code of Conduct
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
*This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)*
RMagick Contributor's Guide
===========================
Welcome
-------
Thank you for considering contributing to RMagick. Your contribution is always welcome and appreciated!
Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
Background
----------
RMagick is a Ruby gem with a C extension. The extension wraps the ImageMagick C library. Therefore, the following document may be helpful to you:
[Running C in Ruby](http://silverhammermba.github.io/emberb/extend/)
Priorities
----------
1. Green build of the gem on all operating systems. You can see the current build state on [the project page at Travis CI](https://travis-ci.org/rmagick/rmagick). You are welcome to improve it.
2. [Open issues](https://github.com/rmagick/rmagick/issues). You are welcome to reproduce them, report current state, suggest solutions, open pull requests with fixes. If you don't know where to start, sort issues by least recently updated. You can also [subscribe to receive random issues by email](http://www.codetriage.com/rmagick/rmagick).
Testing
-------
Our goal is to migrate to [RSpec](http://rspec.info).
If you write new tests, please do it in RSpec.
You are also welcome to convert existing Test/Unit tests to RSpec.
Committing
----------
All work for a next release is done in the `develop` branch. Please create your branch off of it.
It is better if you follow [Git Style Guide](https://github.com/agis-/git-style-guide).
Pull Requests
-------------
Please choose the `rmagick/rmagick` repo and the `develop` branch as the destination for your pull request.
NOTE: GitHub suggests `rmagick-temp/rmagick` repo by default. **This is incorrect.** Please switch to `rmagick/rmagick`. It should be the next repo in the drop-down list.
This diff is collapsed.
source 'https://rubygems.org'
# Specify your gem's dependencies in rmagick.gemspec
gemspec
group :development, :test do
gem 'simplecov', :require => false
end
# Used by README.textile
# gem "RedCloth"
Copyright © 2002-2013 Timothy P. Hunter
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
For installation instructions see http://rmagick.rubyforge.org/install-osx.html
This diff is collapsed.
h1. RMagick
!https://img.shields.io/gem/v/rmagick.svg?style=flat(RubyGems)!:http://rubygems.org/gems/rmagick !https://img.shields.io/gem/dt/rmagick.svg?style=flat! !https://www.versioneye.com/ruby/rmagick/reference_badge.svg?style=flat(VersionEye)!:https://www.versioneye.com/ruby/rmagick/references !https://img.shields.io/travis/rmagick/rmagick/master.svg?style=flat(Travis CI)!:https://travis-ci.org/rmagick/rmagick !https://img.shields.io/codeclimate/github/rmagick/rmagick.svg?style=flat(Code Climate)!:https://codeclimate.com/github/rmagick/rmagick !https://badges.gitter.im/Join%20Chat.svg(Gitter)!:https://gitter.im/rmagick/rmagick?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
h3. Table of Contents
* "Introduction":#intro
* "Prerequisites":#prereq
* "Installing RMagick":#install
* "Things that can go wrong":#wrong
* "Upgrading":#upgrade
* "More samples":#samples
* "Reporting Bugs":#bugs
* "Development Setup":#dev-setup
* "Contact Information":#contact
* "Credits":#credits
* "License":#license
* "Releasing":#releasing
h2(#intro). Introduction
RMagick is an interface between the Ruby programming language and the
ImageMagick image processing library.
h2(#prereq). Prerequisites
*O/S* Linux, &#042;BSD, OS X, Windows 2000, XP, Vista, other &#042;nix-like systems.
*Ruby* Version 1.8.5 or later. You can get Ruby from "www.ruby-lang.org":http://www.ruby-lang.org.
Ruby must be able to build C-Extensions (e.g. MRI, Rubinius, not JRuby)
*ImageMagick* Version 6.4.9 or later. You can get ImageMagick from "www.imagemagick.org":http://www.imagemagick.org.
On Ubuntu, you can run:
bc. sudo apt-get install libmagickwand-dev
h2(#install). Installing RMagick
h4. Installing via Bundler
Add to your `Gemfile`:
bc. gem 'rmagick'
Then run: