geoblacklight 1.9.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +2 -2
  3. data/.rubocop.yml +4 -14
  4. data/.rubocop_todo.yml +51 -48
  5. data/README.md +3 -0
  6. data/Rakefile +1 -2
  7. data/app/assets/javascripts/geoblacklight/basemaps.js +3 -3
  8. data/app/assets/javascripts/geoblacklight/downloaders/downloader.js +1 -1
  9. data/app/assets/javascripts/geoblacklight/geoblacklight.js +1 -1
  10. data/app/assets/javascripts/geoblacklight/modules/download.js +1 -1
  11. data/app/assets/javascripts/geoblacklight/modules/home.js +3 -2
  12. data/app/assets/javascripts/geoblacklight/modules/util.js +8 -0
  13. data/app/assets/javascripts/geoblacklight/templates/index_map_download.hbs +19 -0
  14. data/app/assets/javascripts/geoblacklight/templates/index_map_info.hbs +15 -13
  15. data/app/assets/javascripts/geoblacklight/viewers/esri/dynamic_map_layer.js +3 -3
  16. data/app/assets/javascripts/geoblacklight/viewers/esri/feature_layer.js +4 -2
  17. data/app/assets/javascripts/geoblacklight/viewers/index_map.js +20 -12
  18. data/app/assets/javascripts/geoblacklight/viewers/map.js +2 -1
  19. data/app/assets/javascripts/geoblacklight/viewers/wms.js +1 -5
  20. data/app/assets/stylesheets/geoblacklight/_blacklight_overrides.scss +43 -0
  21. data/app/assets/stylesheets/geoblacklight/_geoblacklight.scss +4 -1
  22. data/app/assets/stylesheets/geoblacklight/application.scss +0 -1
  23. data/app/assets/stylesheets/geoblacklight/modules/downloads.scss +33 -13
  24. data/app/assets/stylesheets/geoblacklight/modules/home.scss +22 -19
  25. data/app/assets/stylesheets/geoblacklight/modules/icon-customization.scss +1 -1
  26. data/app/assets/stylesheets/geoblacklight/modules/index_maps.scss +7 -0
  27. data/app/assets/stylesheets/geoblacklight/modules/item.scss +7 -8
  28. data/app/assets/stylesheets/geoblacklight/modules/metadata.scss +9 -0
  29. data/app/assets/stylesheets/geoblacklight/modules/relations.scss +15 -0
  30. data/app/assets/stylesheets/geoblacklight/modules/results.scss +7 -2
  31. data/app/assets/stylesheets/geoblacklight/modules/sidebar.scss +60 -0
  32. data/app/assets/stylesheets/geoblacklight/modules/toolbar.scss +55 -35
  33. data/app/controllers/download_controller.rb +5 -4
  34. data/app/controllers/relation_controller.rb +11 -1
  35. data/app/helpers/carto_helper.rb +2 -9
  36. data/app/helpers/geoblacklight_helper.rb +15 -28
  37. data/app/models/concerns/geoblacklight/solr_document.rb +4 -0
  38. data/app/models/concerns/geoblacklight/spatial_search_behavior.rb +18 -1
  39. data/app/presenters/geoblacklight/document_presenter.rb +2 -2
  40. data/app/views/catalog/_document_action.html.erb +2 -2
  41. data/app/views/catalog/_document_split.html.erb +5 -3
  42. data/app/views/catalog/_downloads_secondary.html.erb +39 -0
  43. data/app/views/catalog/_facet_tag_layout.html.erb +1 -1
  44. data/app/views/catalog/_home_text.html.erb +30 -38
  45. data/app/views/catalog/_index_split_default.html.erb +1 -2
  46. data/app/views/catalog/_metadata.html.erb +3 -3
  47. data/app/views/catalog/_show_default_attribute_table.html.erb +16 -14
  48. data/app/views/catalog/_show_default_viewer_container.html.erb +5 -3
  49. data/app/views/catalog/_show_default_viewer_information.html.erb +3 -1
  50. data/app/views/catalog/_show_downloads.html.erb +12 -9
  51. data/app/views/catalog/_show_tools.html.erb +25 -0
  52. data/app/views/catalog/_web_services.html.erb +1 -1
  53. data/app/views/catalog/_web_services_wfs.html.erb +1 -1
  54. data/app/views/catalog/_web_services_wms.html.erb +1 -1
  55. data/app/views/catalog/index.html.erb +9 -8
  56. data/app/views/relation/_ancestors.html.erb +2 -2
  57. data/app/views/relation/_descendants.html.erb +3 -3
  58. data/app/views/relation/index.html.erb +8 -8
  59. data/app/views/shared/_header_navbar.html.erb +28 -17
  60. data/config/locales/geoblacklight.en.yml +2 -2
  61. data/geoblacklight.gemspec +5 -4
  62. data/lib/generators/geoblacklight/install_generator.rb +3 -12
  63. data/lib/generators/geoblacklight/templates/Procfile +3 -0
  64. data/lib/generators/geoblacklight/templates/catalog_controller.rb +33 -5
  65. data/lib/generators/geoblacklight/templates/package.json +14 -0
  66. data/lib/generators/geoblacklight/templates/settings.yml +15 -1
  67. data/lib/generators/geoblacklight/templates/webpacker.yml +67 -0
  68. data/lib/generators/geoblacklight/webpacker_generator.rb +35 -0
  69. data/lib/geoblacklight.rb +2 -4
  70. data/lib/geoblacklight/controller_override.rb +27 -22
  71. data/lib/geoblacklight/engine.rb +0 -1
  72. data/lib/geoblacklight/version.rb +1 -1
  73. data/lib/tasks/geoblacklight.rake +18 -0
  74. data/schema/geoblacklight-schema.md +72 -59
  75. data/schema/geometry-type-values.md +1 -0
  76. data/schema/references.md +22 -0
  77. data/schema/schema-commentary.md +198 -0
  78. data/schema/subjects.md +41 -0
  79. data/schema/type-values.md +4 -2
  80. data/solr/conf/core.properties +5 -0
  81. data/solr/conf/schema.xml +11 -1
  82. data/solr/conf/solrconfig.xml +1 -1
  83. data/spec/controllers/catalog_controller_spec.rb +17 -1
  84. data/spec/factories/user.rb +2 -2
  85. data/spec/features/download_layer_spec.rb +19 -15
  86. data/spec/features/esri_viewer_spec.rb +2 -2
  87. data/spec/features/home_page_spec.rb +6 -2
  88. data/spec/features/index_map_spec.rb +15 -25
  89. data/spec/features/layer_opacity_spec.rb +1 -1
  90. data/spec/features/layer_preview_spec.rb +3 -2
  91. data/spec/features/linkified_attribute_table_spec.rb +3 -4
  92. data/spec/features/relations_spec.rb +1 -1
  93. data/spec/features/search_bar_spec.rb +2 -2
  94. data/spec/features/search_results_map_spec.rb +2 -2
  95. data/spec/features/search_results_overlap_ratio_spec.rb +55 -0
  96. data/spec/features/search_spec.rb +13 -0
  97. data/spec/features/show_page_metadata_spec.rb +1 -1
  98. data/spec/features/sms_spec.rb +15 -0
  99. data/spec/features/split_view.html.erb_spec.rb +24 -15
  100. data/spec/features/web_services_modal_spec.rb +0 -2
  101. data/spec/fixtures/solr_documents/README.md +38 -0
  102. data/spec/fixtures/solr_documents/esri-image-map-layer.json +39 -18
  103. data/spec/fixtures/solr_documents/index-map-polygon-no-downloadurl.json +37 -0
  104. data/spec/fixtures/solr_documents/index-map-polygon.json +37 -0
  105. data/spec/fixtures/solr_documents/{point_index_map.json → index_map_point.json} +1 -1
  106. data/spec/fixtures/solr_documents/princeton-child1.json +30 -0
  107. data/spec/fixtures/solr_documents/princeton-child2.json +30 -0
  108. data/spec/fixtures/solr_documents/princeton-parent.json +25 -0
  109. data/spec/helpers/carto_helper_spec.rb +1 -20
  110. data/spec/helpers/geoblacklight_helper_spec.rb +4 -22
  111. data/spec/lib/geoblacklight/document_presenter_spec.rb +1 -1
  112. data/spec/lib/geoblacklight/geoblacklight_helper_behavior_spec.rb +1 -1
  113. data/spec/models/concerns/geoblacklight/spatial_search_behavior_spec.rb +10 -0
  114. data/spec/spec_helper.rb +6 -3
  115. data/spec/teaspoon_env.rb +31 -1
  116. data/spec/test_app_templates/lib/generators/test_app_generator.rb +5 -0
  117. data/spec/test_app_templates/solr_documents +1 -0
  118. data/spec/views/catalog/_show_downloads.html.erb_spec.rb +1 -1
  119. data/spec/views/catalog/_show_tools.html.erb_spec.rb +39 -0
  120. data/template.rb +4 -2
  121. data/vendor/assets/images/layers-2x.png +0 -0
  122. data/vendor/assets/images/layers.png +0 -0
  123. data/vendor/assets/images/marker-icon-2x.png +0 -0
  124. data/vendor/assets/images/marker-icon.png +0 -0
  125. data/vendor/assets/images/marker-shadow.png +0 -0
  126. data/vendor/assets/javascripts/esri-leaflet.js.map +1 -0
  127. data/vendor/assets/javascripts/leaflet-src.js.map +1 -0
  128. data/vendor/assets/javascripts/leaflet.js.erb +13922 -0
  129. data/vendor/assets/stylesheets/leaflet.css +635 -0
  130. metadata +87 -33
  131. data/app/assets/stylesheets/geoblacklight/modules/twitter-typeahead.scss +0 -14
  132. data/app/views/catalog/_search_form_no_navbar.html.erb +0 -22
  133. data/app/views/catalog/_show_default.html.erb +0 -13
  134. data/app/views/catalog/_upper_metadata.html.erb +0 -20
  135. data/spec/fixtures/solr_documents/umn_metro_result2.json +0 -39
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b6b5a2a687ebb538b81e612ae973587c11c30f84
4
- data.tar.gz: 720dc64d284c889f81d99a8fedbefe83c855b9db
3
+ metadata.gz: 7f6f7e3ec44252086ea0128a9b13faddaf5803c9
4
+ data.tar.gz: d7ee0ef4ee9c272ed30ddd3e14a7f90db875a798
5
5
  SHA512:
