blacklight 6.0.2 → 6.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +6 -6
  3. data/.rubocop_todo.yml +448 -87
  4. data/.travis.yml +1 -1
  5. data/VERSION +1 -1
  6. data/app/controllers/concerns/blacklight/bookmarks.rb +8 -8
  7. data/app/controllers/concerns/blacklight/catalog.rb +5 -5
  8. data/app/controllers/concerns/blacklight/controller.rb +5 -5
  9. data/app/controllers/concerns/blacklight/saved_searches.rb +4 -2
  10. data/app/controllers/concerns/blacklight/search_context.rb +3 -0
  11. data/app/controllers/concerns/blacklight/token_based_user.rb +1 -1
  12. data/app/helpers/blacklight/blacklight_helper_behavior.rb +3 -3
  13. data/app/helpers/blacklight/catalog_helper_behavior.rb +20 -9
  14. data/app/helpers/blacklight/configuration_helper_behavior.rb +1 -1
  15. data/app/helpers/blacklight/deprecated_url_helper_behavior.rb +1 -1
  16. data/app/helpers/blacklight/facets_helper_behavior.rb +2 -2
  17. data/app/helpers/blacklight/hash_as_hidden_fields_helper_behavior.rb +1 -1
  18. data/app/helpers/blacklight/render_constraints_helper_behavior.rb +18 -8
  19. data/app/helpers/blacklight/render_partials_helper.rb +15 -3
  20. data/app/models/concerns/blacklight/configurable.rb +4 -8
  21. data/app/models/concerns/blacklight/document.rb +3 -3
  22. data/app/models/concerns/blacklight/document/dublin_core.rb +1 -1
  23. data/app/models/concerns/blacklight/document/extensions.rb +1 -1
  24. data/app/models/concerns/blacklight/user.rb +1 -1
  25. data/app/models/record_mailer.rb +6 -1
  26. data/app/models/search.rb +2 -2
  27. data/blacklight.gemspec +5 -2
  28. data/config/locales/blacklight.de.yml +1 -0
  29. data/config/locales/blacklight.en.yml +1 -0
  30. data/config/locales/blacklight.es.yml +1 -0
  31. data/config/locales/blacklight.fr.yml +1 -0
  32. data/config/locales/blacklight.it.yml +1 -0
  33. data/config/locales/blacklight.pt-BR.yml +1 -0
  34. data/lib/blacklight.rb +2 -2
  35. data/lib/blacklight/abstract_repository.rb +2 -2
  36. data/lib/blacklight/configuration/field.rb +1 -1
  37. data/lib/blacklight/configuration/search_field.rb +1 -1
  38. data/lib/blacklight/configuration/sort_field.rb +1 -1
  39. data/lib/blacklight/search_builder.rb +8 -4
  40. data/lib/blacklight/search_state.rb +3 -3
  41. data/lib/blacklight/solr/repository.rb +3 -3
  42. data/lib/blacklight/solr/request.rb +2 -2
  43. data/lib/blacklight/solr/response.rb +1 -1
  44. data/lib/blacklight/solr/response/spelling.rb +1 -1
  45. data/lib/blacklight/solr/search_builder_behavior.rb +7 -7
  46. data/lib/blacklight/utils.rb +5 -5
  47. data/lib/generators/blacklight/assets_generator.rb +1 -1
  48. data/lib/generators/blacklight/controller_generator.rb +13 -15
  49. data/lib/generators/blacklight/document_generator.rb +5 -4
  50. data/lib/generators/blacklight/install_generator.rb +24 -27
  51. data/lib/generators/blacklight/models_generator.rb +18 -16
  52. data/lib/generators/blacklight/search_builder_generator.rb +4 -4
  53. data/lib/generators/blacklight/solr4_generator.rb +14 -9
  54. data/lib/generators/blacklight/solr5_generator.rb +1 -1
  55. data/lib/generators/blacklight/templates/{blacklight.css.scss → blacklight.scss} +0 -0
  56. data/lib/generators/blacklight/templates/solr_document.rb +6 -8
  57. data/lib/generators/blacklight/test_support_generator.rb +5 -3
  58. data/lib/generators/blacklight/user_generator.rb +18 -12
  59. data/lib/railties/blacklight.rake +2 -2
  60. data/tasks/blacklight.rake +1 -3
  61. metadata +17 -10
  62. data/.rubocop_hound.yml +0 -1063
