cul_hydra 1.3.5 → 1.3.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- NDQ5Y2JmNDY4ZWM3NmY1YzAwNzhkNTI4NDNiNTQzZTFlMDY3YzI2OQ==
5
- data.tar.gz: !binary |-
6
- ZTE0ZTQ2ZGQwZDA4MjYwOGMwMjUzMzUxNjQzNDVmNjdkMWY1ZTQxNg==
2
+ SHA1:
3
+ metadata.gz: fe4ba4c680dcea9404bfb212289593a966f4873b
4
+ data.tar.gz: 53d811bfe46285cf98dcd523fa39bf521ec3027d
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- Y2FlZjA0ZjYzMTQ4YTdmZGZmMzY1YjJiMGMyNzU0MDkyMmNiYTAxYzdiNTQ3
10
- NWEzYmFjYTExNjc5YzFiYjM3YmM1NWYzNzQ2NGVmMjEzNjdiN2RkNmE4NDdj
11
- Y2JiMGU0NmRhNDhiOTNlMTJiNDhhZjc3MmQ0Y2NmYWQ2NjM5ZWM=
12
- data.tar.gz: !binary |-
13
- Njk0MjQ0YjE0ZGQ5YTI1ODY3YTNhODNhMTcwOTVlMzEzMDBjYzljN2M5NTQ3
14
- ZWYxMjIwZTE1YTAyZjJhYTVjYmNlZDhiNWVkNzJkNGQ3MWYwNDBlYjA5NWIy
15
- Y2ExMTNhYmY5OTA1NDliNDkxY2U4ZGEzMzdiYjk0MjA1NDAxMTE=
6
+ metadata.gz: 5b3caee8ee92f083491a732e5952e23b9813c397af27a59cd8697d3a9640e0487fb58c51e4dee523f687e18bc65736462d823e04394daa085e08e85502d081a8
7
+ data.tar.gz: c8538f0b7b3babff13a71823970255249091e41d2d881f9a7e879de20e44c5ddca981be18f6e6ff49420a399cc9d1a35ebc07c1ab950fd2f7711677ddc09e62e
@@ -218,7 +218,7 @@ module Cul::Hydra::Models::Common
218
218
  end
219
219
  else
220
220
  # If there isn't a structMap, just get the first child
221
- member_pids = Cul::Hydra::RisearchMembers.get_direct_member_pids(self.pid)
221
+ member_pids = Cul::Hydra::RisearchMembers.get_direct_member_pids(self.pid, true)
222
222
  if member_pids.first
223
223
  child_obj = ActiveFedora::Base.find(member_pids.first)
224
224
  return child_obj.get_representative_generic_resource
@@ -57,7 +57,14 @@ class GenericAggregator < ::ActiveFedora::Base
57
57
  if has_struct_metadata?()
58
58
  conn = ActiveFedora::SolrService.instance.conn
59
59
  # delete by query proxyIn_ssi: internal_uri
60
- conn.delete_by_query("proxyIn_ssi:#{RSolr.escape(internal_uri())}")
60
+
61
+ if RSolr.respond_to?(:solr_escape)
62
+ # Use newer escape method, assuming the app including the cul_hydra engine is using a newer version of RSolr
63
+ conn.delete_by_query("proxyIn_ssi:#{RSolr.solr_escape(internal_uri())}")
64
+ else
65
+ # Older escape method can throw deprecation warnings
66
+ conn.delete_by_query("proxyIn_ssi:#{RSolr.escape(internal_uri())}")
67
+ end
61
68
 
62
69
  # reindex proxies
63
70
  proxy_docs = proxies().collect {|p| p.to_solr}
@@ -29,7 +29,7 @@ module ClassMethods
29
29
 
30
30
  end
31
31
 
32
- def get_direct_member_results(pid, verbose_output=false, format='json')
32
+ def get_direct_member_results(pid, flush_resource_index_before_query=false, verbose_output=false, format='json')
33
33
 
34
34
  direct_member_query =
35
35
  'select $pid from <#ri>
@@ -42,19 +42,20 @@ module ClassMethods
42
42
  :type => 'tuples',
43
43
  :format => format,
44
44
  :limit => '',
45
- :stream => 'on'
45
+ :stream => 'on',
46
+ :flush => flush_resource_index_before_query.to_s
46
47
  }))
47
48
 
