blacklight_advanced_search 5.0.1 → 5.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 5.0.1
1
+ 5.1.0
@@ -6,7 +6,7 @@
6
6
  </div>
7
7
 
8
8
  <div class="submit-buttons pull-right">
9
- <%= link_to t('blacklight_advanced_search.form.start_over'), advanced_search_path, :class =>"btn btn-default" %>
9
+ <%= link_to t('blacklight_advanced_search.form.start_over'), advanced_search_path, :class =>"btn btn-default advanced-search-start-over" %>
10
10
 
11
11
  <%= submit_tag t('blacklight_advanced_search.form.search_btn'), :class=>'btn btn-primary advanced-search-submit', :id => "advanced-search-submit" %>
12
12
  </div>
@@ -4,7 +4,7 @@
4
4
 
5
5
  <h1 class="advanced page-header">
6
6
  <%= t('blacklight_advanced_search.form.title') %>
7
- <%= link_to t('blacklight_advanced_search.form.start_over'), advanced_search_path, :class =>"btn btn-default pull-right" %>
7
+ <%= link_to t('blacklight_advanced_search.form.start_over'), advanced_search_path, :class =>"btn btn-default pull-right advanced-search-start-over" %>
8
8
  </h1>
9
9
 
10
10
  <div class="row">
@@ -17,7 +17,7 @@ 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
- s.add_dependency "blacklight", ">= 5.1", "< 6.0"
20
+ s.add_dependency "blacklight", ">= 5.2", "< 6.0"
21
21
  s.add_dependency "parslet"
22
22
 
23
23
  s.add_development_dependency "blacklight_marc"
@@ -51,7 +51,7 @@ module BlacklightAdvancedSearch
51
51
  def filters
52
52
  unless (@filters)
53
53
  @filters = {}
54
- return @filters unless @params[:f_inclusive]
54
+ return @filters unless @params[:f_inclusive] && @params[:f_inclusive].respond_to?(:each_pair)
55
55
  @params[:f_inclusive].each_pair do |field, value_array|
56
56
  @filters[field] ||= value_array.dup
57
57
  end
@@ -13,6 +13,10 @@ module BlacklightAdvancedSearch::CatalogHelperOverride
13
13
  my_params = my_params.dup
14
14
  my_params[:f_inclusive] = my_params[:f_inclusive].dup
15
15
  my_params[:f_inclusive].delete(field)
16
+
17
+ if my_params[:f_inclusive].empty?
18
+ my_params.delete :f_inclusive
19
+ end
16
20
  end
17
21
  my_params
18
22
  end
@@ -12,7 +12,7 @@
12
12
  def self.before(controller)
13
13
  params = controller.send(:params)
14
14
 
15
- if params[:f_inclusive]
15
+ if params[:f_inclusive] && params[:f_inclusive].respond_to?(:each_pair)
16
16
  legacy_converted = false
17
17
 
18
18
  params[:f_inclusive].each_pair do |field, value|
@@ -64,14 +64,9 @@ module BlacklightAdvancedSearch::RenderConstraintsOverride
64
64
  def facet_field_in_params?(field)
65
65
  return true if super
66
66
 
67
- # otherwise use our own logic. And work around a weird bug
68
- # in BL that assumes params[:f][field] will exist if facet_field_in_params?
69
- # hacky insistence on params[:f] etc won't be neccesary if after:
70
- # https://github.com/projectblacklight/blacklight/pull/790
67
+ # otherwise use our own logic.
71
68
  query = BlacklightAdvancedSearch::QueryParser.new(params, self.blacklight_config )
72
69
  if query.filters.keys.include?( field )
73
- params[:f] ||= {}
74
- params[:f][field] ||= []
75
70
  return true
76
71
  end
77
72
 
data/spec/spec_helper.rb CHANGED
@@ -10,6 +10,20 @@ require 'capybara/rails'
10
10
 
11
11
 
12
12
  RSpec.configure do |config|
