geoblacklight 1.6.0 → 1.7.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: d3c10c3715efdc9443e4deec764b0d3d7855fc11
4
- data.tar.gz: cdce289bfb3b6427ed07c3b68a09f5626bd49298
3
+ metadata.gz: bb4ed10cd413d3a4e9d2dad9426f3daec4fd2ca2
4
+ data.tar.gz: 913bff7e68d24e3c7ff712691ec68425e804656a
5
5
  SHA512:
6
- metadata.gz: d7e11f1386470600bdb5052784c0edfadd4d4b82f18a866a2275499e9574fd536869c79e15f8c8f5f55cf01b24e19605e0e40d2b21c671717a6c247f3e91b3dc
7
- data.tar.gz: ff81e343deba1e7cb2f76b11ec9a4a80e9e170e8ea025bf2958297bb73ecac62f69087a3e2d333fdbfa9372c5c51622508f8d8394647c2a3a9c63515dc8d5c70
6
+ metadata.gz: aa35b2e12fc1ee5056e74bf6bb6a2f068db3c35968f874025f4100815267cbe85fbc596dc2cfb29e3cf4f62b63f6534b77d067ed7297437c89cef66e05f87401
7
+ data.tar.gz: 9bae8b906915dc34bfec3b4f22e02157cab44c4aeed8dda2e69856942d1e309ac1342bcc23bcde35cf80809d78691e76717d4d3be470da01faf8c1ffa851586a
data/CONTRIBUTING.md CHANGED
@@ -25,7 +25,7 @@ GeoBlacklight welcomes code and documentation contributions. We follow the [pull
25
25
 
26
26
  #### Merging Changes
27
27
 
28
- - It is considered "poor from" to merge your own request.
28
+ - It is considered "poor form" to merge your own request.
29
29
  - Please take the time to review the changes and get a sense of what is being changed. Things to consider:
30
30
  - Does the commit message explain what is going on?
31
31
  - Does the code changes have tests? _Not all changes need new tests, some changes are refactorings_
@@ -23,6 +23,7 @@
23
23
  @import 'modules/metadata_content';
24
24
  @import 'modules/metadata_missing';
25
25
  @import 'modules/metadata_markup';
26
+ @import 'modules/modal';
26
27
  @import 'modules/results';
27
28
  @import 'modules/geosearch';
28
29
  @import 'modules/search_widgets';
@@ -0,0 +1,14 @@
1
+ .modal-header, .modal-body, .modal-footer {
2
+ .hide-without-js {
3
+ display: none;
4
+ }
5
+ }
6
+
7
+ #ajax-modal {
8
+ .modal-header, .modal-body, .modal-footer {
9
+ .hide-without-js {
10
+ display: inline-block;
11
+ }
12
+ }
13
+
14
+ }
@@ -1 +1,11 @@
1
- <%= render :partial => 'metadata' %>
1
+ <div class="modal-header">
2
+ <button type="button" class="ajax-modal-close close" data-dismiss="modal" aria-hidden="true">×</button>
3
+ <h3 class="modal-title">View Metadata</h3>
4
+ </div>
5
+ <div class="modal-body">
6
+ <%= render partial: 'metadata' %>
7
+ </div>
8
+ <div class="modal-footer">
9
+ <button type="button" class="btn btn-default hide-without-js" data-dismiss="modal">Close</button>
10
+ <a href="#" target="_blank" rel="noopener noreferrer" id="btn-metadata-download" class="btn btn-primary">Download</a>
11
+ </div>
@@ -1 +1,10 @@
1
- <%= render :partial => 'web_services' %>
1
+ <div class="modal-header">
2
+ <button type="button" class="ajax-modal-close close" data-dismiss="modal" aria-hidden="true">×</button>
3
+ <h1 class="modal-title">Web services</h1>
4
+ <div class="modal-body">
5
+ <%= render partial: 'web_services' %>
6
+ </div>
7
+ <div class="modal-footer">
8
+ <button type="button" class="btn btn-default hide-without-js" data-dismiss="modal">Close</button>
9
+ </div>
10
+ </div>
@@ -1,4 +1,6 @@
1
- <b><%= t('geoblacklight.relations.ancestor') %></b>
1
+ <li>
2
+ <b><%= t('geoblacklight.relations.ancestor') %></b>
3
+ </li>
2
4
  <% @relations.ancestors['docs'].each do |ancestor| %>
3
5
  <li>
4
6
  <%= link_to solr_document_path(ancestor['layer_slug_s']) do %>
@@ -1,4 +1,6 @@
1
- <b><%= t('geoblacklight.relations.descendant', count: @relations.descendants['numFound']) %></b>
1
+ <li>
2
+ <b><%= t('geoblacklight.relations.descendant', count: @relations.descendants['numFound']) %></b>
3
+ </li>
2
4
  <% @relations.descendants['docs'][0..2].each do |descendant| %>
3
5
  <li>
4
6
  <%= link_to solr_document_path(descendant['layer_slug_s']) do %>
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
  spec.required_rubygems_version = '>= 2.5.2'