6
- metadata.gz: 957e36971bdb8e95eb07ccd6100cb7aca43df15347344088152f6f8fb3d319f02ed31db85dd13e497c757242f4b54753bf9901fbac9591a6d97adb3b9ad987d7
7
- data.tar.gz: b45106b0fb306f0e9b950b4a057758d358a650e11a2f681b940cf91de9b98bbccd19b18949bae2d52c9a89b0b4d5a3c74e222a12cd8f53464a3e1afc0435e57e
6
+ metadata.gz: '04023491e031e0f4cb74eed28c0ee4f77fa83d090031edc46032ce0174e919d4d5bcee5f38b17d2300a769220cff24bceb63ddc9332d11214eba250fdac69a44'
7
+ data.tar.gz: 1c1f049700647e865452c0f78d81eb51384dbae93e4acdc6f7629e9d628a2821aec02fcd8fdffb81519d9d6eb1a1c4320a17a0d05b43a0e73d9c25b83353dbed
@@ -34,7 +34,7 @@ jobs:
34
34
  key: geoblacklight-solr{{ checksum ".solr_wrapper" }}
35
35
  paths:
36
36
  - tmp/solr
37
- # Run specs
37
+ # Run the test suites
38
38
  - run: bundle exec rake ci
39
39
  # Store bundle cache
