hydra-core 8.0.0.beta1 → 8.0.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: cd0d6e692c5ae2bc1ab52d423137ca399d9b2d12
4
- data.tar.gz: 88244842dba506ab0e6743b4dacd6309874cc3c1
3
+ metadata.gz: ba7e8c28c9a948c53ca47121118a2c4948c52827
4
+ data.tar.gz: db44e15d1c9635905cb3b528ce3925f5e853b597
5
5
  SHA512:
6
- metadata.gz: fa1fad88dc614fb8fb1772635f395f90c5aa13b6f087c10d431296f955aaef4a16c30f16ad0e5f019116bbcad8067947de330512b093d39e63f05b64b5ab0ce6
7
- data.tar.gz: 6e668815b37ade5c99968a826a1c5e34f03748341632b5e60cd2cbf6137d43962aaacf272bf827dbd09f920419dab0da0184b502cd38f9ddbe72b3fde6c43ecb
6
+ metadata.gz: 7e52e69c0e0301648d27a6d21982575fac30ddcc45768bbd2a09bff23350bfdbf96f922af063020675ceaa67730afc072cec4ef91df95cfa70bda09d7f64f166
7
+ data.tar.gz: ff9c9d7cbd6a2a10c4dca45c351e32e38abe093a4b3553bafa587c01112e218e6019b4e28e04233794f616e547e19fab2d121a549e3816d8667b88cee220b8b7
@@ -2,7 +2,6 @@ module Hydra
2
2
  module Controller
3
3
  module DownloadBehavior
4
4
  extend ActiveSupport::Concern
5
- extend Deprecation
6
5
 
7
6
  included do
8
7
  include Hydra::Controller::ControllerBehavior
@@ -45,10 +44,6 @@ module Hydra
45
44
 
46
45
  # Customize the :download ability in your Ability class, or override this method
47
46
  def authorize_download!
48
- if self.respond_to?(:can_download?)
49
- Deprecation.warn(DownloadBehavior, "The `can_download?' method is deprecated and will not be supported in hydra-head 8.0. Implement special authorization behavior by customizing the :download permission on ActiveFedora::Datastream in your Ability class.", caller)
50
- current_ability.send(can_download? ? :can : :cannot, :download, ActiveFedora::Datastream, dsid: datastream.dsid, pid: datastream.pid)
51
- end
52
47
  authorize! :download, datastream
53
48
  end
54
49
 
@@ -73,9 +68,7 @@ module Hydra
73
68
  end
74
69
 
75
70
  # Handle the HTTP show request
76
- def send_content(asset_ = nil)
77
- Deprecation.warn(DownloadBehavior, "The `asset' parameter of the `send_content' method is deprecated and will be removed from Hydra::Controller::DownloadBehavior in hydra-head 8.0", caller) if asset_
78
-
71
+ def send_content
79
72
  response.headers['Accept-Ranges'] = 'bytes'
80
73
 
81
74
  if request.head?
data/hydra-core.gemspec CHANGED
@@ -20,10 +20,10 @@ Gem::Specification.new do |gem|
20
20
  gem.required_ruby_version = '>= 1.9.3'
21
21
 
22
22
 
23
- gem.add_dependency "rails", '>= 3.2.3', '< 5'
23
+ gem.add_dependency "rails", '~> 4.0'
24
24
  gem.add_dependency 'block_helpers'
25
25
  gem.add_dependency 'hydra-access-controls', version
26
- gem.add_dependency 'jettywrapper', ">=1.4.1"
26
+ gem.add_dependency 'jettywrapper', "~> 1.5"
27
27
 
28
28
  gem.add_development_dependency 'sqlite3'
29
29
  gem.add_development_dependency 'yard'
data/lib/hydra-core.rb CHANGED
@@ -2,10 +2,6 @@ require 'hydra-access-controls'
2
2
  require 'deprecation'
3
3
 
4
4
  module HydraHead
5
- extend Deprecation
6
5
  require 'hydra-head/engine' if defined?(Rails)
7
- def self.add_routes(router, options = {})
8
- Deprecation.warn HydraHead, "add_routes has been removed." # remove this warning in hydra-head 8
9
- end
10
6
  end
11
7
 
@@ -1,4 +1,4 @@
1
1
  module HydraHead
2
- VERSION = "8.0.0.beta1"
2
+ VERSION = "8.0.0"
3
3
  end
4
4
 
@@ -186,33 +186,5 @@ describe DownloadsController do
186
186
  end