@@ -3,7 +3,12 @@
3
3
  class RecordMailer < ActionMailer::Base
4
4
  def email_record(documents, details, url_gen_params)
5
5
 
6
- subject = I18n.t('blacklight.email.text.subject', :count => documents.length, :title => (documents.first.to_semantic_values[:title] rescue 'N/A') )
6
+ title = begin
7
+ documents.first.to_semantic_values[:title]
8
+ rescue
9
+ I18n.t('blacklight.email.text.default_title')
10
+ end
11
+ subject = I18n.t('blacklight.email.text.subject', :count => documents.length, :title => title )
7
12
 
8
13
  @documents = documents
9
14
  @message = details[:message]
data/app/models/search.rb CHANGED
@@ -18,8 +18,8 @@ class Search < ActiveRecord::Base
18
18
 
19
19
  # delete old, unsaved searches
20
20
  def self.delete_old_searches(days_old)
21
- raise ArgumentError.new('days_old is expected to be a number') unless days_old.is_a?(Numeric)
22
- raise ArgumentError.new('days_old is expected to be greater than 0') if days_old <= 0
21
+ raise ArgumentError, 'days_old is expected to be a number' unless days_old.is_a?(Numeric)
22
+ raise ArgumentError, 'days_old is expected to be greater than 0' if days_old <= 0
23
23
  self.destroy_all(['created_at < ? AND user_id IS NULL', Time.zone.today - days_old])
24
24
  end
25
25
 
data/blacklight.gemspec CHANGED
@@ -11,7 +11,10 @@ Gem::Specification.new do |s|
11
11
  s.email = ["blacklight-development@googlegroups.com"]
12
12
  s.homepage = "http://projectblacklight.org/"
13
13
  s.summary = "Blacklight provides a discovery interface for any Solr (http://lucene.apache.org/solr) index."
14
- s.description = %{Blacklight is an open source Solr user interface discovery platform. You can use Blacklight to enable searching and browsing of your collections. Blacklight uses the Apache Solr search engine to search full text and/or metadata.}
14
+ s.description = %(Blacklight is an open source Solr user interface discovery platform.
15
+ You can use Blacklight to enable searching and browsing of your
16
+ collections. Blacklight uses the Apache Solr search engine to search
17
+ full text and/or metadata.)
15
18
  s.license = "Apache 2.0"
16
19
 
17
20
  s.files = `git ls-files -z`.split("\x0")
@@ -26,7 +29,7 @@ Gem::Specification.new do |s|
26
29
  s.add_dependency "globalid"
27
30
  s.add_dependency "nokogiri", "~>1.6" # XML Parser
28
31
  s.add_dependency "kaminari", ">= 0.15" # the pagination (page 1,2,3, etc..) of our search results
29
- s.add_dependency "rsolr", "~> 1.0.11" # Library for interacting with rSolr.
32
+ s.add_dependency "rsolr", "~> 1.0", ">= 1.0.6" # Library for interacting with rSolr.
30
33
  s.add_dependency "bootstrap-sass", "~> 3.2"
31
34
  s.add_dependency "deprecation"
32
35
  s.add_dependency "twitter-typeahead-rails", '~> 0.11'
@@ -100,6 +100,7 @@ de:
100
100
  message: 'Meldung:'
101
101
  submit: 'Abgeben'
102
102
  text:
103
+ default_title: 'N/A'
103
104
  title: 'Titel: %{value}'
104
105
  author: 'Autor: %{value}'
105
106
  format: 'Format: %{value}'
@@ -100,6 +100,7 @@ en:
100
100
  message: 'Message:'
101
101
  submit: 'Send'
102
102
  text:
103
+ default_title: 'N/A'
103
104
  title: 'Title: %{value}'
104
105
  author: 'Author: %{value}'
105
106
  format: 'Format: %{value}'
@@ -100,6 +100,7 @@ es:
100
100
  message: 'Mensaje:'
101
101
  submit: 'Enviar'
102
102
  text:
103
+ default_title: 'N/A'
103
104
  title: 'Titulo: %{value}'
104
105
  author: 'Autor: %{value}'
105
106
  format: 'Formato: %{value}'
@@ -102,6 +102,7 @@ fr:
102
102
  message: 'Message :'
103
103
  submit: 'Envoyer'
104
104
  text:
105
+ default_title: 'N/A'
105
106
  title: 'Titre : %{value}'
106
107
  author: 'Auteur : %{value}'
