hydra-core 9.2.2 → 9.3.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
  SHA1:
3
- metadata.gz: 4aca722b114a11eaa4b2b4fe147ec453d2469f44
4
- data.tar.gz: 2d11b61aa6d38798534ad3488b1a69058ec7c1ad
3
+ metadata.gz: e23e594007d826f8bad840f355b3665e69f0f7e0
4
+ data.tar.gz: 6aadfdfd537b2dc78a82590bef7d1081bcfb8551
5
5
  SHA512:
6
- metadata.gz: fba7e3ee86763650d52622912bcdd7df918c6e12585d833f91212128d9961889342734f5236d4f1af2e698874459f9a975a57079418f5406fdd228ff1bc29889
7
- data.tar.gz: fca747e2ccb374155ea7a424a3e0e3eee0eb72e1e72d520164bdb3b2515d4390110517bc76c44c53f5880d38286940320367194913ec2f04e52d64ecadfc84de
6
+ metadata.gz: 249ab501d9712ea5e3a3b2bc4e7e8531651a1a7cbae89f3083996a505db3a4b47fed46bf7c4887c69c6f6a79c1ac6af81b35a61d6571a0a80c8e2c5afde6565a
7
+ data.tar.gz: e1fe9b5671e08dbf820c6b5f6aa20aa9da234d9dab3a53c850341fb6429b8df7fdc6f00a2d896eef72c6a9d8ab379b0f8032b900e78eb213e0eaf70443b50c06
@@ -6,7 +6,6 @@ module Hydra
6
6
 
7
7
  included do
8
8
  include Hydra::Controller::ControllerBehavior
9
- include ActionController::Live
10
9
  before_filter :authorize_download!
11
10
  end
12
11
 
@@ -136,6 +135,9 @@ module Hydra
136
135
  def prepare_file_headers
137
136
  send_file_headers! content_options
138
137
  response.headers['Content-Type'] = file.mime_type
138
+ response.headers['Content-Length'] ||= file.size
139
+ # Prevent Rack::ETag from calculating a digest over body
140
+ response.headers['Last-Modified'] = asset.modified_date.utc.strftime("%a, %d %b %Y %T GMT")
139
141
  self.content_type = file.mime_type
140
142
  end
141
143
 
@@ -1,3 +1,3 @@
1
1
  module HydraHead
2
- VERSION = "9.2.2"
2
+ VERSION = "9.3.0"
3
3
  end
@@ -138,8 +138,7 @@ describe DownloadsController do
138
138
  it "head request" do
139
139
  request.env["HTTP_RANGE"] = 'bytes=0-15'
140
140
  head :show, id: parent, file: 'webm'
141
- # See https://github.com/rails/rails/issues/18714
142
- # expect(response.headers['Content-Length']).to eq 16
141
+ expect(response.headers['Content-Length']).to eq 16
143
142
  expect(response.headers['Accept-Ranges']).to eq 'bytes'
144
143
  expect(response.headers['Content-Type']).to eq 'video/webm'
145
144
  end
@@ -148,8 +147,7 @@ describe DownloadsController do
148
147
  get :show, id: '1234', file: 'webm'
149
148
  expect(response.body).to eq 'one1two2threfour'
150
149
  expect(response.headers["Content-Range"]).to eq 'bytes 0-15/16'
151
- # See https://github.com/rails/rails/issues/18714
152
- # expect(response.headers["Content-Length"]).to eq '16'
150
+ expect(response.headers["Content-Length"]).to eq '16'
153
151
  expect(response.headers['Accept-Ranges']).to eq 'bytes'
154
152
  expect(response.headers['Content-Type']).to eq "video/webm"
155
153
  expect(response.headers["Content-Disposition"]).to eq "inline; filename=\"MyVideo.webm\""
@@ -165,16 +163,14 @@ describe DownloadsController do
165
163
  get :show, id: '1234', file: 'webm'
166
164
  expect(response.body).to eq '1two2threfour'
167
165
  expect(response.headers["Content-Range"]).to eq 'bytes 3-15/16'
168
- # See https://github.com/rails/rails/issues/18714
169
- # expect(response.headers["Content-Length"]).to eq '13'
166
+ expect(response.headers["Content-Length"]).to eq '13'
170
167
  end
171
168
  it "should get a range not ending at the end" do
172
169
  request.env["HTTP_RANGE"] = 'bytes=4-11'
173
170
  get :show, id: '1234', file: 'webm'
174
171
  expect(response.body).to eq 'two2thre'
175
172
  expect(response.headers["Content-Range"]).to eq 'bytes 4-11/16'
176
- # See https://github.com/rails/rails/issues/18714
177
- # expect(response.headers["Content-Length"]).to eq '8'
173
+ expect(response.headers["Content-Length"]).to eq '8'
178
174
  end
179
175
  end
180
176
  end
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: 9.2.2
4
+ version: 9.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Zumwalt, Bess Sadler, Julie Meloni, Naomi Dushay, Jessie Keck, John Scofield,
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-08-03 00:00:00.000000000 Z
12
+ date: 2015-10-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -31,14 +31,14 @@ dependencies:
31
31
  requirements:
32
32
  - - '='
33
33
  - !ruby/object:Gem::Version
34
- version: 9.2.2
34
+ version: 9.3.0
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - '='
40
40
  - !ruby/object:Gem::Version
41
- version: 9.2.2
41
+ version: 9.3.0
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: jettywrapper
44
44
  requirement: !ruby/object:Gem::Requirement
@@ -213,7 +213,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
213
213
  version: '0'
214
214
  requirements: []
215
215
  rubyforge_project:
216
- rubygems_version: 2.4.6
216
+ rubygems_version: 2.4.5.1
217
217
  signing_key:
218
218
  specification_version: 4
219
219
  summary: Hydra-Head Rails Engine (requires Rails3)