rgarner-csv-mapper 0.8.0 → 1.0.0
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.
- data/VERSION +1 -1
- data/lib/csv-mapper/row_map.rb +1 -0
- data/spec/csv-mapper/row_map_spec.rb +8 -2
- metadata +5 -5
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
1.0.0
|
data/lib/csv-mapper/row_map.rb
CHANGED
@@ -15,12 +15,18 @@ describe CsvMapper::RowMap do
|
|
15
15
|
row[0] = :changed_name
|
16
16
|
end
|
17
17
|
end
|
18
|
-
|
18
|
+
|
19
|
+
let(:test_context) { TestMapContext.new }
|
20
|
+
|
19
21
|
before(:each) do
|
20
|
-
@row_map = CsvMapper::RowMap.new(
|
22
|
+
@row_map = CsvMapper::RowMap.new(test_context)
|
21
23
|
@csv_row = ['first_name', 'last_name']
|
22
24
|
end
|
23
25
|
|
26
|
+
it "should provide access to the context" do
|
27
|
+
@row_map.context.should == test_context
|
28
|
+
end
|
29
|
+
|
24
30
|
it "should parse a CSV row" do
|
25
31
|
@row_map.parse(@csv_row).should_not be_nil
|
26
32
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rgarner-csv-mapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -14,7 +14,7 @@ date: 2012-11-21 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rspec
|
17
|
-
requirement: &
|
17
|
+
requirement: &2168531460 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
@@ -22,10 +22,10 @@ dependencies:
|
|
22
22
|
version: 2.0.0
|
23
23
|
type: :development
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *2168531460
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: fastercsv
|
28
|
-
requirement: &
|
28
|
+
requirement: &2168529780 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ! '>='
|
@@ -33,7 +33,7 @@ dependencies:
|
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *2168529780
|
37
37
|
description: CSV Mapper makes it easy to import data from CSV files directly to a
|
38
38
|
collection of any type of Ruby object. The simplest way to create mappings is declare
|
39
39
|
the names of the attributes in the order corresponding to the CSV file column order.
|