hydra-derivatives 1.0.0.beta1 → 1.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -3
- data/VERSION +1 -1
- data/hydra-derivatives.gemspec +2 -4
- data/lib/hydra/derivatives/jpeg2k_image.rb +1 -1
- data/lib/hydra/derivatives/railtie.rb +6 -4
- data/spec/fixtures/jpeg2k_config.yml +4 -4
- data/spec/units/jpeg2k_spec.rb +2 -2
- metadata +5 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a187e27d98d4794b3b08e838f1447ab327c3c087
|
4
|
+
data.tar.gz: af4f7cb52f6ba4baa4030fec666246c56d15f316
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 088f11cb8055706f5598635efa2cfa2b30f3c9cb68da5569b462fc416198a19aad676464fa3696e41d21810e00414033e1cca6cfb328e52772ca68cb39e33b4e
|
7
|
+
data.tar.gz: bb4f41955207630d92d09bc3c7e53b1a1a93b5c1e46efe711eb6136725d3205d02d7495a2be775b1e669bb6a8895c341d70fbda51de61adfafa1804e6dd9ec42
|
data/Rakefile
CHANGED
@@ -2,10 +2,8 @@
|
|
2
2
|
|
3
3
|
require "bundler/gem_tasks"
|
4
4
|
|
5
|
-
APP_ROOT="." # for jettywrapper
|
6
5
|
require 'jettywrapper'
|
7
|
-
|
8
|
-
Jettywrapper.url = "https://github.com/projecthydra/hydra-jetty/archive/#{JETTY_ZIP_BASENAME}.zip"
|
6
|
+
Jettywrapper.hydra_jetty_version = "v8.1.0"
|
9
7
|
|
10
8
|
# Dir.glob('tasks/*.rake').each { |r| import r }
|
11
9
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.0.
|
1
|
+
1.0.0.rc1
|
data/hydra-derivatives.gemspec
CHANGED
@@ -1,10 +1,9 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
version = File.read(File.expand_path("../VERSION", __FILE__)).strip
|
3
3
|
|
4
|
-
|
5
4
|
Gem::Specification.new do |spec|
|
6
5
|
spec.name = "hydra-derivatives"
|
7
|
-
spec.version = version
|
6
|
+
spec.version = version
|
8
7
|
spec.authors = ["Justin Coyne"]
|
9
8
|
spec.email = ["justin@curationexperts.com"]
|
10
9
|
spec.description = %q{Derivative generation plugin for hydra}
|
@@ -22,11 +21,10 @@ Gem::Specification.new do |spec|
|
|
22
21
|
spec.add_development_dependency "jettywrapper"
|
23
22
|
spec.add_development_dependency "rspec"
|
24
23
|
|
25
|
-
spec.add_dependency 'active-fedora', '~> 9.0.0.
|
24
|
+
spec.add_dependency 'active-fedora', '~> 9.0.0.rc2'
|
26
25
|
spec.add_dependency 'hydra-file_characterization'
|
27
26
|
spec.add_dependency 'mini_magick'
|
28
27
|
spec.add_dependency 'activesupport', '>= 3.2.13', '< 5.0'
|
29
28
|
spec.add_dependency 'mime-types'
|
30
29
|
spec.add_dependency 'deprecation'
|
31
30
|
end
|
32
|
-
|
@@ -72,7 +72,7 @@ module Hydra
|
|
72
72
|
|
73
73
|
def self.kdu_compress_recipe(args, quality, long_dim)
|
74
74
|
if args[:recipe].is_a? Symbol
|
75
|
-
recipe = [args[:recipe].to_s, quality].join('_')
|
75
|
+
recipe = [args[:recipe].to_s, quality].join('_').to_sym
|
76
76
|
if Hydra::Derivatives.kdu_compress_recipes.has_key? recipe
|
77
77
|
return Hydra::Derivatives.kdu_compress_recipes[recipe]
|
78
78
|
else
|
@@ -1,7 +1,9 @@
|
|
1
|
-
module Hydra
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
module Hydra
|
2
|
+
module Derivative
|
3
|
+
class Railtie < Rails::Railtie
|
4
|
+
initializer 'hydra-derivative' do
|
5
|
+
require 'hydra-file_characterization'
|
6
|
+
end
|
5
7
|
end
|
6
8
|
end
|
7
9
|
end
|
@@ -1,13 +1,13 @@
|
|
1
1
|
defaults: &defaults
|
2
2
|
jp2_recipes:
|
3
3
|
# note that these aren't real recipes, just enough to test configuration options
|
4
|
-
myrecipe_color: >
|
4
|
+
:myrecipe_color: >
|
5
5
|
-rate 2.4
|
6
|
-
-jp2_space sRGB
|
6
|
+
-jp2_space sRGB
|
7
7
|
Stiles=\{1024,1024\}
|
8
|
-
myrecipe_grey: >
|
8
|
+
:myrecipe_grey: >
|
9
9
|
-rate 2.4
|
10
|
-
-jp2_space sLUM
|
10
|
+
-jp2_space sLUM
|
11
11
|
Stiles=\{1024,1024\}
|
12
12
|
|
13
13
|
development:
|
data/spec/units/jpeg2k_spec.rb
CHANGED
@@ -13,7 +13,7 @@ describe Hydra::Derivatives::Jpeg2kImage do
|
|
13
13
|
it "calculates the compression rates for each quality layer" do
|
14
14
|
compression_num = 10
|
15
15
|
layers = 8
|
16
|
-
calc = Hydra::Derivatives::Jpeg2kImage.layer_rates(layers, compression_num)
|
16
|
+
calc = Hydra::Derivatives::Jpeg2kImage.layer_rates(layers, compression_num)
|
17
17
|
expect(calc).to eq("2.4,1.48331273,0.91675694,0.56659885,0.3501847,0.21643059,0.13376427,0.0826726")
|
18
18
|
end
|
19
19
|
|
@@ -28,7 +28,7 @@ describe Hydra::Derivatives::Jpeg2kImage do
|
|
28
28
|
it "can get the recipe from a config file" do
|
29
29
|
args = { recipe: :myrecipe }
|
30
30
|
r = Hydra::Derivatives::Jpeg2kImage.kdu_compress_recipe(args, 'grey', 7200)
|
31
|
-
expect(r).to eq(@sample_cfg['jp2_recipes'][
|
31
|
+
expect(r).to eq(@sample_cfg['jp2_recipes'][:myrecipe_grey])
|
32
32
|
end
|
33
33
|
|
34
34
|
it "can take a recipe as a string" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hydra-derivatives
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Coyne
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 9.0.0.
|
75
|
+
version: 9.0.0.rc2
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 9.0.0.
|
82
|
+
version: 9.0.0.rc2
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: hydra-file_characterization
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -234,7 +234,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
234
234
|
version: 1.3.1
|
235
235
|
requirements: []
|
236
236
|
rubyforge_project:
|
237
|
-
rubygems_version: 2.
|
237
|
+
rubygems_version: 2.4.3
|
238
238
|
signing_key:
|
239
239
|
specification_version: 4
|
240
240
|
summary: Derivative generation plugin for hydra
|
@@ -262,4 +262,3 @@ test_files:
|
|
262
262
|
- spec/units/logger_spec.rb
|
263
263
|
- spec/units/transcoding_spec.rb
|
264
264
|
- spec/units/video_spec.rb
|
265
|
-
has_rdoc:
|