geo_concerns 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/.eslintrc +8 -0
  3. data/.gitignore +1 -2
  4. data/.rubocop.yml +1 -0
  5. data/.travis.yml +7 -8
  6. data/Gemfile +1 -3
  7. data/README.md +3 -2
  8. data/app/assets/javascripts/geo_concerns/application.js +0 -1
  9. data/app/assets/javascripts/geo_concerns/bounding_box_selector.js +1 -2
  10. data/app/assets/javascripts/geo_concerns/es6-modules.js +7 -0
  11. data/app/assets/javascripts/geo_concerns/geo_concerns_boot.es6 +8 -0
  12. data/app/assets/javascripts/geo_concerns/relationships.js +3 -0
  13. data/app/assets/javascripts/geo_concerns/relationships/child_works.es6 +20 -0
  14. data/app/assets/javascripts/geo_concerns/relationships/parent_works.es6 +20 -0
  15. data/app/assets/javascripts/geo_concerns/relationships/related_works.es6 +187 -0
  16. data/app/assets/stylesheets/geo_concerns/related_works.scss +29 -0
  17. data/app/assets/stylesheets/geo_concerns/thumbnails.scss +12 -6
  18. data/app/helpers/geo_concerns/populate_metadata_helper.rb +7 -0
  19. data/app/jobs/delivery_job.rb +18 -0
  20. data/app/models/concerns/geo_concerns/file_set/derivatives.rb +9 -0
  21. data/app/models/concerns/geo_concerns/metadata_extraction_helper.rb +7 -8
  22. data/app/models/concerns/geo_concerns/solr_document_behavior.rb +17 -1
  23. data/app/presenters/geo_concerns/geo_concerns_show_presenter.rb +9 -1
  24. data/app/processors/geo_concerns/processors/base_geo_processor.rb +7 -7
  25. data/app/services/geo_concerns/delivery/geoserver.rb +64 -0
  26. data/app/services/geo_concerns/delivery_service.rb +11 -0
  27. data/app/services/geo_concerns/derivative_path.rb +1 -1
  28. data/app/services/geo_concerns/discovery/abstract_document.rb +4 -4
  29. data/app/services/geo_concerns/discovery/document_builder/basic_metadata_builder.rb +5 -12
  30. data/app/services/geo_concerns/discovery/document_builder/date_builder.rb +19 -8
  31. data/app/services/geo_concerns/discovery/document_builder/spatial_builder.rb +3 -8
  32. data/app/services/geo_concerns/discovery/geoblacklight_document.rb +32 -17
  33. data/app/views/curation_concerns/image_works/show.html.erb +1 -5
  34. data/app/views/curation_concerns/raster_works/_show_actions.html.erb +0 -14
  35. data/app/views/curation_concerns/raster_works/show.html.erb +1 -5
  36. data/app/views/curation_concerns/vector_works/show.html.erb +1 -5
  37. data/app/views/geo_concerns/_form_additional_information.html.erb +8 -8
  38. data/app/views/geo_concerns/_form_populate_metadata.html.erb +1 -1
  39. data/app/views/geo_concerns/_form_required_information.html.erb +0 -2
  40. data/app/views/geo_concerns/_related.html.erb +4 -0
  41. data/app/views/geo_concerns/file_sets/actions/_image_actions.html.erb +1 -1
  42. data/app/views/geo_concerns/file_sets/actions/_raster_actions.html.erb +2 -2
  43. data/app/views/geo_concerns/file_sets/actions/_vector_actions.html.erb +2 -2
  44. data/app/views/geo_concerns/related/_child_member.html.erb +13 -0
  45. data/app/views/geo_concerns/related/_child_works.html.erb +24 -0
  46. data/app/views/geo_concerns/related/_external_metadata_file_member.html.erb +8 -0
  47. data/app/views/geo_concerns/{_related_external_metadata_files.html.erb → related/_external_metadata_files.html.erb} +1 -2
  48. data/app/views/geo_concerns/{_related_geo_files.html.erb → related/_geo_files.html.erb} +0 -0
  49. data/app/views/geo_concerns/related/_new_child_member.html.erb +22 -0
  50. data/app/views/geo_concerns/related/_new_parent_member.html.erb +13 -0
  51. data/app/views/geo_concerns/related/_parent_member.html.erb +13 -0
  52. data/app/views/geo_concerns/related/_parent_works.html.erb +22 -0
  53. data/geo_concerns.gemspec +9 -6
  54. data/lib/generators/geo_concerns/install_generator.rb +10 -8
  55. data/lib/generators/geo_concerns/templates/config/geoserver.yml +17 -0
  56. data/lib/generators/geo_concerns/templates/config/locales/geo_concerns.en.yml +4 -0
  57. data/lib/geo_concerns/version.rb +1 -1
  58. data/spec/factories/collections.rb +17 -0
  59. data/spec/features/create_raster_work_spec.rb +5 -2
  60. data/spec/forms/geo_concerns/image_work_form_spec.rb +2 -2
  61. data/spec/helpers/geo_concerns/populate_metadata_helper_spec.rb +31 -0
  62. data/spec/jobs/delivery_job_spec.rb +25 -0
  63. data/spec/models/concerns/geo_concerns/file_set/derivatives_spec.rb +9 -0
  64. data/spec/models/image_work_spec.rb +1 -1
  65. data/spec/models/raster_work_spec.rb +1 -1
  66. data/spec/models/solr_document_spec.rb +2 -2
  67. data/spec/models/vector_work_spec.rb +1 -5
  68. data/spec/presenters/raster_work_show_presenter_spec.rb +22 -0
  69. data/spec/processors/geo_concerns/processors/base_geo_processor_spec.rb +14 -5
  70. data/spec/services/derivative_path_spec.rb +19 -5
  71. data/spec/services/geo_concerns/delivery/geoserver_spec.rb +72 -0
  72. data/spec/services/geo_concerns/delivery_service_spec.rb +15 -0
  73. data/spec/services/geo_concerns/discovery/document_builder_spec.rb +56 -38
  74. data/spec/services/geo_concerns/discovery/geoblacklight_document_spec.rb +7 -5
  75. data/template.rb +1 -1
  76. metadata +94 -19
  77. data/app/views/geo_concerns/_related_geo_works.html.erb +0 -32
  78. data/lib/generators/geo_concerns/templates/config/discovery/geoblacklight_schema.json +0 -168
  79. data/lib/generators/geo_concerns/templates/jobs/characterize_job.rb +0 -19
