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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5724b0cc33c0984a364df05e23c2d70e87774570
4
- data.tar.gz: e62c0d3a3f0dce54d769cc3522e06095010d3d9e
3
+ metadata.gz: f3c0fb572ee30be72797187fd41faad361941190
4
+ data.tar.gz: 331f8797938142e122b127d0d738a79d868f96ee
5
5
  SHA512:
6
- metadata.gz: 3e5ece7596c1c81423c676c9b05ae9f4a1593a6949c0723791d5b157187afac9538fb5a6c4a2ec23edf096a9448acf14e36a0fa417151c6751f04260eb1d03bf
7
- data.tar.gz: 2d8fdbf9ff483440ddbf1cba706309edbe7f89f33684965ac8e186c1926263b5650332fdc6bf3365a136db3d3a370fb99cd66743f3128097b9e327ffb811ef41
6
+ metadata.gz: fad6acfde6bdc26121c851eb3c33cf254729f4a5c54182abb440314a66ae65bcb03472a30f12404bbdc5ef81431ba40b08b873c2aa7b8d32bf45fe99ad54890e
7
+ data.tar.gz: 89a1a9ce749024b859eaa183f86bacda26bc499594510f926fb5367dd5a3ed6fe5c371046a8dd4c95edf1d542f3a4f16093174c33be6fef2de887ce99da0fa83
data/.travis.yml CHANGED
@@ -2,10 +2,11 @@ language: ruby
2
2
  cache: bundler
3
3
  sudo: false
4
4
  rvm:
5
- - 2.2
5
+ - 2.3.1
6
6
  env:
7
7
  global:
8
8
  - NOKOGIRI_USE_SYSTEM_LIBRARIES=true
9
+ - RAILS_VERSION=4.2.7
9
10
  notifications:
10
11
  irc:
11
12
  channels:
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: `Bumped version to x.y.z`
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
@@ -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 "breadcrumbs_on_rails", "~> 2.3"
24
- spec.add_dependency "jquery-ui-rails"
25
- spec.add_dependency "simple_form", '~> 3.1'
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
@@ -1,3 +1,3 @@
1
1
  module CurationConcerns
2
- VERSION = "1.3.1".freeze
2
+ VERSION = '1.3.2'.freeze
3
3
  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.1
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-09 00:00:00.000000000 Z
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