107
108
  format: 'Format : %{value}'
@@ -100,6 +100,7 @@ it:
100
100
  message: 'Messaggio:'
101
101
  submit: 'Invia'
102
102
  text:
103
+ default_title: 'N/A'
103
104
  title: 'Titolo: %{value}'
104
105
  author: 'Autore: %{value}'
105
106
  format: 'Formato: %{value}'
@@ -99,6 +99,7 @@ pt-BR:
99
99
  message: 'Mensagem:'
100
100
  submit: 'Enviar'
101
101
  text:
102
+ default_title: 'N/A'
102
103
  title: 'Título: %{value}'
103
104
  author: 'Autor: %{value}'
104
105
  format: 'Formato: %{value}'
data/lib/blacklight.rb CHANGED
@@ -63,7 +63,7 @@ module Blacklight
63
63
  require 'yaml'
64
64
 
65
65
  return @blacklight_yml if @blacklight_yml
66
- unless File.exists?(blacklight_config_file)
66
+ unless File.exist?(blacklight_config_file)
67
67
  raise "You are missing a configuration file: #{blacklight_config_file}. Have you run \"rails generate blacklight:install\"?"
68
68
  end
69
69
 
@@ -74,7 +74,7 @@ module Blacklight
74
74
  end
75
75
 
76
76
  begin
77
- @blacklight_yml = YAML::load(blacklight_erb)
77
+ @blacklight_yml = YAML.load(blacklight_erb)
78
78
  rescue => e
79
79
  raise("#{blacklight_config_file} was found, but could not be parsed.\n#{e.inspect}")
80
80
  end
@@ -22,14 +22,14 @@ module Blacklight
22
22
  # @param [String] document's unique key value
23
23
  # @param [Hash] additional query parameters
24
24
  def find(id, params = {})
25
- fail NotImplementedError
25
+ raise NotImplementedError
26
26
  end
27
27
 
28
28
  ##
29
29
  # Execute a search query against a search index
30
30
  # @param [Hash] query parameters
31
31
  def search(params = {})
32
- fail NotImplementedError
32
+ raise NotImplementedError
33
33
  end
34
34
 
35
35
  protected
@@ -14,7 +14,7 @@ module Blacklight
14
14
  end
15
15
 
16
16
  def validate!
17
- raise ArgumentError.new("Must supply a field name") if self.field.nil?
17
+ raise ArgumentError, "Must supply a field name" if self.field.nil?
18
18
  end
19
19
 
20
20
  def default_label
@@ -11,7 +11,7 @@ module Blacklight
11
11
  end
12
12
 
13
13
  def validate!
14
- raise ArgumentError.new("Must supply a search field key") if self.key.nil?
14
+ raise ArgumentError, "Must supply a search field key" if self.key.nil?
15
15
  end
16
16
  end
17
17
  end
@@ -12,7 +12,7 @@ module Blacklight
12
12
  end
13
13
 
14
14
  def validate!
15
- raise ArgumentError.new("Must supply a sort string") if self.sort.nil?
15
+ raise ArgumentError.new, "Must supply a sort string" if self.sort.nil?
16
16
  end
17
17
  end
18
18
  end
@@ -210,14 +210,18 @@ module Blacklight
210
210
  end
211
211
  end
212
212
 
213
- alias_method :per, :rows
213
+ alias per rows
214
214
 
215
215
  def sort
216
- field = if blacklight_params[:sort].blank? and sort_field = blacklight_config.default_sort_field
216
+ sort_field = if blacklight_params[:sort].blank?
217
217
  # no sort param provided, use default
218
- sort_field.sort
219
- elsif sort_field = blacklight_config.sort_fields[blacklight_params[:sort]]
218
+ blacklight_config.default_sort_field
219
+ else
220
220
  # check for sort field key
221
+ blacklight_config.sort_fields[blacklight_params[:sort]]
222
+ end
223
+
224
+ field = if sort_field.present?
221
225
  sort_field.sort
222
226
  else
223
227
  # just pass the key through
@@ -74,7 +74,7 @@ module Blacklight
74
74
  # Delete any request params from facet-specific action, needed
75
75
  # to redir to index action properly.
76
76
  request_keys = blacklight_config.facet_paginator_class.request_keys
77
- new_params.extract! *request_keys.values
77
+ new_params.extract!(*request_keys.values)
78
78
 
79
79
  new_params
80
80
  end
