geoblacklight 0.10.1 → 0.10.2

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: fb161150e767dc710a684cfc1b1ce58c50fdb432
4
- data.tar.gz: 8d6fee0b74b5b103065a504f2d0e2c10d6ef0ee2
3
+ metadata.gz: 011958937e26e5422c1365a2ffbdafb22da97478
4
+ data.tar.gz: e9201eb061d67072de1372c24066ce352a29acd3
5
5
  SHA512:
6
- metadata.gz: 33ee645d8ed2522561f4fdc9614bde529c0ad3d02dbce805a0969f1427486222f63d874cb8070ac3e8661ebed69849999a8ebeadbd17457c0c2a4f7f2a4edfb1
7
- data.tar.gz: 25d38f1a47e47bb05901a0720069a83266a5514c8797d69e1fff4bc65427539bada76dfe1dfa98c1ece3d073ee4539b3f021087dde7be74125b3f31d47d00b8b
6
+ metadata.gz: 34843481a05279c3bf2935312873dd99298e14f5070f2baacd88939fb36f891982dbaae8dbd29dd841b182c1812c0ad26dcced0a45db0d1784437724593cdb91
7
+ data.tar.gz: 1107f1be59b0188378e712a55258abcc232462831cf0a8b8107170d43503dd91ab8d4c027ea92071b755e34ddfb7822bdca933ac71e95aabeaf62b3ee4529122
data/Gemfile CHANGED
@@ -8,12 +8,6 @@ gemspec
8
8
  # it'll want sprockets 2.11.0 and we'll have a conflict
9
9
  gem 'sprockets', '2.11.0'
10
10
 
11
- # If we don't specify 3.2.15 we'll end up with sass 3.3.2 in the main
12
- # Gemfile.lock but since sass-rails gets generated (rails new) into the test app
13
- # it'll want sass 3.2.0 and we'll have a conflict
14
- gem 'sass', '~> 3.2.0'
15
- gem 'bootstrap-sass', ">= 3.2"
16
-
17
11
  group :test do
18
12
  # Peg simplecov to < 0.8 until this is resolved:
19
13
  # https://github.com/colszowka/simplecov/issues/281
data/Rakefile CHANGED
@@ -27,6 +27,11 @@ task :fixtures => ['engine_cart:generate'] do
27
27
  end
28
28
  end
29
29
 
30
+ desc 'Run Teaspoon JavaScript tests'
31
+ task :teaspoon do
32
+ system("TEASPOON_RAILS_ENV='./spec/internal/config/environment' teaspoon --require=spec/internal/spec/teaspoon_env.rb")
33
+ end
34
+
30
35
  desc "Execute Continuous Integration build"
31
36
  task :ci do
32
37
  if Rails.env.test?
@@ -43,6 +48,8 @@ task :ci do
43
48
  # run the tests
44
49
  Rake::Task["spec"].invoke
45
50
  end
51
+ # Run JavaScript tests
52
+ Rake::Task['teaspoon'].invoke
46
53
  else
47
54
  system('rake ci RAILS_ENV=test')
48
55
  end
@@ -37,3 +37,8 @@
37
37
  .geoblacklight-metadata {
38
38
  @extend .fa, .fa-file-text-o;
39
39
  }
40
+
41
+ .geoblacklight-cartodb {
42
+ @extend .fa, .fa-map-marker;
43
+ }
44
+
@@ -27,4 +27,9 @@
27
27
  text-align: center;
28
28
  width: 1.4em;
29
29
  }
30
+
31
+ .geoblacklight-cartodb {
32
+ text-align: center;
33
+ width: 1.4em;
34
+ }
30
35
  }
@@ -91,4 +91,17 @@ module GeoblacklightHelper
91
91
  def geoblacklight_basemap
92
92
  blacklight_config.basemap_provider || 'mapquest'
93
93
  end
94
+
95
+ ##
96
+ # Creates a CartoDB OneClick link link, using the configuration link
97
+ # @param [String] file_link
98
+ # @return [String]
99
+ def cartodb_link(file_link)
100
+ params = URI.encode_www_form(
101
+ file: file_link,
102
+ provider: application_name,
103
+ logo: Settings.APPLICATION_LOGO_URL
104
+ )
105
+ Settings.CARTODB_ONECLICK_LINK + '?' + params
106
+ end
94
107
  end
@@ -0,0 +1,6 @@
1
+ <% document ||= @document %>
2
+ <% if document.cartodb_reference.present? %>
3
+ <%= link_to(cartodb_link(document.cartodb_reference), target: '_blank') do %>
4
+ <span class='geoblacklight geoblacklight-cartodb'></span>Open in CartoDB
5
+ <% end %>
6
+ <% end %>
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
  spec.add_dependency 'leaflet-rails', '~> 0.7.3'