48
49
  return search_response['results']
49
50
  end
50
51
 
51
- def get_direct_member_pids(pid, verbose_output=false)
52
- unique_pids = get_direct_member_results(pid,verbose_output,'json')
52
+ def get_direct_member_pids(pid, flush_resource_index_before_query=false, verbose_output=false)
53
+ unique_pids = get_direct_member_results(pid,flush_resource_index_before_query,verbose_output,'json')
53
54
  unique_pids.map{|result| result['pid'].gsub('info:fedora/', '') }.uniq
54
55
  end
55
56
 
56
- def get_direct_member_count(pid, verbose_output=false)
57
- count = get_direct_member_results(pid,verbose_output,'count/json')
57
+ def get_direct_member_count(pid, flush_resource_index_before_query=false, verbose_output=false)
58
+ count = get_direct_member_results(pid,flush_resource_index_before_query,verbose_output,'count/json')
58
59
  return count.blank? ? 0 : count[0]['count'].to_i
59
60
  end
60
61
 
@@ -121,7 +122,7 @@ module ClassMethods
121
122
  end
122
123
 
123
124
  # Returns the pid of the first object found with the given identifier
124
- def get_pid_for_identifier(identifier)
125
+ def get_pid_for_identifier(identifier, flush_resource_index_before_query=false)
125
126
  find_by_identifier_query = "select $pid from <#ri>
126
127
  where $pid <http://purl.org/dc/elements/1.1/identifier> $identifier
127
128
  and $identifier <mulgara:is> '#{identifier}'"
@@ -130,7 +131,8 @@ module ClassMethods
130
131
  :type => 'tuples',
131
132
  :format => 'json',
132
133
  :limit => '1',
133
- :stream => 'on'
134
+ :stream => 'on',
135
+ :flush => flush_resource_index_before_query.to_s
134
136
  }))
135
137
 
136
138
  if search_response['results'].present?
@@ -1,6 +1,6 @@
1
1
  module Cul
2
2
  module Hydra
3
- VERSION = '1.3.5'
3
+ VERSION = '1.3.6'
4
4
  def self.version
5
5
  VERSION
6
6
  end
@@ -1,6 +1,6 @@
1
1
  module Cul
2
2
  module Hydra
3
- VERSION = '1.3.4'
3
+ VERSION = '1.3.5'
4
4
  def self.version
5
5
  VERSION
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cul_hydra
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.5
4
+ version: 1.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benjamin Armintor
@@ -9,160 +9,160 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-12-23 00:00:00.000000000 Z
12
+ date: 2016-02-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: blacklight
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ! '>='
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
20
  version: '0'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ! '>='
25
+ - - ">="
26
26
  - !ruby/object:Gem::Version
27
27
  version: '0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: hydra-head
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - ~>
32
+ - - "~>"
33
33
  - !ruby/object:Gem::Version
34
34
  version: '7'
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - ~>
39
+ - - "~>"
40
40
  - !ruby/object:Gem::Version
41
41
  version: '7'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: httpclient
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - ! '>='
46
+ - - ">="
47
47
  - !ruby/object:Gem::Version
48
48
  version: '0'
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - ! '>='
53
+ - - ">="
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: active-fedora
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - ~>
60
+ - - "~>"
61
61
  - !ruby/object:Gem::Version
62
62
  version: '7.0'
63
63
  type: :runtime
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - ~>
67
+ - - "~>"
68
68
  - !ruby/object:Gem::Version
69
69
  version: '7.0'
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: active-triples
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - ~>
74
+ - - "~>"
75
75
  - !ruby/object:Gem::Version
76
76
  version: 0.2.2
77
77
  type: :runtime
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - ~>
81
+ - - "~>"
82
82
  - !ruby/object:Gem::Version
83
83
  version: 0.2.2
84
84
  - !ruby/object:Gem::Dependency
85
85
  name: active_fedora_finders
86
86
  requirement: !ruby/object:Gem::Requirement
87
87
  requirements:
88
- - - ! '>='
88
+ - - ">="
89
89
  - !ruby/object:Gem::Version
90
90
  version: 0.5.0
91
91
  type: :runtime
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
- - - ! '>='
95
+ - - ">="
96
96
  - !ruby/object:Gem::Version
97
97
  version: 0.5.0
98
98
  - !ruby/object:Gem::Dependency