@@ -16,9 +16,5 @@
16
16
 
17
17
  <%= render 'geo_concerns/representative_media', presenter: @presenter %>
18
18
  <%= render 'geo_concerns/attributes', presenter: @presenter %>
19
-
20
- <%= render 'geo_concerns/related_geo_files', presenter: @presenter %>
21
- <%= render 'geo_concerns/related_external_metadata_files', presenter: @presenter %>
22
- <%= render 'geo_concerns/related_geo_works', presenter: @presenter %>
23
-
19
+ <%= render 'geo_concerns/related', presenter: @presenter %>
24
20
  <%= render "show_actions", collector: collector, editor: editor%>
@@ -6,20 +6,6 @@
6
6
  <% end %>
7
7
  <% if editor %>
8
8
  <%= link_to "Edit This #{@presenter.human_readable_type}", edit_polymorphic_path([main_app, @presenter]), class: 'btn btn-default' %>
9
- <% if @presenter.valid_child_concerns.length > 0 %>
10
- <div class="btn-group">
11
- <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
12
- Attach Child <span class="caret"></span>
13
- </button>
14
- <ul class="dropdown-menu">
15
- <% @presenter.valid_child_concerns.each do |concern| %>
16
- <li>
17
- <%= link_to "Attach #{concern.human_readable_type}", polymorphic_path([main_app, :new, :curation_concerns, :parent, concern.model_name.singular], parent_id: @presenter.id) %>
18
- </li>
19
- <% end %>
20
- </ul>
21
- </div>
22
- <% end %>
23
9
  <%= render 'raster_actions', document: @presenter %>
24
10
  <%= link_to "Delete This #{@presenter.human_readable_type}", [main_app, @presenter], class: 'btn btn-danger pull-right', data: { confirm: "Delete this #{@presenter.human_readable_type}?" }, method: :delete %>
25
11
  <% end %>
@@ -16,9 +16,5 @@
16
16
 
