Skip to content

Commit

Permalink
Merge 71c94ce into 44dd345
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Feb 8, 2019
2 parents 44dd345 + 71c94ce commit 64fd94b
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 41 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ gem 'net-http-persistent', '~> 2.9'
gem 'marc'

# DLSS/domain-specific dependencies
gem 'dor-services', '~> 6.1'
gem 'dor-services', github: 'sul-dlss/dor-services', branch: '7-0-alpha'
gem 'lyber-core', '>= 2.0.2'
gem 'workflow-archiver', '~> 3.0'

Expand Down
63 changes: 35 additions & 28 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,3 +1,35 @@
GIT
remote: git://github.com/sul-dlss/dor-services.git
revision: 54b2557a488ad6f575ed44c447df31c3283ea32d
branch: 7-0-alpha
specs:
dor-services (7.0.0.alpha)
active-fedora (>= 8.7.0, < 9)
activesupport (~> 5.1)
confstruct (~> 0.2.7)
deprecation (~> 0)
dor-rights-auth (~> 1.0, >= 1.2.0)
dor-services-client (~> 1.5)
dor-workflow-service (~> 2.0, >= 2.0.1)
druid-tools (>= 0.4.1)
equivalent-xml (~> 0.5, >= 0.5.1)
json (>= 1.8.1)
moab-versioning (~> 4.0)
net-sftp (~> 2.1)
nokogiri (~> 1.6)
om (~> 3.0)
rdf (~> 1.1, >= 1.1.7)
rest-client (>= 1.7, < 3)
retries
rsolr (>= 1.0.3, < 3)
ruby-cache (~> 0.3.0)
rubydora (~> 2.1)
solrizer (~> 3.0)
stanford-mods (>= 2.3.1)
stanford-mods-normalizer (~> 0.1)
systemu (~> 2.6)
uuidtools (~> 2.1.4)

GEM
remote: https://rubygems.org/
specs:
Expand Down Expand Up @@ -123,36 +155,11 @@ GEM
unf (>= 0.0.5, < 1.0.0)
dor-rights-auth (1.3.0)
nokogiri
dor-services (6.2.0)
active-fedora (>= 8.7.0, < 9)
activesupport (>= 4.2.10, < 6.0.0)
confstruct (~> 0.2.7)
deprecation (~> 0)
dor-rights-auth (~> 1.0, >= 1.2.0)
dor-services-client (~> 1.0)
dor-workflow-service (~> 2.0, >= 2.0.1)
druid-tools (>= 0.4.1)
equivalent-xml (~> 0.5, >= 0.5.1)
json (>= 1.8.1)
moab-versioning (~> 4.0)
net-sftp (~> 2.1)
nokogiri (~> 1.6)
om (~> 3.0)
rdf (~> 1.1, >= 1.1.7)
rest-client (>= 1.7, < 3)
retries
rsolr (>= 1.0.3, < 3)
ruby-cache (~> 0.3.0)
rubydora (~> 2.1)
solrizer (~> 3.0)
stanford-mods (>= 2.3.1)
stanford-mods-normalizer (~> 0.1)
systemu (~> 2.6)
uuidtools (~> 2.1.4)
dor-services-client (1.2.0)
dor-services-client (1.5.0)
activesupport (>= 4.2, < 6)
deprecation
faraday (~> 0.15)
moab-versioning (~> 4.0)
nokogiri (~> 1.8)
dor-workflow-service (2.3.0)
activesupport (>= 3.2.1, < 6)
Expand Down Expand Up @@ -465,7 +472,7 @@ DEPENDENCIES
config
coveralls (~> 0.8)
dlss-capistrano
dor-services (~> 6.1)
dor-services!
equivalent-xml
faraday
honeybadger
Expand Down
6 changes: 3 additions & 3 deletions spec/controllers/objects_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
login
end

let(:item) { AssembleableVersionableItem.new.tap { |x| x.pid = 'druid:aa123bb4567' } }
let(:item) { VersionableItem.new.tap { |x| x.pid = 'druid:aa123bb4567' } }

before do
allow(Dor).to receive(:find).and_return(item)
Expand Down Expand Up @@ -113,14 +113,14 @@

describe '/release_tags' do
it 'adds a release tag when posted to with false' do
expect(ReleaseTags).to receive(:create).with(AssembleableVersionableItem, release: false, to: 'searchworks', who: 'carrickr', what: 'self')
expect(ReleaseTags).to receive(:create).with(VersionableItem, release: false, to: 'searchworks', who: 'carrickr', what: 'self')
expect(item).to receive(:save)
post :release_tags, params: { id: item.pid }, body: %( {"to":"searchworks","who":"carrickr","what":"self","release":false} )
expect(response.status).to eq(201)
end

it 'adds a release tag when posted to with true' do
expect(ReleaseTags).to receive(:create).with(AssembleableVersionableItem, release: true, to: 'searchworks', who: 'carrickr', what: 'self')
expect(ReleaseTags).to receive(:create).with(VersionableItem, release: true, to: 'searchworks', who: 'carrickr', what: 'self')
expect(item).to receive(:save)
post :release_tags, params: { id: item.pid }, body: %( {"to":"searchworks","who":"carrickr","what":"self","release":true} )
expect(response.status).to eq(201)
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/sdr_controller_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'rails_helper'

RSpec.describe SdrController do
let(:item) { AssembleableVersionableItem.new.tap { |x| x.pid = 'druid:aa123bb4567' } }
let(:item) { VersionableItem.new.tap { |x| x.pid = 'druid:aa123bb4567' } }

before do
allow(Dor).to receive(:find).and_return(item)
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/versions_controller_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'rails_helper'

RSpec.describe VersionsController do
let(:item) { AssembleableVersionableItem.new.tap { |x| x.pid = 'druid:aa123bb4567' } }
let(:item) { VersionableItem.new.tap { |x| x.pid = 'druid:aa123bb4567' } }

before do
allow(Dor).to receive(:find).and_return(item)
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/workflows_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
end

describe 'workflow archiving' do
let(:item) { AssembleableVersionableItem.new.tap { |x| x.pid = 'druid:aa123bb4567' } }
let(:item) { VersionableItem.new.tap { |x| x.pid = 'druid:aa123bb4567' } }

before do
allow(Dor).to receive(:find).with(item.pid).and_return(item)
Expand Down
2 changes: 1 addition & 1 deletion spec/services/workspace_service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

describe '.create' do
let(:druid_path) { File.join(temp_workspace, 'aa', '123', 'bb', '7890', 'aa123bb7890') }
let(:work) { AssembleableVersionableItem.new.tap { |x| x.pid = 'druid:aa123bb7890' } }
let(:work) { VersionableItem.new.tap { |x| x.pid = 'druid:aa123bb7890' } }

before do
FileUtils.rm_rf(File.join(temp_workspace, 'aa'))
Expand Down
5 changes: 0 additions & 5 deletions spec/support/assembleable_versionable_item.rb

This file was deleted.

4 changes: 4 additions & 0 deletions spec/support/versionable_item.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class VersionableItem < ActiveFedora::Base
include Dor::Versionable
attr_accessor :pid
end

0 comments on commit 64fd94b

Please sign in to comment.