99
99
  name: active_fedora_relsint
100
100
  requirement: !ruby/object:Gem::Requirement
101
101
  requirements:
102
- - - ~>
102
+ - - "~>"
103
103
  - !ruby/object:Gem::Version
104
104
  version: '0.4'
105
105
  type: :runtime
106
106
  prerelease: false
107
107
  version_requirements: !ruby/object:Gem::Requirement
108
108
  requirements:
109
- - - ~>
109
+ - - "~>"
110
110
  - !ruby/object:Gem::Version
111
111
  version: '0.4'
112
112
  - !ruby/object:Gem::Dependency
113
113
  name: cul_image_props
114
114
  requirement: !ruby/object:Gem::Requirement
115
115
  requirements:
116
- - - ! '>='
116
+ - - ">="
117
117
  - !ruby/object:Gem::Version
118
118
  version: '0'
119
119
  type: :runtime
120
120
  prerelease: false
121
121
  version_requirements: !ruby/object:Gem::Requirement
122
122
  requirements:
123
- - - ! '>='
123
+ - - ">="
124
124
  - !ruby/object:Gem::Version
125
125
  version: '0'
126
126
  - !ruby/object:Gem::Dependency
127
127
  name: mods
128
128
  requirement: !ruby/object:Gem::Requirement
129
129
  requirements:
130
- - - ! '>='
130
+ - - ">="
131
131
  - !ruby/object:Gem::Version
132
132
  version: '0'
133
133
  type: :runtime
134
134
  prerelease: false
135
135
  version_requirements: !ruby/object:Gem::Requirement
136
136
  requirements:
137
- - - ! '>='
137
+ - - ">="
138
138
  - !ruby/object:Gem::Version
139
139
  version: '0'
140
140
  - !ruby/object:Gem::Dependency
141
141
  name: thread
142
142
  requirement: !ruby/object:Gem::Requirement
143
143
  requirements:
144
- - - ! '>='
144
+ - - ">="
145
145
  - !ruby/object:Gem::Version
146
146
  version: '0'
147
147
  type: :runtime
148
148
  prerelease: false
149
149
  version_requirements: !ruby/object:Gem::Requirement
150
150
  requirements:
151
- - - ! '>='
151
+ - - ">="
152
152
  - !ruby/object:Gem::Version
153
153
  version: '0'
154
154
  - !ruby/object:Gem::Dependency
155
155
  name: rdf
156
156
  requirement: !ruby/object:Gem::Requirement
157
157
  requirements:
158
- - - ! '>='
158
+ - - ">="
159
159
  - !ruby/object:Gem::Version
160
160
  version: 1.1.5
161
161
  type: :runtime
162
162
  prerelease: false
163
163
  version_requirements: !ruby/object:Gem::Requirement
164
164
  requirements:
165
- - - ! '>='
165
+ - - ">="
166
166
  - !ruby/object:Gem::Version
167
167
  version: 1.1.5
168
168
  - !ruby/object:Gem::Dependency
@@ -183,112 +183,112 @@ dependencies:
183
183
  name: cancancan
184
184
  requirement: !ruby/object:Gem::Requirement
185
185
  requirements:
186
- - - ~>
186
+ - - "~>"
187
187
  - !ruby/object:Gem::Version
188
188
  version: 1.12.0
189
189
  type: :runtime
190
190
  prerelease: false
191
191
  version_requirements: !ruby/object:Gem::Requirement
192
192
  requirements:
193
- - - ~>
193
+ - - "~>"
194
194
  - !ruby/object:Gem::Version
195
195
  version: 1.12.0
196
196
  - !ruby/object:Gem::Dependency
197
197
  name: autoprefixer-rails
198
198
  requirement: !ruby/object:Gem::Requirement
199
199
  requirements:
200
- - - <=
200
+ - - "<="
201
201
  - !ruby/object:Gem::Version
202
202
  version: 6.1.1
203
203
  type: :runtime
204
204
  prerelease: false
205
205
  version_requirements: !ruby/object:Gem::Requirement
206
206
  requirements:
207
- - - <=
207
+ - - "<="
208
208
  - !ruby/object:Gem::Version
209
209
  version: 6.1.1
210
210
  - !ruby/object:Gem::Dependency
211
211
  name: sqlite3
212
212
  requirement: !ruby/object:Gem::Requirement