23
23
  spec.add_dependency 'blacklight_range_limit', '~> 5.0.3'
24
24
  spec.add_dependency 'font-awesome-rails', '~> 4.1.0.0'
25
- spec.add_dependency 'rails_config'
25
+ spec.add_dependency 'rails_config', '~> 0.4.2'
26
26
  spec.add_dependency 'faraday'
27
27
  spec.add_dependency 'coderay'
28
28
  spec.add_dependency 'geoblacklight-icons', '>= 0.2'
@@ -211,6 +211,7 @@ class CatalogController < ApplicationController
211
211
  # Custom tools for GeoBlacklight
212
212
  config.add_show_tools_partial :web_services, if: proc { |_context, _config, options| options[:document] && (Settings.WEBSERVICES_SHOWN & options[:document].references.refs.map(&:type).map(&:to_s)).any? }
213
213
  config.add_show_tools_partial :metadata, if: proc { |_context, _config, options| options[:document] && (Settings.METADATA_SHOWN & options[:document].references.refs.map(&:type).map(&:to_s)).any? }
214
+ config.add_show_tools_partial :exports, partial: 'exports', if: proc { |_context, _config, options| options[:document] }
214
215
  config.add_show_tools_partial :downloads, partial: 'downloads', if: proc { |_context, _config, options| options[:document] }
215
216
 
216
217
  # Configure basemap provider for GeoBlacklight maps (uses https only basemap
@@ -1,3 +1,9 @@
1
+ # Configurable Logo Used for CartoDB export
2
+ APPLICATION_LOGO_URL: 'http://geoblacklight.org/images/geoblacklight-logo.png'
3
+
4
+ # CartoDB OneClick Service https://cartodb.com/open-in-cartodb/
5
+ CARTODB_ONECLICK_LINK: 'http://oneclick.cartodb.com/'
6
+
1
7
  # Download path can be configured using this setting
2
8
  #DOWNLOAD_PATH: "./tmp/cache/downloads"
3
9
 
@@ -10,6 +10,7 @@ module Geoblacklight
10
10
  require 'geoblacklight/view_helper_override'
11
11
  require 'geoblacklight/item_viewer'
12
12
  require 'geoblacklight/solr_document/finder'
13
+ require 'geoblacklight/solr_document/carto_db'
13
14
  require 'geoblacklight/solr_document'
14
15
  require 'geoblacklight/wms_layer'
15
16
  require 'geoblacklight/wms_layer/feature_info_response'
@@ -74,6 +74,13 @@ module Geoblacklight
74
74
  raise Geoblacklight::Exceptions::ExternalDownloadFailed, message: 'Download timed out', url: conn.url_prefix.to_s
75
75
  end
76
76
 
77
+ ##
78
+ # Creates a download url for the object
79
+ # @return [String]
80
+ def url_with_params
81
+ url + '/?' + URI.encode_www_form(@options[:request_params])
82
+ end
83
+
77
84
  private
78
85
 
79
86
  ##
@@ -4,6 +4,7 @@ module Geoblacklight
4
4
  extend Blacklight::Solr::Document
5
5
 
6
6
  include Geoblacklight::SolrDocument::Finder
7
+ include Geoblacklight::SolrDocument::CartoDb
7
8
 
8
9
  delegate :download_types, to: :references
9
10
  delegate :viewer_protocol, to: :item_viewer
@@ -0,0 +1,15 @@
1
+ module Geoblacklight
2
+ module SolrDocument
3
+ ##
4
+ # Module for providing external CartoDB download references for a document
5
+ module CartoDb
6
+ ##
7
+ # Returns a url to a file that should be used with CartoDB integration
8
+ # @return [String]
9
+ def cartodb_reference
10
+ return unless public? && download_types.try(:[], :geojson).present?
11
+ Geoblacklight::GeojsonDownload.new(self).url_with_params
12
+ end
13
+ end
14
+ end
15
+ end
@@ -1,3 +1,3 @@
1
1
  module Geoblacklight
2
- VERSION = '0.10.1'
2
+ VERSION = '0.10.2'
3
3
  end
@@ -0,0 +1,19 @@
1
+ require 'spec_helper'
2
+
3
+ feature 'Export features' do
4
+ feature 'when item is public and wfs is available' do
5
+ feature 'Open in CartoDB' do
6
+ scenario 'shows up in tools' do
7
+ visit catalog_path 'tufts-cambridgegrid100-04'
8
+ expect(page).to have_css 'li.exports a', text: 'Open in CartoDB'
9
+ click_link 'Open in CartoDB'
10
+ end
11
+ end
12
+ end
13
+ feature 'when restricted or no wfs' do
14
+ scenario 'is not in tools' do
15
+ visit catalog_path 'princeton-02870w62c'
16
+ expect(page).to_not have_css 'li.exports a', text: 'Open in CartoDB'
17
+ end
18
+ end
19
+ end
@@ -8,7 +8,7 @@ feature 'Index view', js: true do
8
8
  scenario 'should have documents and map on page' do
