Skip to content

Commit

Permalink
Merge branch 'release/2.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Dolski committed Jan 31, 2016
2 parents 6df3929 + 0c5d7c0 commit fe5324a
Show file tree
Hide file tree
Showing 269 changed files with 4,372 additions and 2,519 deletions.
42 changes: 42 additions & 0 deletions cantaloupe.properties.sample
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ max_pixels = 400000000
# website for more information.) This can be an absolute path, or a
# filename; if only a filename is specified, it will be searched for in the
# same folder as this file, and then the current working directory.
# Comment out or set blank to disable the delegate script mechanism.
#delegate_script = delegates.rb

# Helpful in development
Expand Down Expand Up @@ -230,6 +231,18 @@ processor.fallback = Java2dProcessor
# Optional; overrides the PATH
#ImageMagickProcessor.path_to_binaries = /usr/local/bin

#----------------------------------------
# JaiProcessor
#----------------------------------------

# JPEG output quality. Should be a number between 0-1 ending in "f"
JaiProcessor.jpg.quality = 0.7f

# TIFF output compression type. Available values are `LZW`, `Deflate`,
# `ZLib`, `JPEG`, and `PackBits`. Comment out or leave blank for no
# compression.
JaiProcessor.tif.compression = LZW

#----------------------------------------
# Java2dProcessor
#----------------------------------------
Expand All @@ -241,6 +254,11 @@ Java2dProcessor.scale_mode = speed
# JPEG output quality. Should be a number between 0-1 ending in "f"
Java2dProcessor.jpg.quality = 0.7f

# TIFF output compression type. Available values are `LZW`, `Deflate`,
# `ZLib`, `JPEG`, and `PackBits`. Comment out or leave blank for no
# compression.
Java2dProcessor.tif.compression = LZW

#----------------------------------------
# KakaduProcessor
#----------------------------------------
Expand Down Expand Up @@ -320,6 +338,16 @@ FilesystemCache.pathname = /var/cache/cantaloupe
# blank or 0 for "forever"
FilesystemCache.ttl_seconds = 2592000

# Levels of folder hierarchy. Deeper depth results in fewer files per
# directory. Set to 0 to disable subfolders.
# Purge the cache after changing this.
FilesystemCache.dir.depth = 3

# Number of characters in hierarchy directory names. Should be set to
# 16^n < [max number of directory entries your filesystem can deal with].
# Purge the cache after changing this.
FilesystemCache.dir.name_length = 2

#----------------------------------------
# JdbcCache
#----------------------------------------
Expand Down Expand Up @@ -369,6 +397,13 @@ log.application.RollingFileAppender.policy = TimeBasedRollingPolicy
log.application.RollingFileAppender.TimeBasedRollingPolicy.filename_pattern = /path/to/logs/cantaloupe-%d{yyyy-MM-dd}.log
log.application.RollingFileAppender.TimeBasedRollingPolicy.max_history = 30

# See the "SyslogAppender" section for a list of facilities:
# http://logback.qos.ch/manual/appenders.html
log.application.SyslogAppender.enabled = false
log.application.SyslogAppender.host =
log.application.SyslogAppender.port = 514
log.application.SyslogAppender.facility = LOCAL0

#----------------------------------------
# !! Access Log
#----------------------------------------
Expand All @@ -383,3 +418,10 @@ log.access.RollingFileAppender.pathname = /path/to/logs/access.log
log.access.RollingFileAppender.policy = TimeBasedRollingPolicy
log.access.RollingFileAppender.TimeBasedRollingPolicy.filename_pattern = /path/to/logs/access-%d{yyyy-MM-dd}.log
log.access.RollingFileAppender.TimeBasedRollingPolicy.max_history = 30

# See the "SyslogAppender" section for a list of facilities:
# http://logback.qos.ch/manual/appenders.html
log.access.SyslogAppender.enabled = false
log.access.SyslogAppender.host =
log.access.SyslogAppender.port = 514
log.access.SyslogAppender.facility = LOCAL0
46 changes: 40 additions & 6 deletions delegates.rb.sample
Original file line number Diff line number Diff line change
@@ -1,18 +1,52 @@
# Sample Ruby delegate script, containing placeholders for all available
# delegate script methods. See the "Delegate Script" section of the user
# manual for more information.
# methods. See the "Delegate Script" section of the user manual for more
# information.
#
# DO NOT EDIT! Instead, copy to a file named `delegates.rb` and edit that.

module Cantaloupe

