cul_hydra 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cul_hydra/version.rb +1 -1
- data/lib/cul_hydra/version.rb~ +1 -1
- data/lib/tasks/index.rake +30 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: add7cd1403a95f97a6b1ad05e3696b555ffae5be
|
4
|
+
data.tar.gz: 4c2ff7a69468b565d1aff893ff455c9513d61f90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0cd91ebf116b1dd412bf0f69789e826cd4bc38e2bcf2be757b3b36feaa8fc7c05d37349cf6b107257e7f743b852d5cd174e8d28adffe1072e4ca32c6fb5421d
|
7
|
+
data.tar.gz: 39a9ae0bacf69f72f5e890021566442ea26d24216fa6301af9da7db37785cde412bf6790b0f2224cad8c1ed49cb9c9f23ae1df331cbaea801b9857f4c6f66155
|
data/lib/cul_hydra/version.rb
CHANGED
data/lib/cul_hydra/version.rb~
CHANGED
data/lib/tasks/index.rake
CHANGED
@@ -67,6 +67,36 @@ namespace :cul_hydra do
|
|
67
67
|
end
|
68
68
|
|
69
69
|
end
|
70
|
+
|
71
|
+
task :by_publish_target_pid => :environment do
|
72
|
+
|
73
|
+
puts '---------------------------'
|
74
|
+
puts 'Fedora URL: ' + ActiveFedora.config.credentials[:url]
|
75
|
+
puts 'Solr URL: ' + ActiveFedora.solr_config[:url]
|
76
|
+
puts '---------------------------'
|
77
|
+
|
78
|
+
if ENV['PID']
|
79
|
+
publish_target_pid = ENV['PID']
|
80
|
+
else
|
81
|
+
puts 'Please specify a publish target PID (e.g. PID=cul:123)'
|
82
|
+
next
|
83
|
+
end
|
84
|
+
|
85
|
+
skip_generic_resources = (ENV['skip_generic_resources'] == 'true')
|
86
|
+
|
87
|
+
start_time = Time.now
|
88
|
+
pids = Cul::Hydra::RisearchMembers.get_publish_target_member_pids(publish_target_pid, true)
|
89
|
+
total = pids.length
|
90
|
+
puts "Found #{total} publish target members."
|
91
|
+
counter = 0
|
92
|
+
|
93
|
+
pids.each do |pid|
|
94
|
+
Cul::Hydra::Indexer.index_pid(pid, skip_generic_resources, false)
|
95
|
+
counter += 1
|
96
|
+
puts "Indexed #{counter} of #{total} | #{Time.now - start_time} seconds"
|
97
|
+
end
|
98
|
+
|
99
|
+
end
|
70
100
|
|
71
101
|
end
|
72
102
|
|
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.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Benjamin Armintor
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-05-
|
12
|
+
date: 2015-05-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: blacklight
|