9
9
  visit catalog_index_path(f: { dct_provenance_s: ['Stanford']})
10
10
  expect(page).to have_css('#documents')
11
- expect(page).to have_css(".document", count: 2)
11
+ expect(page).to have_css(".document", count: 3)
12
12
  expect(page).to have_css('#map')
13
13
  end
14
14
 
@@ -47,8 +47,8 @@ feature 'Index view', js: true do
47
47
 
48
48
  scenario 'spatial search should reset to page one' do
49
49
  visit '/?per_page=5&q=%2A&page=2'
50
- find("#map").double_click
51
- expect(find('.page_entries')).to have_content('1 - 2 of 2')
50
+ find('#map').double_click
51
+ expect(find('.page_entries')).to have_content(/^1 - \d of \d$/)
52
52
  end
53
53
 
54
54
  scenario 'clicking map search should retain current search parameters' do
@@ -0,0 +1,31 @@
1
+ {
2
+ "uuid": "http://purl.stanford.edu/cz128vq0535",
3
+ "dc_identifier_s": "http://purl.stanford.edu/cz128vq0535",
4
+ "dc_title_s": "2005 Rural Poverty GIS Database: Uganda",
5
+ "dc_description_s": "This polygon shapefile contains 2005 poverty data for 855 rural subcounties in Uganda. These data are intended for researchers, students, policy makers and the general public for reference and mapping purposes, and may be used for basic applications such as viewing, querying, and map output production.",
6
+ "dc_rights_s": "Public",
7
+ "dct_provenance_s": "Stanford",
8
+ "dct_references_s": "{\"http://schema.org/url\":\"http://purl.stanford.edu/cz128vq0535\",\"http://schema.org/downloadUrl\":\"http://stacks.stanford.edu/file/druid:cz128vq0535/data.zip\",\"http://www.loc.gov/mods/v3\":\"http://purl.stanford.edu/cz128vq0535.mods\",\"http://www.isotc211.org/schemas/2005/gmd/\":\"http://opengeometadata.stanford.edu/metadata/edu.stanford.purl/druid:cz128vq0535/iso19139.xml\",\"http://www.w3.org/1999/xhtml\":\"http://opengeometadata.stanford.edu/metadata/edu.stanford.purl/druid:cz128vq0535/default.html\",\"http://www.opengis.net/def/serviceType/ogc/wfs\":\"https://geowebservices.stanford.edu/geoserver/wfs\",\"http://www.opengis.net/def/serviceType/ogc/wms\":\"https://geowebservices.stanford.edu/geoserver/wms\"}",
9
+ "layer_id_s": "druid:cz128vq0535",
10
+ "layer_slug_s": "stanford-cz128vq0535",
11
+ "layer_geom_type_s": "Polygon",
12
+ "layer_modified_dt": "2015-04-16T23:02:57Z",
13
+ "dc_format_s": "Shapefile",
14
+ "dc_language_s": "English",
15
+ "dc_type_s": "Dataset",
16
+ "dc_publisher_s": "Uganda Bureau of Statistics",
17
+ "dc_creator_sm": "Uganda Bureau of Statistics",
18
+ "dc_subject_sm": [
19
+ "Poverty",
20
+ "Statistics"
21
+ ],
22
+ "dct_issued_s": "2005",
23
+ "dct_temporal_sm": "2005",
24
+ "dct_spatial_sm": "Uganda",
25
+ "dc_relation_sm": "http://sws.geonames.org/226074/about.rdf",
26
+ "georss_box_s": "-1.478794 29.572742 4.234077 35.000308",
27
+ "georss_polygon_s": "-1.478794 29.572742 4.234077 29.572742 4.234077 35.000308 -1.478794 35.000308 -1.478794 29.572742",
28
+ "solr_geom": "ENVELOPE(29.572742, 35.000308, 4.234077, -1.478794)",
29
+ "solr_year_i": 2005,
30
+ "stanford_rights_metadata_s": "<?xml version=\"1.0\"?>\n<rightsMetadata>\n <access type=\"discover\">\n <machine>\n <world/>\n </machine>\n </access>\n <access type=\"read\">\n <machine>\n <world/>\n </machine>\n </access>\n <use>\n <human type=\"useAndReproduction\">This item is in the public domain. There are no restrictions on use.</human>\n <human type=\"creativeCommons\"/>\n <machine type=\"creativeCommons\"/>\n </use>\n <copyright>\n <human>This work is in the Public Domain, meaning that it is not subject to copyright.</human>\n </copyright>\n</rightsMetadata>\n"
31
+ }
@@ -0,0 +1,13 @@
1
+ //= require geoblacklight
2
+
3
+ describe('GeoBlacklight', function() {
4
+ describe('loads and makes available libraries', function() {
5
+ it('Leaflet is defined', function() {
6
+ expect(L).toBeDefined();
7
+ });
8
+
9
+ it('History.js is defined', function() {
10
+ expect(History).toBeDefined();
11
+ });
12
+ });
13
+ });
@@ -0,0 +1,32 @@
1
+ // Teaspoon includes some support files, but you can use anything from your own support path too.
2
+ // require support/jasmine-jquery-1.7.0
3
+ // require support/jasmine-jquery-2.0.0
4
+ // require support/jasmine-jquery-2.1.0
5
+ // require support/sinon
6
+ // require support/your-support-file
7
+ //
8
+ // PhantomJS (Teaspoons default driver) doesn't have support for Function.prototype.bind, which has caused confusion.
9
+ // Use this polyfill to avoid the confusion.
10
+ //= require support/bind-poly
11
+ //
12
+ // You can require your own javascript files here. By default this will include everything in application, however you
13
+ // may get better load performance if you require the specific files that are being used in the spec that tests them.
14
+ //= require application
15
+ //
16
+ // Deferring execution
17
+ // If you're using CommonJS, RequireJS or some other asynchronous library you can defer execution. Call
18
+ // Teaspoon.execute() after everything has been loaded. Simple example of a timeout:
19
+ //
20
+ // Teaspoon.defer = true
21
+ // setTimeout(Teaspoon.execute, 1000)
22
+ //
23
+ // Matching files
24
+ // By default Teaspoon will look for files that match _spec.{js,js.coffee,.coffee}. Add a filename_spec.js file in your
25
+ // spec path and it'll be included in the default suite automatically. If you want to customize suites, check out the
26
+ // configuration in teaspoon_env.rb
27
+ //
28
+ // Manifest
29
+ // If you'd rather require your spec files manually (to control order for instance) you can disable the suite matcher in
30
+ // the configuration and use this file as a manifest.
31
+ //
32
+ // For more information: http://github.com/modeset/teaspoon
@@ -6,7 +6,7 @@ describe Geoblacklight::Download do
6
6
  let(:body) { double('body') }