40
40
  - type: cache-save
@@ -73,7 +73,7 @@ jobs:
73
73
  key: geoblacklight-solr{{ checksum ".solr_wrapper" }}
74
74
  paths:
75
75
  - tmp/solr
76
- # Run specs
76
+ # Run the test suites
77
77
  - run: bundle exec rake ci
78
78
  # Store bundle cache
79
79
  - type: cache-save
@@ -9,6 +9,7 @@ Rails:
9
9
  Enabled: true
10
10
 
11
11
  AllCops:
12
+ TargetRubyVersion: 2.3
12
13
  DisplayCopNames: true
13
14
  Include:
14
15
  - '**/Rakefile'
@@ -40,6 +41,7 @@ Metrics/LineLength:
40
41
  - 'Rakefile'
41
42
  - 'lib/generators/geoblacklight/install_generator.rb'
42
43
  - 'lib/tasks/geoblacklight.rake'
44
+ - 'app/models/concerns/geoblacklight/spatial_search_behavior.rb'
43
45
 
44
46
  Metrics/MethodLength:
45
47
  Max: 16
@@ -65,6 +67,7 @@ RSpec/AnyInstance:
65
67
  - 'spec/models/concerns/geoblacklight/solr_document_spec.rb'
66
68
  - 'spec/helpers/geoblacklight_helper_spec.rb'
