blacklight_cql 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.0.1
@@ -18,6 +18,16 @@ module BlacklightCql
18
18
  config.after_initialize do
19
19
  Blacklight.config[:search_fields] << BlacklightCql::SolrHelperExtension.pseudo_search_field
20
20
  end
21
+
22
+
23
+
24
+ require 'blacklight_cql/route_sets'
25
+ initializer "blacklight.cql.routes" do
26
+ if defined? Blacklight::Routes
27
+ Blacklight::Routes.send(:include, BlacklightCql::RouteSets)
28
+ end
29
+ end
30
+
21
31
 
22
32
 
23
33
  # Wrapping in Dispatcher.to_prepare will, theoretically, take care of things
@@ -0,0 +1,19 @@
1
+ module BlacklightCql
2
+
3
+ # Module to be included into Blacklight::Routes to make sure
4
+ # our explain route gets added before other catalog routes, so it
5
+ # can take effect.
6
+ module RouteSets
7
+
8
+ protected
9
+ def catalog
10
+
11
+ add_routes do |options|
12
+ match 'catalog/explain', :to => "blacklight_cql/explain#index"
13
+ end
14
+
15
+ super
16
+ end
17
+
18
+ end
19
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blacklight_cql
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 0
10
- version: 1.0.0
9
+ - 1
10
+ version: 1.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jonathan Rochkind
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-09-12 00:00:00 -04:00
18
+ date: 2011-09-14 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -88,13 +88,13 @@ files:
88
88
  - lib/blacklight_cql/blacklight_to_solr.rb
89
89
  - lib/blacklight_cql/template_helper_extension.rb
90
90
  - lib/blacklight_cql/version.rb
91
+ - lib/blacklight_cql/route_sets.rb
91
92
  - lib/blacklight_cql/solr_helper_extension.rb
92
93
  - lib/blacklight_cql/engine.rb
93
94
  - lib/blacklight_cql.rb
94
95
  - app/controllers/blacklight_cql/explain_controller.rb
95
96
  - app/views/blacklight_cql/explain/explain.xml.builder
96
97
  - app/helpers/blacklight_cql/explain_helper.rb
97
- - config/routes.rb
98
98
  - VERSION
99
99
  - spec/lib/blacklight_to_solr_spec.rb
100
100
  - spec/rcov.opts
data/config/routes.rb DELETED
@@ -1,10 +0,0 @@
1
- # Fix this for Rails3, this is a weird way to do it, but oh well.
2
- # We want to map catalog/explain but not touch the app's own mappings
3
- # for catalog resource. So we do it with just old style routing.
4
-
5
- ActionController::Routing::Routes.draw do |map|
6
- map.connect 'catalog/explain', :controller => "blacklight_cql/explain", :action => "index"
7
-
8
-
9
- end
10
-