riiif 2.1.0 → 2.2.0

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
  SHA256:
3
- metadata.gz: 2e92c056972609b8cb70468fae8b71b34e1974b2ec4caa691af4422187886fa8
4
- data.tar.gz: eae0755c48ed444ebc292b56f30bd13520d1e34988ec6c7c37087483bbfbd8d8
3
+ metadata.gz: b79bb6c8082dc7033167055a4f335122b60ac337c0eaf9b3b49a1b9119741edb
4
+ data.tar.gz: 32ef6a3ecfb7b3cec38e3ffe5189f499bc002fdaf06b0307face66f5ee8ad239
5
5
  SHA512:
6
- metadata.gz: 5fe8da75c42178b50f8768cdb8f8383043d994865ab917d6b1b74083660b925265f0cd7d08f90f0670e7640c41dcf1b48736926a02855a391c51210ef96256f9
7
- data.tar.gz: 11dbed920c6e8bd094cbd2ae01e9e5f29de71670833b3d39d231c5ad0415b39fbc4c3da95b9f79dc46d6e6e12f50a962ed4b425ad3d65fa28d960868655db9e1
6
+ metadata.gz: 2e1f6cbb5ac851d0e6b86d27af6d68643dc4c3ab7da1eb0e61d884634bb2e9d8c56679becb1c98ccda2c4c119cf7926c0416386c1b91b0489eb88c4a106a63c5
7
+ data.tar.gz: 0f5ac5d03dc707c2a14b5a720a393192611adec04ab40407b7ce3e7c49e0ea0ccb0df9d0607d7da4f7689a2d69f67c358e60a26150afd661e7522a0049fb323b
@@ -5,7 +5,12 @@ before_install:
5
5
  - gem update --system
6
6
 
7
7
  rvm:
8
- - 2.4.0
8
+ - 2.6.3
9
+
10
+ env:
11
+ - "RAILS_VERSION=5.2.3"
12
+ - "RAILS_VERSION=6.0.0"
9
13
 
10
14
  sudo: false
11
15
  language: ruby
16
+ dist: trusty
data/Gemfile CHANGED
@@ -28,13 +28,6 @@ else
28
28
  end
29
29
  end
30
30
 
31
- case ENV['RAILS_VERSION']
32
- when /^4.2/
33
- gem 'responders', '~> 2.0'
34
- gem 'sass-rails', '>= 5.0'
35
- gem 'coffee-rails', '~> 4.1.0'
36
- when /^4.[01]/
37
- gem 'sass-rails', '< 5.0'
38
- end
31
+ gem 'sass-rails', '~> 5.0'
39
32
  end
40
33
  # END ENGINE_CART BLOCK
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [![Coverage Status](https://coveralls.io/repos/github/curationexperts/riiif/badge.svg?branch=master)](https://coveralls.io/github/curationexperts/riiif?branch=master)
4
4
 
5
5
 
6
- A Ruby IIIF image server as a rails engine
6
+ A Ruby IIIF image server as a rails engine. Note that RIIIF is meant for development convenience and will not scale to the needs of most production-level applications.
7
7
 
8
8
  ## Installation
9
9
 
@@ -48,7 +48,7 @@ When the Id passed in is "foo_image", then it will look for an image file using
48
48
  ### Images retrieved over HTTP
49
49
  It's preferable to use files on the filesystem, because this avoids the overhead of downloading the file. If this is unavoidable, Riiif can be configured to fetch files from the network. To enable this behavior, configure Riiif to use an alternative resolver:
50
50
  ```
51
- Riiif::Image.file_resolver = Riiif::HTTPFileResolver.new
51
+ Riiif::Image.file_resolver = Riiif::HttpFileResolver.new
52
52
  ```
53
53
  Then we configure the resolver with a mechanism for mapping the provided id to a url:
54
54
  ```
@@ -154,7 +154,7 @@ Create an initializer like this in `config/initializers/riiif_initializer.rb`
154
154
 
155
155
  ```ruby
156
156
  # Tell RIIIF to get files via HTTP (not from the local disk)
157
- Riiif::Image.file_resolver = Riiif::HTTPFileResolver.new
157
+ Riiif::Image.file_resolver = Riiif::HttpFileResolver.new
158
158
 
159
159
  # This tells RIIIF how to resolve the identifier to a URI in Fedora
160
160
  Riiif::Image.file_resolver.id_to_uri = lambda do |id|
@@ -2,11 +2,11 @@ require 'open-uri'
2
2
  require 'active_support/core_ext/file/atomic'
3
3
 
4
4
  module Riiif
5
- class HTTPFileResolver
5
+ class HttpFileResolver
6
6
  # Set a lambda that maps the first parameter (id) to a URL
7
7
  # Example:
8
8
  #
9
- # resolver = Riiif::HTTPFileResolver.new
9
+ # resolver = Riiif::HttpFileResolver.new
10
10
  # resolver.id_to_uri = lambda do |id|
11
11
  # "http://upload.wikimedia.org/wikipedia/commons/thumb/a/a4/#{id}.jpg/600px-#{id}.jpg"
12
12
  # end
@@ -12,6 +12,8 @@ module Riiif
12
12
  # This error is raised when Riiif can't convert an image
13
13
  class ConversionError < Error; end
14
14
 
15
+ HTTPFileResolver = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('Riiif::HTTPFileResolver', 'Riiif::HttpFileResolver')
16
+
15
17
  mattr_accessor :not_found_image # the image to use when a lookup fails
16
18
  mattr_accessor :unauthorized_image # the image to use when a user doesn't have access
17
19
 
@@ -1,3 +1,3 @@
1
1
  module Riiif
2
- VERSION = '2.1.0'.freeze
2
+ VERSION = '2.2.0'.freeze
3
3
  end
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ['lib']
20
20
 
21
- spec.add_dependency 'railties', '>= 4.2', '<6'
21
+ spec.add_dependency 'railties', '>= 4.2', '<7'
22
22
  spec.add_dependency 'deprecation', '>= 1.0.0'
23
23
  spec.add_dependency 'iiif-image-api', '~> 0.1.0'
24
24
  spec.add_development_dependency 'bundler'
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe Riiif::HTTPFileResolver do
3
+ describe Riiif::HttpFileResolver do
4
4
  subject { described_class.new }
5
5
 
6
6
  before do
@@ -39,9 +39,9 @@ RSpec.describe Riiif::Image do
39
39
  end
40
40
  end
41
41
 
42
- context 'using HTTPFileResolver' do
42
+ context 'using HttpFileResolver' do
43
43
  before do
44
- described_class.file_resolver = Riiif::HTTPFileResolver.new
44
+ described_class.file_resolver = Riiif::HttpFileResolver.new
45
45
  described_class.file_resolver.id_to_uri = lambda do |id|
46
46
  "https://upload.wikimedia.org/wikipedia/commons/thumb/a/a4/#{id}.jpg/600px-#{id}.jpg"
47
47
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: riiif
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-30 00:00:00.000000000 Z
11
+ date: 2019-11-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '4.2'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '6'
22
+ version: '7'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '4.2'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '6'
32
+ version: '7'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: deprecation
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -233,8 +233,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
233
233
  - !ruby/object:Gem::Version
234
234
  version: '0'
235
235
  requirements: []
236
- rubyforge_project:
237
- rubygems_version: 2.7.9
236
+ rubygems_version: 3.0.3
238
237
  signing_key:
239
238
  specification_version: 4
240
239
  summary: A rails engine that support IIIF requests