67
69
  - 'spec/models/concerns/geoblacklight/solr_document/finder_spec.rb'
70
+ - 'spec/features/download_layer_spec.rb'
68
71
 
69
72
  # Rubocop bug causes view specs to fail.
70
73
  # https://github.com/nevir/rubocop-rspec/issues/47
@@ -72,20 +75,7 @@ RSpec/DescribeClass:
72
75
  Enabled: false
73
76
 
74
77
  RSpec/ExampleLength:
75
- Exclude:
76
- - 'spec/views/catalog/_show_downloads.html.erb_spec.rb'
77
- - 'spec/features/download_layer_spec.rb'
78
- - 'spec/features/home_page_spec.rb'
79
- - 'spec/features/index_map_spec.rb'
80
- - 'spec/features/metadata_panel_spec.rb'
81
- - 'spec/features/saved_searches_spec.rb'
82
- - 'spec/features/search_results_map_spec.rb'
83
- - 'spec/features/show_page_metadata_spec.rb'
84
- - 'spec/features/split_view.html.erb_spec.rb'
85
- - 'spec/features/web_services_modal_spec.rb'
86
- - 'spec/helpers/geoblacklight_helper_spec.rb'
87
- - 'spec/models/concerns/geoblacklight/solr_document/carto_spec.rb'
88
- - 'spec/models/concerns/geoblacklight/solr_document/finder_spec.rb'
78
+ Enabled: false
89
79
 
90
80
  RSpec/VerifiedDoubles:
91
81
  Exclude:
@@ -1,16 +1,31 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2018-07-24 14:15:32 -0500 using RuboCop version 0.52.1.
3
+ # on 2018-12-21 14:41:38 -0700 using RuboCop version 0.52.1.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
- # Offense count: 17
9
+ # Offense count: 16
10
10
  # Cop supports --auto-correct.
11
11
  # Configuration parameters: Width, IgnoredPatterns.
12
12
  Layout/IndentationWidth:
13
- Enabled: false
13
+ Exclude:
14
+ - 'app/controllers/download_controller.rb'
15
+ - 'app/controllers/relation_controller.rb'
16
+ - 'app/controllers/wms_controller.rb'
17
+ - 'app/helpers/carto_helper.rb'
18
+ - 'app/models/concerns/geoblacklight/solr_document.rb'
19
+ - 'app/models/concerns/geoblacklight/solr_document/finder.rb'
20
+ - 'lib/geoblacklight/bounding_box.rb'
21
+ - 'lib/geoblacklight/download.rb'
22
+ - 'lib/geoblacklight/metadata/base.rb'
23
+ - 'lib/geoblacklight/metadata/fgdc.rb'
24
+ - 'lib/geoblacklight/metadata/iso19139.rb'
25
+ - 'lib/geoblacklight/metadata_transformer/base.rb'
26
+ - 'lib/geoblacklight/reference.rb'
27
+ - 'lib/geoblacklight/references.rb'
28
+ - 'lib/tasks/geoblacklight.rake'
14
29
 
15
30
  # Offense count: 1
16
31
  # Cop supports --auto-correct.
@@ -26,7 +41,7 @@ Lint/UnusedBlockArgument:
26
41
  Exclude:
27
42
  - 'lib/tasks/geoblacklight.rake'
28
43
 
29
- # Offense count: 37
44
+ # Offense count: 46
30
45
  # Configuration parameters: CountComments, ExcludedMethods.
31
46
  Metrics/BlockLength:
32
47
  Max: 227
@@ -45,33 +60,14 @@ RSpec/EmptyExampleGroup:
45
60
  - 'spec/views/catalog/_document_split.html.erb_spec.rb'
46
61
  - 'spec/views/catalog/_index_split.html.erb_spec.rb'
47
62
 