17
17
  <%= render 'geo_concerns/representative_media', presenter: @presenter %>
18
18
  <%= render 'geo_concerns/attributes', presenter: @presenter %>
19
-
20
- <%= render 'geo_concerns/related_geo_files', presenter: @presenter %>
21
- <%= render 'geo_concerns/related_external_metadata_files', presenter: @presenter %>
22
- <%= render 'geo_concerns/related_geo_works', presenter: @presenter %>
23
-
19
+ <%= render 'geo_concerns/related', presenter: @presenter %>
24
20
  <%= render "show_actions", collector: collector, editor: editor%>
@@ -16,9 +16,5 @@
16
16
 
17
17
  <%= render 'geo_concerns/representative_media', presenter: @presenter %>
18
18
  <%= render 'geo_concerns/attributes', presenter: @presenter %>
19
-
20
- <%= render 'geo_concerns/related_geo_files', presenter: @presenter %>
21
- <%= render 'geo_concerns/related_external_metadata_files', presenter: @presenter %>
22
- <%= render 'geo_concerns/related_geo_works', presenter: @presenter %>
23
-
19
+ <%= render 'geo_concerns/related', presenter: @presenter %>
24
20
  <%= render "show_actions", collector: collector, editor: editor%>
@@ -1,11 +1,11 @@
1
1
  <fieldset class="optional prompt">
2
2
  <legend>Additional Information</legend>
3
- <%= f.input :subject, as: :multi_value, input_html: { class: 'form-control' } %>
4
- <%= f.input :publisher, as: :multi_value, input_html: { class: 'form-control' } %>
5
- <%= f.input :source, as: :multi_value, input_html: { class: 'form-control' } %>
6
- <%= f.input :language, as: :multi_value, input_html: { class: 'form-control' } %>
7
- <%= f.input :spatial, as: :multi_value, input_html: { class: 'form-control' } %>
8
- <%= f.input :temporal, as: :multi_value, input_html: { class: 'form-control' } %>
9
- <%= f.input :issued, input_html: { class: 'form-control' } %>
10
- <%= f.input :provenance, input_html: { class: 'form-control' } %>
3
+ <%= f.input :contributor, as: :multi_value, input_html: { class: 'form-control' } %>
4
+ <%= f.input :subject, as: :multi_value, input_html: { class: 'form-control' } %>
5
+ <%= f.input :publisher, as: :multi_value, input_html: { class: 'form-control' } %>
6
+ <%= f.input :source, as: :multi_value, input_html: { class: 'form-control' } %>
7
+ <%= f.input :language, as: :multi_value, input_html: { class: 'form-control' } %>
8
+ <%= f.input :spatial, as: :multi_value, input_html: { class: 'form-control' } %>
9
+ <%= f.input :temporal, as: :multi_value, input_html: { class: 'form-control' } %>
10
+ <%= f.input :issued, input_html: { class: 'form-control' } %>
11
11
  </fieldset>
@@ -2,7 +2,7 @@
2
2
  <div class="col-md-12">
3
3
  <fieldset id="set-populate-metadata">
4
4
  <legend>Automatically Populate Metadata</legend>
5
- <%= f.input :should_populate_metadata, as: :select, input_html: { class: 'form-control' }, label: 'Populate Metadata from External Metadata File', selected: false %>
5
+ <%= f.input :should_populate_metadata, as: :select, input_html: { class: 'form-control' }, label: 'Populate Metadata from External Metadata File', selected: false, include_blank: true, label_method: lambda { |x| x.label }, collection: external_metadata_file_presenters %>
6
6
  </fieldset>
7
7
  </div>
8
8
  </div>
@@ -5,8 +5,6 @@
5
5
 
6
6
  <%= f.input :creator, as: :multi_value %>
7
7
 
8
- <%= f.input :contributor, as: :multi_value, input_html: { class: 'form-control' } %>
9
-
10
8
  <%= f.input :description, as: :multi_value, input_html: { rows: '14', type: 'textarea'} %>
11
9
 
12
10
  </fieldset>
@@ -0,0 +1,4 @@
1
+ <%= render 'geo_concerns/related/geo_files', presenter: @presenter %>
2
+ <%= render 'geo_concerns/related/external_metadata_files', presenter: @presenter %>
3
+ <%= render 'geo_concerns/related/child_works', presenter: @presenter %>
4
+ <%= render 'geo_concerns/related/parent_works', presenter: @presenter %>
@@ -15,7 +15,7 @@
15
15
  <button class="btn btn-default btn-small dropdown-toggle" data-toggle="dropdown" href="#"> Download <span class="caret"></span></button>
16
16
  <ul class="dropdown-menu">
17
17
  <li>
18
- <%= link_to "File", main_app.download_path(file_set) %>
18
+ <%= link_to "File", main_app.download_path(file_set), target: '_blank' %>
19
19
  </li>
20
20
  </ul>
21
21
  </div>
@@ -15,10 +15,10 @@
15
15
  <button class="btn btn-default btn-small dropdown-toggle" data-toggle="dropdown" href="#"> Download <span class="caret"></span></button>
16
16
  <ul class="dropdown-menu">
17
17
  <li>
18
- <%= link_to "File", main_app.download_path(file_set) %>
18
+ <%= link_to "File", main_app.download_path(file_set), target: '_blank' %>
19
19
  </li>
20
20
  <li>
21
- <%= link_to "Display Raster",main_app.download_path(file_set, file: 'display_raster') %>
21
+ <%= link_to "Display Raster", main_app.download_path(file_set, file: 'display_raster'), target: '_blank' %>
22
22
  </li>
23
23
  </ul>
24
24
  </div>
@@ -15,10 +15,10 @@
15
15
  <button class="btn btn-default btn-small dropdown-toggle" data-toggle="dropdown" href="#"> Download <span class="caret"></span></button>
16
16
  <ul class="dropdown-menu">
17
17
  <li>
18
- <%= link_to "File", main_app.download_path(file_set) %>
18
+ <%= link_to "File", main_app.download_path(file_set), target: '_blank' %>
19
19
  </li>
20
20
  <li>
21
- <%= link_to "Display Vector",main_app.download_path(file_set, file: 'display_vector') %>
21
+ <%= link_to "Display Vector",main_app.download_path(file_set, file: 'display_vector'), target: '_blank' %>
22
22
  </li>
23
23
  </ul>
24
24
  </div>
@@ -0,0 +1,13 @@
1
+ <tr class="attributes" data-work-id="<%= child_member.id %>">
2
+ <td class="thumbnail" style="margin-bottom: 0px">
3
+ <%= render_thumbnail_tag child_member %>
4
+ </td>
5
+ <td>
6
+ <%= link_to child_member.title.first, contextual_path(child_member, @presenter) %>
7
+ </td>
8
+ <td>
9
+ <% if can?(:edit, child_member.id) %>
10
+ <a class="btn btn-danger btn-remove-row">Remove</a>
11
+ <% end %>
12
+ </td>
13
+ </tr>
@@ -0,0 +1,24 @@
1
+ <% if child_geo_works_type(presenter) %>
2
+ <div class="panel panel-default" id="child-works">
3
+ <div class="panel-heading">
4
+ <h2>Child Works</h2>
5
+ </div>
6
+ <table class="table table-striped" data-query-url="<%= polymorphic_path([main_app, :curation_concerns, presenter.model_name.singular], id: @presenter.id) %>" data-members="<%= @presenter.member_presenters.map(&:id) %>" data-param-key="<%= @presenter.model_name.param_key %>">
7
+ <thead>
8
+ <% if presenter.work_presenters.present? %>
9
+ <tr>
10
+ <th class="col-xs-3"></th>
11
+ <th>Work Name</th>
12
+ <th>Actions</th>
13
+ </tr>
14
+ <% end %>
15
+ </thead>
16
+ <tbody>
17
+ <% if presenter.work_presenters.present? %>
18
+ <%= render partial: 'geo_concerns/related/child_member', collection: @presenter.work_presenters %>
19
+ <% end %>
20
+ </tbody>
21
+ </table>
22
+ <%= render partial: 'geo_concerns/related/new_child_member' %>
23
+ </div>
24
+ <% end %>
@@ -0,0 +1,8 @@
1
+ <tr class="<%= dom_class(external_metadata_file_member) %> attributes">
2
+ <td class="attribute filename"><%= link_to(external_metadata_file_member.link_name, main_app.curation_concerns_file_set_path(external_metadata_file_member)) %></td>
3
+ <td class="attribute date_uploaded"><%= external_metadata_file_member.date_uploaded %></td>
4
+ <td class="attribute permission"><%= external_metadata_file_member.permission_badge %></td>
5
+ <td>
6
+ <%= file_set_actions(external_metadata_file_member) %>
7
+ </td>
8
+ </tr>
@@ -6,7 +6,6 @@
6
6
  <table class="table table-striped">
7
7
  <thead>
8
8
  <tr>
9
- <th>File</th>
10
9
  <th>Filename</th>
11
10
  <th>Date Uploaded</th>
12
11
  <th>Visibility</th>
@@ -14,7 +13,7 @@
14
13
  </tr>
15
14
  </thead>
16
15
  <tbody>
17
- <%= render partial: 'geo_concerns/member', collection: presenter.external_metadata_file_set_presenters %>
16
+ <%= render partial: 'geo_concerns/related/external_metadata_file_member', collection: presenter.external_metadata_file_set_presenters %>
18
17
  </tbody>
19
18
  </table>
20
19
  </div>
@@ -0,0 +1,22 @@
1
+ <% if can? :edit, @presenter.id %>
2
+ <% if @presenter.valid_child_concerns.length > 0 %>
3
+ <div class="row member-actions">
4
+ <div class="col-sm-5">
5
+ <div class="input-group">
6
+ <input class="related_works_ids work_child_members_ids form-control" id="work_child_members_ids" value="" aria-labelledby="work_child_members_ids_label" type="text" placeholder="Existing child id...">
7
+ <span class="input-group-btn">
8
+ <a class="btn btn-primary btn-add-row">Attach</a>
9
+ </span>
10
+ </div>
11
+ <div class="message has-warning hidden"></div>
12
+ </div>
13
+ <div class="col-sm-7">
14
+ <div class="btn-group">
15
+ <% @presenter.valid_child_concerns.each do |concern| %>
16
+ <%= link_to "Attach New #{concern.human_readable_type}", polymorphic_path([main_app, :new, :curation_concerns, :parent, concern.model_name.singular], parent_id: @presenter.id), class: 'btn btn-default' %>
17
+ <% end %>
18
+ </div>
19
+ </div>
20
+ </div>
21
+ <% end %>
22
+ <% end %>
@@ -0,0 +1,13 @@
1
+ <% if can? :edit, @presenter.id %>
2
+ <div class="row member-actions">
3
+ <div class="col-sm-5">
4
+ <div class="input-group">
5
+ <input class="related_works_ids work_parent_members_ids form-control" id="work_parent_members_ids" value="" aria-labelledby="work_parent_members_ids_label" type="text" placeholder="Existing parent id...">
6
+ <span class="input-group-btn">
7
+ <a class="btn btn-primary btn-add-row">Attach</a>
8
+ </span>
9
+ </div>
10
+ <div class="message has-warning hidden"></div>
11
+ </div>
12
+ </div>
13
+ <% end %>
@@ -0,0 +1,13 @@
1
+ <tr class="attributes" data-work-id="<%= parent_member.id %>">
2
+ <td class="thumbnail" style="margin-bottom: 0px">
3
+ <%= render_thumbnail_tag parent_member.solr_document %>
4
+ </td>
5
+ <td>
6
+ <%= link_to parent_member.title.first, polymorphic_path([main_app, parent_member]) %>
7
+ </td>
8
+ <td>
9
+ <% if can?(:edit, parent_member.id) %>
10
+ <a class="btn btn-danger btn-remove-row">Remove</a>
11
+ <% end %>
12
+ </td>
13
+ </tr>
@@ -0,0 +1,22 @@
1
+ <div class="panel panel-default" id="parent-works">
2
+ <div class="panel-heading">
3
+ <h2>Parent Works</h2>
4
+ </div>
5
+ <table class="table table-striped" data-query-url="<%= polymorphic_path([main_app, :curation_concerns, presenter.model_name.singular], id: @presenter.id) %>" data-members="<%= @presenter.parent_work_presenters.map(&:id) %>" data-param-key="<%= @presenter.model_name.param_key %>">
6
+ <thead>
7
+ <% if presenter.parent_work_presenters.present? %>
8
+ <tr>
9
+ <th class="col-xs-3"></th>
10
+ <th>Work Name</th>
11
+ <th>Actions</th>
12
+ </tr>
13
+ <% end %>
14
+ </thead>
15
+ <tbody>
16
+ <% if presenter.parent_work_presenters.present? %>
17
+ <%= render partial: 'geo_concerns/related/parent_member', collection: @presenter.parent_work_presenters %>
18
+ <% end %>
19
+ </tbody>
20
+ </table>
21
+ <%= render partial: 'geo_concerns/related/new_parent_member' %>
22
+ </div>
data/geo_concerns.gemspec CHANGED
@@ -22,15 +22,18 @@ Gem::Specification.new do |spec|
22
22
 
23
23
  spec.add_dependency 'curation_concerns', '1.5.0'
24
24
  spec.add_dependency 'leaflet-rails', '~> 0.7'
25
- spec.add_dependency 'simple_mapnik', '0.1.0'
26
- spec.add_dependency 'json-schema'
25
+ spec.add_dependency 'simple_mapnik', '0.1.2'
26
+ spec.add_dependency 'json-schema', '>= 2.6.2'
27
+ spec.add_dependency 'rgeoserver', '>= 0.9.1'
28
+
29
+ spec.add_dependency 'bundler', '~> 1.12.5' # TODO: 1.13 breaks our builds
27
30
 
28
31
  spec.add_development_dependency 'sqlite3'
29
32
  spec.add_development_dependency 'devise', '>= 3.0', '< 5'
30
- spec.add_development_dependency 'rspec-rails'
31
- spec.add_development_dependency 'engine_cart', '~> 0.10'
32
- spec.add_development_dependency 'solr_wrapper', '>= 0.13.1'
33
- spec.add_development_dependency 'fcrepo_wrapper', '~> 0.1'
33
+ spec.add_development_dependency 'rspec-rails', '>= 3.5.2'
34
+ spec.add_development_dependency 'engine_cart', '~> 1.0', '>= 1.0.0'
35
+ spec.add_development_dependency 'solr_wrapper', '~> 0.18', '>= 0.18.0'
36
+ spec.add_development_dependency 'fcrepo_wrapper', '~> 0.6', '>= 0.6.0'
34
37
  spec.add_development_dependency 'pry-byebug'
35
38
  spec.add_development_dependency 'database_cleaner', '< 1.1.0'
36
39
  spec.add_development_dependency 'rubocop', '~> 0.39'
@@ -84,16 +84,11 @@ module GeoConcerns
84
84
  copy_file file_path, file_path
85
85
  end
86
86
 
87
- def install_discovery_config
88
- file_path = "config/discovery/geoblacklight_schema.json"
87
+ def install_geoserver_config
88
+ file_path = 'config/geoserver.yml'
89
89
  copy_file file_path, file_path
90
90
  end
91
91
 
92
- def override_characterize_job
93
- file_path = 'app/jobs/characterize_job.rb'
94
- copy_file 'jobs/characterize_job.rb', file_path
95
- end
96
-
97
92
  def inject_into_file_set
98
93
  file_path = 'app/models/file_set.rb'
99
94
  if File.exist?(file_path)
@@ -136,10 +131,17 @@ module GeoConcerns
136
131
  copy_file 'geo_concerns.scss', 'app/assets/stylesheets/geo_concerns.scss'
137
132
  file_path = 'app/assets/javascripts/application.js'
138
133
  inject_into_file file_path, before: %r{\/\/= require_tree \..*$} do
139
- "//= require geo_concerns\n"
134
+ "//= require geo_concerns\n" \
135
+ "//= require curation_concerns\n" \
136
+ "// Require es6 modules after almond is loaded in curation concerns.\n" \
137
+ "//= require geo_concerns/es6-modules\n"
140
138
  end
141
139
  end
142
140
 
141
+ def install_locale_config
142
+ copy_file 'config/locales/geo_concerns.en.yml'
143
+ end
144
+
143
145
  private
144
146
 
145
147
  def install_work
@@ -0,0 +1,17 @@
1
+ geoserver:
2
+ # Set to the REST API for the GeoServer
3
+ url: "http://localhost:8181/geoserver/rest"
4
+ # Optional user/password, set to false to disable
5
+ user: "admin"
6
+ password: "geoserver"
7
+ # Set to your GWC server, or "builtin" for the one bundled with GeoServer
8
+ geowebcache_url: "builtin"
9
+
10
+ # RestClient:
11
+ restclient:
12
+ # Set to false to disable or stdout/stderr or 'filename.out'
13
+ logfile: stderr
14
+ # Timeout (in seconds)
15
+ timeout: 300
16
+ # Open Timeout (in seconds)
17
+ open_timeout: 60
@@ -0,0 +1,4 @@
1
+ en:
2
+ geo_concerns:
3
+ institution:
4
+ uri: "https://your-institution"
@@ -1,3 +1,3 @@
1
1
  module GeoConcerns
2
- VERSION = "0.0.7".freeze
2
+ VERSION = "0.0.8".freeze
3
3
  end
@@ -0,0 +1,17 @@
1
+ FactoryGirl.define do
2
+ factory :collection do
3
+ transient do
4
+ user { FactoryGirl.create(:user) }
5
+ end
6
+
7
+ title ['Test collection title']
8
+
9
+ after(:build) do |collection, evaluator|
10
+ collection.apply_depositor_metadata(evaluator.user.user_key)
11
+ end
12
+
13
+ trait :public do
14
+ visibility Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PUBLIC
15
+ end
16
+ end
17
+ end
@@ -24,8 +24,11 @@ RSpec.feature 'RasterWorkController', type: :feature do
24
24
  expect(page).to have_text 'Open Access'
25
25
  expect(page).to have_link 'Attribution 3.0 United States', href: 'http://creativecommons.org/licenses/by/3.0/us/'
26
26
 
27
- click_button 'Attach Child'
28
- click_link 'Attach Vector Work'
27
+ expect(page).to have_css("input#work_child_members_ids")
28
+ expect(page).to have_css("input#work_parent_members_ids")
29
+ expect(page).to have_text 'Attach'
30
+
31
+ click_link 'Attach New Vector Work'
29
32
  expect(page).not_to have_text 'Add Your Content'
30
33
  fill_in 'vector_work_title', with: 'Vector Title'
31
34
  fill_in 'vector_work_temporal', with: '1990'
@@ -5,7 +5,7 @@ describe GeoConcerns::ImageWorkForm do
5
5
  let(:raw_attributes) { ActionController::Parameters.new(coverage: coverage.to_s) }
6
6
 
7
7
  describe ".model_attributes" do
8
- subject { described_class.model_attributes(raw_attributes) }
9
- it { is_expected.to eq('coverage' => coverage.to_s) }
8
+ subject { described_class.model_attributes(raw_attributes).to_unsafe_h }
9
+ it { is_expected.to include('coverage' => coverage.to_s) }
10
10
  end
11
11
  end
@@ -0,0 +1,31 @@
1
+ require 'spec_helper'
2
+
3
+ describe GeoConcerns::GeoWorksHelper do
4
+ let(:helper) { TestingHelper.new }
5
+ let(:show_presenter) { instance_double('ShowPresenter', class: GeoConcerns::GeoConcernsShowPresenter) }
6
+ let(:file_presenter) { instance_double('FilePresenter', class: CurationConcerns::FileSetPresenter) }
7
+ let(:file_presenters) { [file_presenter] }
8
+ before do
9
+ class TestingHelper
10
+ include GeoConcerns::PopulateMetadataHelper
11
+
12
+ def curation_concern
13
+ end
14
+ end
15
+ end
16
+ after do
17
+ Object.send(:remove_const, :TestingHelper)
18
+ end
19
+
20
+ describe '#external_metadata_file_presenters' do
21
+ before do
22
+ allow(GeoConcerns::GeoConcernsShowPresenter).to receive(:new).and_return(show_presenter)
23
+ end
24
+
25
+ it 'returns an array of external_metadata_file_presenters' do
26
+ expect(show_presenter).to receive(:external_metadata_file_set_presenters).and_return(file_presenters)
27
+ expect(helper).to receive(:curation_concern)
28
+ expect(helper.external_metadata_file_presenters).to eq(file_presenters)
29
+ end
30
+ end
31
+ end