base_indexer 4.0.0 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/app/controllers/base_indexer/collections_controller.rb +2 -2
- data/app/controllers/base_indexer/items_controller.rb +4 -4
- data/base_indexer.gemspec +1 -1
- data/lib/base_indexer/version.rb +1 -1
- data/spec/controllers/base_indexer/items_controller_spec.rb +4 -4
- metadata +7 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8f6c9fe93cdb8c749639fd26bfe007dcc246231
|
4
|
+
data.tar.gz: 887ba6c804e3c76781349b152769ea85d4bfa923
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df9803e1db13503ace967895f80af1bc5174990c2411527a6fe874692dcd2de02478dad5f0e7f637642b66e765d621767e1b9e00e708ecde8f5395090888cc42
|
7
|
+
data.tar.gz: a3433db07d6f23d68638e7b095472d4baf6783230538beccab8d8fd217cf9f4b64710b57e912de7a3378e2c9655125be3df03537f6aafda8c97c76922eb62f45
|
data/.travis.yml
CHANGED
@@ -28,13 +28,13 @@ module BaseIndexer
|
|
28
28
|
end
|
29
29
|
|
30
30
|
@status = report_success
|
31
|
-
|
31
|
+
head :ok
|
32
32
|
Rails.logger.debug "Completing indexing of collection #{druid}"
|
33
33
|
|
34
34
|
rescue Exception => e
|
35
35
|
@status = report_failure request.method_symbol, params, e
|
36
36
|
Rails.logger.error @status
|
37
|
-
|
37
|
+
head :internal_server_error
|
38
38
|
end
|
39
39
|
end
|
40
40
|
end
|
@@ -7,11 +7,11 @@ module BaseIndexer
|
|
7
7
|
|
8
8
|
indexer = BaseIndexer.indexer_class.constantize.new
|
9
9
|
indexer.index druid, { subtarget_params => true }
|
10
|
-
|
10
|
+
head :ok
|
11
11
|
Rails.logger.debug "Completing indexing #{druid}"
|
12
12
|
rescue StandardError => e
|
13
13
|
Rails.logger.error report_failure request.method_symbol, params, e
|
14
|
-
|
14
|
+
head :internal_server_error
|
15
15
|
end
|
16
16
|
|
17
17
|
def destroy
|
@@ -25,11 +25,11 @@ module BaseIndexer
|
|
25
25
|
# Only delete from specified subtarget
|
26
26
|
indexer.index druid, { subtarget_params => false }
|
27
27
|
end
|
28
|
-
|
28
|
+
head :ok
|
29
29
|
Rails.logger.debug "Completing deleting #{druid}"
|
30
30
|
rescue StandardError => e
|
31
31
|
Rails.logger.error report_failure request.method_symbol, params, e
|
32
|
-
|
32
|
+
head :internal_server_error
|
33
33
|
end
|
34
34
|
|
35
35
|
private
|
data/base_indexer.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
20
|
s.require_paths = ["lib"]
|
21
21
|
|
22
|
-
s.add_dependency 'rails', '
|
22
|
+
s.add_dependency 'rails', '~> 5'
|
23
23
|
s.add_dependency 'discovery-indexer', '>= 2', '< 4'
|
24
24
|
s.add_dependency 'retries'
|
25
25
|
s.add_dependency 'dor-fetcher'
|
data/lib/base_indexer/version.rb
CHANGED
@@ -8,12 +8,12 @@ describe BaseIndexer::ItemsController, type: :controller do
|
|
8
8
|
describe 'PATCH/PUT update' do
|
9
9
|
it 'creates an indexing job' do
|
10
10
|
expect(my_instance).to receive(:index).with('bb1111cc2222', 'SEARCHWORKS' => true)
|
11
|
-
patch :update, druid: 'druid:bb1111cc2222', subtarget: 'SEARCHWORKS', use_route: :base_indexer
|
11
|
+
patch :update, params: { druid: 'druid:bb1111cc2222', subtarget: 'SEARCHWORKS', use_route: :base_indexer }
|
12
12
|
expect(response.status).to eq 200
|
13
13
|
end
|
14
14
|
it 'when something bad happens return a 500' do
|
15
15
|
expect(my_instance).to receive(:index).with('bb1111cc2222', 'SEARCHWORKS' => true).and_raise(StandardError)
|
16
|
-
patch :update, druid: 'druid:bb1111cc2222', subtarget: 'SEARCHWORKS', use_route: :base_indexer
|
16
|
+
patch :update, params: { druid: 'druid:bb1111cc2222', subtarget: 'SEARCHWORKS', use_route: :base_indexer }
|
17
17
|
expect(response.status).to eq 500
|
18
18
|
end
|
19
19
|
end
|
@@ -21,14 +21,14 @@ describe BaseIndexer::ItemsController, type: :controller do
|
|
21
21
|
context 'with a subtarget' do
|
22
22
|
it 'sends an "#index" with a false to the IndexerEngine' do
|
23
23
|
expect(my_instance).to receive(:index).with('bb1111cc2222', 'SEARCHWORKS' => false)
|
24
|
-
delete :destroy, druid: 'druid:bb1111cc2222', subtarget: 'SEARCHWORKS', use_route: :base_indexer
|
24
|
+
delete :destroy, params: { druid: 'druid:bb1111cc2222', subtarget: 'SEARCHWORKS', use_route: :base_indexer }
|
25
25
|
expect(response.status).to eq 200
|
26
26
|
end
|
27
27
|
end
|
28
28
|
context 'without a subtarget' do
|
29
29
|
it 'sends a "#delete" to the IndexerEngine' do
|
30
30
|
expect(my_instance).to receive(:delete).with('bb1111cc2222')
|
31
|
-
delete :destroy, druid: 'druid:bb1111cc2222', use_route: :base_indexer
|
31
|
+
delete :destroy, params: { druid: 'druid:bb1111cc2222', use_route: :base_indexer }
|
32
32
|
expect(response.status).to eq 200
|
33
33
|
end
|
34
34
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: base_indexer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ahmed Alsum
|
@@ -9,28 +9,22 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2018-03-08 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: '4'
|
21
|
-
- - "<"
|
18
|
+
- - "~>"
|
22
19
|
- !ruby/object:Gem::Version
|
23
|
-
version: '
|
20
|
+
version: '5'
|
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: '4'
|
31
|
-
- - "<"
|
25
|
+
- - "~>"
|
32
26
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
27
|
+
version: '5'
|
34
28
|
- !ruby/object:Gem::Dependency
|
35
29
|
name: discovery-indexer
|
36
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -306,7 +300,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
306
300
|
version: '0'
|
307
301
|
requirements: []
|
308
302
|
rubyforge_project:
|
309
|
-
rubygems_version: 2.
|
303
|
+
rubygems_version: 2.6.11
|
310
304
|
signing_key:
|
311
305
|
specification_version: 4
|
312
306
|
summary: Summary of BaseIndexer.
|