curate-indexer 0.2.0 → 0.2.1

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: ecfbe4261639066afa2f5f7bfe07a454bd93eafd
4
- data.tar.gz: 7e05eb98cf120fdb06b8c8e64796f033f35df13d
3
+ metadata.gz: 4efb0ef59837d864f981f3924400657282a1cfb4
4
+ data.tar.gz: fb912271efb90be771c2e06e07c0f91f2a3ff78f
5
5
  SHA512:
6
- metadata.gz: 9a697810391125695cfa863c29ae5d2bf4cb9f61a1da7576211f3b0c5597551aa4b613ebd070fda1795eb7ea5e31de7e530b76e6c93a9551e82f3baf5485b6e7
7
- data.tar.gz: edf309676d3f07e1332b9328cd3a04330387dedfcf66318f545a234a44d05f8f31c938dcbe0ce0e9080b23878d0f70c7fd017e0215b04526341093706419025e
6
+ metadata.gz: 5096d42e187b4949a974e49ccdb08abaf16835f0c9348e75c209bf6153badbffc086927f2bddb6966fd2af9c5192c6977f0940447ce6e47885f39142a5fdf320
7
+ data.tar.gz: edc5dc5a0c7098abce0db3349880d4a309e4da8d24c9be5ed7671a0ea9bedbaa9a705324bb2903f0652e222e87c5c399998d3bae3867f027aa0cecb932f54f50
@@ -32,7 +32,7 @@ module Curate
32
32
  end
33
33
 
34
34
  # @api public
35
- # @return Curate::Indexer::Documents::IndexDocument
35
+ # @return Hash - the attributes written to the indexing layer
36
36
  def self.write_document_attributes_to_index_layer(*)
37
37
  raise NotImplementedError
38
38
  end
@@ -44,7 +44,7 @@ module Curate
44
44
  end
45
45
 
46
46
  # @api public
47
- # @return Curate::Indexer::Documents::IndexDocument
47
+ # @return Hash - the attributes written to the indexing layer
48
48
  def self.write_document_attributes_to_index_layer(attributes = {})
49
49
  Index.write_document(attributes)
50
50
  end
@@ -8,7 +8,16 @@ module Curate
8
8
  attr_reader :pid
9
9
  def initialize(pid)
10
10
  @pid = pid
11
- super "Possible graph cycle discovered related to PID:#{pid}."
11
+ super "Possible graph cycle discovered related to PID=#{pid}."
12
+ end
13
+ end
14
+ # A wrapper exception that includes the original exception and the pid
15
+ class ReindexingError < RuntimeError
16
+ attr_reader :pid, :original_exception
17
+ def initialize(pid, original_exception)
18
+ @pid = pid
19
+ @original_exception = original_exception
20
+ super "Error PID=#{pid} - #{original_exception}"
12
21
  end
13
22
  end
14
23
  end
@@ -42,6 +42,8 @@ module Curate
42
42
  def reindex_a_pid(pid)
43
43
  pid_reindexer.call(pid)
44
44
  processed_pids << pid
45
+ rescue StandardError => e
46
+ raise Exceptions::ReindexingError.new(pid, e)
45
47
  end
46
48
  end
47
49
  private_constant :RepositoryReindexer
@@ -1,5 +1,5 @@
1
1
  module Curate
2
2
  module Indexer
3
- VERSION = "0.2.0".freeze
3
+ VERSION = "0.2.1".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: curate-indexer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Friesen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-20 00:00:00.000000000 Z
11
+ date: 2016-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler