hydra-collections 5.0.1 → 5.0.2

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: 66c141437035384dcd06f340506ab837348c902a
4
- data.tar.gz: a817c59334b68041937292aabe05532713bd08a9
3
+ metadata.gz: f5ab9c82d9c2b45b6c93d58bb9629d142104cb77
4
+ data.tar.gz: df870186ca05040cc5f4e07e38f29a03bcfb0900
5
5
  SHA512:
6
- metadata.gz: 4b4b34237bd666aa7f5ff1b7223f158111085c4a9c52260eea3998b5a01aff1e3969474f41b473633b2405c663b1a9be08f2abcd31905d39fe8c6aab0dfee7e7
7
- data.tar.gz: 3390a8a96bb94996a2101111a12a9060a554985c3da39bc4469429f055d3eb7627843d0b61c4c03e102bf893eb57737091eba1423d432fdf3e8c70245c0fe929
6
+ metadata.gz: d04a46fe91e9f572556e689bf0a7c759d5466f91bbcc8df17aebd68d5489f58629f2e1eeb1d9fdae8742d6ea0e2e497a89d70f0ed72fed7f5b4735cd46c28b31
7
+ data.tar.gz: b18035284b01b0439912b716346eead6fdabbc6cad9aa8cec7d4ea2123c3c45f80d235ab9ad5b9cf25ba78fca2894b8b92c7843aba23e56ad420e84f81d0339d
data/Changelog.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 5.0.2
2
+
3
+ * Using new Hydra::Catalog module and Hydra::Collections::SearchBehaviors
4
+
1
5
  # 5.0.1
2
6
 