7
7
  let(:document) { SolrDocument.new(layer_slug_s: 'test', dct_references_s: {'http://www.opengis.net/def/serviceType/ogc/wms' => 'http://www.example.com/wms'}.to_json) }
8
8
  let(:options) { { type: 'shapefile', extension: 'zip', service_type: 'wms', content_type: 'application/zip' } }
9
- let(:download) { Geoblacklight::Download.new(document, options) }
9
+ let(:download) { Geoblacklight::ShapefileDownload.new(document, options) }
10
10
 
11
11
  describe '#initialize' do
12
12
  it 'should initialize as a Download object' do
@@ -78,4 +78,11 @@ describe Geoblacklight::Download do
78
78
  expect { download.initiate_download }.to raise_error(Geoblacklight::Exceptions::ExternalDownloadFailed)
79
79
  end
80
80
  end
81
+ describe '#url_with_params' do
82
+ it 'creates a download url with params' do
83
+ expect(download.url_with_params).to eq 'http://www.example.com/wms/?ser' \
84
+ 'vice=wfs&version=2.0.0&request=GetFeature&srsName=EPSG%3A4326&output' \
85
+ 'format=SHAPE-ZIP&typeName'
86
+ end
87
+ end
81
88
  end
@@ -0,0 +1,30 @@
1
+ require 'spec_helper'
2
+
3
+ describe Geoblacklight::SolrDocument::CartoDb do
4
+ let(:subject) { SolrDocument.new }
5
+ describe '#cartodb_reference' do
6
+ it 'returns nil for restricted documents' do
7
+ expect(subject).to receive(:public?).and_return(false)
8
+ expect(subject.cartodb_reference).to be_nil
9
+ end
10
+ it 'returns nil for no download_types' do
11
+ expect(subject).to receive(:public?).and_return(true)
12
+ expect(subject).to receive(:download_types).and_return(nil)
13
+ expect(subject.cartodb_reference).to be_nil
14
+ end
15
+ it 'returns nil with no :geojson download type' do
16
+ expect(subject).to receive(:public?).and_return(true)
17
+ expect(subject).to receive(:download_types).and_return(geotiff: 'geotiff')
18
+ expect(subject.cartodb_reference).to be_nil
19
+ end
20
+ it 'Creates and returns a GeojsonDownload url' do
21
+ expect(subject).to receive(:public?).and_return(true)
22
+ expect(subject).to receive(:download_types)
23
+ .and_return(geojson: { 'stuff' => 'stuff' })
24
+ expect_any_instance_of(Geoblacklight::GeojsonDownload)
25
+ .to receive(:url_with_params)
26
+ .and_return('http://www.example.com/geojsonDownload')
27
+ expect(subject.cartodb_reference).to eq 'http://www.example.com/geojsonDownload'
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,178 @@
1
+ Teaspoon.configure do |config|
2
+ # Determines where the Teaspoon routes will be mounted. Changing this to "/jasmine" would allow you to browse to
3
+ # `http://localhost:3000/jasmine` to run your tests.
4
+ config.mount_at = "/teaspoon"
5
+
6
+ # Specifies the root where Teaspoon will look for files. If you're testing an engine using a dummy application it can
7
+ # be useful to set this to your engines root (e.g. `Teaspoon::Engine.root`).
8
+ # Note: Defaults to `Rails.root` if nil.
9
+ config.root = Geoblacklight::Engine.root
10
+
11
+ # Paths that will be appended to the Rails assets paths
12
+ # Note: Relative to `config.root`.
13
+ config.asset_paths = ["spec/javascripts", "spec/javascripts/stylesheets"]
14
+
15
+ # Fixtures are rendered through a controller, which allows using HAML, RABL/JBuilder, etc. Files in these paths will
16
+ # be rendered as fixtures.
17
+ config.fixture_paths = ["spec/javascripts/fixtures"]
18
+
19
+ # SUITES
20
+ #
21
+ # You can modify the default suite configuration and create new suites here. Suites are isolated from one another.
22
+ #
23
+ # When defining a suite you can provide a name and a block. If the name is left blank, :default is assumed. You can
24
+ # omit various directives and the ones defined in the default suite will be used.
25
+ #
26
+ # To run a specific suite
27
+ # - in the browser: http://localhost/teaspoon/[suite_name]
28
+ # - with the rake task: rake teaspoon suite=[suite_name]
29
+ # - with the cli: teaspoon --suite=[suite_name]
30
+ config.suite do |suite|
31
+ # Specify the framework you would like to use. This allows you to select versions, and will do some basic setup for
32
+ # you -- which you can override with the directives below. This should be specified first, as it can override other
33
+ # directives.
34
+ # Note: If no version is specified, the latest is assumed.
35
+ #
36
+ # Versions: 1.3.1, 2.0.3, 2.1.3, 2.2.0
37
+ suite.use_framework :jasmine, "2.2.0"
38
+
39
+ # Specify a file matcher as a regular expression and all matching files will be loaded when the suite is run. These
40
+ # files need to be within an asset path. You can add asset paths using the `config.asset_paths`.
41
+ suite.matcher = "{spec/javascripts,app/assets}/**/*_spec.{js,js.coffee,coffee}"
42
+
43
+ # Load additional JS files, but requiring them in your spec helper is the preferred way to do this.
44
+ #suite.javascripts = []
45
+
46
+ # You can include your own stylesheets if you want to change how Teaspoon looks.
47
+ # Note: Spec related CSS can and should be loaded using fixtures.
48
+ #suite.stylesheets = ["teaspoon"]
49
+
50
+ # This suites spec helper, which can require additional support files. This file is loaded before any of your test
51
+ # files are loaded.
52
+ suite.helper = "spec_helper"
53
+
54
+ # Partial to be rendered in the head tag of the runner. You can use the provided ones or define your own by creating
55
+ # a `_boot.html.erb` in your fixtures path, and adjust the config to `"/boot"` for instance.
56
+ #
57
+ # Available: boot, boot_require_js
58
+ suite.boot_partial = "boot"
59
+
60
+ # Partial to be rendered in the body tag of the runner. You can define your own to create a custom body structure.
61
+ suite.body_partial = "body"
62
+
63
+ # Hooks allow you to use `Teaspoon.hook("fixtures")` before, after, or during your spec run. This will make a
64
+ # synchronous Ajax request to the server that will call all of the blocks you've defined for that hook name.
65
+ #suite.hook :fixtures, &proc{}
66
+
67
+ # Determine whether specs loaded into the test harness should be embedded as individual script tags or concatenated
68
+ # into a single file. Similar to Rails' asset `debug: true` and `config.assets.debug = true` options. By default,
69
+ # Teaspoon expands all assets to provide more valuable stack traces that reference individual source files.
70
+ #suite.expand_assets = true
71
+ end
72
+
73
+ # Example suite. Since we're just filtering to files already within the root test/javascripts, these files will also
74
+ # be run in the default suite -- but can be focused into a more specific suite.
75
+ #config.suite :targeted do |suite|
76
+ # suite.matcher = "spec/javascripts/targeted/*_spec.{js,js.coffee,coffee}"
77
+ #end
78
+
79
+ # CONSOLE RUNNER SPECIFIC
80
+ #
81
+ # These configuration directives are applicable only when running via the rake task or command line interface. These
82
+ # directives can be overridden using the command line interface arguments or with ENV variables when using the rake
83
+ # task.
84
+ #
85
+ # Command Line Interface:
86
+ # teaspoon --driver=phantomjs --server-port=31337 --fail-fast=true --format=junit --suite=my_suite /spec/file_spec.js
87
+ #
88
+ # Rake:
89
+ # teaspoon DRIVER=phantomjs SERVER_PORT=31337 FAIL_FAST=true FORMATTERS=junit suite=my_suite
90
+
91
+ # Specify which headless driver to use. Supports PhantomJS and Selenium Webdriver.
92
+ #
93
+ # Available: :phantomjs, :selenium, :capybara_webkit
94
+ # PhantomJS: https://github.com/modeset/teaspoon/wiki/Using-PhantomJS
95
+ # Selenium Webdriver: https://github.com/modeset/teaspoon/wiki/Using-Selenium-WebDriver
96
+ # Capybara Webkit: https://github.com/modeset/teaspoon/wiki/Using-Capybara-Webkit
97
+ #config.driver = :phantomjs
98
+
99
+ # Specify additional options for the driver.
100
+ #
101
+ # PhantomJS: https://github.com/modeset/teaspoon/wiki/Using-PhantomJS
102
+ # Selenium Webdriver: https://github.com/modeset/teaspoon/wiki/Using-Selenium-WebDriver
103
+ # Capybara Webkit: https://github.com/modeset/teaspoon/wiki/Using-Capybara-Webkit
104
+ #config.driver_options = nil
105
+
106
+ # Specify the timeout for the driver. Specs are expected to complete within this time frame or the run will be
107
+ # considered a failure. This is to avoid issues that can arise where tests stall.
108
+ #config.driver_timeout = 180
109
+
110
+ # Specify a server to use with Rack (e.g. thin, mongrel). If nil is provided Rack::Server is used.
111
+ #config.server = nil
112
+
113
+ # Specify a port to run on a specific port, otherwise Teaspoon will use a random available port.
114
+ #config.server_port = nil
115
+
116
+ # Timeout for starting the server in seconds. If your server is slow to start you may have to bump this, or you may
117
+ # want to lower this if you know it shouldn't take long to start.
118
+ #config.server_timeout = 20
119
+
120
+ # Force Teaspoon to fail immediately after a failing suite. Can be useful to make Teaspoon fail early if you have
121
+ # several suites, but in environments like CI this may not be desirable.
122
+ #config.fail_fast = true
123
+
124
+ # Specify the formatters to use when outputting the results.
125
+ # Note: Output files can be specified by using `"junit>/path/to/output.xml"`.
126
+ #
127
+ # Available: :dot, :clean, :documentation, :json, :junit, :pride, :rspec_html, :snowday, :swayze_or_oprah, :tap, :tap_y, :teamcity
128
+ #config.formatters = [:dot]
129
+
130
+ # Specify if you want color output from the formatters.
131
+ #config.color = true
132
+
133
+ # Teaspoon pipes all console[log/debug/error] to $stdout. This is useful to catch places where you've forgotten to
134
+ # remove them, but in verbose applications this may not be desirable.
135
+ #config.suppress_log = false
136
+
137
+ # COVERAGE REPORTS / THRESHOLD ASSERTIONS
138
+ #
139
+ # Coverage reports requires Istanbul (https://github.com/gotwarlost/istanbul) to add instrumentation to your code and
140
+ # display coverage statistics.
141
+ #
142
+ # Coverage configurations are similar to suites. You can define several, and use different ones under different
143
+ # conditions.
144
+ #
145
+ # To run with a specific coverage configuration
146
+ # - with the rake task: rake teaspoon USE_COVERAGE=[coverage_name]
147
+ # - with the cli: teaspoon --coverage=[coverage_name]
148
+
149
+ # Specify that you always want a coverage configuration to be used. Otherwise, specify that you want coverage
150
+ # on the CLI.
151
+ # Set this to "true" or the name of your coverage config.
152
+ #config.use_coverage = nil
153
+
154
+ # You can have multiple coverage configs by passing a name to config.coverage.
155
+ # e.g. config.coverage :ci do |coverage|
156
+ # The default coverage config name is :default.
157
+ config.coverage do |coverage|
158
+ # Which coverage reports Istanbul should generate. Correlates directly to what Istanbul supports.
159
+ #
160
+ # Available: text-summary, text, html, lcov, lcovonly, cobertura, teamcity
161
+ #coverage.reports = ["text-summary", "html"]
162
+
163
+ # The path that the coverage should be written to - when there's an artifact to write to disk.
164
+ # Note: Relative to `config.root`.
165
+ #coverage.output_path = "coverage"
166
+
167
+ # Assets to be ignored when generating coverage reports. Accepts an array of filenames or regular expressions. The
168
+ # default excludes assets from vendor, gems and support libraries.
169
+ #coverage.ignore = [%r{/lib/ruby/gems/}, %r{/vendor/assets/}, %r{/support/}, %r{/(.+)_helper.}]
170
+
171
+ # Various thresholds requirements can be defined, and those thresholds will be checked at the end of a run. If any
172
+ # aren't met the run will fail with a message. Thresholds can be defined as a percentage (0-100), or nil.
173
+ #coverage.statements = nil
174
+ #coverage.functions = nil
175
+ #coverage.branches = nil
176
+ #coverage.lines = nil
177
+ end
178
+ end
@@ -5,6 +5,8 @@ class TestAppGenerator < Rails::Generators::Base
5
5
 