13
+ # Maintain this rspec2 behavior even in rspec3, until we
14
+ # adjust our stuff. Deprecation warning was:
15
+ # --------------------------------------------------------------------------------
16
+ # rspec-rails 3 will no longer automatically infer an example group's spec type
17
+ # from the file location. You can explicitly opt-in to this feature using this
18
+ # snippet:
13
19
 
20
+ # RSpec.configure do |config|
21
+ # config.infer_spec_type_from_file_location!
22
+ # end
23
+
24
+ # If you wish to manually label spec types via metadata you can safely ignore
25
+ # this warning and continue upgrading to RSpec 3 without addressing it.
26
+ # --------------------------------------------------------------------------------
27
+ config.infer_spec_type_from_file_location!
14
28
  end
15
29
 
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blacklight_advanced_search
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.1
4
+ version: 5.1.0
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Jonathan Rochkind
@@ -9,110 +10,124 @@ authors:
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2014-05-07 00:00:00.000000000 Z
13
+ date: 2014-06-05 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: blacklight
16
17
  requirement: !ruby/object:Gem::Requirement
18
+ none: false
17
19
  requirements:
18
- - - ">="
20
+ - - ! '>='
19
21
  - !ruby/object:Gem::Version
20
- version: '5.1'
21
- - - "<"
22
+ version: '5.2'
23
+ - - <
22
24
  - !ruby/object:Gem::Version
23
25
  version: '6.0'
24
26
  type: :runtime
25
27
  prerelease: false
26
28
  version_requirements: !ruby/object:Gem::Requirement
29
+ none: false
27
30
  requirements:
28
- - - ">="
31
+ - - ! '>='
29
32
  - !ruby/object:Gem::Version
30
- version: '5.1'
31
- - - "<"
33
+ version: '5.2'
34
+ - - <
32
35
  - !ruby/object:Gem::Version
33
36
  version: '6.0'
34
37
  - !ruby/object:Gem::Dependency
35
38
  name: parslet
36
39
  requirement: !ruby/object:Gem::Requirement
40
+ none: false
37
41
  requirements:
38
- - - ">="
42
+ - - ! '>='
39
43
  - !ruby/object:Gem::Version
40
44
  version: '0'
41
45
  type: :runtime
42
46
  prerelease: false
43
47
  version_requirements: !ruby/object:Gem::Requirement
48
+ none: false
44
49
  requirements:
45
- - - ">="
50
+ - - ! '>='
46
51
  - !ruby/object:Gem::Version
47
52
  version: '0'
48
53
  - !ruby/object:Gem::Dependency
49
54
  name: blacklight_marc
50
55
  requirement: !ruby/object:Gem::Requirement
56
+ none: false
51
57
  requirements:
52
- - - ">="
58
+ - - ! '>='
53
59
  - !ruby/object:Gem::Version
54
60
  version: '0'
55
61
  type: :development
56
62
  prerelease: false
57
63
  version_requirements: !ruby/object:Gem::Requirement
64
+ none: false
58
65
  requirements:
59
- - - ">="
66
+ - - ! '>='
60
67
  - !ruby/object:Gem::Version
61
68
  version: '0'
62
69
  - !ruby/object:Gem::Dependency
63
70
  name: rails
64
71
  requirement: !ruby/object:Gem::Requirement
72
+ none: false
65
73
  requirements:
66
- - - ">="
74
+ - - ! '>='
67
75
  - !ruby/object:Gem::Version
68
76
  version: '0'
69
77
  type: :development
70
78
  prerelease: false
71
79
  version_requirements: !ruby/object:Gem::Requirement
80
+ none: false
72
81
  requirements:
73
- - - ">="
82
+ - - ! '>='
74
83
  - !ruby/object:Gem::Version
75
84
  version: '0'
76
85
  - !ruby/object:Gem::Dependency
77
86
  name: rspec-rails
78
87
  requirement: !ruby/object:Gem::Requirement
88
+ none: false
79
89
  requirements:
80
- - - ">="
90
+ - - ! '>='
81
91
  - !ruby/object:Gem::Version
82
92
  version: '0'
83
93
  type: :development