213
213
  requirements:
214
- - - ! '>='
214
+ - - ">="
215
215
  - !ruby/object:Gem::Version
216
216
  version: '0'
217
217
  type: :development
218
218
  prerelease: false
219
219
  version_requirements: !ruby/object:Gem::Requirement
220
220
  requirements:
221
- - - ! '>='
221
+ - - ">="
222
222
  - !ruby/object:Gem::Version
223
223
  version: '0'
224
224
  - !ruby/object:Gem::Dependency
225
225
  name: rspec
226
226
  requirement: !ruby/object:Gem::Requirement
227
227
  requirements:
228
- - - ~>
228
+ - - "~>"
229
229
  - !ruby/object:Gem::Version
230
230
  version: '2.10'
231
231
  type: :development
232
232
  prerelease: false
233
233
  version_requirements: !ruby/object:Gem::Requirement
234
234
  requirements:
235
- - - ~>
235
+ - - "~>"
236
236
  - !ruby/object:Gem::Version
237
237
  version: '2.10'
238
238
  - !ruby/object:Gem::Dependency
239
239
  name: rspec-rails
240
240
  requirement: !ruby/object:Gem::Requirement
241
241
  requirements:
242
- - - ~>
242
+ - - "~>"
243
243
  - !ruby/object:Gem::Version
244
244
  version: '2.10'
245
245
  type: :development
246
246
  prerelease: false
247
247
  version_requirements: !ruby/object:Gem::Requirement
248
248
  requirements:
249
- - - ~>
249
+ - - "~>"
250
250
  - !ruby/object:Gem::Version
251
251
  version: '2.10'
252
252
  - !ruby/object:Gem::Dependency
253
253
  name: jettywrapper
254
254
  requirement: !ruby/object:Gem::Requirement
255
255
  requirements:
256
- - - ! '>='
256
+ - - ">="
257
257
  - !ruby/object:Gem::Version
258
258
  version: 1.4.0
259
259
  type: :development
260
260
  prerelease: false
261
261
  version_requirements: !ruby/object:Gem::Requirement
262
262
  requirements:
263
- - - ! '>='
263
+ - - ">="
264
264
  - !ruby/object:Gem::Version
265
265
  version: 1.4.0
266
266
  - !ruby/object:Gem::Dependency
267
267
  name: equivalent-xml
268
268
  requirement: !ruby/object:Gem::Requirement
269
269
  requirements:
270
- - - ! '>='
270
+ - - ">="
271
271
  - !ruby/object:Gem::Version
272
272
  version: 0.2.4
273
273
  type: :development
274
274
  prerelease: false
275
275
  version_requirements: !ruby/object:Gem::Requirement
276
276
  requirements:
277
- - - ! '>='
277
+ - - ">="
278
278
  - !ruby/object:Gem::Version
279
279
  version: 0.2.4
280
280
  - !ruby/object:Gem::Dependency
281
281
  name: rbx-require-relative
282
282
  requirement: !ruby/object:Gem::Requirement
283
283
  requirements:
284
- - - ! '>='
284
+ - - ">="
285
285
  - !ruby/object:Gem::Version
286
286
  version: '0'
287
287
  type: :development
288
288
  prerelease: false
289
289
  version_requirements: !ruby/object:Gem::Requirement
290
290
  requirements:
291
- - - ! '>='
291
+ - - ">="
292
292
  - !ruby/object:Gem::Version
293
293
  version: '0'
294
294
  description: Hydra implementations for CUL repository apps
@@ -538,17 +538,17 @@ require_paths:
538
538
  - fixtures
539
539
  required_ruby_version: !ruby/object:Gem::Requirement
540
540
  requirements:
541
- - - ! '>='
541
+ - - ">="
542
542
  - !ruby/object:Gem::Version
543
543
  version: 1.9.3
544
544
  required_rubygems_version: !ruby/object:Gem::Requirement
545
545
  requirements:
546
- - - ! '>='
546
+ - - ">="
547
547
  - !ruby/object:Gem::Version
548
548
  version: '0'
549
549
  requirements: []
550
550
  rubyforge_project:
551
- rubygems_version: 2.4.6
551
+ rubygems_version: 2.4.8
552
552
  signing_key:
553
553
  specification_version: 4
554
554
  summary: ActiveFedora, OM, and Solrizer implementations for CUL repository apps