blacklight 3.2.2 → 3.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. data/.gitignore +1 -0
  2. data/VERSION +1 -1
  3. data/app/assets/javascripts/blacklight/blacklight.js +2 -2
  4. data/app/assets/stylesheets/blacklight/blacklight.css.scss +1 -1
  5. data/app/assets/stylesheets/blacklight/grids/_susy.css.scss +1 -1
  6. data/app/helpers/blacklight/blacklight_helper_behavior.rb +7 -7
  7. data/app/helpers/blacklight/facets_helper_behavior.rb +3 -1
  8. data/app/helpers/blacklight/render_constraints_helper_behavior.rb +2 -2
  9. data/app/helpers/blacklight/search_history_constraints_helper_behavior.rb +1 -1
  10. data/app/views/catalog/_constraints_element.html.erb +1 -1
  11. data/app/views/catalog/_home_text.html.erb +3 -3
  12. data/app/views/search_history/index.html.erb +9 -5
  13. data/blacklight.gemspec +3 -2
  14. data/lib/blacklight/configurable.rb +1 -1
  15. data/lib/blacklight/solr_helper.rb +2 -0
  16. data/lib/generators/blacklight/blacklight_generator.rb +4 -1
  17. data/lib/generators/blacklight/templates/catalog_controller.rb +6 -0
  18. data/lib/generators/blacklight/templates/config/compass.rb +2 -0
  19. data/test_support/bin/test.sh +2 -1
  20. data/test_support/spec/helpers/blacklight_helper_spec.rb +40 -1
  21. data/test_support/spec/helpers/facets_helper_spec.rb +15 -2
  22. data/test_support/spec/helpers/render_constraints_helper_spec.rb +30 -0
  23. data/test_support/spec/lib/blacklight_configurable_spec.rb +13 -0
  24. data/test_support/spec/lib/blacklight_configuration_spec.rb +6 -0
  25. data/test_support/spec/lib/solr_helper_spec.rb +8 -0
  26. data/test_support/spec/views/catalog/_constraints_element.html.erb_spec.rb +6 -0
  27. data/test_support/spec/views/catalog/_facets.html.erb_spec.rb +1 -1
  28. data/test_support/spec/views/catalog/index.atom.builder_spec.rb +9 -3
  29. metadata +41 -30
  30. data/app/assets/stylesheets/blacklight/grids/_susy_framework.css.scss +0 -228
  31. data/lib/generators/blacklight/templates/config/sass.rb +0 -4
data/.gitignore CHANGED
@@ -18,3 +18,4 @@ Gemfile.lock
18
18
  tmp/test_app
19
19
  .rvmrc
20
20
  pkg/*
21
+ *.swp
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.2.2
1
+ 3.3.0
@@ -69,7 +69,7 @@ $(document).ready(function() {
69
69
  //page load, and later called on document ready.
70
70
  (function($) {
71
71
  Blacklight.do_search_context_behavior = function() {
72
- $('a[data-counter]').click(function() {
72
+ $('a[data-counter]').click(function(event) {
73
73
  var f = document.createElement('form'); f.style.display = 'none';
74
74
  this.parentNode.appendChild(f);
75
75
  f.method = 'POST';
@@ -255,7 +255,7 @@ $(document).ready(function() {
255
255
  var label = $('<label>')
256
256
  .addClass( options.css_class )
257
257
  .attr("for", options.css_class + '_' + unique_id)
258
- .attr("title", form.attr("title"));
258
+ .attr("title", form.attr("title") || "");
259
259
 
260
260
 
261
261
  function update_state_for(state) {
@@ -1,4 +1,4 @@
1
1
  /* This is the default blacklight theme. */
2
2
 
3
- @import 'blacklight/grids/susy';
3
+ @import 'grids/susy';
4
4
  @import 'blacklight/blacklight_base';
@@ -8,7 +8,7 @@ $col-width: 2.5em !default;
8
8
  $gutter-width: .5em !default;
9
9
  $side-gutter-width: 2em !default;
10
10
 
11
- @import "blacklight/grids/susy_framework";
11
+ @import "susy";
12
12
  @import "compass/utilities";
13
13
 
14
14
  /* Header Container Layout */
@@ -76,8 +76,8 @@ module Blacklight::BlacklightHelperBehavior
76
76
  # renders next to title. Includes just 'Folder' by default.
77
77
  def render_index_doc_actions(document, options={})
78
78
  content = []
79
- content << render(:partial => 'bookmark_control', :locals => {:document=> document}.merge(options)) if has_user_authentication_provider? and current_user
80
- content << render(:partial => 'folder_control', :locals => {:document=> document}.merge(options))
79
+ content << render(:partial => 'catalog/bookmark_control', :locals => {:document=> document}.merge(options)) if has_user_authentication_provider? and current_user
80
+ content << render(:partial => 'catalog/folder_control', :locals => {:document=> document}.merge(options))
81
81
 
82
82
  content_tag("div", content.join("\n").html_safe, :class=>"documentFunctions")
83
83
  end
@@ -86,8 +86,8 @@ module Blacklight::BlacklightHelperBehavior
86
86
  # renders next to title. By default includes 'Folder' and 'Bookmarks'