6
6
  def add_gems
7
7
  gem 'blacklight', "~> 5.9"
8
+ gem 'teaspoon'
9
+ gem 'teaspoon-jasmine'
8
10
  Bundler.with_clean_env do
9
11
  run "bundle install"
10
12
  end
@@ -24,4 +26,9 @@ class TestAppGenerator < Rails::Generators::Base
24
26
  FileUtils.mkdir_p 'spec/fixtures/solr_documents'
25
27
  directory 'solr_documents', 'spec/fixtures/solr_documents'
26
28
  end
29
+
30
+ def install_teaspoon
31
+ # Implicit copy of GeoBlacklight checked-in teaspoon_env.rb
32
+ copy_file '../teaspoon_env.rb', 'spec/teaspoon_env.rb'
33
+ end
27
34
  end
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: 0.10.1
4
+ version: 0.10.2
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: 2015-06-01 00:00:00.000000000 Z
14
+ date: 2015-08-11 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: blacklight
@@ -73,16 +73,16 @@ dependencies:
73
73
  name: rails_config
74
74
  requirement: !ruby/object:Gem::Requirement
75
75
  requirements:
76
- - - ">="
76
+ - - "~>"
77
77
  - !ruby/object:Gem::Version
78
- version: '0'
78
+ version: 0.4.2
79
79
  type: :runtime
