Permalink
Browse files

Updated hydra-jetty to latest version with solr 3.5

  • Loading branch information...
jcoyne committed Jul 23, 2012
1 parent 9158793 commit 0302ae77e1905477b36c8050da07ac198b9f03bb
View
@@ -1,3 +1,4 @@
+* The generated configs are for Solr 3.5 (upgraded from 1.4). It ought to work with other versions of solr if you provide your own configs.
* get_file_asset_count(solr_doc) has been replaced by
fedora_doc.file_asset_count (or just fedora_doc.parts.length if you prefer)
* remove User.send(:include, Hydra::GenericUserAttributes) from config/initializers/hydra_config.rb
@@ -7,3 +8,4 @@
* TODO: activate the relavent integration tests in test_support/features
+
@@ -7,7 +7,7 @@ def apply_gated_discovery(solr_parameters, user_parameters)
super
additional_clauses = policy_clauses
unless additional_clauses.nil? || additional_clauses.empty?
- solr_parameters[:fq].first << " OR " + policy_clauses
+ solr_parameters[:fq].first << " OR " + additional_clauses
logger.debug("POLICY-aware Solr parameters: #{ solr_parameters.inspect }")
end
end
@@ -67,4 +67,4 @@ def policy_class
end
end
-end
+end
@@ -66,7 +66,7 @@ def session
end
after(:all) do
- @policies.access.each {|p| p.delete }
+ @sample_policies.each {|p| p.delete }
end
subject { MockController.new }
@@ -97,6 +97,9 @@ def session
describe "apply_gated_discovery" do
it "should include policy-aware query" do
+ # stubbing out policies_with_access because solr doesn't always return them in the same order.
+ policy_pids = (1..6).map {|n| "test:policy#{n}"}
+ subject.should_receive(:policies_with_access).and_return(policy_pids)
subject.apply_gated_discovery(@solr_parameters, @user_parameters)
@solr_parameters[:fq].first.should include(" OR (is_governed_by_s:info\\:fedora/test\\:policy1 OR is_governed_by_s:info\\:fedora/test\\:policy2 OR is_governed_by_s:info\\:fedora/test\\:policy3 OR is_governed_by_s:info\\:fedora/test\\:policy4 OR is_governed_by_s:info\\:fedora/test\\:policy5 OR is_governed_by_s:info\\:fedora/test\\:policy6)")
end
@@ -106,4 +109,4 @@ def session
@solr_parameters[:fq].first.should_not include(" OR (is_governed_by_s:info\\:fedora/test\\:policy1 OR is_governed_by_s:info\\:fedora/test\\:policy2 OR is_governed_by_s:info\\:fedora/test\\:policy3 OR is_governed_by_s:info\\:fedora/test\\:policy4 OR is_governed_by_s:info\\:fedora/test\\:policy5 OR is_governed_by_s:info\\:fedora/test\\:policy6)")
end
end
-end
+end

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 0302ae7

Please sign in to comment.