87
87
  def render_show_doc_actions(document=@document, options={})
88
88
  content = []
89
- content << render(:partial => 'bookmark_control', :locals => {:document=> document}.merge(options)) if has_user_authentication_provider? and current_user
90
- content << render(:partial => 'folder_control', :locals => {:document=> document}.merge(options))
89
+ content << render(:partial => 'catalog/bookmark_control', :locals => {:document=> document}.merge(options)) if has_user_authentication_provider? and current_user
90
+ content << render(:partial => 'catalog/folder_control', :locals => {:document=> document}.merge(options))
91
91
 
92
92
  content_tag("div", content.join("\n").html_safe, :class=>"documentFunctions")
93
93
  end
@@ -204,14 +204,14 @@ module Blacklight::BlacklightHelperBehavior
204
204
  # based on the value of doc[:format]
205
205
  # if this value is blank (nil/empty) the "default" is used
206
206
  # if the partial is not found, the "default" partial is rendered instead
207
- def render_document_partial(doc, action_name)
207
+ def render_document_partial(doc, action_name, locals = {})
208
208
  format = document_partial_name(doc)
209
209
 
210
210
  document_partial_path_templates.each do |str|
211
211
  # XXX rather than handling this logic through exceptions, maybe there's a Rails internals method
212
212
  # for determining if a partial template exists..
213
213
  begin
214
- return render :partial => (str % [action_name, format]), :locals=>{:document=>doc}
214
+ return render :partial => (str % [action_name, format]), :locals=>locals.merge({:document=>doc})
215
215
  rescue ActionView::MissingTemplate
216
216
  nil
217
217
  end
@@ -275,7 +275,7 @@ module Blacklight::BlacklightHelperBehavior
275
275
  def link_to_document(doc, opts={:label=>nil, :counter => nil, :results_view => true})
276
276
  label ||= blacklight_config.index.show_link.to_sym
277
277
  label = render_document_index_label doc, opts
278
- link_to label, doc, :'data-counter' => opts[:counter]
278
+ link_to label, doc, { :'data-counter' => opts[:counter] }.merge(opts.reject { |k,v| [:label, :counter, :results_view].include? k })
279
279
  end
280
280
 
281
281
  # link_back_to_catalog(:label=>'Back to Search')
@@ -72,7 +72,9 @@ module Blacklight::FacetsHelperBehavior
72
72
  # By default, only render facets with items.
73
73
  # @param [RSolr::Ext::Response::Facets::FacetField] display_facet
74
74
  def should_render_facet? display_facet
75
- return !display_facet.items.blank?
75
+ # display when show is nil or true
76
+ display = facet_configuration_for_field(display_facet.name).show != false
77
+ return display && display_facet.items.present?
76
78
  end
77
79
 
78
80
  # the name of the partial to use to render a facet field. Can be over-ridden for custom
@@ -26,7 +26,7 @@ module Blacklight::RenderConstraintsHelperBehavior
26
26
  render_constraint_element(label,
27
27
  localized_params[:q],
28
28
  :classes => ["query"],
29
- :remove => catalog_index_path(localized_params.merge(:q=>nil, :action=>'index')))
29
+ :remove => url_for(localized_params.merge(:q=>nil, :action=>'index')))
30
30
  else
31
31
  "".html_safe
32
32
  end
@@ -46,7 +46,7 @@ module Blacklight::RenderConstraintsHelperBehavior
46
46
  values.map do |val|
47
47
  render_constraint_element( facet_field_labels[facet],
48
48
  val,
49
- :remove => catalog_index_path(remove_facet_params(facet, val, localized_params)),
49
+ :remove => url_for(remove_facet_params(facet, val, localized_params)),
50
50
  :classes => ["filter", "filter-" + facet.parameterize]
51
51
  ) + "\n"
52
52
  end
@@ -19,7 +19,7 @@ module Blacklight::SearchHistoryConstraintsHelperBehavior
19
19
  def render_search_to_s_q(params)
20
20
  return "".html_safe if params[:q].blank?
21
21
 
22
- label = (params[:search_field] == default_search_field[:key]) ?
22
+ label = (default_search_field && params[:search_field] == default_search_field[:key]) ?
23
23
  nil :
24
24
  label_for_search_field(params[:search_field])
25
25
 
@@ -21,7 +21,7 @@
21
21
  if label.blank?
22
22
  "Remove constraint #{options[:escape_value] ? h(value) : value}"
23
23
  else
24
- "Remove constraint #{options[:escape_value] ? h(value) : value}: #{options[:escape_value] ? h(value) : value}"
24
+ "Remove constraint #{options[:escape_label] ? h(label) : label}: #{options[:escape_value] ? h(value) : value}"
25
25
  end
26
26
  %>