@@ -101,7 +101,7 @@ module Blacklight
101
101
  p[:f] = (p[:f] || {}).dup
102
102
  p[:f][url_field] = (p[:f][url_field] || []).dup
103
103
  p[:f][url_field] = p[:f][url_field] - [value]
104
- p[:f].delete(url_field) if p[:f][url_field].size == 0
104
+ p[:f].delete(url_field) if p[:f][url_field].empty?
105
105
  p.delete(:f) if p[:f].empty?
106
106
  p
107
107
  end
@@ -158,7 +158,7 @@ module Blacklight
158
158
  p[:f] = (p[:f] || {}).dup # the command above is not deep in rails3, !@#$!@#$
159
159
  p[:f][url_field] = (p[:f][url_field] || []).dup
160
160
 
161
- if facet_config.single and not p[:f][url_field].empty?
161
+ if facet_config.single and p[:f][url_field].present?
162
162
  p[:f][url_field] = []
163
163
  end
164
164
 
@@ -12,7 +12,7 @@ module Blacklight::Solr
12
12
  .merge(blacklight_config.document_unique_id_param => id)
13
13
 
14
14
  solr_response = send_and_receive blacklight_config.document_solr_path || blacklight_config.solr_path, doc_params
15
- raise Blacklight::Exceptions::RecordNotFound.new if solr_response.documents.empty?
15
+ raise Blacklight::Exceptions::RecordNotFound if solr_response.documents.empty?
16
16
  solr_response
17
17
  end
18
18
 
@@ -45,9 +45,9 @@ module Blacklight::Solr
45
45
  solr_response
46
46
  end
47
47
  rescue Errno::ECONNREFUSED => e
48
- raise Blacklight::Exceptions::ECONNREFUSED.new("Unable to connect to Solr instance using #{connection.inspect}: #{e.inspect}")
48
+ raise Blacklight::Exceptions::ECONNREFUSED, "Unable to connect to Solr instance using #{connection.inspect}: #{e.inspect}"
49
49
  rescue RSolr::Error::Http => e
50
- raise Blacklight::Exceptions::InvalidRequest.new(e.message)
50
+ raise Blacklight::Exceptions::InvalidRequest, e.message
51
51
  end
52
52
 
53
53
  protected
@@ -3,8 +3,8 @@ class Blacklight::Solr::InvalidParameter < ArgumentError; end
3
3
 
4
4
  class Blacklight::Solr::Request < ActiveSupport::HashWithIndifferentAccess
5
5
 
6
- SINGULAR_KEYS = %w{facet fl q qt rows start spellcheck spellcheck.q sort per_page wt hl group defType}
7
- ARRAY_KEYS = %w{facet.field facet.query facet.pivot fq hl.fl}
6
+ SINGULAR_KEYS = %w(facet fl q qt rows start spellcheck spellcheck.q sort per_page wt hl group defType)
7
+ ARRAY_KEYS = %w(facet.field facet.query facet.pivot fq hl.fl)
8
8
 
9
9
  def initialize(constructor = {})
10
10
  if constructor.is_a?(Hash)
@@ -76,7 +76,7 @@ class Blacklight::Solr::Response < ActiveSupport::HashWithIndifferentAccess
76
76
  end
77
77
 
78
78
  def grouped?
79
- self.has_key? "grouped"
79
+ self.key? "grouped"
80
80
  end
81
81
 
82
82
  def export_formats
@@ -11,7 +11,7 @@ module Blacklight::Solr::Response::Spelling
11
11
 
12
12
  class Base
13
13
 
14
- attr :response
14
+ attr_reader :response
15
15
 
16
16
  def initialize(response)
17
17
  @response = response
@@ -52,8 +52,8 @@ module Blacklight::Solr
52
52
  # solr LocalParams in config, using solr LocalParams syntax.
53
53
  # http://wiki.apache.org/solr/LocalParams
54
54
  ##
55
- if (search_field && hash = search_field.solr_local_parameters)
56
- local_params = hash.collect do |key, val|
55
+ if search_field && search_field.solr_local_parameters.present?
56
+ local_params = search_field.solr_local_parameters.map do |key, val|
57
57
  key.to_s + "=" + solr_param_quote(val, :quote => "'")
58
58
  end.join(" ")
59
59
  solr_parameters[:q] = "{!#{local_params}}#{blacklight_params[:q]}"
@@ -91,7 +91,7 @@ module Blacklight::Solr
91
91
  end
92
92
 