##
# Tells the server whether the given request is authorized. Will be called
# upon all image requests to any endpoint.
#
# Implementations should assume that the underlying resource is available.
#
# @param identifier [String] Image identifier
# @param full_size [Hash<String,Integer>] Hash with "width" and "height"
# keys corresponding to the pixel
# dimensions of the source image.
# @param operations [Array<Hash<String,Object>] Array of operations in order
# of execution. Only operations that are not no-ops will
# be included. Every hash contains an "operation" key
# corresponding to the type of operation. See the Javadoc
# of e.i.l.c.image.Operation implementations for a list of
# possible operations.
# @param resulting_size [Hash<String,String>] Hash with "width" and "height"
# keys corresponding to the pixel dimensions of the
# resulting image after all operations are applied.
# @param output_format [Hash<String,String>] Hash with "media_type" and
# "extension" keys.
# @param request_uri [String] Full request URI
# @param request_headers [Hash<String,String>]
# @param client_ip [String]
# @param cookies [Hash<String,String>]
# @return [Boolean] Whether the request is authorized based on the supplied
# parameters.
#
def self.authorized?(identifier, full_size, operations, resulting_size,
output_format, request_uri, request_headers, client_ip,
cookies)
true
end

##
# Used to define a service in the IIIF Image API 2.0 information endpoint.
# Return nil to avoid.
#
# @param identifier [String] Image identifier
# @return [Hash,nil] Hash that will be appended to the `service` key in
# IIIF Image API 2.x information responses, or nil.
# IIIF Image API 2.x information responses, or nil.
#
def self.get_iiif2_service(identifier)
end
Expand All @@ -22,7 +56,7 @@ module Cantaloupe
#
# @param identifier [String] Image identifier
# @return [String,nil] Absolute pathname of the image corresponding to the
# given identifier, or nil if not found.
# given identifier, or nil if not found.
#
def self.get_pathname(identifier)
end
Expand All @@ -41,7 +75,7 @@ module Cantaloupe
#
# @param identifier [String] Image identifier
# @return [String,nil] S3 object key of the image corresponding to the
# given identifier, or nil if not found.
# given identifier, or nil if not found.
#
def self.get_s3_object_key(identifier)
end
Expand All @@ -51,7 +85,7 @@ module Cantaloupe
#
# @param identifier [String] Image identifier
# @return [String,nil] URL of the image corresponding to the given
# identifier, or nil if not found.
# identifier, or nil if not found.
#
def self.get_url(identifier)
end
Expand Down
116 changes: 69 additions & 47 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,55 +4,86 @@
<groupId>edu.illinois.library.cantaloupe</groupId>
<artifactId>Cantaloupe</artifactId>
<packaging>jar</packaging>
<version>2.0.1</version>
<!-- needs to be kept synchronized with properties/cantaloupe.version -->
<version>2.1</version>
<name>Cantaloupe</name>
<url>https://medusa-project.github.io/cantaloupe/</url>
<inceptionYear>2015</inceptionYear>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<cantaloupe.version>2.0.1</cantaloupe.version>
<amazon-s3.version>1.10.43</amazon-s3.version>
<commons-io.version>2.4</commons-io.version>
<commons-lang3.version>3.4</commons-lang3.version>
<h2.version>1.4.190</h2.version>
<hikari.version>2.4.1</hikari.version>
<im4java.version>1.4.0</im4java.version>
<imageio-ext.version>1.1.12</imageio-ext.version>
<jackson.version>2.6.0</jackson.version>
<jaiext-scale.version>1.0.6</jaiext-scale.version>
<janino.version>2.7.8</janino.version>
<jruby.version>9.0.4.0</jruby.version>
<junit.version>4.12</junit.version>
<logback.version>1.1.3</logback.version>
<mimeutil.version>2.1.3</mimeutil.version>
<restlet.version>2.3.5</restlet.version>
<slf4j.version>1.7.12</slf4j.version>
<cantaloupe.version>2.1</cantaloupe.version>
<restlet.version>2.3.6</restlet.version>
</properties>

<developers>
<developer>
<id>alexd</id>
<name>Alex Dolski</name>
<email>[email protected]</email>
<organization>University of Illinois at Urbana-Champaign Library</organization>
<organizationUrl>http://www.library.illinois.edu/</organizationUrl>
<roles>
<role>founder</role>
<role>lead</role>
<role>developer</role>
<role>debugger</role>
<role>reviewer</role>
<role>support</role>
<role>maintainer</role>
</roles>
<timezone>-6</timezone>
</developer>
</developers>

