blacklight_range_limit 1.2.2 → 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -3,3 +3,4 @@ source 'http://rubygems.org'
3
3
  gemspec
4
4
 
5
5
  gem 'combustion'
6
+ gem 'blacklight', :git => 'git://github.com/projectblacklight/blacklight.git'
data/Rakefile CHANGED
@@ -3,3 +3,53 @@ require 'rake'
3
3
 
4
4
  require 'bundler'
5
5
  Bundler::GemHelper.install_tasks
6
+
7
+ require 'rspec/core/rake_task'
8
+
9
+ require 'blacklight'
10
+ import File.join(Blacklight.root, 'lib', 'railties', 'solr_marc.rake')
11
+
12
+ task :default => :spec
13
+
14
+ desc "Run specs"
15
+ RSpec::Core::RakeTask.new do |t|
16
+
17
+ end
18
+
19
+ desc "Execute Continuous Integration build"
20
+ task :ci do
21
+
22
+ require 'combustion'
23
+ Combustion.initialize!
24
+ unless ENV['environment'] == 'test'
25
+ exec("rake ci environment=test")
26
+ end
27
+
28
+
29
+ require 'rails/generators'
30
+ require File.join(Blacklight.root, 'lib', 'generators', 'blacklight', 'jetty_generator.rb')
31
+
32
+ Blacklight::Jetty.start(["--save_location=jetty", "--force", "-e test"])
33
+
34
+ ENV['RAILS_ENV'] = 'test'
35
+ ENV['CONFIG_PATH'] = File.expand_path(File.join(Blacklight.root, 'lib', 'generators', 'blacklight', 'templates', 'config', 'SolrMarc', 'config-test.properties'))
36
+ ENV['SOLRMARC_JAR_PATH'] = File.expand_path(File.join(Blacklight.root, 'lib', 'SolrMarc.jar'))
37
+ ENV['SOLR_PATH'] = File.expand_path(File.join('jetty', 'solr'))
38
+ ENV['SOLR_WAR_PATH'] = File.expand_path(File.join('jetty', 'webapps', 'solr.war'))
39
+ Rake::Task['solr:marc:index_test_data'].invoke
40
+
41
+
42
+ require 'jettywrapper'
43
+ jetty_params = {
44
+ :jetty_home => File.expand_path(File.dirname(__FILE__) + '/jetty'),
45
+ :quiet => false,
46
+ :jetty_port => 8888,
47
+ :solr_home => File.expand_path(File.dirname(__FILE__) + '/jetty/solr'),
48
+ :startup_wait => 30
49
+ }
50
+
51
+ error = Jettywrapper.wrap(jetty_params) do
52
+ Rake::Task['spec'].invoke
53
+ end
54
+ raise "test failures: #{error}" if error
55
+ end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.2
1
+ 1.2.3
@@ -27,4 +27,5 @@ Gem::Specification.new do |s|
27
27
  s.add_development_dependency "capybara"
28
28
  s.add_development_dependency "sqlite3"
29
29
  s.add_development_dependency 'launchy'
30
+ s.add_development_dependency "jettywrapper"
30
31
  end
@@ -14,7 +14,7 @@ module BlacklightRangeLimit
14
14
  def add_range_segments_to_solr!(solr_params, solr_field, min, max)
15
15
  field_config = range_config(solr_field)
16
16
 
17
- solr_params[:"facet.query"] = []
17
+ solr_params[:"facet.query"] ||= []
18
18
 
19
19
  boundaries = boundaries_for_range_facets(min, max, (field_config[:num_segments] || 10) )
20
20
 
@@ -29,8 +29,6 @@ describe "Blacklight Range Limit" do
29
29
  click_link 'View distribution'
30
30
  click_link '1941 to 1944'
31
31
 
32
- save_and_open_page
33
-
34
32
  page.should have_content "1941 to 1944 (1) [remove]"
35
33
  end
36
34
  end
@@ -13,6 +13,6 @@
13
13
  development:
14
14
  url: http://127.0.0.1:8983/solr
