geoblacklight 1.1.2 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3fbbd1cee6968a57c66c02b5feeecc88c1db0b40
4
- data.tar.gz: 449649509ad18a912fcaa748a1b77fbe5e0fa1e8
3
+ metadata.gz: 2790f480cb5d55cf12f7cb2833a40fbd366d72c9
4
+ data.tar.gz: b72946fc1299ff88dcb829dde41b2060ca53195a
5
5
  SHA512:
6
- metadata.gz: 02e426d0152ffa9e06c4d2a55e2ac300ed40f6419ed068095b19d6acc0d8051963ed44d53722497598612a9a5fb11e540ac5ced525da7c0ff5f81f40a0753cb5
7
- data.tar.gz: 434bc34f80ecd636a5e88ee72f8201b1660a80359c0f8a95ed38411347c8c3fe90296531a6be92bbb0a154a3f04a8daebcd6f5a8a9433a00146a45671df554cf
6
+ metadata.gz: 08ef76ebafe288ba94d401d88af615b56f4dc531df078cc3308ff8e7952001aa49a00b7c437ef4570d860a6c7718b95bc83b8b6ff683190e393cf90171f92e66
7
+ data.tar.gz: bbd8456833a4c4bec1c978cdc3edaf82913cd6517e8c961795e8d1d3a7a6b8c308987d0312061b57be50677ba3f141a32b0ee4675b1c3857817ec93f34a2f091
@@ -20,7 +20,7 @@
20
20
 
21
21
  var GeoBlacklight = L.Class.extend({
22
22
  statics: {
23
- __version__: '1.1.2',
23
+ __version__: '1.2.0',
24
24
 
25
25
  debounce: function(fn, delay) {
26
26
  var timeout = null;
@@ -39,7 +39,7 @@ module GeoblacklightHelper
39
39
  def geoblacklight_icon(name)
40
40
  content_tag :span,
41
41
  '',
42
- class: "geoblacklight-icon geoblacklight-#{name.downcase.tr(' ', '-')}",
42
+ class: "geoblacklight-icon geoblacklight-#{name.parameterize}",
43
43
  title: name
44
44
  end
45
45
 
@@ -1,3 +1,3 @@
1
1
  module Geoblacklight
2
- VERSION = '1.1.2'.freeze
2
+ VERSION = '1.2.0'.freeze
3
3
  end
@@ -1,10 +1,10 @@
1
- require 'solr_wrapper'
2
1
  require 'rails/generators'
3
2
  require 'generators/geoblacklight/install_generator'
4
3
 
5
4
  namespace :geoblacklight do
6
5
  desc 'Run Solr and GeoBlacklight for interactive development'
7
6
  task :server, [:rails_server_args] do |_t, args|
7
+ require 'solr_wrapper'
8
8
  SolrWrapper.wrap(port: '8983') do |solr|
9
9
  solr.with_collection(name: 'blacklight-core', dir: File.join(File.expand_path('../../', File.dirname(__FILE__)), 'solr', 'conf')) do
10
10
  puts "\nSolr server running: http://localhost:#{solr.port}/solr/#/blacklight-core"
@@ -3,8 +3,7 @@
3
3
  "description": "Schema for GeoBlacklight. See https://github.com/geoblacklight/geoblacklight/wiki/Schema for more details.",
4
4
  "id": "http://geoblacklight.org/v1.0/schema",
5
5
  "title": "GeoBlacklight Schema",
6
- "type": "array",
7
- "properties": {
6
+ "definitions": {
8
7
  "layer": {
9
8
  "title": "layer",
10
9
  "description": "A GIS data layer. See [this example](https://github.com/OpenGeoMetadata/edu.stanford.purl/blob/master/bb/099/zb/1450/geoblacklight.json) metadata layer.",
@@ -201,5 +200,15 @@
201
200
  }
202
201
  }
203
202
  }
204
- }
203
+ },
204
+ "anyOf": [
205
+ {
206
+ "$ref": "#/definitions/layer"
207
+ }, {
208
+ "type": "array",
209
+ "items": {
210
+ "$ref": "#/definitions/layer"
211
+ }
212
+ }
213
+ ]
205
214
  }
@@ -16,10 +16,21 @@ describe GeoblacklightHelper, type: :helper do
16
16
  end
17
17
 
18
18
  describe '#geoblacklight_icon' do
19
- it 'lowercases and subs spaces for hyphens' do
20
- html = Capybara.string(geoblacklight_icon('TEst 123'))
19
+ it 'replaces special characters, lowercases, and subs spaces for hyphens' do
20
+ html = Capybara.string(geoblacklight_icon('TEst & 123'))
21
21
  expect(html).to have_css '.geoblacklight-test-123'
22
22
  end
23
+ it 'supports in use cases' do
24
+ {
25
+ 'Paper map' => 'paper-map',
26
+ 'Michigan State' => 'michigan-state',
27
+ 'CD ROM' => 'cd-rom',
28
+ 'Lewis & Clark' => 'lewis-clark'
29
+ }.each do |key, value|
30
+ html = Capybara.string(geoblacklight_icon(key))
31
+ expect(html).to have_css ".geoblacklight-#{value}"
32
+ end
33
+ end
23
34
  end
24
35
 
25
36
  describe '#proper_case_format' do
@@ -0,0 +1 @@
1
+ ../fixtures/solr_documents
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geoblacklight
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Graves
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2016-08-12 00:00:00.000000000 Z
14
+ date: 2016-09-09 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rails
@@ -495,6 +495,7 @@ files:
495
495
  - spec/support/features/session_helpers.rb
496
496
  - spec/teaspoon_env.rb
497
497
  - spec/test_app_templates/lib/generators/test_app_generator.rb
498
+ - spec/test_app_templates/solr_documents
498
499
  - spec/views/catalog/_document_split.html.erb_spec.rb
499
500
  - spec/views/catalog/_downloads.html.erb_spec.rb
500
501
  - spec/views/catalog/_index_split.html.erb_spec.rb
@@ -523,7 +524,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
523
524
  version: 2.5.2
524
525
  requirements: []
525
526
  rubyforge_project:
526
- rubygems_version: 2.4.8
527
+ rubygems_version: 2.5.1
527
528
  signing_key:
528
529
  specification_version: 4
529
530
  summary: A discovery platform for geospatial holdings
@@ -600,6 +601,7 @@ test_files:
600
601
  - spec/support/features/session_helpers.rb
601
602
  - spec/teaspoon_env.rb
602
603
  - spec/test_app_templates/lib/generators/test_app_generator.rb
604
+ - spec/test_app_templates/solr_documents
603
605
  - spec/views/catalog/_document_split.html.erb_spec.rb
604
606
  - spec/views/catalog/_downloads.html.erb_spec.rb
605
607
  - spec/views/catalog/_index_split.html.erb_spec.rb