topographer 0.0.7 → 0.0.8
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.
- checksums.yaml +7 -0
- data/lib/topographer/exceptions.rb +5 -3
- data/lib/topographer/importer.rb +25 -9
- data/lib/topographer/importer/helpers.rb +19 -13
- data/lib/topographer/importer/helpers/write_log_to_csv.rb +75 -67
- data/lib/topographer/importer/importable.rb +7 -3
- data/lib/topographer/importer/input.rb +11 -4
- data/lib/topographer/importer/input/base.rb +21 -15
- data/lib/topographer/importer/input/delimited_spreadsheet.rb +55 -0
- data/lib/topographer/importer/input/roo.rb +31 -24
- data/lib/topographer/importer/input/source_data.rb +14 -8
- data/lib/topographer/importer/logger.rb +10 -6
- data/lib/topographer/importer/logger/base.rb +75 -66
- data/lib/topographer/importer/logger/fatal_error_entry.rb +22 -16
- data/lib/topographer/importer/logger/log_entry.rb +31 -25
- data/lib/topographer/importer/logger/simple.rb +25 -19
- data/lib/topographer/importer/mapper.rb +58 -53
- data/lib/topographer/importer/mapper/default_field_mapping.rb +23 -17
- data/lib/topographer/importer/mapper/field_mapping.rb +56 -49
- data/lib/topographer/importer/mapper/ignored_field_mapping.rb +14 -7
- data/lib/topographer/importer/mapper/mapper_builder.rb +57 -44
- data/lib/topographer/importer/mapper/mapping_columns.rb +51 -44
- data/lib/topographer/importer/mapper/mapping_validator.rb +39 -32
- data/lib/topographer/importer/mapper/result.rb +21 -15
- data/lib/topographer/importer/mapper/validation_field_mapping.rb +35 -28
- data/lib/topographer/importer/strategy.rb +12 -6
- data/lib/topographer/importer/strategy/base.rb +43 -38
- data/lib/topographer/importer/strategy/create_or_update_record.rb +39 -34
- data/lib/topographer/importer/strategy/import_new_record.rb +16 -10
- data/lib/topographer/importer/strategy/import_status.rb +27 -20
- data/lib/topographer/importer/strategy/update_record.rb +28 -24
- data/lib/topographer/version.rb +1 -1
- data/spec/assets/test_files/a_csv.csv +3 -0
- data/spec/topographer/importer/helpers/write_log_to_csv_spec.rb +4 -4
- data/spec/topographer/importer/importer_spec.rb +21 -5
- data/spec/topographer/importer/input/delimited_spreadsheet_spec.rb +90 -0
- data/spec/topographer/importer/input/source_data_spec.rb +2 -2
- data/spec/topographer/importer/logger/base_spec.rb +19 -0
- data/spec/topographer/importer/logger/fatal_error_entry_spec.rb +2 -2
- data/spec/topographer/importer/logger/simple_spec.rb +3 -3
- data/spec/topographer/importer/mapper/default_field_mapping_spec.rb +2 -2
- data/spec/topographer/importer/mapper/field_mapping_spec.rb +21 -21
- data/spec/topographer/importer/mapper/mapper_builder_spec.rb +9 -9
- data/spec/topographer/importer/mapper/mapping_validator_spec.rb +10 -10
- data/spec/topographer/importer/mapper/validation_field_mapping_spec.rb +3 -3
- data/spec/topographer/importer/mapper_spec.rb +25 -25
- data/spec/topographer/importer/strategy/base_spec.rb +16 -5
- data/spec/topographer/importer/strategy/create_or_update_record_spec.rb +3 -3
- data/spec/topographer/importer/strategy/import_new_records_spec.rb +5 -5
- data/spec/topographer/importer/strategy/mapped_model.rb +9 -0
- data/spec/topographer/importer/strategy/update_record_spec.rb +3 -3
- data/topographer.gemspec +3 -2
- metadata +101 -102
@@ -23,12 +23,12 @@ describe Topographer::Importer::Mapper::ValidationFieldMapping do
|
|
23
23
|
describe '#process_input' do
|
24
24
|
it 'should not return an error if the validation block passes' do
|
25
25
|
validation_mapping.process_input(valid_input, result)
|
26
|
-
expect(result.errors?).to
|
27
|
-
expect(result.data.blank?).to
|
26
|
+
expect(result.errors?).to be_falsey
|
27
|
+
expect(result.data.blank?).to be_truthy
|
28
28
|
end
|
29
29
|
it 'should return an error if the validation block raises an error' do
|
30
30
|
validation_mapping.process_input(invalid_input, result)
|
31
|
-
expect(result.errors?).to
|
31
|
+
expect(result.errors?).to be_truthy
|
32
32
|
expect(result.errors.values).to include('Sum must be 15')
|
33
33
|
end
|
34
34
|
it 'should not rescue Exceptions that do not inherit from standard error' do
|
@@ -7,15 +7,15 @@ describe Topographer::Importer::Mapper do
|
|
7
7
|
mapper = Topographer::Importer::Mapper.build_mapper(Object) do |m|
|
8
8
|
m.required_mapping 'Field1', 'field_1'
|
9
9
|
end
|
10
|
-
mapper.required_mapping_columns.
|
11
|
-
mapper.output_fields.
|
10
|
+
expect(mapper.required_mapping_columns).to include("Field1")
|
11
|
+
expect(mapper.output_fields).to include('field_1')
|
12
12
|
end
|
13
13
|
it 'can require a many to one field mapping' do
|
14
14
|
mapper = Topographer::Importer::Mapper.build_mapper(Object) do |m|
|
15
15
|
m.required_mapping ['Field1', 'Field2'], 'field_1'
|
16
16
|
end
|
17
|
-
mapper.required_mapping_columns.
|
18
|
-
mapper.output_fields.
|
17
|
+
expect(mapper.required_mapping_columns).to include("Field1", "Field2")
|
18
|
+
expect(mapper.output_fields).to include('field_1')
|
19
19
|
end
|
20
20
|
it 'cannot require a one to many field mapping' do
|
21
21
|
expect { mapper = Topographer::Importer::Mapper.build_mapper(Object) do |m|
|
@@ -29,15 +29,15 @@ describe Topographer::Importer::Mapper do
|
|
29
29
|
mapper = Topographer::Importer::Mapper.build_mapper(Object) do |m|
|
30
30
|
m.optional_mapping 'Field1', 'field_1'
|
31
31
|
end
|
32
|
-
mapper.optional_mapping_columns.
|
33
|
-
mapper.output_fields.
|
32
|
+
expect(mapper.optional_mapping_columns).to include("Field1")
|
33
|
+
expect(mapper.output_fields).to include('field_1')
|
34
34
|
end
|
35
35
|
it 'can create an optional many to one field mapping' do
|
36
36
|
mapper = Topographer::Importer::Mapper.build_mapper(Object) do |m|
|
37
37
|
m.optional_mapping ['Field1', 'Field2'], 'field_1'
|
38
38
|
end
|
39
|
-
mapper.optional_mapping_columns.
|
40
|
-
mapper.output_fields.
|
39
|
+
expect(mapper.optional_mapping_columns).to include("Field1", "Field2")
|
40
|
+
expect(mapper.output_fields).to include('field_1')
|
41
41
|
end
|
42
42
|
it 'cannot create an optional one to many field mapping' do
|
43
43
|
expect { mapper = Topographer::Importer::Mapper.build_mapper(Object) do |m|
|
@@ -51,8 +51,8 @@ describe Topographer::Importer::Mapper do
|
|
51
51
|
mapper = Topographer::Importer::Mapper.build_mapper(Object) do |m|
|
52
52
|
m.ignored_column 'Field1'
|
53
53
|
end
|
54
|
-
mapper.ignored_mapping_columns.
|
55
|
-
mapper.output_fields.
|
54
|
+
expect(mapper.ignored_mapping_columns).to include('Field1')
|
55
|
+
expect(mapper.output_fields).to be_empty
|
56
56
|
end
|
57
57
|
|
58
58
|
it 'raises an error when adding a mapping whose output is already an output of another mapping' do
|
@@ -85,7 +85,7 @@ describe Topographer::Importer::Mapper do
|
|
85
85
|
end
|
86
86
|
end
|
87
87
|
expect(mapper.validation_mapping_columns).to include('Field1')
|
88
|
-
expect(mapper.output_fields.empty?).to
|
88
|
+
expect(mapper.output_fields.empty?).to be_truthy
|
89
89
|
end
|
90
90
|
it 'can create a multicolumn validation' do
|
91
91
|
mapper = Topographer::Importer::Mapper.build_mapper(Object) do |m|
|
@@ -94,7 +94,7 @@ describe Topographer::Importer::Mapper do
|
|
94
94
|
end
|
95
95
|
end
|
96
96
|
expect(mapper.validation_mapping_columns).to eql(['Field1', 'Field2'])
|
97
|
-
expect(mapper.output_fields.empty?).to
|
97
|
+
expect(mapper.output_fields.empty?).to be_truthy
|
98
98
|
end
|
99
99
|
it 'raises an error if a validation name is repeated' do
|
100
100
|
expect {
|
@@ -189,32 +189,32 @@ describe Topographer::Importer::Mapper do
|
|
189
189
|
let(:unmapped_column_structure) {['Field1', 'Field2', 'Field3', 'Field4', 'UnmappedField'] }
|
190
190
|
|
191
191
|
it 'returns false if required fields are missing' do
|
192
|
-
expect(mapper.input_structure_valid?(missing_required_column_structure)).to
|
192
|
+
expect(mapper.input_structure_valid?(missing_required_column_structure)).to be_falsey
|
193
193
|
end
|
194
194
|
it 'returns false if a validation field is missing' do
|
195
|
-
expect(mapper.input_structure_valid?(missing_validation_column_structure)).to
|
195
|
+
expect(mapper.input_structure_valid?(missing_validation_column_structure)).to be_falsey
|
196
196
|
end
|
197
197
|
it 'returns true if all of the required fields are present' do
|
198
|
-
expect(mapper.input_structure_valid?(valid_input_structure_without_options)).to
|
198
|
+
expect(mapper.input_structure_valid?(valid_input_structure_without_options)).to be_truthy
|
199
199
|
end
|
200
200
|
it 'returns true if all the required and optional fields are present' do
|
201
|
-
expect(mapper.input_structure_valid?(valid_input_structure_with_options)).to
|
201
|
+
expect(mapper.input_structure_valid?(valid_input_structure_with_options)).to be_truthy
|
202
202
|
end
|
203
203
|
it 'returns true regardless of whether ignored fields are present' do
|
204
|
-
expect(mapper.input_structure_valid?(valid_input_structure_with_options)).to
|
205
|
-
expect(mapper.input_structure_valid?(valid_input_structure_with_options+['Field5'])).to
|
204
|
+
expect(mapper.input_structure_valid?(valid_input_structure_with_options)).to be_truthy
|
205
|
+
expect(mapper.input_structure_valid?(valid_input_structure_with_options+['Field5'])).to be_truthy
|
206
206
|
end
|
207
207
|
context 'not ignoring unmapped columns' do
|
208
208
|
it 'returns false if there are any extra fields that have not been ignored' do
|
209
|
-
expect(mapper.input_structure_valid?(bad_column_structure)).to
|
209
|
+
expect(mapper.input_structure_valid?(bad_column_structure)).to be_falsey
|
210
210
|
end
|
211
211
|
end
|
212
212
|
context 'ignoring unmapped columns' do
|
213
213
|
it 'returns false if there are any extra fields that have not been ignored and required fields are missing' do
|
214
|
-
expect(mapper.input_structure_valid?(bad_column_structure, ignore_unmapped_columns: true)).to
|
214
|
+
expect(mapper.input_structure_valid?(bad_column_structure, ignore_unmapped_columns: true)).to be_falsey
|
215
215
|
end
|
216
216
|
it 'returns true if there are any extra fields that have not been ignored but all required fields are present' do
|
217
|
-
expect(mapper.input_structure_valid?(unmapped_column_structure, ignore_unmapped_columns: true)).to
|
217
|
+
expect(mapper.input_structure_valid?(unmapped_column_structure, ignore_unmapped_columns: true)).to be_truthy
|
218
218
|
end
|
219
219
|
end
|
220
220
|
end
|
@@ -328,24 +328,24 @@ describe Topographer::Importer::Mapper do
|
|
328
328
|
|
329
329
|
it 'returns an error if required field is missing in input data' do
|
330
330
|
invalid_field_result = mapper.map_input(missing_field_input)
|
331
|
-
expect(invalid_field_result.errors?).to
|
331
|
+
expect(invalid_field_result.errors?).to be_truthy
|
332
332
|
expect(invalid_field_result.errors['field_4']).to include('Missing required input(s): `Field3` for `field_4`')
|
333
333
|
end
|
334
334
|
|
335
335
|
it 'returns an error if a validation does not pass' do
|
336
336
|
invalid_data_result = mapper.map_input(invalid_data_input)
|
337
|
-
expect(invalid_data_result.errors?).to
|
337
|
+
expect(invalid_data_result.errors?).to be_truthy
|
338
338
|
expect(invalid_data_result.errors['Field2 Validation']).to include('FAILURE')
|
339
339
|
|
340
340
|
end
|
341
341
|
|
342
342
|
it 'does not return an error if an optional field is missing in the input data' do
|
343
|
-
expect(result.errors?).to
|
343
|
+
expect(result.errors?).to be_falsey
|
344
344
|
end
|
345
345
|
|
346
346
|
it 'returns a `blank row` error if an entire row is blank' do
|
347
347
|
empty_result = mapper.map_input(empty_input)
|
348
|
-
expect(empty_result.errors?).to
|
348
|
+
expect(empty_result.errors?).to be_truthy
|
349
349
|
expect(empty_result.errors['EmptyRow']).to include('empty row')
|
350
350
|
end
|
351
351
|
end
|
@@ -13,12 +13,23 @@ describe Topographer::Importer::Strategy::Base do
|
|
13
13
|
double 'Status',
|
14
14
|
errors?: true
|
15
15
|
end
|
16
|
+
|
17
|
+
subject do
|
18
|
+
described_class.new(mapper)
|
19
|
+
end
|
20
|
+
|
16
21
|
describe '#initialize' do
|
17
22
|
it 'creates a new Strategy instance with the given mapper' do
|
18
23
|
strategy = Topographer::Importer::Strategy::Base.new(mapper)
|
19
|
-
strategy.instance_variable_get(:@mapper).
|
24
|
+
expect(strategy.instance_variable_get(:@mapper)).to be(mapper)
|
20
25
|
end
|
21
26
|
end
|
27
|
+
|
28
|
+
it 'has an attr_accessor for mapper' do
|
29
|
+
expect(subject.respond_to?(:mapper=)).to be_truthy
|
30
|
+
expect(subject.respond_to?(:mapper)).to be_truthy
|
31
|
+
end
|
32
|
+
|
22
33
|
describe '#import_record' do
|
23
34
|
it 'should raise NotImplementedError' do
|
24
35
|
expect { strategy.import_record(nil) }.to raise_error(NotImplementedError)
|
@@ -27,16 +38,16 @@ describe Topographer::Importer::Strategy::Base do
|
|
27
38
|
|
28
39
|
describe '#should_persist_import?' do
|
29
40
|
it 'returns true if the status has no errors and the import is not a dry run' do
|
30
|
-
expect(strategy.should_persist_import?(status)).to
|
41
|
+
expect(strategy.should_persist_import?(status)).to be_truthy
|
31
42
|
end
|
32
43
|
it 'returns false if the status has errors regardless of whether the import is a dry run or not' do
|
33
|
-
expect(strategy.should_persist_import?(bad_status)).to
|
44
|
+
expect(strategy.should_persist_import?(bad_status)).to be_falsey
|
34
45
|
strategy.dry_run = true
|
35
|
-
expect(strategy.should_persist_import?(bad_status)).to
|
46
|
+
expect(strategy.should_persist_import?(bad_status)).to be_falsey
|
36
47
|
end
|
37
48
|
it 'returns false if the status has no errors and the import is a dry run' do
|
38
49
|
strategy.dry_run = true
|
39
|
-
expect(strategy.should_persist_import?(status)).to
|
50
|
+
expect(strategy.should_persist_import?(status)).to be_falsey
|
40
51
|
end
|
41
52
|
end
|
42
53
|
|
@@ -25,20 +25,20 @@ describe Topographer::Importer::Strategy::CreateOrUpdateRecord do
|
|
25
25
|
expect(strategy.import_record(input)).to be_a Topographer::Importer::Strategy::ImportStatus
|
26
26
|
end
|
27
27
|
it 'should import a record from valid input' do
|
28
|
-
MappedModel.
|
28
|
+
expect_any_instance_of(MappedModel).to receive(:save).once
|
29
29
|
import_status = strategy.import_record(input)
|
30
30
|
expect(import_status.errors?).to be false
|
31
31
|
end
|
32
32
|
it 'should not import a record from invalid input' do
|
33
33
|
|
34
|
-
MappedModel.
|
34
|
+
expect_any_instance_of(MappedModel).not_to receive(:save)
|
35
35
|
import_status = strategy.import_record(invalid_input)
|
36
36
|
expect(import_status.errors?).to be true
|
37
37
|
expect(import_status.errors[:mapping]).to include('Missing required input(s): `Field2` for `field_2`')
|
38
38
|
expect(import_status.errors[:validation]).to include('Field 2 is not datum2')
|
39
39
|
end
|
40
40
|
it 'should not save a record on a dry run' do
|
41
|
-
MappedModel.
|
41
|
+
expect_any_instance_of(MappedModel).not_to receive(:save)
|
42
42
|
strategy.dry_run = true
|
43
43
|
import_status = strategy.import_record(input)
|
44
44
|
expect(import_status.errors?).to be false
|
@@ -34,7 +34,7 @@ describe Topographer::Importer::Strategy::ImportNewRecord do
|
|
34
34
|
describe '#initialize' do
|
35
35
|
it 'creates a new Strategy instance with the given mapper' do
|
36
36
|
strategy = Topographer::Importer::Strategy::ImportNewRecord.new(mapper)
|
37
|
-
strategy.instance_variable_get(:@mapper).
|
37
|
+
expect(strategy.instance_variable_get(:@mapper)).to be(mapper)
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
@@ -43,21 +43,21 @@ describe Topographer::Importer::Strategy::ImportNewRecord do
|
|
43
43
|
expect(strategy.import_record(input)).to be_a Topographer::Importer::Strategy::ImportStatus
|
44
44
|
end
|
45
45
|
it 'should import a record from valid input' do
|
46
|
-
MappedModel.
|
46
|
+
expect_any_instance_of(MappedModel).to receive(:save).once
|
47
47
|
result = strategy.import_record(input)
|
48
48
|
expect(result.errors?).to be false
|
49
49
|
end
|
50
50
|
it 'should not import a record from invalid input' do
|
51
|
-
mapper.
|
51
|
+
allow(mapper).to receive(:map_input).and_return(invalid_result)
|
52
52
|
strategy = Topographer::Importer::Strategy::ImportNewRecord.new(mapper)
|
53
|
-
MappedModel.
|
53
|
+
expect_any_instance_of(MappedModel).not_to receive(:save)
|
54
54
|
import_status = strategy.import_record(input)
|
55
55
|
expect(import_status.errors?).to be true
|
56
56
|
expect(import_status.errors[:mapping]).to include('Missing input(s): `Field2` for `field_2`')
|
57
57
|
expect(import_status.errors[:validation]).to include('Field 2 is not datum2')
|
58
58
|
end
|
59
59
|
it 'should not save a record on a dry run' do
|
60
|
-
MappedModel.
|
60
|
+
expect_any_instance_of(MappedModel).not_to receive(:save)
|
61
61
|
strategy.dry_run = true
|
62
62
|
import_status = strategy.import_record(input)
|
63
63
|
expect(import_status.errors?).to be false
|
@@ -24,20 +24,20 @@ describe Topographer::Importer::Strategy::UpdateRecord do
|
|
24
24
|
expect(strategy.import_record(input)).to be_a Topographer::Importer::Strategy::ImportStatus
|
25
25
|
end
|
26
26
|
it 'should import a record from valid input' do
|
27
|
-
MappedModel.
|
27
|
+
expect_any_instance_of(MappedModel).to receive(:save).once
|
28
28
|
result = strategy.import_record(input)
|
29
29
|
expect(result.errors?).to be false
|
30
30
|
end
|
31
31
|
it 'should not import a record from invalid input' do
|
32
32
|
|
33
|
-
MappedModel.
|
33
|
+
expect_any_instance_of(MappedModel).not_to receive(:save)
|
34
34
|
import_status = strategy.import_record(invalid_input)
|
35
35
|
expect(import_status.errors?).to be true
|
36
36
|
expect(import_status.errors[:mapping]).to include('Missing required input(s): `Field2` for `field_2`')
|
37
37
|
expect(import_status.errors[:validation]).to include('Field 2 is not datum2')
|
38
38
|
end
|
39
39
|
it 'should not save a record on a dry run' do
|
40
|
-
MappedModel.
|
40
|
+
expect_any_instance_of(MappedModel).not_to receive(:save)
|
41
41
|
strategy.dry_run = true
|
42
42
|
import_status = strategy.import_record(input)
|
43
43
|
expect(import_status.errors?).to be false
|
data/topographer.gemspec
CHANGED
@@ -20,9 +20,10 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.add_dependency('thor')
|
22
22
|
|
23
|
-
spec.
|
23
|
+
spec.add_dependency('activesupport', ['>= 3'])
|
24
|
+
spec.add_dependency('i18n')
|
24
25
|
|
25
26
|
spec.add_development_dependency('bundler', ['~> 1.3'])
|
26
27
|
spec.add_development_dependency('rake')
|
27
|
-
spec.add_development_dependency('rspec')
|
28
|
+
spec.add_development_dependency('rspec', '~> 3')
|
28
29
|
end
|
metadata
CHANGED
@@ -1,107 +1,110 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: topographer
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
- 7
|
10
|
-
version: 0.0.7
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.8
|
11
5
|
platform: ruby
|
12
|
-
authors:
|
6
|
+
authors:
|
13
7
|
- Mike Simpson
|
14
8
|
- Emerson Huitt
|
15
9
|
autorequire:
|
16
10
|
bindir: bin
|
17
11
|
cert_chain: []
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2016-02-01 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
22
15
|
name: thor
|
23
|
-
|
24
|
-
|
25
|
-
none: false
|
26
|
-
requirements:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
27
18
|
- - ">="
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
|
30
|
-
segments:
|
31
|
-
- 0
|
32
|
-
version: "0"
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '0'
|
33
21
|
type: :runtime
|
34
|
-
|
35
|
-
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '0'
|
28
|
+
- !ruby/object:Gem::Dependency
|
36
29
|
name: activesupport
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '3'
|
35
|
+
type: :runtime
|
37
36
|
prerelease: false
|
38
|
-
|
39
|
-
|
40
|
-
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '3'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: i18n
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
41
46
|
- - ">="
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
|
44
|
-
segments:
|
45
|
-
- 3
|
46
|
-
version: "3"
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '0'
|
47
49
|
type: :runtime
|
48
|
-
version_requirements: *id002
|
49
|
-
- !ruby/object:Gem::Dependency
|
50
|
-
name: bundler
|
51
50
|
prerelease: false
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: bundler
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - "~>"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '1.3'
|
62
63
|
type: :development
|
63
|
-
version_requirements: *id003
|
64
|
-
- !ruby/object:Gem::Dependency
|
65
|
-
name: rake
|
66
64
|
prerelease: false
|
67
|
-
|
68
|
-
|
69
|
-
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - "~>"
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '1.3'
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: rake
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
70
74
|
- - ">="
|
71
|
-
- !ruby/object:Gem::Version
|
72
|
-
|
73
|
-
segments:
|
74
|
-
- 0
|
75
|
-
version: "0"
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
76
77
|
type: :development
|
77
|
-
version_requirements: *id004
|
78
|
-
- !ruby/object:Gem::Dependency
|
79
|
-
name: rspec
|
80
78
|
prerelease: false
|
81
|
-
|
82
|
-
|
83
|
-
requirements:
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
84
81
|
- - ">="
|
85
|
-
- !ruby/object:Gem::Version
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '0'
|
84
|
+
- !ruby/object:Gem::Dependency
|
85
|
+
name: rspec
|
86
|
+
requirement: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - "~>"
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '3'
|
90
91
|
type: :development
|
91
|
-
|
92
|
+
prerelease: false
|
93
|
+
version_requirements: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - "~>"
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '3'
|
92
98
|
description: Topographer enables importing of models from various input sources.
|
93
|
-
email:
|
99
|
+
email:
|
94
100
|
- mjs2600@gmail.com
|
95
101
|
- ehuitt@gmail.com
|
96
102
|
executables: []
|
97
|
-
|
98
103
|
extensions: []
|
99
|
-
|
100
104
|
extra_rdoc_files: []
|
101
|
-
|
102
|
-
|
103
|
-
- .
|
104
|
-
- .travis.yml
|
105
|
+
files:
|
106
|
+
- ".gitignore"
|
107
|
+
- ".travis.yml"
|
105
108
|
- Gemfile
|
106
109
|
- LICENSE
|
107
110
|
- LICENSE.txt
|
@@ -132,6 +135,7 @@ files:
|
|
132
135
|
- lib/topographer/importer/importable.rb
|
133
136
|
- lib/topographer/importer/input.rb
|
134
137
|
- lib/topographer/importer/input/base.rb
|
138
|
+
- lib/topographer/importer/input/delimited_spreadsheet.rb
|
135
139
|
- lib/topographer/importer/input/roo.rb
|
136
140
|
- lib/topographer/importer/input/source_data.rb
|
137
141
|
- lib/topographer/importer/logger.rb
|
@@ -157,12 +161,14 @@ files:
|
|
157
161
|
- lib/topographer/importer/strategy/update_record.rb
|
158
162
|
- lib/topographer/tasks.rb
|
159
163
|
- lib/topographer/version.rb
|
164
|
+
- spec/assets/test_files/a_csv.csv
|
160
165
|
- spec/generators/helpers_spec.rb
|
161
166
|
- spec/spec_helper.rb
|
162
167
|
- spec/topographer/importer/helpers/write_log_to_csv_spec.rb
|
163
168
|
- spec/topographer/importer/helpers_spec.rb
|
164
169
|
- spec/topographer/importer/importable_spec.rb
|
165
170
|
- spec/topographer/importer/importer_spec.rb
|
171
|
+
- spec/topographer/importer/input/delimited_spreadsheet_spec.rb
|
166
172
|
- spec/topographer/importer/input/source_data_spec.rb
|
167
173
|
- spec/topographer/importer/logger/base_spec.rb
|
168
174
|
- spec/topographer/importer/logger/fatal_error_entry_spec.rb
|
@@ -181,46 +187,40 @@ files:
|
|
181
187
|
- spec/topographer/importer/strategy/mapped_model.rb
|
182
188
|
- spec/topographer/importer/strategy/update_record_spec.rb
|
183
189
|
- topographer.gemspec
|
184
|
-
homepage:
|
185
|
-
licenses:
|
190
|
+
homepage: ''
|
191
|
+
licenses:
|
186
192
|
- MIT
|
193
|
+
metadata: {}
|
187
194
|
post_install_message:
|
188
195
|
rdoc_options: []
|
189
|
-
|
190
|
-
require_paths:
|
196
|
+
require_paths:
|
191
197
|
- lib
|
192
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
193
|
-
|
194
|
-
requirements:
|
198
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
199
|
+
requirements:
|
195
200
|
- - ">="
|
196
|
-
- !ruby/object:Gem::Version
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
version: "0"
|
201
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
202
|
-
none: false
|
203
|
-
requirements:
|
201
|
+
- !ruby/object:Gem::Version
|
202
|
+
version: '0'
|
203
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
204
|
+
requirements:
|
204
205
|
- - ">="
|
205
|
-
- !ruby/object:Gem::Version
|
206
|
-
|
207
|
-
segments:
|
208
|
-
- 0
|
209
|
-
version: "0"
|
206
|
+
- !ruby/object:Gem::Version
|
207
|
+
version: '0'
|
210
208
|
requirements: []
|
211
|
-
|
212
209
|
rubyforge_project:
|
213
|
-
rubygems_version:
|
210
|
+
rubygems_version: 2.2.2
|
214
211
|
signing_key:
|
215
|
-
specification_version:
|
216
|
-
summary: Topographer allows the mapping of columnar input data to fields for active
|
217
|
-
|
212
|
+
specification_version: 4
|
213
|
+
summary: Topographer allows the mapping of columnar input data to fields for active
|
214
|
+
record models. This facilitates importing from a variety of sources.
|
215
|
+
test_files:
|
216
|
+
- spec/assets/test_files/a_csv.csv
|
218
217
|
- spec/generators/helpers_spec.rb
|
219
218
|
- spec/spec_helper.rb
|
220
219
|
- spec/topographer/importer/helpers/write_log_to_csv_spec.rb
|
221
220
|
- spec/topographer/importer/helpers_spec.rb
|
222
221
|
- spec/topographer/importer/importable_spec.rb
|
223
222
|
- spec/topographer/importer/importer_spec.rb
|
223
|
+
- spec/topographer/importer/input/delimited_spreadsheet_spec.rb
|
224
224
|
- spec/topographer/importer/input/source_data_spec.rb
|
225
225
|
- spec/topographer/importer/logger/base_spec.rb
|
226
226
|
- spec/topographer/importer/logger/fatal_error_entry_spec.rb
|
@@ -238,4 +238,3 @@ test_files:
|
|
238
238
|
- spec/topographer/importer/strategy/import_status_spec.rb
|
239
239
|
- spec/topographer/importer/strategy/mapped_model.rb
|
240
240
|
- spec/topographer/importer/strategy/update_record_spec.rb
|
241
|
-
has_rdoc:
|