15
15
  test: &test
16
- url: http://127.0.0.1:8983/solr
16
+ url: http://127.0.0.1:8888/solr
17
17
  cucumber:
18
18
  <<: *test
@@ -9,12 +9,6 @@ require 'rsolr-ext'
9
9
  require 'capybara/rspec'
10
10
  Combustion.initialize!
11
11
 
12
- Blacklight.solr_config = { :url => 'http://127.0.0.1:8983/solr' }
13
-
14
- class SolrDocument
15
- include Blacklight::Solr::Document
16
- end
17
-
18
12
  require 'rspec/rails'
19
13
  require 'capybara/rails'
20
14
 
metadata CHANGED
@@ -1,146 +1,167 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: blacklight_range_limit
3
- version: !ruby/object:Gem::Version
4
- hash: 27
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.2.3
5
5
  prerelease:
6
- segments:
7
- - 1
8
- - 2
9
- - 2
10
- version: 1.2.2
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Jonathan Rochkind
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-04-12 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2012-10-12 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
21
15
  name: rails
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
24
17
  none: false
25
- requirements:
18
+ requirements:
26
19
  - - ~>
27
- - !ruby/object:Gem::Version
28
- hash: 7
29
- segments:
30
- - 3
31
- - 0
32
- version: "3.0"
20
+ - !ruby/object:Gem::Version
21
+ version: '3.0'
33
22
  type: :runtime
34
- version_requirements: *id001
35
- - !ruby/object:Gem::Dependency
36
- name: jquery-rails
37
23
  prerelease: false
38
- requirement: &id002 !ruby/object:Gem::Requirement
39
- none: false
40
- requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- hash: 3
44
- segments:
45
- - 0
46
- version: "0"
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '3.0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: jquery-rails
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
47
38
  type: :runtime
48
- version_requirements: *id002
49
- - !ruby/object:Gem::Dependency
50
- name: blacklight
51
39
  prerelease: false
52
- requirement: &id003 !ruby/object:Gem::Requirement
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: blacklight
48
+ requirement: !ruby/object:Gem::Requirement
53
49
  none: false
54
- requirements:
50
+ requirements:
55
51
  - - ~>
56
- - !ruby/object:Gem::Version
57
- hash: 3
58
- segments:
59
- - 3
60
- - 2
61
- version: "3.2"
52
+ - !ruby/object:Gem::Version
53
+ version: '3.2'
62
54
  type: :runtime
63
- version_requirements: *id003
64
- - !ruby/object:Gem::Dependency
65
- name: rspec
66
55
  prerelease: false
67
- requirement: &id004 !ruby/object:Gem::Requirement
68
- none: false
69
- requirements:
70
- - - ">="
71
- - !ruby/object:Gem::Version
72
- hash: 3
73
- segments:
74
- - 0
75
- version: "0"
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '3.2'
62
+ - !ruby/object:Gem::Dependency
63
+ name: rspec
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
76
70
  type: :development
77
- version_requirements: *id004
78
- - !ruby/object:Gem::Dependency
79
- name: rspec-rails
80
71
  prerelease: false
81
- requirement: &id005 !ruby/object:Gem::Requirement
82
- none: false
83
- requirements:
84
- - - ">="
85
- - !ruby/object:Gem::Version
86
- hash: 3
87
- segments:
88
- - 0
89
- version: "0"
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ - !ruby/object:Gem::Dependency
79
+ name: rspec-rails
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
90
86
  type: :development
91
- version_requirements: *id005
92
- - !ruby/object:Gem::Dependency
93
- name: capybara
94
87
  prerelease: false
95
- requirement: &id006 !ruby/object:Gem::Requirement
96
- none: false
97
- requirements:
98
- - - ">="
99
- - !ruby/object:Gem::Version
100
- hash: 3
101
- segments:
102
- - 0
103
- version: "0"
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ - !ruby/object:Gem::Dependency
95
+ name: capybara
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
104
102
  type: :development