3
7
  * Fixed bug where access controls were not enforced by default
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Hydra::Collections [![Version](https://badge.fury.io/rb/hydra-collections.png)](http://badge.fury.io/rb/hydra-collections) [![Build Status](https://travis-ci.org/projecthydra-labs/hydra-collections.png?branch=master)](https://travis-ci.org/projecthydra-labs/hydra-collections) [![Dependency Status](https://gemnasium.com/projecthydra/hydra-collections.png)](https://gemnasium.com/projecthydra/hydra-collections)
1
+ # Hydra::Collections [![Version](https://badge.fury.io/rb/hydra-collections.png)](http://badge.fury.io/rb/hydra-collections) [![Build Status](https://travis-ci.org/projecthydra/hydra-collections.png?branch=master)](https://travis-ci.org/projecthydra/hydra-collections) [![Dependency Status](https://gemnasium.com/projecthydra/hydra-collections.png)](https://gemnasium.com/projecthydra/hydra-collections)
2
2
 
3
3
  Add collections to your Hydra application. These collections are typically created by depositors (instead of librarians or curators). Any collectible item can belong to many different collections. The collection does not confer access rights onto any of the members of the collections.
4
4
 
@@ -1,31 +1,5 @@
1
1
  module Hydra::Collections
2
2
  class SearchBuilder < Hydra::SearchBuilder
3
-
4
- def collection
5
- scope.collection
6
- end
7
-
8
- # include filters into the query to only include the collection memebers
9
- def include_collection_ids(solr_parameters)
10
- solr_parameters[:fq] ||= []
11
- solr_parameters[:fq] << "{!join from=hasCollectionMember_ssim to=id}id:#{collection.id}"
12
- end
13
-
14
- def some_rows(solr_parameters)
15
- solr_parameters[:rows] = '100'
16
- end
17
-
18
- def add_collection_filter(solr_parameters)
19
- solr_parameters[:fq] ||= []
20
- solr_parameters[:fq] << ActiveFedora::SolrQueryBuilder.construct_query_for_rel(has_model: ::Collection.to_class_uri)
21
- end
22
-
23
- def discovery_perms= perms
24
- @discovery_perms = perms
25
- end
26
-
27
- def discovery_permissions
28
- @discovery_perms || super
29
- end
3
+ include Hydra::Collections::SearchBehaviors
30
4
  end
31
5
  end
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["cam156@psu.edu"]
11
11
  spec.description = "A rails engine for managing Hydra Collections"
12
12
  spec.summary = "A rails engine for managing Hydra Collections"
13
- spec.homepage = "https://github.com/projecthydra-labs/hydra-collections"
13
+ spec.homepage = "https://github.com/projecthydra/hydra-collections"
14
14
  spec.license = "APACHE2"
15
15
 
16
16
  spec.files = `git ls-files`.split($/)
@@ -9,6 +9,7 @@ module Hydra
9
9
  autoload :AcceptsBatches
10
10
  autoload :SelectsCollections
11
11
  autoload :SolrDocumentBehavior
12
+ autoload :SearchBehaviors
12
13
  class Engine < ::Rails::Engine
13
14
  engine_name "collections"
14
15
  config.autoload_paths += %W(
@@ -0,0 +1,30 @@
1
+ module Hydra::Collections::SearchBehaviors
2
+
3
+ def collection
4
+ scope.collection
5
+ end
6
+
7
+ # include filters into the query to only include the collection memebers
8
+ def include_collection_ids(solr_parameters)
9
+ solr_parameters[:fq] ||= []
10
+ solr_parameters[:fq] << "{!join from=hasCollectionMember_ssim to=id}id:#{collection.id}"
11
+ end
12
+
13
+ def some_rows(solr_parameters)
14
+ solr_parameters[:rows] = '100'
15
+ end
16
+
17
+ def add_collection_filter(solr_parameters)
18
+ solr_parameters[:fq] ||= []
19
+ solr_parameters[:fq] << ActiveFedora::SolrQueryBuilder.construct_query_for_rel(has_model: ::Collection.to_class_uri)
20
+ end
21
+
22
+ def discovery_perms= perms
23
+ @discovery_perms = perms
24
+ end
25
+
26
+ def discovery_permissions
27
+ @discovery_perms || super
28
+ end
29
+
30
+ end
@@ -1,5 +1,5 @@
1
1
  module Hydra
2
2
  module Collections
3
- VERSION = "5.0.1"
3
+ VERSION = "5.0.2"
4
4
  end
5
5
  end
@@ -1,7 +1,5 @@
1
1
  require 'spec_helper'
2
2
 
3
- include Rails.application.routes.url_helpers
4
-
5
3
  describe CatalogController, :type => :controller do
6
4
 
7
5
  before do
@@ -71,7 +71,7 @@ class TestAppGenerator < Rails::Generators::Base
71
71
 
72
72
  # Inject collections call into balacklight catalog
73
73
  def inject_collections
74
- insert_into_file "app/controllers/catalog_controller.rb", :after => 'Hydra::Controller::ControllerBehavior' do
74
+ insert_into_file "app/controllers/catalog_controller.rb", :after => 'Hydra::Catalog' do
75
75
  "\n include Hydra::Collections::SelectsCollections\n before_filter :find_collections, :only=>:index"
76
76
  end
77
77
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hydra-collections
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.1
4
+ version: 5.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carolyn Cole
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-11 00:00:00.000000000 Z
11
+ date: 2015-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hydra-head
@@ -150,6 +150,7 @@ files:
150
150
  - lib/hydra-collections.rb
151
151
  - lib/hydra/collections/accepts_batches.rb
152
152
  - lib/hydra/collections/collectible.rb
153
+ - lib/hydra/collections/search_behaviors.rb
153
154
  - lib/hydra/collections/search_service.rb
154
155
  - lib/hydra/collections/solr_document_behavior.rb
155
156
  - lib/hydra/collections/version.rb
@@ -184,7 +185,7 @@ files:
184
185
  - spec/views/collections/show.html.erb_spec.rb
185
186
  - tasks/hydra-collections-dev.rake
186
187
  - tasks/jetty.rake
187
- homepage: https://github.com/projecthydra-labs/hydra-collections
188
+ homepage: https://github.com/projecthydra/hydra-collections
188
189
  licenses:
189
190
  - APACHE2
190
191
  metadata: {}
@@ -204,7 +205,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
204
205
  version: '0'
205
206
  requirements: []
206
207
  rubyforge_project:
207
- rubygems_version: 2.4.5
208
+ rubygems_version: 2.4.6
208
209
  signing_key:
209
210
  specification_version: 4
210
211
  summary: A rails engine for managing Hydra Collections