21
21
 
22
22
  spec.add_dependency 'rails', '~> 5.0'
23
- spec.add_dependency 'blacklight', '~> 6.10'
23
+ spec.add_dependency 'blacklight', '~> 6.11'
24
24
  spec.add_dependency 'leaflet-rails', '~> 0.7.3'
25
25
  spec.add_dependency 'font-awesome-rails'
26
26
  spec.add_dependency 'config'
@@ -30,6 +30,7 @@ Gem::Specification.new do |spec|
30
30
  spec.add_dependency 'geoblacklight-icons', '>= 0.2'
31
31
  spec.add_dependency 'deprecation'
32
32
  spec.add_dependency 'geo_combine', '>= 0.3'
33
+ spec.add_dependency 'mime-types'
33
34
 
34
35
  spec.add_development_dependency 'solr_wrapper'
35
36
  spec.add_development_dependency 'rails-controller-testing'
@@ -7,25 +7,27 @@ module Geoblacklight
7
7
  desc 'Install Geoblacklight'
8
8
 
9
9
  def mount_geoblacklight_engine
10
- route "mount Geoblacklight::Engine => 'geoblacklight'"
10
+ inject_into_file 'config/routes.rb', "mount Geoblacklight::Engine => 'geoblacklight'\n", before: /^end/
11
11
  end
12
12
 
13
13
  def inject_geoblacklight_routes
14
- route <<-EOF.strip_heredoc
15
- concern :gbl_exportable, Geoblacklight::Routes::Exportable.new
16
- resources :solr_documents, only: [:show], path: '/catalog', controller: 'catalog' do
17
- concerns :gbl_exportable
18
- end
19
- concern :gbl_wms, Geoblacklight::Routes::Wms.new
20
- namespace :wms do
21
- concerns :gbl_wms
22
- end
23
- concern :gbl_downloadable, Geoblacklight::Routes::Downloadable.new
24
- namespace :download do
25
- concerns :gbl_downloadable
26
- end
27
- resources :download, only: [:show]
28
- EOF
14
+ routes = <<-"ROUTES"
15
+ concern :gbl_exportable, Geoblacklight::Routes::Exportable.new
16
+ resources :solr_documents, only: [:show], path: '/catalog', controller: 'catalog' do
17
+ concerns :gbl_exportable
18
+ end
19
+ concern :gbl_wms, Geoblacklight::Routes::Wms.new
20
+ namespace :wms do
21
+ concerns :gbl_wms
22
+ end
23
+ concern :gbl_downloadable, Geoblacklight::Routes::Downloadable.new
24
+ namespace :download do
25
+ concerns :gbl_downloadable
26
+ end
27
+ resources :download, only: [:show]
28
+ ROUTES
29
+
30
+ inject_into_file 'config/routes.rb', routes, before: /^end/
29
31
  end
30
32
 
31
33
  def assets
@@ -3,10 +3,20 @@ module Geoblacklight
3
3
  extend ActiveSupport::Concern
4
4
  def web_services
5
5
  @response, @document = fetch params[:id]
6
+ respond_to do |format|
7
+ format.html do
8
+ return render layout: false if request.xhr?
9
+ end
10
+ end
6
11
  end
7
12
 
8
13
  def metadata
9
14
  @response, @document = fetch params[:id]
15
+ respond_to do |format|
16
+ format.html do
17
+ return render layout: false if request.xhr?
18
+ end
19
+ end
10
20
  end
11
21
  end
12
22
  end
@@ -7,6 +7,7 @@ require 'faraday'
7
7
  require 'faraday_middleware'
8
8
  require 'nokogiri'
9
9
  require 'geoblacklight-icons'
10
+ require 'mime/types'
10
11
 
11
12
  module Geoblacklight
12
13
  class Engine < ::Rails::Engine
@@ -1,3 +1,3 @@
1
1
  module Geoblacklight
2
- VERSION = '1.6.0'.freeze
2
+ VERSION = '1.7.0'.freeze
3
3
  end
@@ -0,0 +1,8 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'Catalog Routes', type: :routing do
4
+ # Test paths for custom routes
5
+ it "maps { :controller => 'catalog', :action => 'opensearch', :format => 'xml' } to /catalog/opensearch.xml" do
6
+ expect(get: '/catalog/opensearch.xml').to route_to(controller: 'catalog', action: 'opensearch', format: 'xml')
7
+ end
8
+ end
data/spec/spec_helper.rb CHANGED
@@ -14,7 +14,7 @@ require 'selenium-webdriver'
14
14
 
15
15
  Capybara.register_driver(:headless_chrome) do |app|
16
16
  capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
17
- chromeOptions: { args: %w(headless disable-gpu) }
17
+ chromeOptions: { args: %w(headless disable-gpu window-size=1280,1024) }
18
18
  )
19
19
 
