hydra-core 10.4.0 → 10.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generators/hydra/head_generator.rb +3 -7
- data/lib/generators/hydra/templates/config/blacklight.yml +1 -2
- data/lib/generators/hydra/templates/config/initializers/hydra_config.rb +2 -0
- data/lib/hydra-head/version.rb +1 -1
- data/lib/tasks/hydra.rake +19 -16
- data/spec/models/user_spec.rb +6 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 390e410597d92f2ea211e30a83b3b1b4cb49c823
|
4
|
+
data.tar.gz: 633207d0e603be5b0230211df550c7844f2c8000
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e00c2afff1bd6aadc322275c7e5407130660fe1068263fa185d7ae79ffeaf597f5778d0649819198a50cde37061782954d0c0f1467dabad48adfe89ff242abd
|
7
|
+
data.tar.gz: c1a44dbbe07da54548db0fe6f275da4dcfecabd5f4236cfdf70de8b185a95665c532f6b5210b41f8b67cd7c25cf10d753c7645e123beda163695ca716228affb
|
@@ -33,14 +33,9 @@ module Hydra
|
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
36
|
-
def
|
36
|
+
def install_rspec
|
37
37
|
return if options[:'skip-rspec']
|
38
|
-
|
39
|
-
application("\n" <<
|
40
|
-
" config.generators do |g|\n" <<
|
41
|
-
" g.test_framework :rspec, :spec => true\n" <<
|
42
|
-
" end\n\n"
|
43
|
-
)
|
38
|
+
generate 'rspec:install'
|
44
39
|
end
|
45
40
|
|
46
41
|
def overwrite_catalog_controller
|
@@ -57,6 +52,7 @@ module Hydra
|
|
57
52
|
# Add Hydra to the SearchBuilder
|
58
53
|
def inject_hydra_search_builder_behavior
|
59
54
|
insert_into_file "app/models/search_builder.rb", after: "include Blacklight::Solr::SearchBuilderBehavior\n" do
|
55
|
+
" # Add a filter query to restrict the search to documents the current user has access to\n" \
|
60
56
|
" include Hydra::AccessControlsEnforcement\n"
|
61
57
|
end
|
62
58
|
end
|
@@ -3,8 +3,7 @@ development:
|
|
3
3
|
url: <%= ENV['SOLR_URL'] || "http://127.0.0.1:#{ENV.fetch('SOLR_DEVELOPMENT_PORT', 8983)}/solr/hydra-development" %>
|
4
4
|
test: &test
|
5
5
|
adapter: solr
|
6
|
-
url:
|
6
|
+
url: <%= ENV['SOLR_URL'] || "http://127.0.0.1:#{ENV.fetch('SOLR_TEST_PORT', 8985)}/solr/hydra-test" %>
|
7
7
|
production:
|
8
8
|
adapter: solr
|
9
9
|
url: <%= ENV['SOLR_URL'] || "http://127.0.0.1:8983/solr/blacklight-core" %>
|
10
|
-
|
data/lib/hydra-head/version.rb
CHANGED
data/lib/tasks/hydra.rake
CHANGED
@@ -3,29 +3,32 @@ require 'active_fedora/rake_support'
|
|
3
3
|
namespace :hydra do
|
4
4
|
desc "Start a solr, fedora and rails instance"
|
5
5
|
task :server do
|
6
|
-
with_server('development') do
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
6
|
+
with_server(ENV['RAILS_ENV'] || 'development') do
|
7
|
+
puts "Fedora: #{ActiveFedora.config.credentials[:url]}"
|
8
|
+
puts "Solr..: #{ActiveFedora.solr_config[:url]}"
|
9
|
+
begin
|
10
|
+
if ENV['SKIP_RAILS']
|
11
|
+
puts "^C to exit"
|
12
|
+
sleep
|
13
|
+
else
|
14
|
+
# If HOST specified, bind to that IP with -b
|
15
|
+
server_options = " -b #{ENV['HOST']}" if ENV['HOST']
|
16
|
+
IO.popen("rails server#{server_options}") do |io|
|
17
|
+
io.each do |line|
|
18
|
+
puts line
|
19
|
+
end
|
13
20
|
end
|
14
|
-
rescue Interrupt
|
15
|
-
puts "Stopping server"
|
16
21
|
end
|
22
|
+
rescue Interrupt
|
23
|
+
puts "Stopping server"
|
17
24
|
end
|
18
25
|
end
|
19
26
|
end
|
20
27
|
|
21
28
|
desc "Start solr and fedora instances for tests"
|
22
29
|
task :test_server do
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
rescue Interrupt
|
27
|
-
puts "Stopping server"
|
28
|
-
end
|
29
|
-
end
|
30
|
+
ENV['RAILS_ENV'] = 'test'
|
31
|
+
ENV['SKIP_RAILS'] = 'true'
|
32
|
+
Rake::Task['hydra:server'].invoke
|
30
33
|
end
|
31
34
|
end
|
data/spec/models/user_spec.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'spec_helper'
|
2
|
+
require 'hydra/shared_spec/group_service_interface'
|
2
3
|
|
3
4
|
describe User do
|
4
5
|
|
@@ -25,6 +26,11 @@ describe User do
|
|
25
26
|
end
|
26
27
|
end
|
27
28
|
|
29
|
+
describe '.group_service' do
|
30
|
+
let(:group_service) { described_class.group_service }
|
31
|
+
it_behaves_like 'a Hydra group_service interface'
|
32
|
+
end
|
33
|
+
|
28
34
|
describe "#groups" do
|
29
35
|
let(:user) { FactoryGirl.create(:user) }
|
30
36
|
let(:mock_service) { double }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hydra-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 10.
|
4
|
+
version: 10.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Zumwalt, Bess Sadler, Julie Meloni, Naomi Dushay, Jessie Keck, John Scofield,
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-06-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: railties
|
@@ -37,14 +37,14 @@ dependencies:
|
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 10.
|
40
|
+
version: 10.5.0
|
41
41
|
type: :runtime
|
42
42
|
prerelease: false
|
43
43
|
version_requirements: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 10.
|
47
|
+
version: 10.5.0
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: sqlite3
|
50
50
|
requirement: !ruby/object:Gem::Requirement
|
@@ -180,7 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
180
180
|
version: '0'
|
181
181
|
requirements: []
|
182
182
|
rubyforge_project:
|
183
|
-
rubygems_version: 2.6.
|
183
|
+
rubygems_version: 2.6.12
|
184
184
|
signing_key:
|
185
185
|
specification_version: 4
|
186
186
|
summary: Hydra-Head Rails Engine (requires Rails3)
|