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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3de2f55b5b9b847e3d3b13920ea2142534f89f0a
4
- data.tar.gz: d6fdf3504b7e3f1f86660e2c8a9258d4432a2e53
3
+ metadata.gz: 390e410597d92f2ea211e30a83b3b1b4cb49c823
4
+ data.tar.gz: 633207d0e603be5b0230211df550c7844f2c8000
5
5
  SHA512:
6
- metadata.gz: 8b62c71271993b3f1737458ae31971c0d09223c832448af354d6731e81ac4a8886a6a30f3a099fec24f9a932e00b8d1bb36adfdac1920dd11f97b7e769877bb8
7
- data.tar.gz: 82e0111d3f2500f5178bcfd8ce4722f8e7dfeef824cea78b70b3bf6ec667592def182311a36beb0612a38750b24402e9ef092c3fea681a63e89e34397098e1e9
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 inject_test_framework
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: http://localhost:<%= ENV['SOLR_TEST_PORT'] || 8985 %>/solr/hydra-test
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
-
@@ -19,4 +19,6 @@ Hydra.configure do |config|
19
19
  #
20
20
  # Specify the user model
21
21
  <%= '# ' if model_name == 'User' %>config.user_model = '<%= model_name %>'
22
+
23
+ config.user_key_field = Devise.authentication_keys.first
22
24
  end
@@ -1,3 +1,3 @@
1
1
  module HydraHead
2
- VERSION = "10.4.0"
2
+ VERSION = "10.5.0"
3
3
  end
@@ -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
- # If HOST specified, bind to that IP with -b
8
- server_options = " -b #{ENV['HOST']}" if ENV['HOST']
9
- IO.popen("rails server#{server_options}") do |io|
10
- begin
11
- io.each do |line|
12
- puts line
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
- with_server('test') do
24
- begin
25
- sleep
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
@@ -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.0
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-01-25 00:00:00.000000000 Z
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.4.0
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.4.0
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.8
183
+ rubygems_version: 2.6.12
184
184
  signing_key:
185
185
  specification_version: 4
186
186
  summary: Hydra-Head Rails Engine (requires Rails3)