geoblacklight_sidecar_images 0.9.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +7 -7
  3. data/.solr_wrapper.yml +0 -1
  4. data/README.md +13 -19
  5. data/app/assets/stylesheets/geoblacklight_sidecar_images/modules/_results.scss +32 -8
  6. data/app/models/concerns/wms_rewrite_concern.rb +1 -1
  7. data/app/services/geoblacklight_sidecar_images/image_service/wms.rb +1 -1
  8. data/app/services/geoblacklight_sidecar_images/image_service.rb +1 -1
  9. data/geoblacklight_sidecar_images.gemspec +7 -7
  10. data/lib/generators/geoblacklight_sidecar_images/config_generator.rb +1 -1
  11. data/lib/generators/geoblacklight_sidecar_images/helpers_generator.rb +21 -0
  12. data/lib/generators/geoblacklight_sidecar_images/install_generator.rb +7 -1
  13. data/lib/generators/geoblacklight_sidecar_images/jobs_generator.rb +1 -1
  14. data/lib/generators/geoblacklight_sidecar_images/models_generator.rb +1 -1
  15. data/lib/generators/geoblacklight_sidecar_images/templates/helpers/blacklight/layout_helper_behavior.rb +110 -0
  16. data/lib/generators/geoblacklight_sidecar_images/templates/views/catalog/_index_split_default.html.erb +25 -24
  17. data/lib/geoblacklight_sidecar_images/version.rb +1 -1
  18. data/lib/tasks/geoblacklight_sidecar_images_tasks.rake +1 -1
  19. data/solr/conf/schema.xml +60 -58
  20. data/solr/conf/solrconfig.xml +29 -29
  21. data/spec/fixtures/files/actual-polygon1.json +33 -18
  22. data/spec/fixtures/files/esri-dynamic-layer-all-layers.json +34 -25
  23. data/spec/fixtures/files/esri-image-map-layer.json +36 -26
  24. data/spec/fixtures/files/esri-tiled_map_layer.json +33 -18
  25. data/spec/fixtures/files/placeholder.json +38 -0
  26. data/spec/fixtures/files/public_iiif_princeton.json +41 -26
  27. data/spec/fixtures/files/umich_iiif_jpg.json +48 -25
  28. data/spec/fixtures/files/umn_iiif_jpg.json +57 -28
  29. data/spec/fixtures/files/umn_solr_thumb.json +59 -31
  30. data/spec/jobs/store_image_job_spec.rb +1 -1
  31. data/spec/lib/tasks/geoblacklight_sidecar_images_spec.rb +0 -1
  32. data/spec/models/solr_document_sidecar_spec.rb +1 -1
  33. data/spec/models/solr_document_spec.rb +1 -1
  34. data/spec/services/image_service_spec.rb +11 -1
  35. data/spec/spec_helper.rb +23 -10
  36. data/spec/test_app_templates/Gemfile.extra +2 -1
  37. data/template.rb +4 -4
  38. metadata +24 -56
  39. data/app/assets/stylesheets/geoblacklight_sidecar_images/application.scss +0 -10
  40. data/lib/generators/geoblacklight_sidecar_images/templates/gblsci.scss +0 -3
  41. data/spec/fixtures/files/actual-papermap1.json +0 -23
  42. data/spec/fixtures/files/actual-point1.json +0 -37
  43. data/spec/fixtures/files/actual-raster1.json +0 -38
  44. data/spec/fixtures/files/b1g_thumbnail.json +0 -42
  45. data/spec/fixtures/files/baruch_ancestor1.json +0 -46
  46. data/spec/fixtures/files/baruch_ancestor2.json +0 -46
  47. data/spec/fixtures/files/baruch_documentation_download.json +0 -49
  48. data/spec/fixtures/files/bbox-spans-180.json +0 -20
  49. data/spec/fixtures/files/cornell_html_metadata.json +0 -42
  50. data/spec/fixtures/files/esri-dynamic-layer-single-layer.json +0 -40
  51. data/spec/fixtures/files/esri-feature-layer.json +0 -46
  52. data/spec/fixtures/files/esri-wms-layer.json +0 -33
  53. data/spec/fixtures/files/harvard_raster.json +0 -44
  54. data/spec/fixtures/files/iiif-eastern-hemisphere.json +0 -30
  55. data/spec/fixtures/files/index-map-polygon-no-downloadurl.json +0 -37
  56. data/spec/fixtures/files/index-map-polygon.json +0 -37
  57. data/spec/fixtures/files/index-map-stanford.json +0 -37
  58. data/spec/fixtures/files/index_map_point.json +0 -27
  59. data/spec/fixtures/files/no_spatial.json +0 -21
  60. data/spec/fixtures/files/princeton-child1.json +0 -30
  61. data/spec/fixtures/files/princeton-child2.json +0 -30
  62. data/spec/fixtures/files/princeton-child3.json +0 -30
  63. data/spec/fixtures/files/princeton-child4.json +0 -30
  64. data/spec/fixtures/files/princeton-parent.json +0 -25
  65. data/spec/fixtures/files/public_direct_download.json +0 -34
  66. data/spec/fixtures/files/public_polygon_mit.json +0 -27
  67. data/spec/fixtures/files/restricted-line.json +0 -37
  68. data/spec/fixtures/files/umn_metro_result1.json +0 -41
  69. data/spec/fixtures/files/umn_metro_result2.json +0 -35
  70. data/spec/fixtures/files/umn_state_result1.json +0 -38
  71. data/spec/fixtures/files/umn_state_result2.json +0 -38
  72. data/spec/fixtures/files/uva_slug_colon.json +0 -25
  73. data/spec/rails_helper.rb +0 -59
