blacklight 5.0.3 → 5.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -2
  3. data/Gemfile +9 -9
  4. data/Rakefile +0 -1
  5. data/VERSION +1 -1
  6. data/app/assets/stylesheets/blacklight/_facets.css.scss +2 -1
  7. data/app/controllers/bookmarks_controller.rb +0 -1
  8. data/app/helpers/blacklight/blacklight_helper_behavior.rb +3 -3
  9. data/app/helpers/blacklight/catalog_helper_behavior.rb +5 -1
  10. data/app/helpers/blacklight/configuration_helper_behavior.rb +60 -0
  11. data/app/helpers/blacklight/facets_helper_behavior.rb +3 -5
  12. data/app/helpers/blacklight/render_constraints_helper_behavior.rb +1 -1
  13. data/app/helpers/blacklight/url_helper_behavior.rb +24 -19
  14. data/app/views/catalog/_facet_layout.html.erb +1 -1
  15. data/app/views/catalog/_facet_limit.html.erb +2 -4
  16. data/app/views/catalog/_facet_pagination.html.erb +0 -1
  17. data/app/views/catalog/facet.html.erb +2 -13
  18. data/blacklight.gemspec +3 -3
  19. data/gemfiles/rails3.gemfile +19 -5
  20. data/gemfiles/rails4.gemfile +17 -5
  21. data/lib/blacklight/catalog.rb +55 -10
  22. data/lib/blacklight/configuration.rb +6 -1
  23. data/lib/blacklight/configuration/fields.rb +38 -4
  24. data/lib/blacklight/controller.rb +10 -1
  25. data/lib/blacklight/facet.rb +8 -0
  26. data/lib/blacklight/solr_helper.rb +53 -25
  27. data/lib/blacklight/solr_response/facets.rb +22 -4
  28. data/spec/controllers/catalog_controller_spec.rb +59 -2
  29. data/spec/features/alternate_controller_spec.rb +3 -3
  30. data/spec/features/record_view_spec.rb +1 -1
  31. data/spec/helpers/blacklight_helper_spec.rb +5 -5
  32. data/spec/helpers/catalog_helper_spec.rb +20 -7
  33. data/spec/helpers/configuration_helper_spec.rb +42 -0
  34. data/spec/helpers/facets_helper_spec.rb +5 -12
  35. data/spec/helpers/render_constraints_helper_spec.rb +4 -1
  36. data/spec/helpers/url_helper_spec.rb +37 -49
  37. data/spec/lib/blacklight/configuration_spec.rb +53 -1
  38. data/spec/lib/blacklight/solr_helper_spec.rb +37 -4
  39. data/spec/test_app_templates/Gemfile.extra +21 -0
  40. data/spec/test_app_templates/lib/generators/test_app_generator.rb +5 -0
  41. data/spec/test_app_templates/lib/tasks/blacklight_test_app.rake +14 -0
  42. data/spec/views/catalog/_constraints.html.erb_spec.rb +2 -2
  43. data/spec/views/catalog/_facet_layout.html.erb_spec.rb +3 -1
  44. data/spec/views/catalog/_facets.html.erb_spec.rb +42 -40
  45. data/spec/views/catalog/facet.html.erb_spec.rb +30 -0
  46. metadata +23 -33
  47. data/spec/views/catalog/opensearch.xml.builder_spec.rb +0 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7dabf17ff15de58d015662a3f76b993373abddd2
4
- data.tar.gz: 8a05023c77d84fae2f3221740157c887789c74b7
3
+ metadata.gz: 5b2d38f9b220bd5f8964188bb0ee5789fb834a3c
4
+ data.tar.gz: a25ff32577292eada643a0b1410c48d9544b3cde
5
5
  SHA512:
