geo_concerns 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +9 -2
- data/README.md +13 -0
- data/app/controllers/concerns/geo_concerns/file_sets_controller_behavior.rb +15 -0
- data/app/controllers/concerns/geo_concerns/geoblacklight_controller_behavior.rb +29 -0
- data/app/models/concerns/geo_concerns/ability.rb +12 -0
- data/app/models/concerns/geo_concerns/file_set/derivatives.rb +6 -6
- data/app/models/concerns/geo_concerns/geo_file_format_behavior.rb +4 -4
- data/app/presenters/geo_concerns/raster_work_show_presenter.rb +1 -1
- data/app/processors/geo_concerns/processors/mapnik.rb +30 -0
- data/app/processors/geo_concerns/processors/vector/base.rb +2 -1
- data/app/processors/geo_concerns/processors/vector/info.rb +66 -0
- data/app/services/geo_concerns/authority_service.rb +29 -0
- data/app/services/geo_concerns/discovery.rb +4 -0
- data/app/services/geo_concerns/discovery/abstract_document.rb +36 -0
- data/app/services/geo_concerns/discovery/document_builder.rb +69 -0
- data/app/services/geo_concerns/discovery/document_builder/basic_metadata_builder.rb +69 -0
- data/app/services/geo_concerns/discovery/document_builder/composite_builder.rb +21 -0
- data/app/services/geo_concerns/discovery/document_builder/date_builder.rb +38 -0
- data/app/services/geo_concerns/discovery/document_builder/document_helper.rb +10 -0
- data/app/services/geo_concerns/discovery/document_builder/document_path.rb +82 -0
- data/app/services/geo_concerns/discovery/document_builder/layer_info_builder.rb +65 -0
- data/app/services/geo_concerns/discovery/document_builder/references_builder.rb +82 -0
- data/app/services/geo_concerns/discovery/document_builder/spatial_builder.rb +40 -0
- data/app/services/geo_concerns/discovery/geoblacklight_document.rb +122 -0
- data/app/services/geo_concerns/image_format_service.rb +6 -0
- data/app/services/geo_concerns/metadata_format_service.rb +6 -0
- data/app/services/geo_concerns/raster_format_service.rb +6 -0
- data/app/services/geo_concerns/vector_format_service.rb +6 -0
- data/app/views/curation_concerns/image_works/show.html.erb +1 -1
- data/app/views/curation_concerns/raster_works/show.html.erb +1 -1
- data/app/views/curation_concerns/vector_works/show.html.erb +1 -1
- data/app/views/geo_concerns/_representative_media.html.erb +5 -0
- data/app/views/{curation_concerns → geo_concerns}/file_sets/_form.html.erb +4 -4
- data/app/views/geo_concerns/file_sets/media_display/_geo.html.erb +16 -0
- data/app/views/geo_concerns/file_sets/new.html.erb +12 -0
- data/config/routes.rb +18 -0
- data/geo_concerns.gemspec +2 -0
- data/lib/generators/geo_concerns/install_generator.rb +34 -0
- data/lib/generators/geo_concerns/templates/config/authorities/image_formats.yml +2 -0
- data/lib/generators/geo_concerns/templates/config/authorities/raster_formats.yml +4 -0
- data/lib/generators/geo_concerns/templates/config/authorities/vector_formats.yml +2 -0
- data/lib/generators/geo_concerns/templates/config/discovery/geoblacklight_schema.json +168 -0
- data/lib/generators/geo_concerns/templates/config/mapnik.yml +24 -0
- data/lib/generators/geo_concerns/templates/controllers/curation_concerns/image_works_controller.rb +1 -0
- data/lib/generators/geo_concerns/templates/controllers/curation_concerns/raster_works_controller.rb +1 -0
- data/lib/generators/geo_concerns/templates/controllers/curation_concerns/vector_works_controller.rb +1 -0
- data/lib/geo_concerns/version.rb +1 -1
- data/spec/controllers/file_sets_controller_spec.rb +20 -0
- data/spec/controllers/vector_works_controller_spec.rb +33 -0
- data/spec/processors/geo_concerns/processors/mapnik_spec.rb +48 -0
- data/spec/processors/geo_concerns/processors/vector/base_spec.rb +1 -1
- data/spec/processors/geo_concerns/processors/vector/info_spec.rb +41 -0
- data/spec/services/geo_concerns/discovery/abstract_document_spec.rb +23 -0
- data/spec/services/geo_concerns/discovery/document_builder_spec.rb +186 -0
- data/spec/services/geo_concerns/discovery/geoblacklight_document_spec.rb +17 -0
- data/spec/services/raster_format_service_spec.rb +1 -1
- data/template.rb +2 -2
- metadata +70 -9
- data/app/services/authority_service.rb +0 -23
- data/app/services/image_format_service.rb +0 -4
- data/app/services/metadata_format_service.rb +0 -4
- data/app/services/raster_format_service.rb +0 -4
- data/app/services/vector_format_service.rb +0 -4
@@ -1,23 +0,0 @@
|
|
1
|
-
module AuthorityService
|
2
|
-
extend ActiveSupport::Concern
|
3
|
-
|
4
|
-
included do
|
5
|
-
mattr_accessor :authority
|
6
|
-
end
|
7
|
-
|
8
|
-
class_methods do
|
9
|
-
def select_options
|
10
|
-
authority.all.map do |element|
|
11
|
-
[element[:label], element[:id]]
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
def label(id)
|
16
|
-
(authority.find(id) || {}).fetch('term', nil)
|
17
|
-
end
|
18
|
-
|
19
|
-
def include?(id)
|
20
|
-
!authority.find(id).nil? && !authority.find(id).empty?
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|