curation_concerns 0.14.0.pre2 → 0.14.0.pre3

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: 57de72e25be5af57715ccfdb367577a5ebd9b98b
4
- data.tar.gz: 278a1dcc3a79d15ba8472222b04877c7c804aa5c
3
+ metadata.gz: 499d0f504305d4a3527b20952256ca5c479495f6
4
+ data.tar.gz: 198f23262a6af4305f350622678666ae444d4c9f
5
5
  SHA512:
6
- metadata.gz: 03414390a8504f7001eaeea69c5929a41c27d3db1c191ea19266bd056a8e8666931c7e0a897e0a3a6f6519325a1aaae9c9ca33a4423f50af7bfe185c76a64e3a
7
- data.tar.gz: 3d0b2327008ca3ce0b866d5faa07b8ddbde751e072f68b2126c6b222ef74e89f5fb03e7bb44d6b1cb4c4cae18519fbd45be2bfdc408216089c52c6354ce0e48b
6
+ metadata.gz: fc6d2a67ff1711383d698b083ccbd4e869f1031354fd302512787abddeb656a43ac12b6b87d1bb163230ee1db5da17684190deff4fa28f1f2dc99b240870c503
7
+ data.tar.gz: 48549fbe68acc204baf000be4464be9363b00dff9ebb77198deb2c8eb2f15115143881f2f07f80176ea38b5be71cf9c576fcb614f0e4c37573c985abd521a79f
data/RELEASING.md CHANGED
@@ -1,3 +1,3 @@
1
1
  * Bump version number in `lib/curation_concerns/version.rb`
2
+ * Commit and push your change to the master branch
2
3
  * Release the gem to rubygems.org: `rake build` then `rake release`
3
- * `git push`
@@ -69,10 +69,7 @@ module CurationConcerns
69
69
  stack = ActorStack.new(file_set,
70
70
  user,
71
71
  [InterpretVisibilityActor, BaseActor])
72
- if result = stack.update(attributes)
73
- CurationConcerns.config.callback.run(:after_update_metadata, file_set, user)
74
- end
75
- result
72
+ stack.update(attributes)
76
73
  end
77
74
 
78
75
  def destroy
@@ -123,6 +120,7 @@ module CurationConcerns
123
120
  # Save the work so the association between the work and the file_set is persisted (head_id)
124
121
  work.save
125
122
  end
123
+ CurationConcerns.config.callback.run(:after_create_fileset, file_set, user)
126
124
  end
127
125
 
128
126
  def assign_visibility?(file_set_params = {})
@@ -24,6 +24,5 @@ class IngestFileJob < ActiveJob::Base
24
24
 
25
25
  # Do post file ingest actions
26
26
  CurationConcerns::VersioningService.create(file_set.send(relation.to_sym), user)
27
- CurationConcerns.config.callback.run(:after_create_fileset, file_set, user)
28
27
  end
29
28
  end
@@ -1,3 +1,3 @@
1
1
  module CurationConcerns
2
- VERSION = "0.14.0.pre2".freeze
2
+ VERSION = "0.14.0.pre3".freeze
3
3
  end
@@ -35,7 +35,7 @@ describe CurationConcerns::FileSetActor do
35
35
  end
36
36
 
37
37
  context 'when a work is provided' do
38
- let(:work) { FactoryGirl.create(:generic_work) }
38
+ let(:work) { create(:generic_work) }
39
39
 
40
40
  it 'adds the generic file to the parent work' do
41
41
  expect(subject.generic_works).to eq [work]
@@ -203,6 +203,7 @@ describe CurationConcerns::FileSetActor do
203
203
  end
204
204
 
205
205
  it "writes to the most up to date version" do
206
+ expect(CurationConcerns.config.callback).to receive(:run).with(:after_create_fileset, file_set3, user)
206
207
  # using send(), because attach_file_to_work is private
207
208
  actor.send(:attach_file_to_work, work_v1, file_set3, {})
208
209
  expect(work_v1.members.size).to eq 3
@@ -67,12 +67,4 @@ describe IngestFileJob do
67
67
  expect(VersionCommitter.where(version_id: versions.last.uri).pluck(:committer_login)).to eq [user2.user_key]
68
68
  end
69
69
  end
70
-
71
- describe "the after_create_fileset callback" do
72
- subject { CurationConcerns.config.callback }
73
- it 'runs with file_set and user arguments' do
74
- expect(subject).to receive(:run).with(:after_create_fileset, file_set, user)
75
- described_class.perform_now(file_set, filename, 'image/png', user)
76
- end
77
- end
78
70
  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: 0.14.0.pre2
4
+ version: 0.14.0.pre3
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-04-28 00:00:00.000000000 Z
13
+ date: 2016-04-29 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: hydra-head