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.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +7 -7
- data/.solr_wrapper.yml +0 -1
- data/README.md +13 -19
- data/app/assets/stylesheets/geoblacklight_sidecar_images/modules/_results.scss +32 -8
- data/app/models/concerns/wms_rewrite_concern.rb +1 -1
- data/app/services/geoblacklight_sidecar_images/image_service/wms.rb +1 -1
- data/app/services/geoblacklight_sidecar_images/image_service.rb +1 -1
- data/geoblacklight_sidecar_images.gemspec +7 -7
- data/lib/generators/geoblacklight_sidecar_images/config_generator.rb +1 -1
- data/lib/generators/geoblacklight_sidecar_images/helpers_generator.rb +21 -0
- data/lib/generators/geoblacklight_sidecar_images/install_generator.rb +7 -1
- data/lib/generators/geoblacklight_sidecar_images/jobs_generator.rb +1 -1
- data/lib/generators/geoblacklight_sidecar_images/models_generator.rb +1 -1
- data/lib/generators/geoblacklight_sidecar_images/templates/helpers/blacklight/layout_helper_behavior.rb +110 -0
- data/lib/generators/geoblacklight_sidecar_images/templates/views/catalog/_index_split_default.html.erb +25 -24
- data/lib/geoblacklight_sidecar_images/version.rb +1 -1
- data/lib/tasks/geoblacklight_sidecar_images_tasks.rake +1 -1
- data/solr/conf/schema.xml +60 -58
- data/solr/conf/solrconfig.xml +29 -29
- data/spec/fixtures/files/actual-polygon1.json +33 -18
- data/spec/fixtures/files/esri-dynamic-layer-all-layers.json +34 -25
- data/spec/fixtures/files/esri-image-map-layer.json +36 -26
- data/spec/fixtures/files/esri-tiled_map_layer.json +33 -18
- data/spec/fixtures/files/placeholder.json +38 -0
- data/spec/fixtures/files/public_iiif_princeton.json +41 -26
- data/spec/fixtures/files/umich_iiif_jpg.json +48 -25
- data/spec/fixtures/files/umn_iiif_jpg.json +57 -28
- data/spec/fixtures/files/umn_solr_thumb.json +59 -31
- data/spec/jobs/store_image_job_spec.rb +1 -1
- data/spec/lib/tasks/geoblacklight_sidecar_images_spec.rb +0 -1
- data/spec/models/solr_document_sidecar_spec.rb +1 -1
- data/spec/models/solr_document_spec.rb +1 -1
- data/spec/services/image_service_spec.rb +11 -1
- data/spec/spec_helper.rb +23 -10
- data/spec/test_app_templates/Gemfile.extra +2 -1
- data/template.rb +4 -4
- metadata +24 -56
- data/app/assets/stylesheets/geoblacklight_sidecar_images/application.scss +0 -10
- data/lib/generators/geoblacklight_sidecar_images/templates/gblsci.scss +0 -3
- data/spec/fixtures/files/actual-papermap1.json +0 -23
- data/spec/fixtures/files/actual-point1.json +0 -37
- data/spec/fixtures/files/actual-raster1.json +0 -38
- data/spec/fixtures/files/b1g_thumbnail.json +0 -42
- data/spec/fixtures/files/baruch_ancestor1.json +0 -46
- data/spec/fixtures/files/baruch_ancestor2.json +0 -46
- data/spec/fixtures/files/baruch_documentation_download.json +0 -49
- data/spec/fixtures/files/bbox-spans-180.json +0 -20
- data/spec/fixtures/files/cornell_html_metadata.json +0 -42
- data/spec/fixtures/files/esri-dynamic-layer-single-layer.json +0 -40
- data/spec/fixtures/files/esri-feature-layer.json +0 -46
- data/spec/fixtures/files/esri-wms-layer.json +0 -33
- data/spec/fixtures/files/harvard_raster.json +0 -44
- data/spec/fixtures/files/iiif-eastern-hemisphere.json +0 -30
- data/spec/fixtures/files/index-map-polygon-no-downloadurl.json +0 -37
- data/spec/fixtures/files/index-map-polygon.json +0 -37
- data/spec/fixtures/files/index-map-stanford.json +0 -37
- data/spec/fixtures/files/index_map_point.json +0 -27
- data/spec/fixtures/files/no_spatial.json +0 -21
- data/spec/fixtures/files/princeton-child1.json +0 -30
- data/spec/fixtures/files/princeton-child2.json +0 -30
- data/spec/fixtures/files/princeton-child3.json +0 -30
- data/spec/fixtures/files/princeton-child4.json +0 -30
- data/spec/fixtures/files/princeton-parent.json +0 -25
- data/spec/fixtures/files/public_direct_download.json +0 -34
- data/spec/fixtures/files/public_polygon_mit.json +0 -27
- data/spec/fixtures/files/restricted-line.json +0 -37
- data/spec/fixtures/files/umn_metro_result1.json +0 -41
- data/spec/fixtures/files/umn_metro_result2.json +0 -35
- data/spec/fixtures/files/umn_state_result1.json +0 -38
- data/spec/fixtures/files/umn_state_result2.json +0 -38
- data/spec/fixtures/files/uva_slug_colon.json +0 -25
- data/spec/rails_helper.rb +0 -59
@@ -1,36 +1,51 @@
|
|
1
1
|
{
|
2
|
-
"
|
3
|
-
"
|
4
|
-
|
5
|
-
|
6
|
-
"
|
7
|
-
"
|
8
|
-
|
9
|
-
"dc_subject_sm": [
|
10
|
-
"New York (State)‒Maps",
|
11
|
-
"New Jersey‒Maps"
|
2
|
+
"id": "princeton-02870w62c",
|
3
|
+
"dct_identifier_sm": [
|
4
|
+
"http://arks.princeton.edu/ark:/88435/02870w62c"
|
5
|
+
],
|
6
|
+
"dct_title_s": "The provinces of New York and New Jersey, with part of Pensilvania, and the Province of Quebec : drawn by Major Holland, Surveyor General, of the Northern District in America. Corrected and improved, from the original materials, by Governr. Pownall, Member of Parliament, 1776",
|
7
|
+
"dct_description_sm": [
|
8
|
+
"Partly colored. Relief shown pictorially. Shows administrative divisions. From Thomas Jefferys's The American atlas, or, A geographical description of the whole continent of America (London : Printed by R. Sayer and Bennett, 1778). Insets: A chart of the mouth of Hudson's River, from Sandy Hook to New York. A plan of the city of New York. Plan of Amboy, with its environs, from an actual survey."
|
12
9
|
],
|
13
|
-
"
|
14
|
-
|
15
|
-
|
10
|
+
"dct_language_sm": [
|
11
|
+
"English"
|
12
|
+
],
|
13
|
+
"dct_creator_sm": [
|
16
14
|
"Rogers, Henry Darwin",
|
17
15
|
"Pownall, Thomas"
|
18
16
|
],
|
19
|
-
"
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
17
|
+
"dct_publisher_sm": [
|
18
|
+
"London, Robt. Sayer & John Bennett"
|
19
|
+
],
|
20
|
+
"schema_provider_s": "Princeton",
|
21
|
+
"gbl_resourceClass_sm": [
|
22
|
+
"Datasets"
|
23
|
+
],
|
24
|
+
"gbl_resourceType_sm": [
|
25
|
+
"Raster data"
|
26
|
+
],
|
27
|
+
"dct_subject_sm": [
|
28
|
+
"New York (State)‒Maps",
|
29
|
+
"New Jersey‒Maps"
|
24
30
|
],
|
25
31
|
"dct_temporal_sm": [
|
26
32
|
"1778"
|
27
33
|
],
|
28
34
|
"dct_issued_s": "1778",
|
29
|
-
"
|
30
|
-
|
31
|
-
|
32
|
-
"
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
35
|
+
"gbl_indexYear_im": [
|
36
|
+
1778
|
37
|
+
],
|
38
|
+
"dct_spatial_sm": [
|
39
|
+
"New York (State)",
|
40
|
+
"New Jersey",
|
41
|
+
"Pennsylvania"
|
42
|
+
],
|
43
|
+
"locn_geometry": "ENVELOPE(-76.3394, -72.1916, 46.5798, 38.6693)",
|
44
|
+
"dcat_bbox": "ENVELOPE(-76.3394, -72.1916, 46.5798, 38.6693)",
|
45
|
+
"dct_accessRights_s": "Public",
|
46
|
+
"dct_format_s": "Raster",
|
47
|
+
"gbl_wxsIdentifier_s": "02870w62c",
|
48
|
+
"dct_references_s": "{\"http://schema.org/url\":\"http://arks.princeton.edu/ark:/88435/02870w62c\",\"http://schema.org/thumbnailUrl\":\"https://libimages.princeton.edu/loris2/pudl0076%2Fmap_pownall%2F00000001.jp2/full/50,/0/default.jpg\",\"http://iiif.io/api/image\":\"https://libimages.princeton.edu/loris/pudl0076/map_pownall/00000001.jp2/info.json\",\"http://schema.org/downloadUrl\":[]}",
|
49
|
+
"gbl_mdModified_dt": "2014-10-09T18:00:18Z",
|
50
|
+
"gbl_mdVersion_s": "Aardvark"
|
51
|
+
}
|
@@ -1,28 +1,51 @@
|
|
1
1
|
{
|
2
|
-
"
|
3
|
-
"
|
4
|
-
|
5
|
-
|
6
|
-
"
|
7
|
-
"
|
8
|
-
|
9
|
-
|
10
|
-
"
|
11
|
-
|
2
|
+
"id": "3ffb1f2e-d617-4361-bc2b-49d9ad270cad",
|
3
|
+
"dct_identifier_sm": [
|
4
|
+
"umich-iiif-jpg-3ffb1f2e-d617-4361-bc2b-49d9ad270cad"
|
5
|
+
],
|
6
|
+
"dct_title_s": "A new map of America from the latest observations / revis'd by I. Senex.",
|
7
|
+
"dct_description_sm": [
|
8
|
+
"Relief shown pictorially. Dedication in title cartouche to [Henry Bowes Howard,] Earl of Berkshire, deputy earl marshal of England. Shows California as an island. Includes elaborate decorative cartouche in the upper left corner. The cartouche depicts scenes of Native American life, such as battle and food as well. 1 map : outline col. ; 47 x 55 cm. This map is in the public domain. Please attribute access and use of this digitized map to the Stephen S. Clark Library, University of Michigan Library."
|
9
|
+
],
|
10
|
+
"dct_language_sm": [
|
11
|
+
"eng"
|
12
|
+
],
|
13
|
+
"dct_creator_sm": [
|
14
|
+
"Senex, John, -1740.",
|
12
15
|
"Harris, John, fl. ca.1685-ca. 1720 engraver.",
|
13
16
|
"Senex, John, -1740. A new general atlas.",
|
14
|
-
"Dahl, James, former owner."
|
15
|
-
|
16
|
-
"
|
17
|
-
|
18
|
-
|
19
|
-
"
|
20
|
-
"
|
21
|
-
|
22
|
-
|
23
|
-
"
|
24
|
-
|
25
|
-
|
26
|
-
"
|
27
|
-
|
28
|
-
|
17
|
+
"Dahl, James, former owner."
|
18
|
+
],
|
19
|
+
"dct_publisher_sm": [
|
20
|
+
"London : s.n."
|
21
|
+
],
|
22
|
+
"schema_provider_s": "Michigan",
|
23
|
+
"gbl_resourceClass_sm": [
|
24
|
+
"Imagery"
|
25
|
+
],
|
26
|
+
"gbl_resourceType_sm": [
|
27
|
+
"EDIT ME -- this record had layer_geom_type_s = Paper Map"
|
28
|
+
],
|
29
|
+
"dct_temporal_sm": [
|
30
|
+
"ca. 1719"
|
31
|
+
],
|
32
|
+
"gbl_indexYear_im": [
|
33
|
+
1719
|
34
|
+
],
|
35
|
+
"dct_spatial_sm": [
|
36
|
+
"Americas"
|
37
|
+
],
|
38
|
+
"locn_geometry": "ENVELOPE(-179.27, -1.42, 68.65, -60.15)",
|
39
|
+
"dcat_bbox": "ENVELOPE(-179.27, -1.42, 68.65, -60.15)",
|
40
|
+
"dct_accessRights_s": "Public",
|
41
|
+
"dct_format_s": "JPEG",
|
42
|
+
"dct_references_s": "{\"http://schema.org/url\":\"https://quod.lib.umich.edu/c/clark1ic/x-012464989/39015095390558\",\"http://schema.org/downloadUrl\":[{\"label\":\"JPEG\",\"url\":\"https://quod.lib.umich.edu/cgi/i/image/api/image/clark1ic:012464989:39015095390558/full/res:5/0/native.jpg?attachment=1\"}],\"http://iiif.io/api/image\":\"https://quod.lib.umich.edu/cgi/i/image/api/image/clark1ic:012464989:39015095390558/info.json\"}",
|
43
|
+
"gbl_mdModified_dt": "2017-12-11T16:28:21Z",
|
44
|
+
"gbl_mdVersion_s": "Aardvark",
|
45
|
+
"thumbnail_path_ss": "https://quod.lib.umich.edu/cgi/i/image/api/image/clark1ic:012464989:39015095390558/full/res:5/0/native.jpg?attachment=1",
|
46
|
+
"dc_relation_sm": [
|
47
|
+
"http://sws.geonames.org/10861432"
|
48
|
+
],
|
49
|
+
"centroid_s": "4.25,-90.345",
|
50
|
+
"dct_isPartOf_sm": "michigan-collection-clark-library-map-collections"
|
51
|
+
}
|
@@ -1,29 +1,58 @@
|
|
1
1
|
{
|
2
|
-
"
|
3
|
-
"
|
4
|
-
|
5
|
-
|
6
|
-
"
|
7
|
-
"
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
"
|
14
|
-
|
15
|
-
|
16
|
-
"
|
17
|
-
|
18
|
-
|
19
|
-
"
|
20
|
-
"
|
21
|
-
|
22
|
-
|
23
|
-
"
|
24
|
-
|
25
|
-
|
26
|
-
"
|
27
|
-
|
28
|
-
|
29
|
-
|
2
|
+
"id": "83f4648a-125c-4000-a12f-aba2b432e7cd",
|
3
|
+
"dct_identifier_sm": [
|
4
|
+
"minnesota-iiif-jpg-83f4648a-125c-4000-a12f-aba2b432e7cd"
|
5
|
+
],
|
6
|
+
"dct_title_s": "Bird's eye view of Minneapolis, Minn",
|
7
|
+
"dct_description_sm": [
|
8
|
+
"Cartographic Details: Scale approximately 1:1,341,000. 90 British Miles 69 1/2 to a Degree = 10.8 cm. Third edition. 56 x 83 cm"
|
9
|
+
],
|
10
|
+
"dct_language_sm": [
|
11
|
+
"English"
|
12
|
+
],
|
13
|
+
"dct_creator_sm": [
|
14
|
+
"Pezolt, F."
|
15
|
+
],
|
16
|
+
"dct_publisher_sm": [
|
17
|
+
"A.M. Smith"
|
18
|
+
],
|
19
|
+
"schema_provider_s": "Minnesota",
|
20
|
+
"gbl_resourceClass_sm": [
|
21
|
+
"Imagery"
|
22
|
+
],
|
23
|
+
"gbl_resourceType_sm": [
|
24
|
+
"EDIT ME -- this record had layer_geom_type_s = Paper Map"
|
25
|
+
],
|
26
|
+
"dct_subject_sm": [
|
27
|
+
"Aerial views",
|
28
|
+
"Bird's-eye views"
|
29
|
+
],
|
30
|
+
"dcat_theme_sm": [
|
31
|
+
"imagery",
|
32
|
+
"biology"
|
33
|
+
],
|
34
|
+
"dct_temporal_sm": [
|
35
|
+
"1891"
|
36
|
+
],
|
37
|
+
"dct_issued_s": "1891",
|
38
|
+
"gbl_indexYear_im": [
|
39
|
+
1891
|
40
|
+
],
|
41
|
+
"dct_spatial_sm": [
|
42
|
+
"Minneapolis, Minnesota, United States",
|
43
|
+
"Minnesota, United States"
|
44
|
+
],
|
45
|
+
"locn_geometry": "ENVELOPE(-93.2601, -93.2301, 44.98, 44.96)",
|
46
|
+
"dcat_bbox": "ENVELOPE(-93.2601, -93.2301, 44.98, 44.96)",
|
47
|
+
"dct_accessRights_s": "Public",
|
48
|
+
"dct_format_s": "TIFF",
|
49
|
+
"dct_references_s": "{\"http://schema.org/url\":\"http://purl.umn.edu/204328\",\"http://schema.org/downloadUrl\":[{\"label\":\"TIFF\",\"url\":\"https://umedia.lib.umn.edu/sites/default/files/archive/84/image/tiff/1062058.tif\"}],\"http://iiif.io/api/image\":\"https://cdm16022.contentdm.oclc.org/digital/iiif/p16022coll245/889/info.json\"}",
|
50
|
+
"gbl_mdModified_dt": "2017-12-11T12:01:50Z",
|
51
|
+
"gbl_mdVersion_s": "Aardvark",
|
52
|
+
"dc_relation_sm": [
|
53
|
+
"http://sws.geonames.org/5037649",
|
54
|
+
"http://sws.geonames.org/5037779"
|
55
|
+
],
|
56
|
+
"centroid_s": "44.97,-93.2451",
|
57
|
+
"dct_isPartOf_sm": "minnesota-collection-john-r-borchert-map-library"
|
58
|
+
}
|
@@ -1,34 +1,62 @@
|
|
1
1
|
{
|
2
|
-
"
|
3
|
-
"
|
4
|
-
|
5
|
-
|
6
|
-
"
|
7
|
-
"
|
8
|
-
|
9
|
-
|
2
|
+
"id": "aaf63e35-3d5f-4e62-b59d-377f008e9aad",
|
3
|
+
"dct_identifier_sm": [
|
4
|
+
"aaf63e35-3d5f-4e62-b59d-377f008e9aad"
|
5
|
+
],
|
6
|
+
"dct_title_s": "Condition map of Minnesota Trunk Highways : a 7,000 mile primary system showing national and state markings",
|
7
|
+
"dct_description_sm": [
|
8
|
+
"Cartographic Details: Scale approximately 1:1,530,000. Description based on: 1932 sheet. Each sheet lists the Commissioner of highways and the Chief Engineer. On verso: Distance tables for various cities in Minnesota."
|
9
|
+
],
|
10
|
+
"dct_language_sm": [
|
11
|
+
"eng"
|
12
|
+
],
|
13
|
+
"dct_creator_sm": [
|
14
|
+
"Minnesota. Department of Highways."
|
15
|
+
],
|
16
|
+
"dct_publisher_sm": [
|
17
|
+
"The Department"
|
18
|
+
],
|
19
|
+
"schema_provider_s": "Minnesota",
|
20
|
+
"gbl_resourceClass_sm": [
|
21
|
+
"EDIT ME -- this record had dc_type_s = Still image"
|
22
|
+
],
|
23
|
+
"gbl_resourceType_sm": [
|
24
|
+
"EDIT ME -- this record had layer_geom_type_s = Paper Map"
|
25
|
+
],
|
26
|
+
"dct_subject_sm": [
|
27
|
+
"Roads -- Minnesota -- Maps",
|
10
28
|
"Minnesota -- Distances -- Tables",
|
11
29
|
"Minnesota -- Maps",
|
12
|
-
"Maps"
|
13
|
-
|
14
|
-
"
|
15
|
-
|
16
|
-
|
17
|
-
"
|
18
|
-
|
19
|
-
|
20
|
-
"
|
21
|
-
"
|
22
|
-
|
23
|
-
|
24
|
-
"
|
25
|
-
|
26
|
-
|
27
|
-
"
|
28
|
-
"
|
29
|
-
"
|
30
|
-
"
|
31
|
-
"
|
32
|
-
"
|
33
|
-
"
|
34
|
-
|
30
|
+
"Maps"
|
31
|
+
],
|
32
|
+
"dcat_theme_sm": [
|
33
|
+
"transportation"
|
34
|
+
],
|
35
|
+
"dct_temporal_sm": [
|
36
|
+
"1925"
|
37
|
+
],
|
38
|
+
"dct_issued_s": "1925",
|
39
|
+
"gbl_indexYear_im": [
|
40
|
+
1925
|
41
|
+
],
|
42
|
+
"dct_spatial_sm": [
|
43
|
+
"Minnesota, United States"
|
44
|
+
],
|
45
|
+
"locn_geometry": "ENVELOPE(-97.2509765625, -90.9228515625, 49.3787965644, 43.4648808289)",
|
46
|
+
"dcat_bbox": "ENVELOPE(-97.2509765625, -90.9228515625, 49.3787965644, 43.4648808289)",
|
47
|
+
"dct_accessRights_s": "Public",
|
48
|
+
"dct_format_s": "TIFF",
|
49
|
+
"gbl_wxsIdentifier_s": "urn:aaf63e35-3d5f-4e62-b59d-377f008e9aad",
|
50
|
+
"dct_references_s": "{\"http://schema.org/url\":\"http://purl.umn.edu/231125\",\"http://schema.org/downloadUrl\":[{\"label\":\"TIFF\",\"url\":\"https://umedia.lib.umn.edu/sites/default/files/archive/562/image/tiff/1089695.tif\"}],\"http://iiif.io/api/image\":\"https://umedia.lib.umn.edu/fcgi-bin/iipsrv.fcgi?IIIF=sites/default/files/reference/562/image/jp2/1089695.jp2/info.json\"}",
|
51
|
+
"gbl_mdModified_dt": "2017-06-12T13:36:50Z",
|
52
|
+
"gbl_mdVersion_s": "Aardvark",
|
53
|
+
"thumbnail_path_ss": "https://cdm16022.contentdm.oclc.org/utils/getthumbnail/collection/p16022coll206/id/133.jpg",
|
54
|
+
"dc_relation_sm": [
|
55
|
+
"http://sws.geonames.org/5037779/about/rdf"
|
56
|
+
],
|
57
|
+
"georss_box_s": "43.4648808289 -97.2509765625 49.3787965644 -90.9228515625",
|
58
|
+
"georss_polygon_s": "43.4648808289 -97.2509765625 49.3787965644 -97.2509765625 49.3787965644 -90.9228515625 43.4648808289 -90.9228515625 43.4648808289 -97.2509765625",
|
59
|
+
"timestamp": "2017-06-12T22:01:27.649Z",
|
60
|
+
"centroid_s": "46.42183869665,-94.0869140625",
|
61
|
+
"dct_isPartOf_sm": "minnesota-collection-john-r-borchert-map-library"
|
62
|
+
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "
|
3
|
+
require "spec_helper"
|
4
4
|
|
5
5
|
describe GeoblacklightSidecarImages::ImageService do
|
6
6
|
# Dynamic Map Layer
|
@@ -27,6 +27,10 @@ describe GeoblacklightSidecarImages::ImageService do
|
|
27
27
|
let(:tiled_map_document) { SolrDocument.new(json_data("esri-tiled_map_layer")) }
|
28
28
|
let(:tiled_map_imgsvc) { described_class.new(tiled_map_document) }
|
29
29
|
|
30
|
+
# Placeholder Image
|
31
|
+
let(:placeholder_document) { SolrDocument.new(json_data("placeholder")) }
|
32
|
+
let(:placeholder_imgsvc) { described_class.new(placeholder_document) }
|
33
|
+
|
30
34
|
describe "#store" do
|
31
35
|
it "responds to store" do
|
32
36
|
expect(iiif_imgsvc).to respond_to(:store)
|
@@ -67,6 +71,12 @@ describe GeoblacklightSidecarImages::ImageService do
|
|
67
71
|
expect(wms_imgsvc.document.sidecar.image_state.current_state).to eq("succeeded")
|
68
72
|
end
|
69
73
|
|
74
|
+
it "placeholders a doc without an imageservice" do
|
75
|
+
# Doc: mit-001145244
|
76
|
+
placeholder_imgsvc.store
|
77
|
+
expect(placeholder_imgsvc.document.sidecar.image_state.current_state).to eq("placeheld")
|
78
|
+
end
|
79
|
+
|
70
80
|
it "prioritizes settings thumbnail field" do
|
71
81
|
expect(thumb_imgsvc.send(:gblsi_thumbnail_field?)).to be_truthy
|
72
82
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,23 +1,29 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
ENV["RAILS_ENV"]
|
3
|
+
ENV["RAILS_ENV"] ||= "test"
|
4
4
|
|
5
|
-
require "simplecov"
|
6
|
-
SimpleCov.formatter = SimpleCov::Formatter::HTMLFormatter
|
5
|
+
# require "simplecov"
|
6
|
+
# SimpleCov.formatter = SimpleCov::Formatter::HTMLFormatter
|
7
7
|
|
8
|
-
SimpleCov.start "rails" do
|
9
|
-
|
10
|
-
|
11
|
-
end
|
8
|
+
# SimpleCov.start "rails" do
|
9
|
+
# @TODO
|
10
|
+
# refuse_coverage_drop
|
11
|
+
# end
|
12
12
|
|
13
13
|
require "database_cleaner"
|
14
|
+
require "capybara/rspec"
|
15
|
+
require "selenium-webdriver"
|
16
|
+
require "webdrivers"
|
17
|
+
|
18
|
+
require "rails/all"
|
19
|
+
require "blacklight"
|
20
|
+
require "geoblacklight"
|
21
|
+
require "geoblacklight_sidecar_images"
|
22
|
+
|
14
23
|
require "engine_cart"
|
15
24
|
EngineCart.load_application!
|
16
25
|
|
17
26
|
require "rspec/rails"
|
18
|
-
require "capybara/rspec"
|
19
|
-
require "selenium-webdriver"
|
20
|
-
require "webdrivers"
|
21
27
|
|
22
28
|
def json_data(filename)
|
23
29
|
file_content = file_fixture("#{filename}.json").read
|
@@ -25,6 +31,9 @@ def json_data(filename)
|
|
25
31
|
end
|
26
32
|
|
27
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
|
+
|
28
37
|
config.use_transactional_fixtures = false
|
29
38
|
|
30
39
|
config.before do
|
@@ -36,3 +45,7 @@ RSpec.configure do |config|
|
|
36
45
|
DatabaseCleaner.clean
|
37
46
|
end
|
38
47
|
end
|
48
|
+
|
49
|
+
def main_app
|
50
|
+
Rails.application.class.routes.url_helpers
|
51
|
+
end
|
@@ -1 +1,2 @@
|
|
1
|
-
gem 'faraday', ENV["FARADAY_VERSION"].to_s != "" ? ENV["FARADAY_VERSION"] : '>= 1.0'
|
1
|
+
gem 'faraday', ENV["FARADAY_VERSION"].to_s != "" ? ENV["FARADAY_VERSION"] : '>= 1.0'
|
2
|
+
gem 'devise'
|
data/template.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
# $ rails
|
1
|
+
# $ rails _7.0.4.2_ new app-name -m https://raw.githubusercontent.com/geoblacklight/geoblacklight_sidecar_images/master/template.rb
|
2
2
|
|
3
|
-
gem "blacklight", ">= 7.0"
|
4
|
-
gem "geoblacklight", ">=
|
3
|
+
gem "blacklight", ">= 7.0", "< 8.0"
|
4
|
+
gem "geoblacklight", ">= 4.0"
|
5
5
|
gem "statesman", ">= 3.4"
|
6
|
-
gem "geoblacklight_sidecar_images", git: "git://github.com/ewlarson/geoblacklight_sidecar_images.git", branch: "
|
6
|
+
gem "geoblacklight_sidecar_images", git: "git://github.com/ewlarson/geoblacklight_sidecar_images.git", branch: "develop"
|
7
7
|
|
8
8
|
run "bundle install"
|
9
9
|
|