@@ -1,37 +0,0 @@
1
- {
2
- "dc_identifier_s": "http://purl.stanford.edu/cg357zz0321",
3
- "dc_title_s": "10 Meter Contours: Russian River Basin, California",
4
- "dc_description_s": "This line shapefile contains contours that were derived from a mosiac of 10 meter digital elevation models for the extent of the Russian River basin, located in Sonoma and Mendocino Counties, California.This layer can be used for watershed analysis and planning in the Russian River region of California.",
5
- "dc_rights_s": "Restricted",
6
- "dct_provenance_s": "Stanford",
7
- "dct_references_s": "{\"http://schema.org/url\":\"http://purl.stanford.edu/cg357zz0321\",\"http://schema.org/downloadUrl\":\"http://stacks.stanford.edu/file/druid:cg357zz0321/data.zip\",\"http://www.loc.gov/mods/v3\":\"http://purl.stanford.edu/cg357zz0321.mods\",\"http://www.isotc211.org/schemas/2005/gmd/\":\"https://raw.githubusercontent.com/OpenGeoMetadata/edu.stanford.purl/master/cg/357/zz/0321/iso19139.xml\",\"http://www.opengis.net/def/serviceType/ogc/wfs\":\"https://geowebservices-restricted.stanford.edu/geoserver/wfs\",\"http://www.opengis.net/def/serviceType/ogc/wms\":\"https://geowebservices-restricted.stanford.edu/geoserver/wms\"}",
8
- "layer_id_s": "druid:cg357zz0321",
9
- "layer_slug_s": "stanford-cg357zz0321",
10
- "layer_geom_type_s": "Line",
11
- "layer_modified_dt": "2016-04-25T17:13:35Z",
12
- "dc_format_s": "Shapefile",
13
- "dc_language_s": "English",
14
- "dc_type_s": "Dataset",
15
- "dc_publisher_s": "Circuit Rider Productions",
16
- "dc_creator_sm": [
17
- "United States. National Oceanic and Atmospheric Administration",
18
- "Circuit Rider Productions"
19
- ],
20
- "dc_subject_sm": [
21
- "Contours (Cartography)",
22
- "Elevation",
23
- "Inland Waters"
24
- ],
25
- "dct_issued_s": "2002",
26
- "dct_temporal_sm": [
27
- "2002"
28
- ],
29
- "dct_spatial_sm": [
30
- "Sonoma County (Calif.)",
31
- "Mendocino County (Calif.)"
32
- ],
33
- "solr_geom": "ENVELOPE(-123.387366, -122.52958, 39.398403, 38.302994)",
34
- "solr_year_i": 2002,
35
- "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 <group>Stanford</group>\n </machine>\n </access>\n <use>\n <human type=\"useAndReproduction\">These data are licensed by Stanford Libraries and are available to Stanford University affiliates only. Affiliates are limited to current faculty, staff and students. These data may not be reproduced or used for any purpose without permission. For more information please contact brannerlibrary@stanford.edu.</human>\n <human type=\"creativeCommons\"/>\n <machine type=\"creativeCommons\"/>\n </use>\n <copyright>\n <human>Copyright ownership resides with the originator.</human>\n </copyright>\n</rightsMetadata>\n",
36
- "geoblacklight_version": "1.0"
37
- }
@@ -1,41 +0,0 @@
1
- {
2
- "dc_identifier_s": "02236876-9c21-42f6-9870-d2562da8e44f",
3
- "dc_title_s": "2030 Regional Development Framework Planning Areas: Metro Twin Cities, Minnesota, 2011",
4
- "dc_description_s": "The 2030 Regional Development Framework Planning Areas - 2011 updates the 2030 Regional Development Framework Planning Areas initially adopted on January 14, 2004 and ammended in 2006. This dataset reflect the agreed upon planning areas between a community and the Metropolitan Council and defined in the communities' 2030 Comprehensive Plan Update and is intended to supplement the 2030 Regional Development Framework - the planning guide for the 7-county Twin Cities metropolitan area of Minneapolis and Saint Paul, Minnesota. Planning area definitions and strategies for the planning areas are available in the 2030 Regional Development Framework document at http://www.metrocouncil.org/Planning/Planning/2030-Regional-Development-Framework.aspx (See Chapter 3). For questions about how decisions were made regarding individual communities' geographic planning areas, please contact the Metropolitan Council Regional Framework Development staff, Dan Marckel, 651-602-1548. See Currentness Reference and Lineage in Data Quality Section of this metadata for more information.",
5
- "dc_rights_s": "Public",
6
- "dc_format_s": "Shapefile",
7
- "dc_language_sm": [
8
- "English"
9
- ],
10
- "dc_type_sm": [
11
- "Dataset",
12
- "Service"
13
- ],
14
- "dc_publisher_sm": [
15
- "Metropolitan Council"
16
- ],
17
- "dc_creator_sm": [
18
- "Metropolitan Council"
19
- ],
20
- "dc_subject_sm": [
21
- "Planning and Cadastral"
22
- ],
23
- "dct_provenance_s": "Minnesota",
24
- "dct_references_s": "{\"http://schema.org/url\":\"https://gisdata.mn.gov/dataset/02236876-9c21-42f6-9870-d2562da8e44f\",\"http://schema.org/downloadUrl\":\"ftp://ftp.gisdata.mn.gov/pub/gdrs/data/pub/us_mn_state_metc/plan_frmwrk2030dev_plan_ar2011/shp_plan_frmwrk2030dev_plan_ar2011.zip\",\"urn:x-esri:serviceType:ArcGIS#DynamicMapLayer\":\"https://gis2.metc.state.mn.us/arcgis/rest/services/MetroGIS/Planning/MapServer/3\",\"http://www.opengis.net/cat/csw/csdgm\":\"https://btaagdp.org/metadata/05a-01/pub/gdrs/data/pub/us_mn_state_metc/plan_frmwrk2030dev_plan_ar2011/metadata/metadata.xml\"}",
25
- "dct_isPartOf_sm": [
26
- "Minnesota Geospatial Commons"
27
- ],
28
- "dct_issued_s": "2015-10-01T10:01:54.499443",
29
- "dct_temporal_sm": [
30
- "2014"
31
- ],
32
- "dct_spatial_sm": [
33
- "Minnesota, United States"
34
- ],
35
- "layer_slug_s": "02236876-9c21-42f6-9870-d2562da8e44f",
36
- "layer_geom_type_s": "Polygon",
37
- "layer_modified_dt": "2018-08-02T17:42:57Z",
38
- "solr_geom": "ENVELOPE(-94.012, -92.732, 45.415, 44.471)",
39
- "solr_year_i": 2014,
40
- "geoblacklight_version": "1.0"
41
- }
@@ -1,35 +0,0 @@
1
- {
2
- "layer_geom_type_s": "Mixed",
3
- "layer_modified_dt": "2017-01-20T18:39:22Z",
4
- "solr_geom": "ENVELOPE(-94.012, -92.732, 45.415, 44.471)",
5
- "dct_references_s": "{\"http://schema.org/downloadUrl\":\"ftp://ftp.gisdata.mn.gov/pub/gdrs/data/pub/us_mn_state_metc/society_census_trt_comb1990_2000/shp_society_census_trt_comb1990_2000.zip\",\"http://schema.org/url\":\"https://gisdata.mn.gov/dataset/us-mn-state-metc-society-census-trt-comb1990-2000\",\"http://www.isotc211.org/schemas/2005/gmd/\":\"https://opengeometadata.github.io/edu.umn/e9/71/49/88c3074135b7a7a1d521949f5d/iso19139.xml\"}",
6
- "dc_rights_s": "Public",
7
- "dct_provenance_s": "Minnesota",
8
- "dc_subject_sm": [
9
- "Society"
10
- ],
11
- "dc_format_s": "Shapefile",
12
- "dc_description_s": "This dataset consists of a correspondence table and shape file of the combined 1990 and 2000 Census tracts. Note: Census tracts from 1990 and 2000 do not match in all areas. This dataset is an attempt to match them. Some combining and splitting of tracts was necessary. See the Lineage in Section 2 of the metadata for more information.",
13
- "dct_issued_s": "2003-01-27",
14
- "dct_temporal_sm": [
15
- "1990-2000"
16
- ],
17
- "dc_creator_sm": [
18
- "Metropolitan Council"
19
- ],
20
- "dc_identifier_s": "e9714988-c307-4135-b7a7-a1d521949f5d",
21
- "solr_year_i": 1990,
22
- "dct_spatial_sm": [
23
- "Minnesota, United States",
24
- "Minneapolis-St. Paul-Bloomington, United States"
25
- ],
26
- "dc_publisher_sm": [
27
- "Metropolitan Council"
28
- ],
29
- "layer_id_s": "e9714988-c307-4135-b7a7-a1d521949f5d",
30
- "dc_title_s": "1990 to 2000 Census Tract Correspondence and Combined Tracts: Twin Cities Metro, Minnesota, 2003",
31
- "layer_slug_s": "e9714988-c307-4135-b7a7-a1d521949f5d",
32
- "dct_isPartOf_sm": [
33
- "Minnesota Geospatial Commons"
34
- ]
35
- }
@@ -1,38 +0,0 @@
1
- {
2
- "dc_identifier_s": "2eddde2f-c222-41ca-bd07-2fd74a21f4de",
3
- "dc_title_s": "1:100k Digital Raster Graphic - Collars Removed: Minnesota",
4
- "dc_description_s": "A digital raster graphic (DRG) is a scanned image of an U.S. Geological Survey (USGS) standard series topographic map, including all map collar information. The image inside the map neatline is georeferenced to the surface of the earth and fit to the Universal Transverse Mercator projection. The horizontal positional accuracy and datum of the DRG matches the accuracy and datum of the source map. The map is scanned at a minimum resolution of 250 dots per inch. DRG's are created by scanning published paper maps on high-resolution scanners. The raster image is georeferenced and fit to the UTM projection. Colors are standardized to remove scanner limitations and artifacts. The average data set size is about 6 megabytes in Tagged Image File Format (TIFF) with PackBits compression. DRG's can be easily combined with other digital cartographic products such as digital elevation models (DEM) and digital orthophoto quadrangles (DOQ). DRG's are stored as rectified TIFF files in geoTIFF format. GeoTIFF is a relatively new TIFF image storage format that incorporates georeferencing information in the header. This allows software, such as ArcView, ARC/INFO, or EPPL7 to reference the image without an additional header or world file. Within the Minnesota Department of Natural Resources Core GIS data set the DRG's have been processed to be in compliance with departmental data standards (UTM Extended Zone 15, NAD83 datum) and the map collar information has been removed to facilitate the display of the DRG's in a seamless fashion. These DRG's were clipped and transformed to UTM Zone 15 using EPPL7 Raster GIS.",
5
- "dc_rights_s": "Public",
6
- "dc_format_s": "ArcGRID",
7
- "dc_language_sm": "English",
8
- "dc_type_sm": [
9
- "Dataset"
10
- ],
11
- "dc_publisher_sm": [
12
- "Minnesota Department of Natural Resources (DNR)"
13
- ],
14
- "dc_creator_sm": [
15
- "U.S. Geological Survey (USGS) and Minnesota Department of Natural Resources (DNR)"
16
- ],
17
- "dc_subject_sm": [
18
- "Imagery and Base Maps"
19
- ],
20
- "dct_provenance_s": "Minnesota",
21
- "dct_references_s": "{\"http://schema.org/url\":\"https://gisdata.mn.gov/dataset/2eddde2f-c222-41ca-bd07-2fd74a21f4de\",\"http://schema.org/downloadUrl\":\"ftp://gdrs.dnr.state.mn.us/gdrs/data/pub/us_mn_state_dnr/fgdb_base_usgs_scanned_topo_100k_drg.zip\",\"http://schema.org/image\":\"https://btaagdp.org/thumbnails/05a-01/pub/gdrs/data/pub/us_mn_state_dnr/base_usgs_scanned_topo_100k_drg/metadata/preview.jpg\",\"http://www.opengis.net/cat/csw/csdgm\":\"https://btaagdp.org/metadata/05a-01/pub/gdrs/data/pub/us_mn_state_dnr/base_usgs_scanned_topo_100k_drg/metadata/metadata.xml\"}",
22
- "dct_isPartOf_sm": [
23
- "Minnesota Geospatial Commons"
24
- ],
25
- "dct_issued_s": "2015-11-18T11:02:15.705119",
26
- "dct_temporal_sm": [
27
- "2015"
28
- ],
29
- "dct_spatial_sm": [
30
- "Minnesota, United States"
31
- ],
32
- "layer_slug_s": "2eddde2f-c222-41ca-bd07-2fd74a21f4de",
33
- "layer_geom_type_s": "Raster",
34
- "layer_modified_dt": "2018-08-02T17:47:58Z",
35
- "solr_geom": "ENVELOPE(-97.612501, -88.842351, 49.464145, 42.906949)",
36
- "solr_year_i": 2015,
37
- "geoblacklight_version": "1.0"
38
- }
@@ -1,38 +0,0 @@
1
- {
2
- "dc_identifier_s": "e9c71086-6b25-4950-8e1c-84c2794e3382",
3
- "dc_title_s": "1:250k Digital Raster Graphic - Collars Removed: Minnesota",
4
- "dc_description_s": "A digital raster graphic (DRG) is a scanned image of an U.S. Geological Survey (USGS) standard series topographic map, including all map collar information. The image inside the map neatline is georeferenced to the surface of the earth and fit to the Universal Transverse Mercator projection. The horizontal positional accuracy and datum of the DRG matches the accuracy and datum of the source map. The map is scanned at a minimum resolution of 250 dots per inch. DRG's are created by scanning published paper maps on high-resolution scanners. The raster image is georeferenced and fit to the UTM projection. Colors are standardized to remove scanner limitations and artifacts. The average data set size is about 6 megabytes in Tagged Image File Format (TIFF) with PackBits compression. DRG's can be easily combined with other digital cartographic products such as digital elevation models (DEM) and digital orthophoto quadrangles (DOQ). DRG's are stored as rectified TIFF files in geoTIFF format. GeoTIFF is a relatively new TIFF image storage format that incorporates georeferencing information in the header. This allows software, such as ArcView, ARC/INFO, or EPPL7 to reference the image without an additional header or world file. Within the Minnesota Department of Natural Resources Core GIS data set the DRG's have been processed to be in compliance with departmental data standards (UTM Extended Zone 15, NAD83 datum) and the map collar information has been removed to facilitate the display of the DRG's in a seamless fashion. These DRG's were clipped and transformed to UTM Zone 15 using EPPL7 Raster GIS.",
5
- "dc_rights_s": "Public",
6
- "dc_format_s": "GeoTIFF",
7
- "dc_language_sm": "English",
8
- "dc_type_sm": [
9
- "Dataset"
10
- ],
11
- "dc_publisher_sm": [
12
- "Minnesota Department of Natural Resources (DNR)"
13
- ],
14
- "dc_creator_sm": [
15
- "U.S. Geological Survey and Minnesota DNR"
16
- ],
17
- "dc_subject_sm": [
18
- "Imagery and Base Maps"
19
- ],
20
- "dct_provenance_s": "Minnesota",
21
- "dct_references_s": "{\"http://schema.org/url\":\"https://gisdata.mn.gov/dataset/e9c71086-6b25-4950-8e1c-84c2794e3382\",\"http://schema.org/downloadUrl\":\"ftp://ftp.gisdata.mn.gov/pub/gdrs/data/pub/us_mn_state_dnr/base_usgs_scanned_topo_250k_drg/fgdb_base_usgs_scanned_topo_250k_drg.zip\",\"http://schema.org/image\":\"https://btaagdp.org/thumbnails/05a-01/pub/gdrs/data/pub/us_mn_state_dnr/base_usgs_scanned_topo_250k_drg/metadata/preview.jpg\",\"http://www.opengis.net/cat/csw/csdgm\":\"https://btaagdp.org/metadata/05a-01/pub/gdrs/data/pub/us_mn_state_dnr/base_usgs_scanned_topo_250k_drg/metadata/metadata.xml\"}",
22
- "dct_isPartOf_sm": [
23
- "Minnesota Geospatial Commons"
24
- ],
25
- "dct_issued_s": "2015-11-18T11:02:15.187331",
26
- "dct_temporal_sm": [
27
- "1998"
28
- ],
29
- "dct_spatial_sm": [
30
- "Minnesota, United States"
31
- ],
32
- "layer_slug_s": "e9c71086-6b25-4950-8e1c-84c2794e3382",
33
- "layer_geom_type_s": "Raster",
34
- "layer_modified_dt": "2018-08-02T17:49:48Z",
35
- "solr_geom": "ENVELOPE(-97.991522, -87.177541, 49.892443, 42.891013)",
36
- "solr_year_i": 1998,
37
- "geoblacklight_version": "1.0"
38
- }
@@ -1,25 +0,0 @@
1
- {
2
- "dc_description_s": "Police stations for Norfolk, Virginia.",
3
- "dc_format_s": "Shapefile",
4
- "dc_identifier_s": "315fc8ee-3b57-4ebb-aa24-4300f1c42dc9-13",
5
- "dc_language_s": "eng",
6
- "dc_rights_s": "Public",
7
- "dc_subject_sm": [
8
- "Location"
9
- ],
10
- "dc_title_s": "Norfolk 2005 Police Stations",
11
- "dct_issued_s": "2008-10-17",
12
- "dct_provenance_s": "UVa",
13
- "dct_references_s": "{\"http://www.opengis.net/def/serviceType/ogc/wms\":\"http://gis.lib.virginia.edu/geoserver/wms\",\"http://www.opengis.net/def/serviceType/ogc/wfs\":\"http://gis.lib.virginia.edu/geoserver/wfs\",\"http://www.opengis.net/def/serviceType/ogc/wcs\":\"http://gis.lib.virginia.edu/geoserver/wcs\",\"http://schema.org/downloadUrl\":\"http://gis.lib.virginia.edu/geoserver/ows?service=WFS\\u0026typeName=Norfolk:police_point\\u0026request=GetFeature\\u0026outputFormat=shape-zip\",\"http://www.isotc211.org/schemas/2005/gmd/\":\"https://opengeometadata.github.io/edu.virginia/382/13/iso19139.xml\"}",
14
- "dct_temporal_sm": [
15
- "2005-2005"
16
- ],
17
- "georss_polygon_s": "36.82 -76.346 36.971 -76.346 36.971 -76.176 36.82 -76.176 36.82 -76.346",
18
- "layer_geom_type_s": "MultiPoint",
19
- "layer_id_s": "Norfolk:police_point",
20
- "layer_modified_dt": "2008-11-12T15:29:47Z",
21
- "layer_slug_s": "uva-Norfolk:police_point",
22
- "solr_geom": "ENVELOPE(-76.346, -76.176, 36.971, 36.82)",
23
- "solr_year_i": 2005,
24
- "geoblacklight_version": "1.0"
25
- }
data/spec/rails_helper.rb DELETED
@@ -1,59 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- ENV["RAILS_ENV"] ||= "test"
4
-
5
- require "spec_helper"
6
- require "database_cleaner"
7
- require "engine_cart"
8
- EngineCart.load_application!
9
-
10
- require "rspec/rails"
11
- # Add additional requires below this line. Rails is not loaded until this point!
12
-
13
- require "geoblacklight_sidecar_images"
14
-
15
- # Requires supporting ruby files with custom matchers and macros, etc, in
16
- # spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
17
- # run as spec files by default. This means that files in spec/support that end
18
- # in _spec.rb will both be required and run as specs, causing the specs to be
19
- # run twice. It is recommended that you do not name files matching this glob to
20
- # end with _spec.rb. You can configure this pattern with the --pattern
21
- # option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
22
- #
23
- # The following line is provided for convenience purposes. It has the downside
24
- # of increasing the boot-up time by auto-requiring all files in the support
25
- # directory. Alternatively, in the individual `*_spec.rb` files, manually
26
- # require only the support files necessary.
27
- #
28
- # Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
29
-
30
- # require 'capybara/poltergeist'
31
- # Capybara.javascript_driver = :poltergeist
32
-
33
- RSpec.configure do |config|
34
- # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
35
- config.fixture_path = "#{::Rails.root}/spec/fixtures"
36
-
37
- config.before(:suite) do
38
- DatabaseCleaner.clean_with :truncation
39
- end
40
-
41
- config.before do
42
- DatabaseCleaner.strategy = if Capybara.current_driver == :rack_test
43
- :transaction
44
- else
45
- :truncation
46
- end
47
- DatabaseCleaner.start
48
- end
49
-
50
- config.after do
51
- DatabaseCleaner.clean
52
- end
53
-
54
- config.infer_spec_type_from_file_location!
55
- end
56
-
57
- def main_app
58
- Rails.application.class.routes.url_helpers
59
- end