105
- version_requirements: *id006
106
- - !ruby/object:Gem::Dependency
107
- name: sqlite3
108
103
  prerelease: false
109
- requirement: &id007 !ruby/object:Gem::Requirement
110
- none: false
111
- requirements:
112
- - - ">="
113
- - !ruby/object:Gem::Version
114
- hash: 3
115
- segments:
116
- - 0
117
- version: "0"
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ - !ruby/object:Gem::Dependency
111
+ name: sqlite3
112
+ requirement: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - ! '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
118
  type: :development
119
- version_requirements: *id007
120
- - !ruby/object:Gem::Dependency
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ! '>='
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
126
+ - !ruby/object:Gem::Dependency
121
127
  name: launchy
128
+ requirement: !ruby/object:Gem::Requirement
129
+ none: false
130
+ requirements:
131
+ - - ! '>='
132
+ - !ruby/object:Gem::Version
133
+ version: '0'
134
+ type: :development
122
135
  prerelease: false
123
- requirement: &id008 !ruby/object:Gem::Requirement
124
- none: false
125
- requirements:
126
- - - ">="
127
- - !ruby/object:Gem::Version
128
- hash: 3
129
- segments:
130
- - 0
131
- version: "0"
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
138
+ requirements:
139
+ - - ! '>='
140
+ - !ruby/object:Gem::Version
141
+ version: '0'
142
+ - !ruby/object:Gem::Dependency
143
+ name: jettywrapper
144
+ requirement: !ruby/object:Gem::Requirement
145
+ none: false
146
+ requirements:
147
+ - - ! '>='
148
+ - !ruby/object:Gem::Version
149
+ version: '0'
132
150
  type: :development
133
- version_requirements: *id008
151
+ prerelease: false
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
154
+ requirements:
155
+ - - ! '>='
156
+ - !ruby/object:Gem::Version
157
+ version: '0'
134
158
  description:
135
- email:
159
+ email:
136
160
  - blacklight-development@googlegroups.com
137
161
  executables: []
138
-
139
162
  extensions: []
140
-
141
163
  extra_rdoc_files: []
142
-
143
- files:
164
+ files:
144
165
  - .gitignore
145
166
  - Gemfile
146
167
  - MIT-LICENSE
@@ -184,38 +205,29 @@ files:
184
205
  - vendor/assets/javascripts/flot/jquery.flot.selection.js
185
206
  homepage: http://projectblacklight.org/
186
207
  licenses: []
187
-
188
208
  post_install_message:
189
209
  rdoc_options: []
190
-
191
- require_paths:
210
+ require_paths:
192
211
  - lib
193
- required_ruby_version: !ruby/object:Gem::Requirement
212
+ required_ruby_version: !ruby/object:Gem::Requirement
194
213
  none: false
195
- requirements:
196
- - - ">="
197
- - !ruby/object:Gem::Version
198
- hash: 3
199
- segments:
200
- - 0
201
- version: "0"
202
- required_rubygems_version: !ruby/object:Gem::Requirement
214
+ requirements:
215
+ - - ! '>='
216
+ - !ruby/object:Gem::Version
217
+ version: '0'
218
+ required_rubygems_version: !ruby/object:Gem::Requirement
203
219
  none: false
204
- requirements:
205
- - - ">="
206
- - !ruby/object:Gem::Version
207
- hash: 3
208
- segments:
209
- - 0
210
- version: "0"
220
+ requirements:
221
+ - - ! '>='
222
+ - !ruby/object:Gem::Version
223
+ version: '0'
211
224
  requirements: []
212
-
213
225
  rubyforge_project: blacklight
214
- rubygems_version: 1.8.15
226
+ rubygems_version: 1.8.24
215
227
  signing_key:
216
228
  specification_version: 3
217
229
  summary: Blacklight Range Limit plugin
218
- test_files:
230
+ test_files:
219
231
  - spec/acceptance/blacklight_range_limit_spec.rb
220
232
  - spec/integration/blacklight_stub_spec.rb
221
233
  - spec/internal/app/controllers/application_controller.rb