48
- # Offense count: 24
49
- # Configuration parameters: Max.
50
- RSpec/ExampleLength:
51
- Exclude:
52
- - 'spec/features/download_layer_spec.rb'
53
- - 'spec/features/home_page_spec.rb'
54
- - 'spec/features/index_map_spec.rb'
55
- - 'spec/features/metadata_panel_spec.rb'
56
- - 'spec/features/saved_searches_spec.rb'
57
- - 'spec/features/search_results_map_spec.rb'
58
- - 'spec/features/show_page_metadata_spec.rb'
59
- - 'spec/features/split_view.html.erb_spec.rb'
60
- - 'spec/features/web_services_modal_spec.rb'
61
- - 'spec/helpers/geoblacklight_helper_spec.rb'
62
- - 'spec/models/concerns/geoblacklight/solr_document/carto_spec.rb'
63
- - 'spec/models/concerns/geoblacklight/solr_document/finder_spec.rb'
64
- - 'spec/views/catalog/_downloads.html.erb_spec.rb'
65
-
66
- # Offense count: 2
63
+ # Offense count: 1
67
64
  # Configuration parameters: EnforcedStyle.
68
65
  # SupportedStyles: implicit, each, example
69
66
  RSpec/HookArgument:
70
67
  Exclude:
71
68
  - 'spec/spec_helper.rb'
72
- - 'spec/views/catalog/_downloads.html.erb_spec.rb'
73
69
 
74
- # Offense count: 9
70
+ # Offense count: 8
75
71
  RSpec/LeadingSubject:
76
72
  Exclude:
77
73
  - 'spec/lib/geoblacklight/document_presenter_spec.rb'
@@ -79,15 +75,14 @@ RSpec/LeadingSubject:
79
75
  - 'spec/lib/geoblacklight/metadata_transformer/fgdc_spec.rb'
80
76
  - 'spec/lib/geoblacklight/metadata_transformer/iso19139_spec.rb'
81
77
  - 'spec/lib/geoblacklight/metadata_transformer_spec.rb'
82
- - 'spec/models/concerns/geoblacklight/spatial_search_behavior_spec.rb'
83
78
 
84
- # Offense count: 58
79
+ # Offense count: 49
85
80
  # Configuration parameters: .
86
81
  # SupportedStyles: have_received, receive
87
82
  RSpec/MessageSpies:
88
83
  EnforcedStyle: receive
89
84
 
90
- # Offense count: 38
85
+ # Offense count: 24
91
86
  RSpec/NamedSubject:
92
87
  Exclude:
93
88
  - 'spec/lib/geoblacklight/metadata/base_spec.rb'
@@ -95,8 +90,6 @@ RSpec/NamedSubject:
95
90
  - 'spec/lib/geoblacklight/metadata_transformer/fgdc_spec.rb'
96
91
  - 'spec/lib/geoblacklight/metadata_transformer/iso19139_spec.rb'
97
92
  - 'spec/lib/geoblacklight/metadata_transformer_spec.rb'
98
- - 'spec/models/concerns/geoblacklight/solr_document/carto_spec.rb'
99
- - 'spec/models/concerns/geoblacklight/solr_document/finder_spec.rb'
100
93
  - 'spec/models/concerns/geoblacklight/solr_document/inspection_spec.rb'
101
94
  - 'spec/models/concerns/geoblacklight/spatial_search_behavior_spec.rb'
102
95
 
@@ -112,24 +105,11 @@ RSpec/RepeatedExample:
112
105
  Exclude:
113
106
  - 'spec/features/esri_viewer_spec.rb'
114
107
 
115
- # Offense count: 1
108
+ # Offense count: 2
116
109
  RSpec/SubjectStub:
117
110
  Exclude:
118
111
  - 'spec/models/concerns/geoblacklight/spatial_search_behavior_spec.rb'
119
112
 
120
- # Offense count: 12
121
- # Configuration parameters: IgnoreSymbolicNames.
122
- RSpec/VerifiedDoubles:
123
- Exclude:
124
- - 'spec/helpers/geoblacklight_helper_spec.rb'
125
- - 'spec/lib/geoblacklight/document_presenter_spec.rb'
126
- - 'spec/lib/geoblacklight/download_spec.rb'
127
- - 'spec/lib/geoblacklight/geoblacklight_helper_behavior_spec.rb'
128
- - 'spec/lib/geoblacklight/wms_layer_spec.rb'
129
- - 'spec/models/concerns/geoblacklight/solr_document/finder_spec.rb'
130
- - 'spec/models/concerns/geoblacklight/spatial_search_behavior_spec.rb'
131
- - 'spec/views/catalog/_downloads.html.erb_spec.rb'
132
-
133
113
  # Offense count: 7