93
93
  # :fq, map from :f.
94
- if ( blacklight_params[:f])
94
+ if blacklight_params[:f]
95
95
  f_request_params = blacklight_params[:f]
96
96
 
97
97
  f_request_params.each_pair do |facet_field, value_list|
@@ -202,7 +202,7 @@ module Blacklight::Solr
202
202
  end
203
203
 
204
204
  page = blacklight_params.fetch(request_keys[:page], 1).to_i
205
- offset = (page - 1) * (limit)
205
+ offset = (page - 1) * limit
206
206
 
207
207
  sort = blacklight_params[request_keys[:sort]]
208
208
  prefix = blacklight_params[request_keys[:prefix]]
@@ -281,7 +281,7 @@ module Blacklight::Solr
281
281
  def facet_value_to_fq_string(facet_field, value)
282
282
  facet_config = blacklight_config.facet_fields[facet_field]
283
283
 
284
- solr_field = facet_config.field if facet_config and not facet_config.query
284
+ solr_field = facet_config.field if facet_config and !facet_config.query
285
285
  solr_field ||= facet_field
286
286
 
287
287
  local_params = []
@@ -307,9 +307,9 @@ module Blacklight::Solr
307
307
  def convert_to_term_value(value)
308
308
  case
309
309
  when (value.is_a?(DateTime) or value.is_a?(Time))
310
- "#{value.utc.strftime("%Y-%m-%dT%H:%M:%SZ")}"
310
+ value.utc.strftime("%Y-%m-%dT%H:%M:%SZ")
311
311
  when value.is_a?(Date)
312
- "#{value.to_time(:local).strftime("%Y-%m-%dT%H:%M:%SZ")}"
312
+ value.to_time(:local).strftime("%Y-%m-%dT%H:%M:%SZ")
313
313
  else
314
314
  value.to_s
315
315
  end
@@ -85,11 +85,11 @@ module Blacklight
85
85
  end
86
86
 
87
87
  lazy_configs.each do |k,v|
88
- if v.is_a? nested_class
89
- hash[k] = v
90
- else
91
- hash[k] = nested_class.new v
92
- end
88
+ hash[k] = if v.is_a? nested_class
89
+ v
90
+ else
91
+ nested_class.new v
92
+ end
93
93
  end
94
94
 
95
95
  super hash
@@ -4,7 +4,7 @@ module Blacklight
4
4
  source_root File.expand_path('../templates', __FILE__)
5
5
 
6
6
  def assets
7
- copy_file "blacklight.css.scss", "app/assets/stylesheets/blacklight.css.scss"
7
+ copy_file "blacklight.scss", "app/assets/stylesheets/blacklight.scss"
8
8
 
9
9
  return if has_blacklight_assets?
10
10
 
@@ -6,20 +6,18 @@ module Blacklight
6
6
 
7
7
  argument :controller_name , type: :string , default: "catalog"
8
8
 
9
- desc """
10
- This generator makes the following changes to your application:
11
- 1. Injects behavior into your user application_controller.rb
12
- 2. Creates a Blacklight::Catalog-based controller
13
- 3. Adds routes for your controller
14
-
15
- Thank you for Installing Blacklight.
16
- """
9
+ desc <<-EOS
10
+ This generator makes the following changes to your application:
11
+ 1. Injects behavior into your user application_controller.rb
12
+ 2. Creates a Blacklight::Catalog-based controller
13
+ 3. Adds routes for your controller
14
+ EOS
17
15
 
18
16
  # Add Blacklight to the application controller
19
17
  def inject_blacklight_controller_behavior
20
18
  inject_into_class "app/controllers/application_controller.rb", "ApplicationController" do
21
- " # Adds a few additional behaviors into the application controller \n" +
22
- " include Blacklight::Controller\n" +
19
+ " # Adds a few additional behaviors into the application controller\n" \
20
+ " include Blacklight::Controller\n" \
23
21
  " layout 'blacklight'\n\n"
24
22
  end
25
23
  end
@@ -30,12 +28,12 @@ module Blacklight
30
28
  end
31
29
 
32
30
  def inject_blacklight_routes
33
- route <<-EOF.strip_heredoc
34
- concern :searchable, Blacklight::Routes::Searchable.new
31
+ route <<-EOF
32
+ concern :searchable, Blacklight::Routes::Searchable.new
35
33
 