80
80
  prerelease: false
81
81
  version_requirements: !ruby/object:Gem::Requirement
82
82
  requirements:
83
- - - ">="
83
+ - - "~>"
84
84
  - !ruby/object:Gem::Version
85
- version: '0'
85
+ version: 0.4.2
86
86
  - !ruby/object:Gem::Dependency
87
87
  name: faraday
88
88
  requirement: !ruby/object:Gem::Requirement
@@ -312,6 +312,7 @@ files:
312
312
  - app/views/catalog/_document_action.html.erb
313
313
  - app/views/catalog/_document_split.html.erb
314
314
  - app/views/catalog/_downloads.html.erb
315
+ - app/views/catalog/_exports.html.erb
315
316
  - app/views/catalog/_facet_tag_item.html.erb
316
317
  - app/views/catalog/_facet_tag_layout.html.erb
317
318
  - app/views/catalog/_home_text.html.erb
@@ -363,6 +364,7 @@ files:
363
364
  - lib/geoblacklight/routes.rb
364
365
  - lib/geoblacklight/search_builder.rb
365
366
  - lib/geoblacklight/solr_document.rb
367
+ - lib/geoblacklight/solr_document/carto_db.rb
366
368
  - lib/geoblacklight/solr_document/finder.rb
367
369
  - lib/geoblacklight/version.rb