134
114
  Rails/FilePath:
135
115
  Exclude:
@@ -139,7 +119,7 @@ Rails/FilePath:
139
119
  - 'spec/lib/geoblacklight/metadata_transformer/fgdc_spec.rb'
140
120
  - 'spec/lib/geoblacklight/metadata_transformer/iso19139_spec.rb'
141
121
 
142
- # Offense count: 6
122
+ # Offense count: 7
143
123
  Rails/OutputSafety:
144
124
  Exclude:
145
125
  - 'app/controllers/download_controller.rb'
@@ -166,6 +146,13 @@ Style/EmptyLiteral:
166
146
  Exclude:
167
147
  - 'spec/models/concerns/geoblacklight/spatial_search_behavior_spec.rb'
168
148
 
149
+ # Offense count: 128
150
+ # Cop supports --auto-correct.
151
+ # Configuration parameters: EnforcedStyle.
152
+ # SupportedStyles: when_needed, always, never
153
+ Style/FrozenStringLiteralComment:
154
+ Enabled: false
155
+
169
156
  # Offense count: 3
170
157
  # Cop supports --auto-correct.
171
158
  # Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
@@ -180,13 +167,23 @@ Style/MethodMissing:
180
167
  - 'app/models/concerns/geoblacklight/solr_document.rb'
181
168
  - 'lib/geoblacklight/references.rb'
182
169
 
183
- # Offense count: 1
170
+ # Offense count: 2
184
171
  # Cop supports --auto-correct.
185
172
  Style/MultilineIfModifier:
186
173
  Exclude:
174
+ - 'app/helpers/geoblacklight_helper.rb'
187
175
  - 'lib/geoblacklight/references.rb'
188
176
 
189
- # Offense count: 12
177
+ # Offense count: 2
178
+ # Cop supports --auto-correct.
179
+ # Configuration parameters: AutoCorrect, EnforcedStyle.
180
+ # SupportedStyles: predicate, comparison
181
+ Style/NumericPredicate:
182
+ Exclude:
183
+ - 'spec/**/*'
184
+ - 'lib/geoblacklight/relation/relation_response.rb'
185
+
186
+ # Offense count: 11
190
187
  # Cop supports --auto-correct.
191
188
  # Configuration parameters: PreferredDelimiters.
192
189
  Style/PercentLiteralDelimiters:
@@ -196,9 +193,15 @@ Style/PercentLiteralDelimiters:
196
193
  - 'spec/lib/geoblacklight/document_presenter_spec.rb'
197
194
  - 'spec/lib/geoblacklight/references_spec.rb'
198
195
  - 'spec/lib/geoblacklight/wms_layer/feature_info_response_spec.rb'
199
- - 'spec/models/concerns/geoblacklight/solr_document/finder_spec.rb'
200
196
  - 'spec/spec_helper.rb'
201
197
 
198
+ # Offense count: 1
199
+ # Cop supports --auto-correct.
200
+ # Configuration parameters: ConvertCodeThatCanStartToReturnNil.
201
+ Style/SafeNavigation:
202
+ Exclude:
203
+ - 'app/models/concerns/geoblacklight/solr_document.rb'
204
+
202
205
  # Offense count: 5
203
206
  # Cop supports --auto-correct.
204
207
  # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
