curation_concerns 1.3.1 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -1
- data/RELEASING.md +1 -1
- data/app/actors/curation_concerns/actors/apply_order_actor.rb +2 -0
- data/app/controllers/concerns/curation_concerns/embargoes_controller_behavior.rb +0 -4
- data/app/controllers/concerns/curation_concerns/leases_controller_behavior.rb +0 -4
- data/app/controllers/concerns/curation_concerns/manages_embargoes.rb +1 -0
- data/curation_concerns.gemspec +3 -4
- data/lib/curation_concerns/version.rb +1 -1
- data/spec/actors/curation_concerns/apply_order_actor_spec.rb +20 -0
- metadata +10 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f3c0fb572ee30be72797187fd41faad361941190
|
4
|
+
data.tar.gz: 331f8797938142e122b127d0d738a79d868f96ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fad6acfde6bdc26121c851eb3c33cf254729f4a5c54182abb440314a66ae65bcb03472a30f12404bbdc5ef81431ba40b08b873c2aa7b8d32bf45fe99ad54890e
|
7
|
+
data.tar.gz: 89a1a9ce749024b859eaa183f86bacda26bc499594510f926fb5367dd5a3ed6fe5c371046a8dd4c95edf1d542f3a4f16093174c33be6fef2de887ce99da0fa83
|
data/.travis.yml
CHANGED
data/RELEASING.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
* Checkout the master branch.
|
2
2
|
* Bump version number in `lib/curation_concerns/version.rb`
|
3
|
-
* Commit your change with a message such as: `
|
3
|
+
* Commit your change with a message such as: `Bump version to x.y.z`
|
4
4
|
* Release the gem to rubygems.org: `rake release` This also pushes the code to github.
|
@@ -15,12 +15,14 @@ module CurationConcerns
|
|
15
15
|
(existing_members_ids - ordered_member_ids).each do |old_id|
|
16
16
|
work = ::ActiveFedora::Base.find(old_id)
|
17
17
|
curation_concern.ordered_members.delete(work)
|
18
|
+
curation_concern.members.delete(work)
|
18
19
|
end
|
19
20
|
|
20
21
|
(ordered_member_ids - existing_members_ids).each do |work_id|
|
21
22
|
work = ::ActiveFedora::Base.find(work_id)
|
22
23
|
curation_concern.ordered_members << work
|
23
24
|
end
|
25
|
+
curation_concern.save
|
24
26
|
true
|
25
27
|
end
|
26
28
|
|
@@ -4,10 +4,6 @@ module CurationConcerns
|
|
4
4
|
include CurationConcerns::ManagesEmbargoes
|
5
5
|
include CurationConcerns::Collections::AcceptsBatches
|
6
6
|
|
7
|
-
included do
|
8
|
-
skip_before_action :normalize_identifier, only: :update
|
9
|
-
end
|
10
|
-
|
11
7
|
def index
|
12
8
|
authorize! :index, Hydra::AccessControls::Embargo
|
13
9
|
end
|
@@ -4,10 +4,6 @@ module CurationConcerns
|
|
4
4
|
include CurationConcerns::ManagesEmbargoes
|
5
5
|
include CurationConcerns::Collections::AcceptsBatches
|
6
6
|
|
7
|
-
included do
|
8
|
-
skip_before_action :normalize_identifier, only: :update
|
9
|
-
end
|
10
|
-
|
11
7
|
def index
|
12
8
|
authorize! :index, Hydra::AccessControls::Lease
|
13
9
|
end
|
@@ -11,6 +11,7 @@ module CurationConcerns
|
|
11
11
|
load_and_authorize_resource class: ActiveFedora::Base, instance_name: :curation_concern
|
12
12
|
end
|
13
13
|
|
14
|
+
# This is an override of CurationConcerns::ApplicationController
|
14
15
|
def deny_access(exception)
|
15
16
|
redirect_to root_path, alert: exception.message
|
16
17
|
end
|
data/curation_concerns.gemspec
CHANGED
@@ -20,9 +20,9 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.add_dependency 'hydra-head', '>= 10.0.0', '< 11'
|
22
22
|
spec.add_dependency 'blacklight', '~> 6.3'
|
23
|
-
spec.add_dependency
|
24
|
-
spec.add_dependency
|
25
|
-
spec.add_dependency
|
23
|
+
spec.add_dependency 'breadcrumbs_on_rails', '>= 2.3', '< 4'
|
24
|
+
spec.add_dependency 'jquery-ui-rails'
|
25
|
+
spec.add_dependency 'simple_form', '~> 3.1'
|
26
26
|
spec.add_dependency 'hydra-editor', '>= 2', '< 4'
|
27
27
|
spec.add_dependency 'blacklight_advanced_search', '~> 6.0'
|
28
28
|
spec.add_dependency 'rails_autolink'
|
@@ -60,5 +60,4 @@ Gem::Specification.new do |spec|
|
|
60
60
|
spec.add_development_dependency 'rubocop', '~> 0.39'
|
61
61
|
spec.add_development_dependency 'rubocop-rspec', '~> 1.4.1'
|
62
62
|
spec.add_development_dependency 'webmock'
|
63
|
-
|
64
63
|
end
|
@@ -56,5 +56,25 @@ describe CurationConcerns::Actors::ApplyOrderActor do
|
|
56
56
|
expect(subject.update(attributes)).to be true
|
57
57
|
end
|
58
58
|
end
|
59
|
+
|
60
|
+
context 'without an ordered_member_id that was associated with the curation concern' do
|
61
|
+
let(:curation_concern) { create(:work_with_two_children, user: user) }
|
62
|
+
let(:attributes) { { ordered_member_ids: ["Blah2"] } }
|
63
|
+
let(:root_actor) { double }
|
64
|
+
before do
|
65
|
+
allow(CurationConcerns::Actors::RootActor).to receive(:new).and_return(root_actor)
|
66
|
+
allow(root_actor).to receive(:update).with({}).and_return(true)
|
67
|
+
child.title = ["Generic Title"]
|
68
|
+
child.apply_depositor_metadata(user.user_key)
|
69
|
+
child.save!
|
70
|
+
curation_concern.apply_depositor_metadata(user.user_key)
|
71
|
+
curation_concern.save!
|
72
|
+
end
|
73
|
+
it "removes the first child" do
|
74
|
+
expect(subject.update(attributes)).to be true
|
75
|
+
expect(curation_concern.members.size).to eq(1)
|
76
|
+
expect(curation_concern.ordered_member_ids.size).to eq(1)
|
77
|
+
end
|
78
|
+
end
|
59
79
|
end
|
60
80
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: curation_concerns
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Zumwalt
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-08-
|
13
|
+
date: 2016-08-10 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: hydra-head
|
@@ -50,16 +50,22 @@ dependencies:
|
|
50
50
|
name: breadcrumbs_on_rails
|
51
51
|
requirement: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
|
-
- - "
|
53
|
+
- - ">="
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '2.3'
|
56
|
+
- - "<"
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
version: '4'
|
56
59
|
type: :runtime
|
57
60
|
prerelease: false
|
58
61
|
version_requirements: !ruby/object:Gem::Requirement
|
59
62
|
requirements:
|
60
|
-
- - "
|
63
|
+
- - ">="
|
61
64
|
- !ruby/object:Gem::Version
|
62
65
|
version: '2.3'
|
66
|
+
- - "<"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '4'
|
63
69
|
- !ruby/object:Gem::Dependency
|
64
70
|
name: jquery-ui-rails
|
65
71
|
requirement: !ruby/object:Gem::Requirement
|