20
20
  Capybara::Selenium::Driver.new(app,
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.6.0
4
+ version: 1.7.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: 2017-08-23 00:00:00.000000000 Z
14
+ date: 2017-12-14 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rails
@@ -33,14 +33,14 @@ dependencies:
33
33
  requirements:
34
34
  - - "~>"
35
35
  - !ruby/object:Gem::Version
36
- version: '6.10'
36
+ version: '6.11'
37
37
  type: :runtime
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
41
  - - "~>"
42
42
  - !ruby/object:Gem::Version
43
- version: '6.10'
43
+ version: '6.11'
44
44
  - !ruby/object:Gem::Dependency
45
45
  name: leaflet-rails
46
46
  requirement: !ruby/object:Gem::Requirement
@@ -167,6 +167,20 @@ dependencies:
167
167
  - - ">="
168
168
  - !ruby/object:Gem::Version
169
169
  version: '0.3'
170
+ - !ruby/object:Gem::Dependency
171
+ name: mime-types
172
+ requirement: !ruby/object:Gem::Requirement
173
+ requirements:
174
+ - - ">="
175
+ - !ruby/object:Gem::Version
176
+ version: '0'
177
+ type: :runtime
178
+ prerelease: false
179
+ version_requirements: !ruby/object:Gem::Requirement
180
+ requirements:
181
+ - - ">="
182
+ - !ruby/object:Gem::Version
183
+ version: '0'
170
184
  - !ruby/object:Gem::Dependency
171
185
  name: solr_wrapper
172
186
  requirement: !ruby/object:Gem::Requirement
@@ -365,6 +379,7 @@ files:
365
379
  - app/assets/stylesheets/geoblacklight/modules/metadata_markup.scss
366
380
  - app/assets/stylesheets/geoblacklight/modules/metadata_missing.scss
367
381
  - app/assets/stylesheets/geoblacklight/modules/mixins.scss
382
+ - app/assets/stylesheets/geoblacklight/modules/modal.scss
368
383
  - app/assets/stylesheets/geoblacklight/modules/results.scss
369
384
  - app/assets/stylesheets/geoblacklight/modules/search_widgets.scss
370
385
  - app/assets/stylesheets/geoblacklight/modules/toolbar.scss
@@ -409,12 +424,10 @@ files:
409
424
  - app/views/catalog/_web_services_wms.html.erb
410
425
  - app/views/catalog/index.html.erb
411
426
  - app/views/catalog/metadata.html.erb
412
- - app/views/catalog/metadata.js.erb
413
427
  - app/views/catalog/metadata/_content.html.erb
414
428
  - app/views/catalog/metadata/_markup.html.erb
415
429
  - app/views/catalog/metadata/_missing.html.erb
416
430
  - app/views/catalog/web_services.html.erb
417
- - app/views/catalog/web_services.js.erb
418
431
  - app/views/download/hgl.html.erb
419
432
  - app/views/relation/_ancestors.html.erb
420
433
  - app/views/relation/_descendants.html.erb
@@ -571,6 +584,7 @@ files:
571
584
  - spec/models/concerns/geoblacklight/solr_document/inspection_spec.rb
572
585
  - spec/models/concerns/geoblacklight/solr_document_spec.rb
573
586
  - spec/models/concerns/geoblacklight/spatial_search_behavior_spec.rb
587
+ - spec/routing/catalog_routing_spec.rb
574
588
  - spec/spec_helper.rb
575
589
  - spec/support/backport_test_helpers.rb
576
590
  - spec/support/features.rb
@@ -610,7 +624,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
610
624
  version: 2.5.2
611
625
  requirements: []
612
626
  rubyforge_project:
613
- rubygems_version: 2.6.10
627
+ rubygems_version: 2.6.14
614
628
  signing_key:
615
629
  specification_version: 4
616
630
  summary: A discovery platform for geospatial holdings
@@ -702,6 +716,7 @@ test_files:
702
716
  - spec/models/concerns/geoblacklight/solr_document/inspection_spec.rb
703
717
  - spec/models/concerns/geoblacklight/solr_document_spec.rb
704
718
  - spec/models/concerns/geoblacklight/spatial_search_behavior_spec.rb
719
+ - spec/routing/catalog_routing_spec.rb
705
720
  - spec/spec_helper.rb
706
721
  - spec/support/backport_test_helpers.rb
707
722
  - spec/support/features.rb
@@ -1,11 +0,0 @@
1
- <div class="modal-header">
2
- <button type="button" class="ajax-modal-close close" data-dismiss="modal" aria-hidden="true">×</button>
3
- <h3 class="modal-title">View Metadata</h3>
4
- </div>
5
- <div class="modal-body">
6
- <%= render partial: 'metadata' %>
7
- </div>
8
- <div class="modal-footer">
9
- <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
10
- <a href="#" target="_blank" rel="noopener noreferrer" id="btn-metadata-download" class="btn btn-primary">Download</a>
11
- </div>
@@ -1,7 +0,0 @@
1
- <div class="modal-header">
2
- <button type="button" class="ajax-modal-close close" data-dismiss="modal" aria-hidden="true">×</button>
3
- <h1 class="modal-title">Web services</h1>
4
- <div class="modal-body">
5
- <%= render partial: 'web_services' %>
6
- </div>
7
- </div>