<scm>
<connection>scm:git:git://github.com/medusa-project/cantaloupe</connection>
<developerConnection>scm:git:[email protected]:medusa-project/cantaloupe</developerConnection>
<tag>HEAD</tag>
<url>https://github.com/medusa-project/cantaloupe</url>
</scm>
<issueManagement>
<system>GitHub Issues</system>
<url>https://github.com/medusa-project/cantaloupe/issues</url>
</issueManagement>

<dependencies>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
<version>1.1.3</version>
</dependency>
<!-- Used by AmazonS3Resolver -->
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-s3</artifactId>
<version>${amazon-s3.version}</version>
<version>1.10.43</version>
</dependency>
<dependency>
<groupId>com.github.jai-imageio</groupId>
<artifactId>jai-imageio-core</artifactId>
<version>1.3.1</version>
</dependency>
<!-- Used in tests to test for System.exit() -->
<dependency>
<groupId>com.github.stefanbirkner</groupId>
<artifactId>system-rules</artifactId>
<version>1.15.1</version>
<scope>test</scope>
</dependency>
<!-- Used by JdbcResolverTest and JdbcCacheTest -->
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>${h2.version}</version>
<version>1.4.190</version>
<scope>test</scope>
</dependency>
<!-- Provides a JDBC connection pool for JdbcResolver and JdbcCache -->
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>${hikari.version}</version>
<version>2.4.1</version>
</dependency>
<dependency>
<groupId>commons-configuration</groupId>
Expand All @@ -62,12 +93,12 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons-io.version}</version>
<version>2.4</version>
</dependency>
<dependency>
<groupId>eu.medsea.mimeutil</groupId>
<artifactId>mime-util</artifactId>
<version>${mimeutil.version}</version>
<version>2.1.3</version>
<exclusions>
<exclusion>
<groupId>log4j</groupId>
Expand All @@ -79,49 +110,40 @@
</exclusion>
</exclusions>
</dependency>
<!-- Provides JAI for JaiProcessor -->
<dependency>
<groupId>it.geosolutions.imageio-ext</groupId>
<artifactId>imageio-ext-imagereadmt</artifactId>
<version>${imageio-ext.version}</version>
</dependency>
<dependency>
<groupId>it.geosolutions.imageio-ext</groupId>
<artifactId>imageio-ext-tiff</artifactId>
<version>${imageio-ext.version}</version>
</dependency>
<dependency> <!-- https://github.com/geosolutions-it/jai-ext -->
<groupId>it.geosolutions.jaiext.scale</groupId>
<artifactId>jt-scale</artifactId>
<version>${jaiext-scale.version}</version>
<groupId>javax.media.jai</groupId>
<artifactId>com.springsource.javax.media.jai.core</artifactId>
<version>1.1.3</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons-lang3.version}</version>
<version>3.4</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<version>4.12</version>
<scope>test</scope>
</dependency>
<!-- Supports <if> expressions in logback.xml -->
<dependency>
<groupId>org.codehaus.janino</groupId>
<artifactId>janino</artifactId>
<version>${janino.version}</version>
<version>2.7.8</version>
</dependency>
<!-- Used by GraphicsMagickProcessor and ImageMagickProcessor -->
<dependency>
<groupId>org.im4java</groupId>
<artifactId>im4java</artifactId>
<version>${im4java.version}</version>
<version>1.4.0</version>
</dependency>
<!-- Used by FilesystemResolver to execute lookup scripts -->
<dependency>
<groupId>org.jruby</groupId>
<artifactId>jruby</artifactId>
<version>${jruby.version}</version>
<version>9.0.5.0</version>
<type>pom</type>
</dependency>
<dependency>
Expand Down Expand Up @@ -161,21 +183,21 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
<version>1.7.12</version>
</dependency>
<!-- intercepts jcl log messages from Commons Configuration etc. -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>${slf4j.version}</version>
<version>1.7.12</version>
</dependency>
</dependencies>

<repositories>
<repository>
<id>geosolutions</id>
<name>GeoSolutions Repository</name>
<url>http://maven.geo-solutions.it/</url>
<id>com.springsource.repository.bundles.external</id>
<name>SpringSource Enterprise Bundle Repository - External Bundle Releases</name>
<url>http://repository.springsource.com/maven/bundles/external</url>
</repository>
<repository>
<id>maven-restlet</id>
Expand Down
Loading

0 comments on commit fe5324a

Please sign in to comment.