6
- metadata.gz: 9f3c1b6f201964e4481be952d25d53c85960351dd304c83c884ca2a5000e517e160738f4f7763b6c118cf98f7bb8888cc9006ec14673261ba798afce20cf945a
7
- data.tar.gz: e997713b7968192f908ee5c6d251f9e5a3f86f4789745bb9605cd9a747520920f1e3cacac84a87758b00bcaf0b3e23819c7039e16c2a14b51a46993857fb149b
6
+ metadata.gz: 4130f90f31cbcc0bbe4650f508bc38b88ed7779ab8af2523311bac816a879f2790ebd39c079410f10070761291ed20e04678651a19aa11b81bfe079f7f28851e
7
+ data.tar.gz: 83af8dee407631644e94b28af90ad3b995584c0856071fcbfdb7c9440a02e099b3def65e11c162a045dab11cef9230c49ab0c06ff8fd803b8917c6441d83fb98
data/.gitignore CHANGED
@@ -11,5 +11,5 @@ log/*
11
11
  solr_marc/solrmarc.log
12
12
  lib/solrmarc.log.*
13
13
  tmp/*
14
- pkg/*
15
- spec/internal
14
+ spec/internal/
15
+ pkg/*
data/Gemfile CHANGED
@@ -1,21 +1,21 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  # Please see blacklight.gemspec for dependency information.
4
- gemspec path: File.expand_path('..', __FILE__)
4
+ gemspec
5
5
 
6
6
 
7
7
  gem 'simplecov', require: false
8
8
  gem 'coveralls', require: false
9
9
 
10
- gem 'engine_cart', '~> 0.3.0'
11
-
12
10
  group :test do
13
- gem "blacklight-marc", "~> 5.0", github: "projectblacklight/blacklight_marc"
14
- gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby
11
+ gem 'devise'
12
+ gem 'devise-guests'
13
+ gem "bootstrap-sass"
14
+ gem 'turbolinks'
15
+ gem 'sass-rails'
16
+ gem 'blacklight-marc', :github => 'projectblacklight/blacklight_marc'
15
17
  end
16
18
 
17
- file = File.expand_path("Gemfile", ENV['ENGINE_CART_DESTINATION'] || ENV['RAILS_ROOT'] || File.expand_path("../spec/internal", __FILE__))
18
- if File.exists?(file)
19
- puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v`
20
- instance_eval File.read(file)
19
+ if File.exists?('spec/test_app_templates/Gemfile.extra')
20
+ eval File.read('spec/test_app_templates/Gemfile.extra'), nil, 'spec/test_app_templates/Gemfile.extra'
21
21
  end
data/Rakefile CHANGED
@@ -1,6 +1,5 @@
1
1
  # encoding: UTF-8
2
2
  require 'rubygems'
3
- require 'rails'
4
3
  begin
5
4
  require 'bundler/setup'
6
5
  rescue LoadError
data/VERSION CHANGED
@@ -1 +1 @@
1
- 5.0.3
1
+ 5.1.0
@@ -83,7 +83,8 @@
83
83
 
84
84
  }
85
85
 
86
- ul.facet_extended_list
86
+ /* deprecated in Blacklight 5.x */
87
+ ul.facet_extended_list, .facet_extended_list ul
87
88
  {
88
89
  @extend .list-unstyled;
89
90
 
@@ -15,7 +15,6 @@ class BookmarksController < CatalogController
15
15
  def search_action_url *args
16
16
  catalog_index_url *args
17
17
  end
18
- helper_method :search_action_url
19
18
 
20
19
  before_filter :verify_user
21
20
 
@@ -170,7 +170,7 @@ module Blacklight::BlacklightHelperBehavior
170
170
  document = args.first
171
171
 
172
172
  field = options[:field]
173
- html_escape t(:'blacklight.search.index.label', label: index_fields(document)[field].label)
173
+ html_escape t(:"blacklight.search.index.#{document_index_view_type}.label", default: :'blacklight.search.index.label', label: index_field_label(document, field))
174
174
  end
175
175
 
176
176
  ##
@@ -226,7 +226,7 @@ module Blacklight::BlacklightHelperBehavior
226
226
 
227
227
  field = options[:field]
228
228
 
229
- html_escape t(:'blacklight.search.show.label', label: document_show_fields(document)[field].label)
229
+ html_escape t(:'blacklight.search.show.label', label: document_show_field_label(document, field))
230
230
  end
231
231
 
232
232
  ##
@@ -364,7 +364,7 @@ module Blacklight::BlacklightHelperBehavior
364
364
  end
365
365
 
366
366
  Array(value).map do |v|
367
- link_to render_field_value(v, field_config), search_action_url(add_facet_params(link_field, v, {}))
367
+ link_to render_field_value(v, field_config), search_action_path(add_facet_params(link_field, v, {}))
368
368
  end if field
369
369
  else
370
370
  value
@@ -167,7 +167,11 @@ module Blacklight::CatalogHelperBehavior
167
167
  end
168
168
 
169
169
  if value
170
- link_to_document document, url_options.merge(:label => value)
170
+ if url_options === false || url_options[:suppress_link]
171
+ value
172
+ else
173
+ link_to_document document, url_options.merge(:label => value)
174
+ end
171
175
  end
172
176
  end
173
177
 
@@ -24,6 +24,66 @@ module Blacklight::ConfigurationHelperBehavior
24
24
  blacklight_config.show_fields
25
25
  end
26
26
 
27
+ ##
28
+ # Look up the label for the index field
29
+ def index_field_label document, field
30
+ label = index_fields(document)[field].label
31
+
32
+ solr_field_label(
33
+ label,
34
+ :"blacklight.search.fields.index.#{field}",
35
+ :"blacklight.search.fields.#{field}"
36
+ )
37
+ end
38
+
39
+ ##
40
+ # Look up the label for the show field
41
+ def document_show_field_label document, field
42
+ label = document_show_fields(document)[field].label
43
+
44
+ solr_field_label(
45
+ label,
46
+ :"blacklight.search.fields.show.#{field}",
47
+ :"blacklight.search.fields.#{field}"
48
+ )
49
+ end
50
+
51
+ ##
52
+ # Look up the label for the facet field
53
+ def facet_field_label field
54
+ label = blacklight_config.facet_fields[field].label
55
+
56
+ solr_field_label(
57
+ label,
58
+ :"blacklight.search.fields.facet.#{field}",
59
+ :"blacklight.search.fields.#{field}"
60
+ )
61
+ end
62
+
63
+ ##
64
+ # Look up the label for a solr field.
65
+ #
66
+ # @overload
67
+ # @param [Symbol] an i18n key
68
+ #
69
+ # @overload
70
+ # @param [String] default label to display if the i18n look up fails
71
+ # @param [Symbol] i18n keys to attempt to look up
72
+ # before falling back to the label
73
+ # @param [Symbol] any number of additional keys
74
+ # @param [Symbol] ...
75
+ def solr_field_label label, *i18n_keys
76
+ if label.is_a? Symbol
77
+ return t(label)
78
+ end
79
+
80
+ first, *rest = i18n_keys
81
+
82
+ rest << label
83
+
84
+ t(first, default: rest)
85
+ end
86
+
27
87
  ##
28
88
  # Get the default index view type
29
89
  def default_document_index_view_type
@@ -111,11 +111,9 @@ module Blacklight::FacetsHelperBehavior
111
111
  # @param [String] facet item
112
112
  # @param [Hash] options
113
113
  # @option options [Boolean] :suppress_link display the facet, but don't link to it
114
- # @option options [Rails::Engine] :route_set route set to use to render the link
115
114
  # @return [String]
116
- def render_facet_value(facet_solr_field, item, options ={})
117
- scope = options.delete(:route_set) || self
118
- path = scope.url_for(add_facet_params_and_redirect(facet_solr_field, item).merge(only_path: true))
115
+ def render_facet_value(facet_solr_field, item, options ={})
116
+ path = search_action_path(add_facet_params_and_redirect(facet_solr_field, item))
119
117
  content_tag(:span, :class => "facet-label") do
120
118
  link_to_unless(options[:suppress_link], facet_display_value(facet_solr_field, item), path, :class=>"facet_select")
121
119
  end + render_facet_count(item.hits)
@@ -128,7 +126,7 @@ module Blacklight::FacetsHelperBehavior
128
126
  content_tag(:span, :class => "facet-label") do
129
127
  content_tag(:span, facet_display_value(facet_solr_field, item), :class => "selected") +
130
128
  # remove link
131
- link_to(content_tag(:span, '', :class => "glyphicon glyphicon-remove") + content_tag(:span, '[remove]', :class => 'sr-only'), remove_facet_params(facet_solr_field, item, params), :class=>"remove")
129
+ link_to(content_tag(:span, '', :class => "glyphicon glyphicon-remove") + content_tag(:span, '[remove]', :class => 'sr-only'), search_action_path(remove_facet_params(facet_solr_field, item, params)), :class=>"remove")
132
130
  end + render_facet_count(item.hits, :classes => ["selected"])
133
131
  end
134
132
 
@@ -78,7 +78,7 @@ module Blacklight::RenderConstraintsHelperBehavior
78
78
  safe_join(values.map do |val|
79
79
  render_constraint_element( blacklight_config.facet_fields[facet].label,
80
80
  facet_display_value(facet, val),
81
- :remove => url_for(remove_facet_params(facet, val, localized_params)),
81
+ :remove => search_action_path(remove_facet_params(facet, val, localized_params)),
82
82
  :classes => ["filter", "filter-" + facet.parameterize]
83
83
  )
84
84
  end, "\n")
@@ -1,5 +1,13 @@
1
1
  module Blacklight::UrlHelperBehavior
2
2
 
3
+ ##
4
+ # Extension point for downstream applications
5
+ # to provide more interesting routing to
6
+ # documents
7
+ def url_for_document doc
8
+ doc
9
+ end
10
+
3
11
  # link_to_document(doc, :label=>'VIEW', :counter => 3)
4
12
  # Use the catalog_path RESTful route to create a link to the show page for a specific item.
5
13
  # catalog_path accepts a HashWithIndifferentAccess object. The solr query params are stored in the session,
@@ -7,13 +15,13 @@ module Blacklight::UrlHelperBehavior
7
15
  def link_to_document(doc, opts={:label=>nil, :counter => nil})
8
16
  opts[:label] ||= document_show_link_field(doc)
9
17
  label = render_document_index_label doc, opts
10
- link_to label, doc, search_session_params(opts[:counter]).merge(opts.reject { |k,v| [:label, :counter].include? k })
18
+ link_to label, url_for_document(doc), search_session_params(opts[:counter]).merge(opts.reject { |k,v| [:label, :counter].include? k })
11
19
  end
12
20
 
13
21
  ##
14
22
  # Link to the previous document in the current search context
15
23
  def link_to_previous_document(previous_document)
16
- link_to_unless previous_document.nil?, raw(t('views.pagination.previous')), previous_document, search_session_params(search_session[:counter].to_i - 1).merge(:class => "previous", :rel => 'prev') do
24
+ link_to_unless previous_document.nil?, raw(t('views.pagination.previous')), url_for_document(previous_document), search_session_params(search_session[:counter].to_i - 1).merge(:class => "previous", :rel => 'prev') do
17
25
  content_tag :span, raw(t('views.pagination.previous')), :class => 'previous'
18
26
  end
19
27
  end
@@ -21,7 +29,7 @@ module Blacklight::UrlHelperBehavior
21
29
  ##
22
30
  # Link to the next document in the current search context
23
31
  def link_to_next_document(next_document)
24
- link_to_unless next_document.nil?, raw(t('views.pagination.next')), next_document, search_session_params(search_session[:counter].to_i + 1).merge(:class => "next", :rel => 'next') do
32
+ link_to_unless next_document.nil?, raw(t('views.pagination.next')), url_for_document(next_document), search_session_params(search_session[:counter].to_i + 1).merge(:class => "next", :rel => 'next') do
25
33
  content_tag :span, raw(t('views.pagination.next')), :class => 'next'
26
34
  end
27
35
  end
@@ -40,7 +48,7 @@ module Blacklight::UrlHelperBehavior
40
48
  def link_to_query(query)
41
49
  p = params.except(:page, :action)
42
50
  p[:q]=query
43
- link_url = catalog_index_path(p)
51
+ link_url = search_action_path(p)
44
52
  link_to(query, link_url)
45
53
  end
46
54
 
@@ -52,7 +60,7 @@ module Blacklight::UrlHelperBehavior
52
60
  current_index_view_type = document_index_view_type(query_params)
53
61
  h[:view] = current_index_view_type unless current_index_view_type == default_document_index_view_type
54
62
 
55
- search_action_url(h)
63
+ search_action_path(h)
56
64
  end
57
65
 
58
66
  # Create a link back to the index screen, keeping the user's facet, query and paging choices intact by using session.
@@ -76,7 +84,7 @@ module Blacklight::UrlHelperBehavior
76
84
 
77
85
  # Search History and Saved Searches display
78
86
  def link_to_previous_search(params)
79
- link_to(render_search_to_s(params), catalog_index_path(params))
87
+ link_to(render_search_to_s(params), search_action_path(params))
80
88
  end
81
89
 
82
90
  # @overload params_for_search(source_params, params_to_merge)
@@ -126,7 +134,13 @@ module Blacklight::UrlHelperBehavior
126
134
  my_params = source_params.reject { |k,v| v.nil? }
127
135
 
128
136
  my_params.except(:action, :controller, :id, :commit, :utf8)
137
+ end
129
138
 
139
+ ##
140
+ # Reset any search parameters that store search context
141
+ # and need to be reset when e.g. constraints change
142
+ def reset_search_params source_params
143
+ sanitize_search_params(source_params).except :page, :counter
130
144
  end
131
145
 
132
146
  # adds the value and/or field to params[:f]
@@ -143,7 +157,7 @@ module Blacklight::UrlHelperBehavior
143
157
 
144
158
  value = facet_value_for_facet_item(item)
145
159
 
146
- p = source_params.dup
160
+ p = reset_search_params(source_params)
147
161
  p[:f] = (p[:f] || {}).dup # the command above is not deep in rails3, !@#$!@#$
148
162
  p[:f][field] = (p[:f][field] || []).dup
149
163
 
@@ -171,15 +185,12 @@ module Blacklight::UrlHelperBehavior
171
185
  # catalog/index with their new facet choice.
172
186
  def add_facet_params_and_redirect(field, item)
173
187
  new_params = add_facet_params(field, item)
174
- new_params.except! :page, :id
175
188
 
176
189
  # Delete any request params from facet-specific action, needed
177
190
  # to redir to index action properly.
178
191
  new_params.except! *Blacklight::Solr::FacetPaginator.request_keys.values
179
192
 
180
- # Force action to be index.
181
- new_params[:action] = "index"
182
- new_params
193
+ new_params
183
194
  end
184
195
 
185
196
  # copies the current params (or whatever is passed in as the 3rd arg)
@@ -193,21 +204,15 @@ module Blacklight::UrlHelperBehavior
193
204
 
194
205
  value = facet_value_for_facet_item(item)
195
206
 
196
- p = source_params.dup
207
+ p = reset_search_params(source_params)
197
208
  # need to dup the facet values too,
198
209
  # if the values aren't dup'd, then the values
199
210
  # from the session will get remove in the show view...
200
211
  p[:f] = (p[:f] || {}).dup
201
212
  p[:f][field] = (p[:f][field] || []).dup
202
- p.except! :page, :id, :counter, :commit
203
213
  p[:f][field] = p[:f][field] - [value]
204
214
  p[:f].delete(field) if p[:f][field].size == 0
205
215
  p
206
216
  end
207
217
 
208
- if ::Rails.version < "4.0"
209
- def asset_url *args
210
- "#{request.protocol}#{request.host_with_port}#{asset_path(*args)}"
211
- end
212
- end
213
- end
218
+ end
@@ -1,7 +1,7 @@
1
1
  <div class="panel panel-default facet_limit blacklight-<%= facet_field.field.parameterize %> <%= 'facet_limit-active' if facet_field_in_params?(facet_field.field) %>">
2
2
  <div class="<%= "collapsed" if should_collapse_facet?(facet_field) %> collapse-toggle panel-heading" data-toggle="collapse" data-target="#facet-<%= facet_field.label.parameterize %>">
3
3
  <h5 class="panel-title">
4
- <%= link_to facet_field.label, "#", :"data-no-turbolink" => true %>
4
+ <%= link_to facet_field_label(facet_field.field), "#", :"data-no-turbolink" => true %>
5
5
  </h5>
6
6
  </div>
7
7
  <div id="facet-<%= facet_field.label.parameterize %>" class="panel-collapse facet-content <%= should_collapse_facet?(facet_field) ? 'collapse' : 'in' %>">
@@ -1,7 +1,5 @@
1
1
  <ul class="facet-values list-unstyled">
2
- <% paginator =
3
- Blacklight::Solr::FacetPaginator.new(display_facet.items,
4
- :limit => facet_limit_for(solr_field))
2
+ <% paginator = facet_paginator(facet_field, display_facet)
5
3
  %>
6
4
  <% paginator.items.each do |item| -%>
7
5
  <li>
@@ -13,7 +11,7 @@
13
11
  </li>
14
12
  <% end %>
15
13
 
16
- <% if(paginator.has_next?) %>
14
+ <% if paginator.has_next? and params[:action] != "facet" %>
17
15
  <li class="more_facets_link"><%= link_to(t('blacklight.search.facets.more'), params.merge(:id => solr_field, :action=>"facet", :page => nil), :class => "more_facets_link") %></li>
18
16
  <% end %>
19
17
 
@@ -1,4 +1,3 @@
1
-
2
1
  <div class="prev_next_links btn-group pull-left">
3
2
  <%= link_to_previous_page @pagination, raw(t('views.pagination.previous')), :params => params, :param_name => Blacklight::Solr::FacetPaginator.request_keys[:page], :class => 'btn btn-link', :data => {:ajax_modal => "preserve"} do %>
4
3
  <span class="disabled btn btn-disabled"><%= raw(t('views.pagination.previous')) %></span>
@@ -4,22 +4,11 @@
4
4
 
5
5
  <div class="modal-header">
6
6
  <button type="button" class="ajax-modal-close close" data-dismiss="modal" aria-hidden="true">×</button>
7
- <h3 class="modal-title"><%= blacklight_config.facet_fields[params[:id]].label %></h3>
7
+ <h3 class="modal-title"><%= facet_field_label(@facet.field) %></h3>
8
8
  </div>
9
9
  <div class="modal-body">
10
10
  <div class="facet_extended_list">
11
-
12
- <ul class="facet_extended_list facet-values">
13
- <% @pagination.items.each do |item| %>
14
- <li>
15
- <% if facet_in_params?( params[:id], item.value ) %>
16
- <%= render_selected_facet_value(params[:id], item) %>
17
- <% else %>
18
- <%= render_facet_value(params[:id], item) %>
19
- <% end -%>
20
- </li>
21
- <% end %>
22
- </ul>
11
+ <%= render_facet_limit(@display_facet, layout: false) %>
23
12
  </div>
24
13
  </div>
25
14
 
@@ -17,18 +17,18 @@ Gem::Specification.new do |s|
17
17
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
18
18
  s.require_paths = ["lib"]
19
19
 
20
+ # PRODUCTION GEM REQUIREMENTS
21
+ # ---------------------------------------
20
22
  s.add_dependency "rails", ">= 3.2.6", "< 5"
21
23
  s.add_dependency "nokogiri", "~>1.6" # XML Parser
22
24
  s.add_dependency "kaminari", "~> 0.13" # the pagination (page 1,2,3, etc..) of our search results
23
25
  s.add_dependency "rsolr", "~> 1.0.6" # Library for interacting with rSolr.
26
+ s.add_dependency "sass-rails"
24
27
  s.add_dependency "bootstrap-sass", "~> 3.0"
25
28
  s.add_dependency "deprecation"
26
-
27
29
  s.add_development_dependency "jettywrapper", ">= 1.5.2"
28
30
  s.add_development_dependency "blacklight-marc", "~> 5.0"
29
31
  s.add_development_dependency "rspec-rails"
30
- s.add_development_dependency "capybara"
31
- s.add_development_dependency "poltergeist"
32
32
  s.add_development_dependency 'engine_cart', ">= 0.1.0"
33
33
  s.add_development_dependency "equivalent-xml"
34
34
  end
@@ -1,9 +1,23 @@
1
1
  source 'http://rubygems.org'
2
2
 
3
- file = File.expand_path("../../Gemfile", __FILE__)
4
- if File.exists?(file)
5
- puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v`
6
- instance_eval File.read(file)
3
+ # Please see blacklight.gemspec for dependency information.
4
+ gemspec :path=>"../"
5
+
6
+ gem 'rails', "~> 3.2"
7
+
8
+ gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby
9
+
10
+ group :test do
11
+ gem 'simplecov', require: false
12
+ gem 'coveralls', require: false
13
+ gem 'devise'
14
+ gem 'devise-guests'
15
+ gem "bootstrap-sass"
16
+ gem 'turbolinks'
17
+ gem 'uglifier'
7
18
  end
8
19
 
9
- gem 'rails', "3.2.17"
20
+ f = File.expand_path(File.dirname(__FILE__) + '/../spec/test_app_templates/Gemfile.extra')
21
+ if File.exists?(f)
22
+ eval File.read(f), nil, f
23
+ end