36
- resource :catalog, only: [:index], as: 'catalog', path: '/catalog', controller: 'catalog' do
37
- concerns :searchable
38
- end
34
+ resource :catalog, only: [:index], as: 'catalog', path: '/catalog', controller: 'catalog' do
35
+ concerns :searchable
36
+ end
39
37
  EOF
40
38
  end
41
39
  end
@@ -9,10 +9,11 @@ module Blacklight
9
9
 
10
10
  argument :model_name, :type => :string , :default => "solr_document"
11
11
 
12
- desc """
13
- This generator makes the following changes to your application:
14
- 1. Creates a blacklight document in your /app/models directory
15
- """
12
+ desc <<-EOS
13
+ This generator makes the following changes to your application:
14
+ 1. Creates a blacklight document in your /app/models directory
15
+ EOS
16
+
16
17
  def create_solr_document
17
18
  template "solr_document.rb", "app/models/#{model_name}.rb"
18
19
  end
@@ -13,32 +13,31 @@ module Blacklight
13
13
  class_option :devise , type: :boolean, default: false, aliases: "-d", desc: "Use Devise as authentication logic."
14
14
  class_option :jettywrapper, type: :boolean, default: false, desc: "Use jettywrapper to download and control Jetty"
15
15
  class_option :marc , type: :boolean, default: false, aliases: "-m", desc: "Generate MARC-based demo ."
16
+ class_option :'skip-assets', type: :boolean, default: false, desc: "Skip generating javascript and css assets into the application"
16
17
 
17
- desc """
18
- This generator makes the following changes to your application:
19
- 1. Generates blacklight:models
20
- 2. Generates utilities for working with solr
21
- 3. Adds globalid to the Gemfile
22
- 4. Creates a number of public assets, including images, stylesheets, and javascript
23
- 5. Injects behavior into your user application_controller.rb
24
- 6. Adds example configurations for dealing with MARC-like data
25
- 7. Adds Blacklight routes to your ./config/routes.rb
18
+ desc <<-EOS
19
+ This generator makes the following changes to your application:
20
+ 1. Generates blacklight:models
21
+ 2. Generates utilities for working with solr
22
+ 3. Creates a number of public assets, including images, stylesheets, and javascript
23
+ 4. Injects behavior into your user application_controller.rb
24
+ 5. Adds example configurations for dealing with MARC-like data
25
+ 6. Adds Blacklight routes to your ./config/routes.rb
26
26
 
27
- Thank you for Installing Blacklight.
28
- """
27
+ Thank you for Installing Blacklight.
28
+ EOS
29
29
 
30
30
  def add_solr_wrapper
31
- if options[:jettywrapper]
32
- generate 'blacklight:solr4'
33
- elsif solr_version == 'latest'
34
- generate 'blacklight:solr5'
35
- else
36
- generate "blacklight:solr#{solr_version}"
37
- end
38
- end
39
-
40
- def add_globalid_gem
41
- gem "globalid"
31
+ generator_options = '--jettywrapper' if options[:jettywrapper]
32
+ solr_generator = case
33
+ when options[:jettywrapper]
34
+ 'blacklight:solr4'
35
+ when solr_version == 'latest'
36
+ 'blacklight:solr5'
37
+ else
38
+ "blacklight:solr#{solr_version}"
39
+ end
40
+ generate solr_generator, generator_options
42
41
  end
43
42
 
44
43
  def bundle_install
@@ -51,7 +50,7 @@ module Blacklight
51
50
  # Call external generator in AssetsGenerator, so we can
52
51
  # leave that callable seperately too.
53
52
  def copy_public_assets
54
- generate "blacklight:assets"
53
+ generate "blacklight:assets" unless options[:'skip-assets']
55
54
  end
56
55
 
57
56
  def generate_blacklight_document
@@ -87,7 +86,7 @@ module Blacklight
87
86
  def add_sass_configuration
88
87
 
89
88
  insert_into_file "config/application.rb", :after => "config.assets.enabled = true" do <<EOF
90
-
89
+
91
90
  # Default SASS Configuration, check out https://github.com/rails/sass-rails for details
92
91
  config.assets.compress = !Rails.env.development?
93
92
  EOF
@@ -112,9 +111,7 @@ EOF
112
111
  end
113
112
 
114
113
  def add_routes
115
- route <<-EOF
116
- mount Blacklight::Engine => '/'
117
- EOF
114
+ route "mount Blacklight::Engine => '/'"
118
115
  end
119
116
  end
120
117
  end