187
187
  end
188
188
 
189
- describe "overriding the can_download? method" do
190
- before { sign_in @user }
191
- context "current_ability.can? returns true / can_download? returns false" do
192
- it "should authorize according to can_download?" do
193
- expect(controller.current_ability.can?(:download, @obj.datastreams['buzz'])).to be true
194
- allow(controller).to receive(:can_download?).and_return(false)
195
- Deprecation.silence(Hydra::Controller::DownloadBehavior) do
196
- get :show, id: @obj, datastream_id: 'buzz'
197
- end
198
- expect(response).to redirect_to root_url
199
- end
200
- end
201
- context "current_ability.can? returns false / can_download? returns true" do
202
- before do
203
- @obj.rightsMetadata.clear_permissions!
204
- @obj.save
205
- end
206
- it "should authorize according to can_download?" do
207
- expect(controller.current_ability.can?(:download, @obj.datastreams['buzz'])).to be false
208
- allow(controller).to receive(:can_download?).and_return(true)
209
- Deprecation.silence(Hydra::Controller::DownloadBehavior) do
210
- get :show, id: @obj, datastream_id: 'buzz'
211
- end
212
- expect(response).to be_successful
213
- end
214
- end
215
- end
216
-
217
189
  end
218
190
  end
@@ -1,7 +1,3 @@
1
- group :develop do
2
- # gem 'active-fedora', github: "projecthydra/active_fedora"
3
- gem 'active-fedora', '8.0.0.rc2'
4
- end
5
1
  gem 'rspec-rails', '~> 3.1', group: :test
6
2
  gem 'rspec-its'
7
3
 
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: 8.0.0.beta1
4
+ version: 8.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Zumwalt, Bess Sadler, Julie Meloni, Naomi Dushay, Jessie Keck, John Scofield,
@@ -9,28 +9,22 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-12-03 00:00:00.000000000 Z
12
+ date: 2015-02-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
- - - ">="
19
- - !ruby/object:Gem::Version
20
- version: 3.2.3
21
- - - "<"
18
+ - - "~>"
22
19
  - !ruby/object:Gem::Version
23
- version: '5'
20
+ version: '4.0'
24
21
  type: :runtime
25
22
  prerelease: false
26
23
  version_requirements: !ruby/object:Gem::Requirement
27
24
  requirements:
28
- - - ">="
29
- - !ruby/object:Gem::Version
30
- version: 3.2.3
31
- - - "<"
25
+ - - "~>"
32
26
  - !ruby/object:Gem::Version
33
- version: '5'
27
+ version: '4.0'
34
28
  - !ruby/object:Gem::Dependency
35
29
  name: block_helpers
36
30
  requirement: !ruby/object:Gem::Requirement
@@ -51,28 +45,28 @@ dependencies:
51
45
  requirements:
52
46
  - - '='
53
47
  - !ruby/object:Gem::Version
54
- version: 8.0.0.beta1
48
+ version: 8.0.0
55
49
  type: :runtime
56
50
  prerelease: false
57
51
  version_requirements: !ruby/object:Gem::Requirement
58
52
  requirements:
59
53
  - - '='
60
54
  - !ruby/object:Gem::Version
61
- version: 8.0.0.beta1
55
+ version: 8.0.0
62
56
  - !ruby/object:Gem::Dependency
63
57
  name: jettywrapper
64
58
  requirement: !ruby/object:Gem::Requirement
65
59
  requirements:
66
- - - ">="
60
+ - - "~>"
67
61
  - !ruby/object:Gem::Version
68
- version: 1.4.1
62
+ version: '1.5'
69
63
  type: :runtime
70
64
  prerelease: false
71
65
  version_requirements: !ruby/object:Gem::Requirement
72
66
  requirements:
73
- - - ">="
67
+ - - "~>"
74
68
  - !ruby/object:Gem::Version
75
- version: 1.4.1
69
+ version: '1.5'
76
70
  - !ruby/object:Gem::Dependency
77
71
  name: sqlite3
78
72
  requirement: !ruby/object:Gem::Requirement
@@ -212,9 +206,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
212
206
  version: 1.9.3
213
207
  required_rubygems_version: !ruby/object:Gem::Requirement
214
208
  requirements:
215
- - - ">"
209
+ - - ">="
216
210
  - !ruby/object:Gem::Version
217
- version: 1.3.1
211
+ version: '0'
218
212
  requirements: []
219
213
  rubyforge_project:
220
214
  rubygems_version: 2.2.2