hydra-core 6.2.2 → 6.3.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/hydra-core.gemspec +1 -1
- data/lib/hydra-core.rb +1 -1
- data/lib/hydra-head/version.rb +1 -1
- data/lib/hydra/controller/download_behavior.rb +2 -2
- data/spec/controllers/downloads_controller_spec.rb +4 -4
- data/tasks/rspec.rake +4 -2
- metadata +14 -10
- data/spec/support/Gemfile +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 72d25319b87e47b55a3cac1d7de077f8c17faebb
|
4
|
+
data.tar.gz: 9ac105348b61019ecf34bee28e26011ff1b199d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8451f542407c4d4921d066ff94cbb52f30fdf6f4081a475c6661be381b5a935cd2947560ecb94e3c9aa02c905e3496bca9eff40204de601481e3d707faf3b4a
|
7
|
+
data.tar.gz: 8ab22ba9ac7bb63f170689b03a7489ba03faef3b403828e8cf45d85a21106cf0c138a77d43cadb77be8c617c8ece4ccbbd02f7634b8c547ae6ced40b52228fbb
|
data/hydra-core.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |gem|
|
|
19
19
|
gem.required_ruby_version = '>= 1.9.3'
|
20
20
|
|
21
21
|
|
22
|
-
gem.add_dependency "rails", '
|
22
|
+
gem.add_dependency "rails", '>= 3.2.3', '< 5'
|
23
23
|
gem.add_dependency "blacklight", '~> 4.0'
|
24
24
|
gem.add_dependency "active-fedora"
|
25
25
|
gem.add_dependency 'block_helpers'
|
data/lib/hydra-core.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'hydra'
|
2
2
|
|
3
3
|
module HydraHead
|
4
|
-
require 'hydra-head/engine' if defined?(Rails)
|
4
|
+
require 'hydra-head/engine' if defined?(Rails)
|
5
5
|
require 'hydra-head/routes'
|
6
6
|
# If you put this in your application's routes.rb, it will add the Hydra Head routes to the app.
|
7
7
|
# The hydra:head generator puts this in routes.rb for you by default.
|
data/lib/hydra-head/version.rb
CHANGED
@@ -63,7 +63,7 @@ module Hydra
|
|
63
63
|
|
64
64
|
if request.head?
|
65
65
|
content_head
|
66
|
-
elsif request.headers[
|
66
|
+
elsif request.headers['HTTP_RANGE']
|
67
67
|
send_range
|
68
68
|
else
|
69
69
|
send_file_headers! content_options
|
@@ -93,7 +93,7 @@ module Hydra
|
|
93
93
|
|
94
94
|
# render an HTTP Range response
|
95
95
|
def send_range
|
96
|
-
_, range = request.headers[
|
96
|
+
_, range = request.headers['HTTP_RANGE'].split('bytes=')
|
97
97
|
from, to = range.split('-').map(&:to_i)
|
98
98
|
to = datastream.dsSize - 1 unless to
|
99
99
|
length = to - from + 1
|
@@ -90,14 +90,14 @@ describe DownloadsController do
|
|
90
90
|
controller.stub(:log_download)
|
91
91
|
end
|
92
92
|
it "head request" do
|
93
|
-
request.env["
|
93
|
+
request.env["HTTP_RANGE"] = 'bytes=0-15'
|
94
94
|
head :show, id: 'changeme:test', datastream_id: 'webm'
|
95
95
|
response.headers['Content-Length'].should == 16
|
96
96
|
response.headers['Accept-Ranges'].should == 'bytes'
|
97
97
|
response.headers['Content-Type'].should == 'video/webm'
|
98
98
|
end
|
99
99
|
it "should send the whole thing" do
|
100
|
-
request.env["
|
100
|
+
request.env["HTTP_RANGE"] = 'bytes=0-15'
|
101
101
|
get :show, id: 'changeme:test', datastream_id: 'webm'
|
102
102
|
response.body.should == 'one1two2threfour'
|
103
103
|
response.headers["Content-Range"].should == 'bytes 0-15/16'
|
@@ -113,14 +113,14 @@ describe DownloadsController do
|
|
113
113
|
response.body.should == 'one1two2threfour'
|
114
114
|
end
|
115
115
|
it "should get a range not starting at the beginning" do
|
116
|
-
request.env["
|
116
|
+
request.env["HTTP_RANGE"] = 'bytes=3-15'
|
117
117
|
get :show, id: 'changeme:test', datastream_id: 'webm'
|
118
118
|
response.body.should == '1two2threfour'
|
119
119
|
response.headers["Content-Range"].should == 'bytes 3-15/16'
|
120
120
|
response.headers["Content-Length"].should == '13'
|
121
121
|
end
|
122
122
|
it "should get a range not ending at the end" do
|
123
|
-
request.env["
|
123
|
+
request.env["HTTP_RANGE"] = 'bytes=4-11'
|
124
124
|
get :show, id: 'changeme:test', datastream_id: 'webm'
|
125
125
|
response.body.should == 'two2thre'
|
126
126
|
response.headers["Content-Range"].should == 'bytes 4-11/16'
|
data/tasks/rspec.rake
CHANGED
@@ -23,8 +23,10 @@ task :generate do
|
|
23
23
|
unless File.exists?('spec/internal/Rakefile')
|
24
24
|
puts "Generating rails app"
|
25
25
|
`rails new spec/internal`
|
26
|
-
puts "
|
27
|
-
`
|
26
|
+
puts "Updating gemfile"
|
27
|
+
`echo " gem 'hydra-access-controls', :path=>'../../../hydra-access-controls'" >> spec/internal/Gemfile`
|
28
|
+
`echo " gem 'hydra-core', :path=>'../../', :require=>'hydra-core'" >> spec/internal/Gemfile`
|
29
|
+
`echo " gem 'factory_girl_rails'" >> spec/internal/Gemfile`
|
28
30
|
puts "Copying generator"
|
29
31
|
`cp -r spec/support/lib/generators spec/internal/lib`
|
30
32
|
within_test_app do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hydra-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.
|
4
|
+
version: 6.3.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Zumwalt, Bess Sadler, Julie Meloni, Naomi Dushay, Jessie Keck, John Scofield,
|
@@ -9,22 +9,28 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-06-
|
12
|
+
date: 2013-06-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- -
|
18
|
+
- - '>='
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: 3.2.3
|
21
|
+
- - <
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: '5'
|
21
24
|
type: :runtime
|
22
25
|
prerelease: false
|
23
26
|
version_requirements: !ruby/object:Gem::Requirement
|
24
27
|
requirements:
|
25
|
-
- -
|
28
|
+
- - '>='
|
26
29
|
- !ruby/object:Gem::Version
|
27
30
|
version: 3.2.3
|
31
|
+
- - <
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '5'
|
28
34
|
- !ruby/object:Gem::Dependency
|
29
35
|
name: blacklight
|
30
36
|
requirement: !ruby/object:Gem::Requirement
|
@@ -87,14 +93,14 @@ dependencies:
|
|
87
93
|
requirements:
|
88
94
|
- - '='
|
89
95
|
- !ruby/object:Gem::Version
|
90
|
-
version: 6.
|
96
|
+
version: 6.3.0.rc1
|
91
97
|
type: :runtime
|
92
98
|
prerelease: false
|
93
99
|
version_requirements: !ruby/object:Gem::Requirement
|
94
100
|
requirements:
|
95
101
|
- - '='
|
96
102
|
- !ruby/object:Gem::Version
|
97
|
-
version: 6.
|
103
|
+
version: 6.3.0.rc1
|
98
104
|
- !ruby/object:Gem::Dependency
|
99
105
|
name: jettywrapper
|
100
106
|
requirement: !ruby/object:Gem::Requirement
|
@@ -238,7 +244,6 @@ files:
|
|
238
244
|
- spec/rcov.opts
|
239
245
|
- spec/spec.opts
|
240
246
|
- spec/spec_helper.rb
|
241
|
-
- spec/support/Gemfile
|
242
247
|
- spec/support/app/controllers/downloads_controller.rb
|
243
248
|
- spec/support/app/models/generic_content.rb
|
244
249
|
- spec/support/app/models/sample.rb
|
@@ -269,9 +274,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
269
274
|
version: 1.9.3
|
270
275
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
271
276
|
requirements:
|
272
|
-
- - '
|
277
|
+
- - '>'
|
273
278
|
- !ruby/object:Gem::Version
|
274
|
-
version:
|
279
|
+
version: 1.3.1
|
275
280
|
requirements: []
|
276
281
|
rubyforge_project:
|
277
282
|
rubygems_version: 2.0.3
|
@@ -298,7 +303,6 @@ test_files:
|
|
298
303
|
- spec/rcov.opts
|
299
304
|
- spec/spec.opts
|
300
305
|
- spec/spec_helper.rb
|
301
|
-
- spec/support/Gemfile
|
302
306
|
- spec/support/app/controllers/downloads_controller.rb
|
303
307
|
- spec/support/app/models/generic_content.rb
|
304
308
|
- spec/support/app/models/sample.rb
|
data/spec/support/Gemfile
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
gem 'rails', '3.2.12'
|
4
|
-
|
5
|
-
gem 'sqlite3'
|
6
|
-
|
7
|
-
gem 'devise'
|
8
|
-
gem 'blacklight'
|
9
|
-
gem 'hydra-access-controls', :path=>'../../../hydra-access-controls'
|
10
|
-
gem 'hydra-core', :path=>'../../', :require=>'hydra-core'
|
11
|
-
gem 'rspec-rails'
|
12
|
-
gem 'factory_girl_rails'
|