zizia 2.1.0.alpha.07 → 2.1.0.alpha.08
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/zizia/importer_documentation_controller.rb +1 -2
- data/lib/zizia/csv_template.rb +9 -0
- data/lib/zizia/version.rb +1 -1
- data/lib/zizia.rb +1 -0
- data/spec/zizia/csv_template_spec.rb +11 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f01e21a72b0a90ff796529c072cf9c5a68d5509d054e125112bb43cd30544699
|
4
|
+
data.tar.gz: f251b98deed66733a0a2b1634fac07b330dac06c7c781a28ee5ce39ad369150a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 300027bae9529295cbedfb3802a07321ce31a56c8af99293d72b009c6f44b04d231c6ae7446d461455d923d606e84ec20b7ae5fa7069ca553941849e9a04d1e7
|
7
|
+
data.tar.gz: 51f2ae499e189a88ab984d59e80f59ff6763680f2c8fbc71c4ba73f358e168aa421b38116218493764beaadfa75d4c3c39bc9c66f4b45ecc34392cc73a005dc7
|
@@ -5,8 +5,7 @@ module Zizia
|
|
5
5
|
def guide; end
|
6
6
|
|
7
7
|
def csv
|
8
|
-
|
9
|
-
send_file Rails.root.join('app', 'assets', 'csv', 'import_manifest.csv'), type: 'text/csv; charset=utf-8', disposition: 'attachment', filename: 'import_manifest.csv'
|
8
|
+
send_data Zizia::CsvTemplate.new.to_s, type: 'text/csv; charset=utf-8', disposition: 'attachment', filename: 'import_manifest.csv'
|
10
9
|
end
|
11
10
|
end
|
12
11
|
end
|
data/lib/zizia/version.rb
CHANGED
data/lib/zizia.rb
CHANGED
@@ -0,0 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
RSpec.describe Zizia::CsvTemplate do
|
6
|
+
let(:csv_template) { described_class.new }
|
7
|
+
|
8
|
+
it 'retruns a CSV string based on the headers in the Hyrax mapper' do
|
9
|
+
expect(csv_template.to_s).to eq(Zizia::HyraxBasicMetadataMapper.new.fields.join(','))
|
10
|
+
end
|
11
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zizia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.0.alpha.
|
4
|
+
version: 2.1.0.alpha.08
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Data Curation Experts
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-08-
|
11
|
+
date: 2019-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active-fedora
|
@@ -322,6 +322,7 @@ files:
|
|
322
322
|
- docs/index.md
|
323
323
|
- lib/zizia.rb
|
324
324
|
- lib/zizia/always_invalid_validator.rb
|
325
|
+
- lib/zizia/csv_template.rb
|
325
326
|
- lib/zizia/engine.rb
|
326
327
|
- lib/zizia/hash_mapper.rb
|
327
328
|
- lib/zizia/hyrax_basic_metadata_mapper.rb
|
@@ -460,6 +461,7 @@ files:
|
|
460
461
|
- spec/views/zizia/importer_documentation/guide.html.erb_spec.rb
|
461
462
|
- spec/zizia/csv_format_validator_spec.rb
|
462
463
|
- spec/zizia/csv_parser_spec.rb
|
464
|
+
- spec/zizia/csv_template_spec.rb
|
463
465
|
- spec/zizia/formatted_message_stream_spec.rb
|
464
466
|
- spec/zizia/hash_mapper_spec.rb
|
465
467
|
- spec/zizia/hyrax_basic_metadata_mapper_spec.rb
|