data/README.md CHANGED
@@ -26,6 +26,9 @@ $ rake geoblacklight:server
26
26
  Or install with [Docker](https://github.com/geoblacklight/geoblacklight-docker)
27
27
  For more information see the [installation guide](https://github.com/geoblacklight/geoblacklight/wiki/Installation)
28
28
 
29
+ ### Webpacker
30
+ GeoBlacklight can use [Webpacker](https://github.com/rails/webpacker) in order to manage JavaScript dependencies and assets, which requires that either [Yarn](https://yarnpkg.com/) or the [Node Package Manager](https://www.npmjs.com/) be available on the system where this is deployed. How Webpacker interacts with Rails is overviewed within its own documentation, including [how best to configure JavaScript processing settings](https://github.com/rails/webpacker/blob/master/docs/webpack.md). We encourage you to review this.
31
+
29
32
  ### Contributing
30
33
  Interested in contributing to GeoBlacklight? Please see our [contributing](CONTRIBUTING.md) guide.
31
34
 
data/Rakefile CHANGED
@@ -14,8 +14,6 @@ require 'rspec/core/rake_task'
14
14
  require 'rubocop/rake_task'
15
15
  require 'solr_wrapper/rake_task'
16
16
 
17
- EngineCart.fingerprint_proc = EngineCart.rails_fingerprint_proc
18
-
19
17
  desc 'Run RuboCop style checker'
20
18
  RuboCop::RakeTask.new(:rubocop) do |task|
21
19
  task.requires << 'rubocop-rspec'
@@ -38,6 +36,7 @@ task ci: ['geoblacklight:generate'] do
38
36
  solr.with_collection(name: 'blacklight-core', dir: File.join(File.expand_path('.', File.dirname(__FILE__)), 'solr', 'conf')) do
39
37
  within_test_app do
40
38
  system 'RAILS_ENV=test rake geoblacklight:index:seed'
39
+ system 'RAILS_ENV=test bundle exec rails webpacker:compile'
41
40
  end
42
41
  Rake::Task['geoblacklight:coverage'].invoke
43
42
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  GeoBlacklight.Basemaps = {
4
4
  darkMatter: L.tileLayer(
5
- 'http://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{retina}.png', {
5
+ 'https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{retina}.png', {
6
6
  attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, &copy; <a href="http://carto.com/attributions">Carto</a>',
7
7
  maxZoom: 18,
8
8
  worldCopyJump: true,
@@ -11,7 +11,7 @@ GeoBlacklight.Basemaps = {
11
11
  }
12
12
  ),
13
13
  positron: L.tileLayer(
14
- 'http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{retina}.png', {
14
+ 'https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{retina}.png', {
15
15
  attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, &copy; <a href="http://carto.com/attributions">Carto</a>',
16
16
  maxZoom: 18,
17
17
  worldCopyJump: true,
@@ -20,7 +20,7 @@ GeoBlacklight.Basemaps = {
20
20
  }
21
21
  ),
22
22
  positronLite: L.tileLayer(
23
- 'http://{s}.basemaps.cartocdn.com/light_nolabels/{z}/{x}/{y}{retina}.png', {
23
+ 'https://{s}.basemaps.cartocdn.com/light_nolabels/{z}/{x}/{y}{retina}.png', {
24
24
  attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, &copy; <a href="http://carto.com/attributions">Carto</a>',
25
25
  maxZoom: 18,
26
26
  worldCopyJump: true,
@@ -10,7 +10,7 @@
10
10
  L.Util.setOptions(this, options);
11
11
  this.$el = $(el);
12
12
  this.options.spinner.hide();
13
- $('.exports .panel-heading').append(this.options.spinner);
13
+ $('.exports .card-header').append(this.options.spinner);
14
14
  this.configureHandler();
15
15
  },
16
16
 
@@ -21,7 +21,7 @@
21
21
 
22
22
  var GeoBlacklight = L.Class.extend({
23
23
  statics: {
24
- __version__: '1.9.1',
24
+ __version__: '2.0.0',
25
25
 
26
26
  debounce: function(fn, delay) {
27
27
  var timeout = null;
@@ -2,7 +2,7 @@ Blacklight.onLoad(function() {
2
2
  $('[data-download-path]').each(function(i, element) {
3
3
  GeoBlacklight.downloader(element);
4
4
  });
5
- $('#ajax-modal').on('loaded.blacklight.ajax-modal', function() {
5
+ $('#blacklight-modal').on('loaded.blacklight.blacklight-modal', function() {
6
6
  var modal = this;
7
7
  $(this).find('#hglRequest').each(function() {
8
8
  GeoBlacklight.hglDownloader(this, { modal: modal });
@@ -1,8 +1,9 @@
1
1
  Blacklight.onLoad(function() {
2
2
  $('[data-map="home"]').each(function(i, element) {
3
3
 
4
- var geoblacklight = new GeoBlacklight.Viewer.Map(this),
5
- data = $(this).data();
4
+ var geoblacklight = new GeoBlacklight.Viewer.Map(this);
5
+ var data = $(this).data();
6
+
6
7
  geoblacklight.map.addControl(L.control.geosearch({
7
8
  baseUrl: data.catalogPath,
8
9
  dynamic: false,
@@ -6,6 +6,14 @@ GeoBlacklight.Util = {
6
6
  var urlRegEx = /((([A-Za-z]{3,9}:(?:\/\/)?)(?:[\-;:&=\+\$,\w]+@)?[A-Za-z0-9\.\-]+|(?:www\.|[\-;:&=\+\$,\w]+@)[A-Za-z0-9\.\-]+)((?:\/[\+~%\/\.\w\-]*)?\??(?:[\-\+=&;%@\.\w]*)#?(?:[\.\!\/\\\w]*))?)/g;
7
7
  return str.toString().replace(urlRegEx, '<a href=\'$1\'>$1</a>');
8
8
  },
9
+ /**
10
+ * Calls the index map download template
11
+ * @param {Object} data - GeoJSON feature properties object
12
+ * @param {requestCallback} cb
13
+ */
14
+ indexMapDownloadTemplate: function(data, cb) {
15
+ cb(HandlebarsTemplates["index_map_download"](data));
16
+ },
9
17
  /**
10
18
  * Calls the index map template
11
19
  * @param {Object} data - GeoJSON feature properties object
@@ -0,0 +1,19 @@
1
+ {{#if downloadUrl}}
2
+ <li class="list-group-item download js-index-map-feature">
3
+ <h3 class="card-subtitle">Selected feature</h3>
4
+
5
+ <ul class="list-group list-group-flush list-group-nested">
6
+ <li class="list-group-item download">
7
+ <div class="download-link-container">
8
+ <a class="btn btn-default download download-original" href="{{downloadUrl}}">
9
+ {{#if label}}
10
+ {{label}}
11
+ {{else}}
12
+ Download
13
+ {{/if}}
14
+ </a>
15
+ </div>
16
+ </li>
17
+ </ul>
18
+ </li>
19
+ {{/if}}
@@ -1,8 +1,10 @@
1
1
  <div class="index-map-info">
2
2
  {{#if title}}
3
- <h3>{{title}}</h3>
3
+ <div class="col-sm-12">
4
+ <h3>{{title}}</h3>
5
+ </div>
4
6
  {{/if}}
5
- <div class="">
7
+ <div class="col-sm-12">
6
8
  {{#if thumbnailUrl}}
7
9
  {{#if websiteUrl}}
8
10
  <a href="{{websiteUrl}}">
@@ -12,26 +14,26 @@
12
14
  <img src="{{thumbnailUrl}}">
13
15
  {{/if}}
14
16
  {{/if}}
15
- <dl>
17
+ <dl class="row dl-invert document-metadata">
16
18
  {{#if websiteUrl}}
17
- <dt>Website</dt>
18
- <dd><a href="{{websiteUrl}}">{{websiteUrl}}</a></dd>
19
+ <dt class="col-sm-3">Website:</dt>
20
+ <dd class="col-sm-9"><a href="{{websiteUrl}}">{{websiteUrl}}</a></dd>
19
21
  {{/if}}
20
22
  {{#if downloadUrl}}
21
- <dt>Download</dt>
22
- <dd><a href="{{downloadUrl}}">{{downloadUrl}}</a></dd>
23
+ <dt class="col-sm-3">Download:</dt>
24
+ <dd class="col-sm-9"><a href="{{downloadUrl}}">{{downloadUrl}}</a></dd>
23
25
  {{/if}}
24
26
  {{#if recordIdentifier}}
25
- <dt>Record Identifier</dt>
26
- <dd>{{recordIdentifier}}</dd>
27
+ <dt class="col-sm-3">Record Identifier:</dt>
28
+ <dd class="col-sm-9">{{recordIdentifier}}</dd>
27
29
  {{/if}}
28
30
  {{#if label}}
29
- <dt>Label</dt>
30
- <dd>{{label}}</dd>
31
+ <dt class="col-sm-3">Label:</dt>
32
+ <dd class="col-sm-9">{{label}}</dd>
31
33
  {{/if}}
32
34
  {{#if note}}
33
- <dt>Note</dt>
34
- <dd>{{note}}</dd>
35
+ <dt class="col-sm-3">Note:</dt>
36
+ <dd class="col-sm-9">{{note}}</dd>
35
37
  {{/if}}
36
38
  </dl>
37
39
  </div>