27
27
  <%= link_to(accessible_remove_label,
@@ -1,6 +1,6 @@
1
1
  <h3>Welcome!</h3>
2
2
  <p>To modify this text to your specifications, copy this file located in the blacklight plugin directory:<br/>
3
- &nbsp;&nbsp;&nbsp;vendor/plugins/blacklight/app/views/catalog/_home_text.html.erb</p>
3
+ &nbsp;&nbsp;&nbsp;<%= Blacklight.root %>/app/views/catalog/_home_text.html.erb</p>
4
4
  <p>to your top level rails app:<br/>
5
- &nbsp;&nbsp;&nbsp;app/views/catalog/_home_text.html.erb</p>
6
- Note that you will need to create the 'catalog' directory under views.
5
+ &nbsp;&nbsp;&nbsp;<%= Rails.root %>/app/views/catalog/_home_text.html.erb</p>
6
+ Note that you will need to create the 'catalog' directory under views.
@@ -10,11 +10,15 @@
10
10
  <%- @searches.each_with_index do |search,index| -%>
11
11
  <%= content_tag :tr, :id => "document_#{index + 1}" do %>
12
12
  <td class="query"><%= link_to_previous_search(search.query_params) %></td>
13
- <td class="actions"><%- if has_user_authentication_provider? && current_user && search.saved? -%>
14
- <%= button_to "forget", forget_search_path(search.id) %>
15
- <%- else -%>
16
- <%= button_to "save", save_search_path(search.id), :method => :put %>
17
- <%- end -%></td>
13
+ <%- if has_user_authentication_provider? -%>
14
+ <td class="actions">
15
+ <%- if current_user && search.saved? -%>
16
+ <%= button_to "forget", forget_search_path(search.id) %>
17
+ <%- else -%>
18
+ <%= button_to "save", save_search_path(search.id), :method => :put %>
19
+ <%- end -%>
20
+ </td>
21
+ <%- end -%>
18
22
  <% end #content_tag %>
19
23
  <%- end -%>
20
24
  </table>
@@ -27,7 +27,8 @@ Gem::Specification.new do |s|
27
27
  s.add_dependency "rsolr", "~> 1.0.6" # Library for interacting with rSolr.
28
28
  s.add_dependency "rsolr-ext", '~> 1.0.3' # extension to the above for some rails-ish behaviors - currently embedded in our solr document ojbect.
29
29
  s.add_dependency "kaminari" # the pagination (page 1,2,3, etc..) of our search results
30
- s.add_dependency "sass-rails", "~> 3.1"
30
+ s.add_dependency "sass-rails", "~> 3.2.0"
31
31
  s.add_development_dependency "jettywrapper", ">= 1.2.0"
32
- s.add_dependency "compass", ">= 0.12.alpha.2"
32
+ s.add_dependency "compass-rails", "~> 1.0.0"
33
+ s.add_dependency "compass-susy-plugin", ">= 0.9.0"
33
34
  end
@@ -45,7 +45,7 @@ module Blacklight::Configurable
45
45
  # The default configuration object, by default it reads from Blacklight.config for backwards
46
46
  # compatibility with Blacklight <= 3.1
47
47
  def default_configuration
48
- Blacklight::Configurable.default_configuration
48
+ Blacklight::Configurable.default_configuration.inheritable_copy
49
49
  end
50
50
  end
51
51
 
@@ -261,6 +261,8 @@ module Blacklight::SolrHelper
261
261
  # Convert a facet/value pair into a solr fq parameter
262
262
  def facet_value_to_fq_string(facet_field, value)
263
263
  case
264
+ when (value.is_a?(TrueClass) or value.is_a?(FalseClass) or value == 'true' or value == 'false')
265
+ "#{facet_field}:#{value}"
264
266
  when (value.is_a?(Integer) or (value.to_i.to_s == value if value.respond_to? :to_i))
265
267
  "#{facet_field}:#{value}"
266
268
  when (value.is_a?(Float) or (value.to_f.to_s == value if value.respond_to? :to_f))
@@ -147,6 +147,9 @@ EOF
147
147
  end
148
148
 
149
149
  def add_sass_configuration
150
+ gem 'compass-rails', '~> 1.0.0', :group => :assets
151
+ gem 'compass-susy-plugin', '~> 0.9.0', :group => :assets
152
+ run "bundle install"
150
153
  insert_into_file "config/application.rb", :after => "config.assets.enabled = true" do <<EOF
151
154
 
152
155
  # Default SASS Configuration, check out https://github.com/rails/sass-rails for details
@@ -156,7 +159,7 @@ EOF
156
159
  EOF
157
160
  end
158
161
 
159
- copy_file "config/sass.rb", "config/initializers/sass.rb"
162
+ copy_file "config/compass.rb", "config/compass.rb"
160
163
  end
161
164
 
162
165
  private
@@ -36,6 +36,9 @@ class CatalogController < ApplicationController
36
36
  # on the solr side in the request handler itself. Request handler defaults
37
37
  # sniffing requires solr requests to be made with "echoParams=all", for
38
38
  # app code to actually have it echo'd back to see it.
39
+ #
40
+ # :show may be set to false if you don't want the facet to be drawn in the
41
+ # facet bar
39
42
  config.add_facet_field 'format', :label => 'Format'
40
43
  config.add_facet_field 'pub_date', :label => 'Publication Year'
41
44
  config.add_facet_field 'subject_topic_facet', :label => 'Topic', :limit => 20
@@ -48,6 +51,9 @@ class CatalogController < ApplicationController
48
51
  # previously. Simply remove these lines if you'd rather use Solr request
49
52
  # handler defaults, or have no facets.
50
53
  config.default_solr_params[:'facet.field'] = config.facet_fields.keys
54
+ #use this instead if you don't want to query facets marked :show=>false
55
+ #config.default_solr_params[:'facet.field'] = config.facet_fields.select{ |k, v| v[:show] != false}.keys
56
+
51
57
 
52
58
  # solr fields to be displayed in the index (search results) view
53
59
  # The ordering of the field names is the order of the display
@@ -0,0 +1,2 @@
1
+ require 'susy'
2
+ project_type = :rails
@@ -85,7 +85,8 @@ gem 'blacklight', :path => '../../'
85
85
  gem 'jquery-rails'
86
86
 
87
87
  group :assets do
88
- gem 'compass', '0.12.alpha.2'
88
+ gem 'compass-rails', '~> 1.0.0'
89
+ gem 'compass-susy-plugin', '~> 0.9.0'
89
90
  end
90
91
 
91
92
 
@@ -266,6 +266,13 @@ describe BlacklightHelper do
266
266
  @document = SolrDocument.new(data)
267
267
  link_to_document(@document, { :label => :title_display, :counter => 5 }).should =~ /data-counter="5"/
268
268
  end
269
+ it "passes on the title attribute to the link_to_with_data method" do
270
+ link_to_document(@mock_doc,:label=>"Some crazy long label...",:title=>"Some crazy longer label").should match(/title=\"Some crazy longer label\"/)
271
+ end
272
+
273
+ it "doesn't add an erroneous title attribute if one isn't provided" do
274
+ link_to_document(@mock_doc,:label=>"Some crazy long label...").should_not match(/title=/)
275
+ end
269
276
  end
270
277
 
271
278
 
@@ -318,7 +325,39 @@ describe BlacklightHelper do
318
325
  response = render_link_rel_alternates(@document)
319
326
  response.html_safe?.should == true
320
327
  end
321
-
322
328
  end
329
+
330
+ describe "with a config" do
331
+ before do
332
+ @config = Blacklight::Configuration.new.configure do |config|
333
+ config.show.html_title = "title_display"
334
+ config.show.heading = "title_display"
335
+ config.show.display_type = 'format'
336
+
337
+ config.index.show_link = 'title_display'
338
+ config.index.record_display_type = 'format'
339
+ end
340
+
341
+ @document = SolrDocument.new('title_display' => "A Fake Document", 'id'=>'8')
342
+ helper.stub(:blacklight_config).and_return(@config)
343
+ helper.stub(:has_user_authentication_provider?).and_return(true)
344
+ helper.stub(:current_user).and_return(User.new)
345
+ end
346
+ describe "render_index_doc_actions" do
347
+ it "should render partials" do
348
+ response = helper.render_index_doc_actions(@document)
349
+ response.should have_selector(".bookmark_toggle")
350
+ response.should have_selector(".folder_toggle")
351
+ end
352
+ end
353
+ describe "render_show_doc_actions" do
354
+ it "should render partials" do
355
+ response = helper.render_show_doc_actions(@document)
356
+ response.should have_selector(".bookmark_toggle")
357
+ response.should have_selector(".folder_toggle")
358
+ end
359
+ end
360
+ end
361
+
323
362
 
324
363
  end
@@ -2,14 +2,27 @@ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
2
2
  describe FacetsHelper do
3
3
 
4
4
  describe "should_render_facet?" do
5
+ before do
6
+ @config = Blacklight::Configuration.new do |config|
7
+ config.add_facet_field 'basic_field'
8
+ config.add_facet_field 'no_show', :show=>false
9
+ end
10
+
11
+ helper.stub(:blacklight_config => @config)
12
+ end
5
13
  it "should render facets with items" do
6
- a = mock(:items => [1,2])
14
+ a = mock(:items => [1,2], :name=>'basic_field')
7
15
  helper.should_render_facet?(a).should == true
8
16
  end
9
17
  it "should not render facets without items" do
10
- empty = mock(:items => [])
18
+ empty = mock(:items => [], :name=>'basic_field')
11
19
  helper.should_render_facet?(empty).should == false
12
20
  end
21
+
22
+ it "should not render facets where show is set to false" do
23
+ a = mock(:items => [1,2], :name=>'no_show')
24
+ helper.should_render_facet?(a).should == false
25
+ end
13
26
  end
14
27
 
15
28
  describe "facet_by_field_name" do
@@ -0,0 +1,30 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
2
+
3
+ describe RenderConstraintsHelper do
4
+
5
+ before do
6
+ ## Pretend that we're in a controller at /advanced_search
7
+ Journey::Route.any_instance.stub(:format).and_return('/advanced_search')
8
+ end
9
+ describe '#render_constraints_query' do
10
+ it "should have a link relative to the current url" do
11
+ helper.render_constraints_query(:q=>'foobar', :f=>{:type=>'journal'}).should have_selector "a[href='/advanced_search?f%5Btype%5D=journal']"
12
+ end
13
+ end
14
+
15
+ describe '#render_filter_element' do
16
+ before do
17
+ @config = Blacklight::Configuration.new do |config|
18
+ config.add_facet_field 'type'
19
+ end
20
+ helper.stub(:blacklight_config => @config)
21
+ end
22
+ it "should have a link relative to the current url" do
23
+ result = helper.render_filter_element('type', ['journal'], {:q=>'biz'})
24
+ result.size.should == 1
25
+ # I'm not certain how the ampersand gets in there. It's not important.
26
+ result.first.should have_selector "a[href='/advanced_search?&q=biz']"
27
+ end
28
+ end
29
+
30
+ end
@@ -86,6 +86,19 @@ describe "Blacklight::Configurable" do
86
86
  instance.blacklight_config.foo.should be_nil
87
87
  klass.blacklight_config.foo.should == "bar"
88
88
  end
89
+
90
+ it "configurable classes should not mutate the default configuration object" do
91
+ klass = Class.new
92
+ klass.send(:include, Blacklight::Configurable)
93
+ klass.blacklight_config.foo = "bar"
94
+
95
+ klass2 = Class.new
96
+ klass2.send(:include, Blacklight::Configurable)
97
+ klass2.blacklight_config.foo = "asdf"
98
+
99
+ klass.blacklight_config.foo.should == "bar"
100
+ klass2.blacklight_config.foo.should == "asdf"
101
+ end
89
102
 
90
103
  end
91
104
  end
@@ -125,6 +125,12 @@ describe "Blacklight::Configuration" do
125
125
 
126
126
  @config.facet_fields["publication_date"].label.should == "Publication Date"
127
127
  end
128
+
129
+ it "should allow you to not show the facet in the facet bar" do
130
+ @config.add_facet_field("publication_date", :show=>false)
131
+
132
+ @config.facet_fields["publication_date"]['show'].should be_false
133
+ end
128
134
 
129
135
  it "should raise on nil solr field name" do
130
136
  lambda { @config.add_facet_field(nil) }.should raise_error ArgumentError
@@ -159,6 +159,14 @@ describe 'Blacklight::SolrHelper' do
159
159
  facet_value_to_fq_string("facet_name", "my value").should == "{!raw f=facet_name}my value"
160
160
  end
161
161
 
162
+ it "should pass booleans through" do
163
+ facet_value_to_fq_string("facet_name", true).should == "facet_name:true"
164
+ end
165
+
166
+ it "should pass boolean-like strings through" do
167
+ facet_value_to_fq_string("facet_name", "true").should == "facet_name:true"
168
+ end
169
+
162
170
  it "should pass integers through" do
163
171
  facet_value_to_fq_string("facet_name", 1).should == "facet_name:1"
164
172
  end
@@ -23,6 +23,12 @@ describe "catalog/_constraints_element.html.erb" do
23
23
  s.should have_selector("a.btnRemove.imgReplace[href='http://remove']")
24
24
  end
25
25
  end
26
+
27
+ it "should have an accessible remove label" do
28
+ rendered.should have_selector("a.imgReplace") do |s|
29
+ s.should have_content("Remove constraint my label: my value")
30
+ end
31
+ end
26
32
  end
27
33
 
28
34
  describe "with checkmark suppressed" do
@@ -1,6 +1,6 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
2
2
 
3
- describe "catalog/_facets.html.erb" do
3
+ describe "catalog/_facets" do
4
4
  before do
5
5
  @mock_config = Blacklight::Configuration.new
6
6
  view.stub(:blacklight_config => @mock_config)
@@ -1,8 +1,7 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
3
3
 
4
- describe "catalog/index.atom.builder" do
5
-
4
+ describe "catalog/index" do
6
5
 
7
6
  before(:all) do
8
7
  @config ||= Blacklight::Configuration.from_legacy_configuration({
@@ -57,7 +56,14 @@ describe "catalog/index.atom.builder" do
57
56
  @response = @rsolr_response
58
57
 
59
58
  view.stub!(:blacklight_config).and_return(@config)
60
- render
59
+ view.stub!(:search_field_options_for_select).and_return([])
60
+
61
+ if Rails.version >= "3.2.0"
62
+ render :template => 'catalog/index', :formats => [:atom]
63
+ else
64
+ render :template => 'catalog/index.atom'
65
+ end
66
+
61
67
 
62
68
  # We need to use rexml to test certain things that have_tag wont' test
63
69
  # note that response is depricated rails 3, use "redered" instead.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blacklight
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.2
4
+ version: 3.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -16,11 +16,11 @@ authors:
16
16
  autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
- date: 2012-01-25 00:00:00.000000000 Z
19
+ date: 2012-03-19 00:00:00.000000000 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  name: rails
23
- requirement: &2152624320 !ruby/object:Gem::Requirement
23
+ requirement: &2153768840 !ruby/object:Gem::Requirement
24
24
  none: false
25
25
  requirements:
26
26
  - - ~>
@@ -28,10 +28,10 @@ dependencies:
28
28
  version: '3.1'
29
29
  type: :runtime
30
30
  prerelease: false
31
- version_requirements: *2152624320
31
+ version_requirements: *2153768840
32
32
  - !ruby/object:Gem::Dependency
33
33
  name: nokogiri
34
- requirement: &2152623840 !ruby/object:Gem::Requirement
34
+ requirement: &2153768360 !ruby/object:Gem::Requirement
35
35
  none: false
36
36
  requirements:
37
37
  - - ~>
@@ -39,10 +39,10 @@ dependencies:
39
39
  version: '1.5'
40
40
  type: :runtime
41
41
  prerelease: false
42
- version_requirements: *2152623840
42
+ version_requirements: *2153768360
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: unicode
45
- requirement: &2152623460 !ruby/object:Gem::Requirement
45
+ requirement: &2153767980 !ruby/object:Gem::Requirement
46
46
  none: false
47
47
  requirements:
48
48
  - - ! '>='
@@ -50,10 +50,10 @@ dependencies:
50
50
  version: '0'
51
51
  type: :runtime
52
52
  prerelease: false
53
- version_requirements: *2152623460
53
+ version_requirements: *2153767980
54
54
  - !ruby/object:Gem::Dependency
55
55
  name: marc
56
- requirement: &2152622540 !ruby/object:Gem::Requirement
56
+ requirement: &2153767440 !ruby/object:Gem::Requirement
57
57
  none: false
58
58
  requirements:
59
59
  - - ~>
@@ -61,10 +61,10 @@ dependencies:
61
61
  version: 0.4.3
62
62
  type: :runtime
63
63
  prerelease: false
64
- version_requirements: *2152622540
64
+ version_requirements: *2153767440
65
65
  - !ruby/object:Gem::Dependency
66
66
  name: rsolr
67
- requirement: &2152621760 !ruby/object:Gem::Requirement
67
+ requirement: &2153766920 !ruby/object:Gem::Requirement
68
68
  none: false
69
69
  requirements:
70
70
  - - ~>
@@ -72,10 +72,10 @@ dependencies:
72
72
  version: 1.0.6
73
73
  type: :runtime
74
74
  prerelease: false
75
- version_requirements: *2152621760
75
+ version_requirements: *2153766920
76
76
  - !ruby/object:Gem::Dependency
77
77
  name: rsolr-ext
78
- requirement: &2152621120 !ruby/object:Gem::Requirement
78
+ requirement: &2153766020 !ruby/object:Gem::Requirement
79
79
  none: false
80
80
  requirements:
81
81
  - - ~>
@@ -83,10 +83,10 @@ dependencies:
83
83
  version: 1.0.3
84
84
  type: :runtime
85
85
  prerelease: false
86
- version_requirements: *2152621120
86
+ version_requirements: *2153766020
87
87
  - !ruby/object:Gem::Dependency
88
88
  name: kaminari
89
- requirement: &2152620680 !ruby/object:Gem::Requirement
89
+ requirement: &2153765640 !ruby/object:Gem::Requirement
90
90
  none: false
91
91
  requirements:
92
92
  - - ! '>='
@@ -94,21 +94,21 @@ dependencies:
94
94
  version: '0'
95
95
  type: :runtime
96
96
  prerelease: false
97
- version_requirements: *2152620680
97
+ version_requirements: *2153765640
98
98
  - !ruby/object:Gem::Dependency
99
99
  name: sass-rails
100
- requirement: &2152620100 !ruby/object:Gem::Requirement
100
+ requirement: &2153765040 !ruby/object:Gem::Requirement
101
101
  none: false
102
102
  requirements:
103
103
  - - ~>
104
104
  - !ruby/object:Gem::Version
105
- version: '3.1'
105
+ version: 3.2.0
106
106
  type: :runtime
107
107
  prerelease: false
108
- version_requirements: *2152620100
108
+ version_requirements: *2153765040
109
109
  - !ruby/object:Gem::Dependency
110
110
  name: jettywrapper
111
- requirement: &2152562760 !ruby/object:Gem::Requirement
111
+ requirement: &2153764540 !ruby/object:Gem::Requirement
112
112
  none: false
113
113
  requirements:
114
114
  - - ! '>='
@@ -116,18 +116,29 @@ dependencies:
116
116
  version: 1.2.0
117
117
  type: :development
118
118
  prerelease: false
119
- version_requirements: *2152562760
119
+ version_requirements: *2153764540
120
+ - !ruby/object:Gem::Dependency
121
+ name: compass-rails
122
+ requirement: &2153764080 !ruby/object:Gem::Requirement
123
+ none: false
124
+ requirements:
125
+ - - ~>
126
+ - !ruby/object:Gem::Version
127
+ version: 1.0.0
128
+ type: :runtime
129
+ prerelease: false
130
+ version_requirements: *2153764080
120
131
  - !ruby/object:Gem::Dependency
121
- name: compass
122
- requirement: &2152562280 !ruby/object:Gem::Requirement
132
+ name: compass-susy-plugin
133
+ requirement: &2153763600 !ruby/object:Gem::Requirement
123
134
  none: false
124
135
  requirements:
125
136
  - - ! '>='
126
137
  - !ruby/object:Gem::Version
127
- version: 0.12.alpha.2
138
+ version: 0.9.0
128
139
  type: :runtime
129
140
  prerelease: false
130
- version_requirements: *2152562280
141
+ version_requirements: *2153763600
131
142
  description: Blacklight is a free and open source ruby-on-rails based discovery interface
132
143
  (a.k.a. “next-generation catalog”) especially optimized for heterogeneous collections.
133
144
  You can use it as a library catalog, as a front end for a digital repository, or
@@ -173,7 +184,6 @@ files:
173
184
  - app/assets/stylesheets/blacklight/blacklight.css.scss
174
185
  - app/assets/stylesheets/blacklight/blacklight_defaults.css.scss
175
186
  - app/assets/stylesheets/blacklight/grids/_susy.css.scss
176
- - app/assets/stylesheets/blacklight/grids/_susy_framework.css.scss
177
187
  - app/assets/stylesheets/jquery/ui-lightness/images/ui-anim_basic_16x16.gif
178
188
  - app/assets/stylesheets/jquery/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png
179
189
  - app/assets/stylesheets/jquery/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png
@@ -330,7 +340,7 @@ files:
330
340
  - lib/generators/blacklight/templates/config/SolrMarc/translation_maps/instrument_map.properties
331
341
  - lib/generators/blacklight/templates/config/SolrMarc/translation_maps/language_map.properties
332
342
  - lib/generators/blacklight/templates/config/blacklight_config.rb
333
- - lib/generators/blacklight/templates/config/sass.rb
343
+ - lib/generators/blacklight/templates/config/compass.rb
334
344
  - lib/generators/blacklight/templates/config/solr.yml
335
345
  - lib/generators/blacklight/templates/migrations/add_user_types_to_bookmarks_searches.rb
336
346
  - lib/generators/blacklight/templates/migrations/create_bookmarks.rb
@@ -386,6 +396,7 @@ files:
386
396
  - test_support/spec/helpers/facets_helper_spec.rb
387
397
  - test_support/spec/helpers/hash_as_hidden_fields_spec.rb
388
398
  - test_support/spec/helpers/html_head_helper_spec.rb
399
+ - test_support/spec/helpers/render_constraints_helper_spec.rb
389
400
  - test_support/spec/helpers/search_history_constraints_helper_spec.rb
390
401
  - test_support/spec/lib/blacklight_configurable_spec.rb
391
402
  - test_support/spec/lib/blacklight_configuration_spec.rb
@@ -435,7 +446,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
435
446
  version: '0'
436
447
  segments:
437
448
  - 0
438
- hash: 2527126427684428122
449
+ hash: 4535691040177281828
439
450
  required_rubygems_version: !ruby/object:Gem::Requirement
440
451
  none: false
441
452
  requirements:
@@ -444,10 +455,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
444
455
  version: '0'
445
456
  segments:
446
457
  - 0
447
- hash: 2527126427684428122
458
+ hash: 4535691040177281828
448
459
  requirements: []
449
460
  rubyforge_project: blacklight
450
- rubygems_version: 1.8.10
461
+ rubygems_version: 1.8.15
451
462
  signing_key:
452
463
  specification_version: 3
453
464
  summary: A next-generation Library Catalag for Universities
@@ -1,228 +0,0 @@
1
- // Imports -------------------------------------------------------------------
2
-
3
- @import "compass/utilities/general/clearfix";
4
- @import "compass/utilities/general/float";
5
- @import "compass/layout/grid-background";
6
-
7
- // Variables -----------------------------------------------------------------
8
-
9
- // Your basic settings for the grid.
10
- $total-cols : 12 !default;
11
- $col-width : 4em !default;
12
- $gutter-width : 1em !default;
13
- $side-gutter-width : $gutter-width !default;
14
-
15
- // Controls for right-to-left or bi-directional sites.
16
- $from-direction : left !default;
17
-
18
- // The direction that +omega elements are floated by deafult.
19
- $omega-float : opposite-position($from-direction) !default;
20
-
21
- // Functions -----------------------------------------------------------------
22
-
23
- // Return the width of 'n' columns plus 'n - 1' gutters
24
- // plus page padding in non-nested contexts
25
- @function columns-width(
26
- $n: false
27
- ) {
28
- $sg: 0;
29
- @if not $n {
30
- $n: $total-cols;
31
- $sg: $side-gutter-width;
32
- }
33
- $columns-width: ($n*$col-width) + (ceil($n - 1)*$gutter-width) + ($sg*2);
34
- @return $columns-width;
35
- }
36
-
37
- // Return the percentage for the target in a given context
38
- @function percent-width(
39
- $t,
40
- $c
41
- ) {
42
- $perc: ($t / $c) * 100%;
43
- @return $perc;
44
- }
45
-
46
- // Return the percentage width of 'n' columns in a context of 'c'
47
- @function columns(
48
- $n,
49
- $c: false
50
- ) {
51
- $columns: percent-width(columns-width($n), columns-width($c));
52
- @return $columns;
53
- }
54
-
55
- // Return the percentage width of a single gutter in a context of 'c'
56
- @function gutter(
57
- $c: false
58
- ) {
59
- $gutter: percent-width($gutter-width, columns-width($c));
60
- @return $gutter;
61
- }
62
-
63
- // Return the percentage width of a single side gutter in a context of 'c'
64
- @function side-gutter(
65
- $c: false
66
- ) {
67
- $side-gutter: percent-width($side-gutter-width, columns-width($c));
68
- @return $side-gutter;
69
- }
70
-
71
- // Return the percentage width of a single column in a context of 'c'
72
- @function column(
73
- $c: false
74
- ) {
75
- $column: percent-width($col-width, columns-width($c));
76
- @return $column;
77
- }
78
-
79
- // Base Mixin ----------------------------------------------------------------
80
-
81
- // Set the outer grid-containing element(s).
82
- @mixin container() {
83
- @include pie-clearfix;
84
- margin: auto;
85
- width: columns-width();
86
- max-width: 100%;
87
- }
88
-
89
- // Column Mixins -------------------------------------------------------------
90
-
91
- // Set +columns() on any column element, even nested ones.
92
- // The first agument [required] is the number of columns to span.
93
- // The second argument is the context (columns spanned by parent).
94
- // - Context is required on any nested elements.
95
- // - Context MUST NOT be declared on a top-level element.
96
- // By default a grid-column is floated left with a right gutter.
97
- // - Override those with +float("right"), +alpha or +omega
98
- @mixin columns(
99
- $n,
100
- $context : false,
101
- $from : $from-direction
102
- ) {
103
- $to : opposite-position($from);
104
- // the column is floated left
105
- @include float($from);
106
- // the width of the column is set as a percentage of the context
107
- width: columns($n, $context);
108
- // the right gutter is added as a percentage of the context
109
- margin-#{$to}: gutter($context);
110
- }
111
-
112
- // @include `reset-column` to reset a column element to default block behavior
113
- @mixin reset-column(
114
- $from : $from-direction
115
- ) {
116
- $to : opposite-position($from);
117
- @include reset-float;
118
- width: auto;
119
- margin-#{$to}: auto;
120
- }
121
-
122
- @mixin un-column(
123
- $from : $from-direction
124
- ) {
125
- @include reset-column($from);
126
- }
127
-
128
- // @include `full` on an element that will span it's entire context.
129
- // There is no need for +columns, +alpha or +omega on a +full element.
130
- @mixin full(
131
- $nested: false
132
- ) {
133
- clear: both;
134
- @if not $nested {
135
- margin: {
136
- left: side-gutter();
137
- right: side-gutter();
138
- }
139
- }
140
- }
141
-
142
- // Padding Mixins ------------------------------------------------------------
143
-
144
- // add empty colums as padding before an element.
145
- @mixin prefix(
146
- $n,
147
- $context : false,
148
- $from : $from-direction
149
- ) {
150
- padding-#{$from}: columns($n, $context) + gutter($context);
151
- }
152
-
153
- // add empty colums as padding after an element.
154
- @mixin suffix(
155
- $n,
156
- $context : false,
157
- $from : $from-direction
158
- ) {
159
- $to : opposite-position($from);
160
- padding-#{$to}: columns($n, $context) + gutter($context);
161
- }
162
-
163
- // add empty colums as padding before and after an element.
164
- @mixin pad(
165
- $p : false,
166
- $s : false,
167
- $c : false,
168
- $from : $from-direction
169
- ) {
170
- @if $p {
171
- @include prefix($p, $c, $from);
172
- }
173
- @if $s {
174
- @include suffix($s, $c, $from);
175
- }
176
- }
177
-
178
- // Alpha & Omega Mixins ------------------------------------------------------
179
- // I recommend that you pass the actual nested contexts (when nested) rather
180
- // than a true/false argument for the sake of consistency. Effect is the same,
181
- // but your code will be much more readable.
182
-
183
- // @include on any element spanning the first column in non-nested context to
184
- // take side-gutters into account.
185
- @mixin alpha(
186
- $nested : false,
187
- $from : $from-direction
188
- ) {
189
- @if not $nested {
190
- margin-#{$from}: side-gutter();
191
- } @else {
192
- @warn "The alpha mixin is not needed in a nested context";
193
- }
194
- }
195
-
196
- // @include on the last element of a row, in order to take side-gutters and
197
- // the page edge into account. Set the $nested argument for nested columns.
198
- @mixin omega(
199
- $nested : false,
200
- $from : $from-direction
201
- ) {
202
- $to : opposite-position($from);
203
- $hack : opposite-position($omega-float);
204
- $sg : 0;
205
- @if not $nested {
206
- $sg: side-gutter();
207
- }
208
- @include float($omega-float);
209
- margin-#{$to}: $sg;
210
- @if $legacy-support-for-ie6 or $legacy-support-for-ie7 {
211
- #margin-#{$hack}: - $gutter-width;
212
- }
213
- }
214
-
215
- // Susy Grid Backgrounds -----------------------------------------------------
216
-
217
- @mixin susy-grid-background {
218
- @include column-grid-background($total-cols, $col-width, $gutter-width, $side-gutter-width, $force-fluid: true);
219
- }
220
-
221
- @mixin show-grid($img:false) {
222
- @warn "show-grid is deprecated in favor of susy-grid-background.";
223
- @if $img {
224
- @warn "show-grid and susy-grid-background no longer use any images or take any arguments.";
225
- }
226
- @include susy-grid-background;
227
- }
228
-
@@ -1,4 +0,0 @@
1
- Rails.configuration.sass.tap do |config|
2
- require 'compass'
3
- config.load_paths << "#{Gem.loaded_specs['compass'].full_gem_path}/frameworks/compass/stylesheets"
4
- end