368
370
  - lib/geoblacklight/view_helper_override.rb
@@ -376,6 +378,7 @@ files:
376
378
  - spec/features/bookmarks_spec.rb
377
379
  - spec/features/configurable_basemap_spec.rb
378
380
  - spec/features/download_layer_spec.rb
381
+ - spec/features/exports_spec.rb
379
382
  - spec/features/home_page_spec.rb
380
383
  - spec/features/iiif_viewer_spec.rb
381
384
  - spec/features/layer_inspection_spec.rb
@@ -392,10 +395,13 @@ files:
392
395
  - spec/fixtures/solr_documents/actual-polygon1.json
393
396
  - spec/fixtures/solr_documents/actual-raster1.json
394
397
  - spec/fixtures/solr_documents/harvard_raster.json
398
+ - spec/fixtures/solr_documents/public_direct_download.json
395
399
  - spec/fixtures/solr_documents/public_iiif_princeton.json
396
400
  - spec/fixtures/solr_documents/public_polygon_mit.json
397
401
  - spec/fixtures/solr_documents/restricted-line.json
398
402
  - spec/helpers/geoblacklight_helpers_spec.rb
403
+ - spec/javascripts/geoblacklight_spec.js
404
+ - spec/javascripts/spec_helper.js
399
405
  - spec/lib/geoblacklight/bounding_box_spec.rb
