discovery-indexer 0.9.10 → 0.9.11

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: 16c9549ca3901309319c5ab4094728c041d7487f
4
- data.tar.gz: 3788454690db173e028b00a905b225828578ec9f
3
+ metadata.gz: b8fd97b75b353201ee293f8307361df4fd777eec
4
+ data.tar.gz: 6960bff705ca5e9033245089cc21bd92b28c9b7b
5
5
  SHA512:
6
- metadata.gz: 472cb47b4cfd9b49e6b5479749dbd25e85c8dc4cb0a9822c2723be09b477fdd5269d981dbe9b85e7c867e466b4a8b533c5e18cb4209a12853b34e908a49a19f5
7
- data.tar.gz: 90dcf65cbbc1fa2a57bad75ade34f32d20f77c35a3fbf69348c0df5517583d7eb79fd22bbea0c9ef7aac0cfb7760f3f68b16470303ec632492114a92af50d224
6
+ metadata.gz: b3a02909b7c5a687f15546f3d468145e938fa3a82bf86b54b2528e586383eb8fbd0150e54a79848d22a6c78f6c3a50d1d66f95a10b24030f94ce8c9b07ce04e9
7
+ data.tar.gz: 14c8d6d96b92e0c8fb4ea0da68bd28c51b58acbc5ecfceb38c87c4be715c027b2e1ab96bd717a0d6b1499a775d22d10d3c4b0d9c5df0e4d19e781e418b2b0224
@@ -149,19 +149,9 @@ module DiscoveryIndexer
149
149
  # the @id attribute of resource/file elements that match the image type, including extension
150
150
  # @return [Array<String>] filenames
151
151
  def parse_image_ids
152
- ids = []
153
152
  content_md = parse_content_metadata
154
153
  return nil if content_md.nil?
155
- types_to_search=%w{image page}
156
- types_to_search.each do |resource_type|
157
- content_md.xpath("//resource[@type=\"#{resource_type}\"]/file").each do |node|
158
- if node['mimetype'] == 'image/jp2'
159
- ids << node['id'] unless node['id'].empty?
160
- end
161
- end
162
- end
163
- return nil if ids.empty?
164
- ids
154
+ content_md.xpath('//resource[@type="page" or @type="image"]/file[@mimetype="image/jp2"]/@id').map(&:to_s)
165
155
  end
166
156
 
167
157
  def parse_sourceid
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module DiscoveryIndexer
2
- VERSION = '0.9.10'
2
+ VERSION = '0.9.11'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: discovery-indexer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.10
4
+ version: 0.9.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ahmed AlSum
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-10-06 00:00:00.000000000 Z
12
+ date: 2015-10-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri