zizia 4.4.0.alpha.01 → 4.4.1.alpha.01
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9629a59be90ca2d1b2d56ea38c6a1de8bad912bd7c4843e21a8625fceb1ef581
|
4
|
+
data.tar.gz: 35aa1ba6679804b0ceaab32696ce3a2a4ff47076ccced0a585493e18933d09fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 723108c90866bf5d8d1db2380731f4448dc46c94eb670b708549f2fe5bc9c0a8032bc63f1e1ca9f0c16bf6283cd3eda970331986ab18cef7157d5f64b221205d
|
7
|
+
data.tar.gz: ef217c2d1820075ecaf8514c9d78b90ae4a76e0cf3f68426278a6f9b84383e7f39d938bd3d300f522d363c7ec1ad0aa02d917a1fa5818c218bb66601c96cc8d5
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Zizia
|
4
|
+
class ImporterDocumentationController < ::ApplicationController
|
5
|
+
def csv
|
6
|
+
send_data Zizia::CsvTemplate.new.to_s, type: 'text/csv; charset=utf-8', disposition: 'attachment', filename: 'import_template.csv'
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
@@ -19,7 +19,7 @@
|
|
19
19
|
<div class="well well-lg">
|
20
20
|
<p><b>Download a CSV template</b> to get started.</b></p>
|
21
21
|
<div class="text-center">
|
22
|
-
<a href="/importer_documentation/csv" data-turbolinks="false" class="btn btn-default btn-lg"><i class="glyphicon glyphicon-list"></i> Download
|
22
|
+
<a href="/importer_documentation/csv" data-turbolinks="false" class="btn btn-default btn-lg"><i class="glyphicon glyphicon-list"></i> Download an Import Template</a>
|
23
23
|
</div>
|
24
24
|
</div>
|
25
25
|
</div>
|
data/config/routes.rb
CHANGED
@@ -6,6 +6,7 @@ Zizia::Engine.routes.draw do
|
|
6
6
|
|
7
7
|
get 'importer_documentation/guide', to: 'metadata_details#show'
|
8
8
|
get 'importer_documentation/profile', to: 'metadata_details#profile'
|
9
|
+
get 'importer_documentation/csv', to: 'importer_documentation#csv'
|
9
10
|
|
10
11
|
get 'csv_import_details/index'
|
11
12
|
get 'csv_import_details/show/:id', to: 'csv_import_details#show', as: 'csv_import_detail'
|
data/lib/zizia/version.rb
CHANGED
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require 'rails_helper'
|
3
|
+
|
4
|
+
RSpec.describe Zizia::ImporterDocumentationController, type: :controller do
|
5
|
+
routes { Zizia::Engine.routes }
|
6
|
+
|
7
|
+
describe "GET csv" do
|
8
|
+
it "provides a csv download" do
|
9
|
+
get :csv
|
10
|
+
expect(response.headers['Content-Type']).to eq('text/csv; charset=utf-8')
|
11
|
+
expect(response.headers['Content-Disposition']).to eq('attachment; filename="import_template.csv"')
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zizia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.4.
|
4
|
+
version: 4.4.1.alpha.01
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Data Curation Experts
|
@@ -660,6 +660,7 @@ files:
|
|
660
660
|
- app/config/usage.yml
|
661
661
|
- app/controllers/zizia/csv_import_details_controller.rb
|
662
662
|
- app/controllers/zizia/csv_imports_controller.rb
|
663
|
+
- app/controllers/zizia/importer_documentation_controller.rb
|
663
664
|
- app/controllers/zizia/metadata_details_controller.rb
|
664
665
|
- app/helpers/zizia/application_helper.rb
|
665
666
|
- app/helpers/zizia/metadata_details_helper.rb
|
@@ -759,6 +760,7 @@ files:
|
|
759
760
|
- solr/config/xslt/example_atom.xsl
|
760
761
|
- solr/config/xslt/example_rss.xsl
|
761
762
|
- solr/config/xslt/luke.xsl
|
763
|
+
- spec/controllers/importer_documentation_controller_spec.rb
|
762
764
|
- spec/controllers/metadata_details_spec.rb
|
763
765
|
- spec/dummy/.fcrepo_wrapper
|
764
766
|
- spec/dummy/.gitignore
|