400
406
  - spec/lib/geoblacklight/controller_override_spec.rb
401
407
  - spec/lib/geoblacklight/download/geojson_download_spec.rb
@@ -409,6 +415,7 @@ files:
409
415
  - spec/lib/geoblacklight/reference_spec.rb
410
416
  - spec/lib/geoblacklight/references_spec.rb
411
417
  - spec/lib/geoblacklight/search_builder_spec.rb
418
+ - spec/lib/geoblacklight/solr_document/carto_db_spec.rb
412
419
  - spec/lib/geoblacklight/solr_document/finder_spec.rb
413
420
  - spec/lib/geoblacklight/solr_document_spec.rb
414
421
  - spec/lib/geoblacklight/view_helper_override_spec.rb
@@ -417,6 +424,7 @@ files:
417
424
  - spec/spec_helper.rb
418
425
  - spec/support/features.rb
419
426
  - spec/support/features/session_helpers.rb
427
+ - spec/teaspoon_env.rb
420
428
  - spec/test_app_templates/lib/generators/test_app_generator.rb
421
429
  - spec/views/catalog/_document_split.html.erb_spec.rb
422
430
  - spec/views/catalog/_index_split.html.erb_spec.rb
@@ -444,7 +452,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
444
452
  version: '0'
445
453
  requirements: []
446
454
  rubyforge_project:
447
- rubygems_version: 2.4.6
455
+ rubygems_version: 2.4.5
448
456
  signing_key:
449
457
  specification_version: 4
450
458
  summary: A discovery platform for geospatial holdings
@@ -455,6 +463,7 @@ test_files:
455
463
  - spec/features/bookmarks_spec.rb
456
464
  - spec/features/configurable_basemap_spec.rb
457
465
  - spec/features/download_layer_spec.rb
466
+ - spec/features/exports_spec.rb
458
467
  - spec/features/home_page_spec.rb
459
468
  - spec/features/iiif_viewer_spec.rb
460
469
  - spec/features/layer_inspection_spec.rb
@@ -471,10 +480,13 @@ test_files:
471
480
  - spec/fixtures/solr_documents/actual-polygon1.json
472
481
  - spec/fixtures/solr_documents/actual-raster1.json
473
482
  - spec/fixtures/solr_documents/harvard_raster.json
483
+ - spec/fixtures/solr_documents/public_direct_download.json
474
484
  - spec/fixtures/solr_documents/public_iiif_princeton.json
475
485
  - spec/fixtures/solr_documents/public_polygon_mit.json
476
486
  - spec/fixtures/solr_documents/restricted-line.json
477
487
  - spec/helpers/geoblacklight_helpers_spec.rb
488
+ - spec/javascripts/geoblacklight_spec.js
489
+ - spec/javascripts/spec_helper.js
478
490
  - spec/lib/geoblacklight/bounding_box_spec.rb
479
491
  - spec/lib/geoblacklight/controller_override_spec.rb
480
492
  - spec/lib/geoblacklight/download/geojson_download_spec.rb
@@ -488,6 +500,7 @@ test_files:
488
500
  - spec/lib/geoblacklight/reference_spec.rb
489
501
  - spec/lib/geoblacklight/references_spec.rb
490
502
  - spec/lib/geoblacklight/search_builder_spec.rb
503
+ - spec/lib/geoblacklight/solr_document/carto_db_spec.rb
491
504
  - spec/lib/geoblacklight/solr_document/finder_spec.rb
492
505
  - spec/lib/geoblacklight/solr_document_spec.rb
493
506
  - spec/lib/geoblacklight/view_helper_override_spec.rb
@@ -496,6 +509,7 @@ test_files:
496
509
  - spec/spec_helper.rb
497
510
  - spec/support/features.rb
498
511
  - spec/support/features/session_helpers.rb
512
+ - spec/teaspoon_env.rb
499
513
  - spec/test_app_templates/lib/generators/test_app_generator.rb
500
514
  - spec/views/catalog/_document_split.html.erb_spec.rb
501
515
  - spec/views/catalog/_index_split.html.erb_spec.rb