84
94
  prerelease: false
85
95
  version_requirements: !ruby/object:Gem::Requirement
96
+ none: false
86
97
  requirements:
87
- - - ">="
98
+ - - ! '>='
88
99
  - !ruby/object:Gem::Version
89
100
  version: '0'
90
101
  - !ruby/object:Gem::Dependency
91
102
  name: jettywrapper
92
103
  requirement: !ruby/object:Gem::Requirement
104
+ none: false
93
105
  requirements:
94
- - - ">="
106
+ - - ! '>='
95
107
  - !ruby/object:Gem::Version
96
108
  version: 1.4.2
97
109
  type: :development
98
110
  prerelease: false
99
111
  version_requirements: !ruby/object:Gem::Requirement
112
+ none: false
100
113
  requirements:
101
- - - ">="
114
+ - - ! '>='
102
115
  - !ruby/object:Gem::Version
103
116
  version: 1.4.2
104
117
  - !ruby/object:Gem::Dependency
105
118
  name: engine_cart
106
119
  requirement: !ruby/object:Gem::Requirement
120
+ none: false
107
121
  requirements:
108
- - - "~>"
122
+ - - ~>
109
123
  - !ruby/object:Gem::Version
110
124
  version: 0.2.2
111
125
  type: :development
112
126
  prerelease: false
113
127
  version_requirements: !ruby/object:Gem::Requirement
128
+ none: false
114
129
  requirements:
115
- - - "~>"
130
+ - - ~>
116
131
  - !ruby/object:Gem::Version
117
132
  version: 0.2.2
118
133
  description:
@@ -122,8 +137,8 @@ executables: []
122
137
  extensions: []
123
138
  extra_rdoc_files: []
124
139
  files:
125
- - ".gitignore"
126
- - ".travis.yml"
140
+ - .gitignore
141
+ - .travis.yml
127
142
  - Gemfile
128
143
  - LICENSE
129
144
  - README.md
@@ -182,26 +197,33 @@ files:
182
197
  - spec/test_app_templates/lib/tasks/blacklight_test_app.rake
183
198
  homepage: http://projectblacklight.org/
184
199
  licenses: []
185
- metadata: {}
186
200
  post_install_message:
187
201
  rdoc_options: []
188
202
  require_paths:
189
203
  - lib
190
204
  required_ruby_version: !ruby/object:Gem::Requirement
205
+ none: false
191
206
  requirements:
192
- - - ">="
207
+ - - ! '>='
193
208
  - !ruby/object:Gem::Version
194
209
  version: '0'
210
+ segments:
211
+ - 0
212
+ hash: 816155266112980095
195
213
  required_rubygems_version: !ruby/object:Gem::Requirement
214
+ none: false
196
215
  requirements:
197
- - - ">="
216
+ - - ! '>='
198
217
  - !ruby/object:Gem::Version
199
218
  version: '0'
219
+ segments:
220
+ - 0
221
+ hash: 816155266112980095
200
222
  requirements: []
201
223
  rubyforge_project: blacklight
202
- rubygems_version: 2.2.2
224
+ rubygems_version: 1.8.23
203
225
  signing_key:
204
- specification_version: 4
226
+ specification_version: 3
205
227
  summary: Blacklight Advanced Search plugin
206
228
  test_files:
207
229
  - spec/features/blacklight_advanced_search_form_spec.rb
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 000da5f4dfcf42001bd6386e88f7be6b1ffe6984
4
- data.tar.gz: e2f09aac472a8ed22902db017c6c0969a2e35d86
5
- SHA512:
6
- metadata.gz: b509e758a16e53ee206dce4ff9dc404da1fa82a5915288881d595885200661704191fab5562a3aed26d4e0f3b63509cb528587fe75e2a5ff14b93dcda42968b2
7
- data.tar.gz: a257bd6fe46823b305657adf4c492b7cce133b426eed3aaf6e7372303cb3f7411fab7f135e625cd08bf71ec24b09eecaaaff39efc26bd9a4da1e2e52714c54c1