csv_record 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/.travis.yml +2 -0
- data/README.md +3 -3
- data/Rakefile +1 -1
- data/csv_record.gemspec +6 -7
- data/lib/csv_record/callbacks.rb +3 -3
- data/lib/csv_record/connector.rb +7 -7
- data/lib/csv_record/csv_fields.rb +45 -0
- data/lib/csv_record/csv_queries/query.rb +1 -1
- data/lib/csv_record/{reader.rb → csv_readers/class_reader.rb} +11 -29
- data/lib/csv_record/csv_readers/instance_reader.rb +29 -0
- data/lib/csv_record/csv_readers/reader.rb +9 -0
- data/lib/csv_record/csv_validations/custom_validation.rb +1 -1
- data/lib/csv_record/csv_validations/validations.rb +2 -2
- data/lib/csv_record/csv_writers/class_writer.rb +52 -0
- data/lib/csv_record/{writer.rb → csv_writers/instance_writer.rb} +4 -21
- data/lib/csv_record/csv_writers/writer.rb +9 -0
- data/lib/csv_record/document.rb +11 -12
- data/lib/csv_record/exceptions.rb +1 -0
- data/lib/csv_record/field.rb +21 -0
- data/lib/csv_record/helpers.rb +1 -1
- data/lib/csv_record/timestamps.rb +11 -2
- data/lib/csv_record/version.rb +4 -1
- data/test/csv_record/associations_test.rb +0 -3
- data/test/csv_record/callbacks_test.rb +0 -1
- data/test/csv_record/connector_test.rb +0 -2
- data/test/csv_record/helpers_test.rb +0 -1
- data/test/csv_record/query_test.rb +0 -1
- data/test/csv_record/reader_test.rb +122 -116
- data/test/csv_record/timestamps_test.rb +2 -5
- data/test/csv_record/validation_test.rb +13 -14
- data/test/csv_record/writer_test.rb +60 -18
- data/test/helpers.rb +7 -0
- data/test/models/customized_class.rb +11 -0
- data/test/monkey_patches/object_test.rb +2 -4
- data/test/test_helper.rb +9 -6
- metadata +38 -43
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: csv_record
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,104 +9,88 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-02-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
|
-
- -
|
19
|
+
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
21
|
+
version: 3.2.9
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
none: false
|
26
26
|
requirements:
|
27
|
-
- -
|
27
|
+
- - ~>
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
29
|
+
version: 3.2.9
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: rake
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
33
33
|
none: false
|
34
34
|
requirements:
|
35
|
-
- -
|
35
|
+
- - ~>
|
36
36
|
- !ruby/object:Gem::Version
|
37
|
-
version:
|
37
|
+
version: 0.9.2.2
|
38
38
|
type: :development
|
39
39
|
prerelease: false
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
41
|
none: false
|
42
42
|
requirements:
|
43
|
-
- -
|
43
|
+
- - ~>
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version:
|
46
|
-
- !ruby/object:Gem::Dependency
|
47
|
-
name: pry
|
48
|
-
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
|
-
requirements:
|
51
|
-
- - ! '>='
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '0'
|
54
|
-
type: :development
|
55
|
-
prerelease: false
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
|
-
requirements:
|
59
|
-
- - ! '>='
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
45
|
+
version: 0.9.2.2
|
62
46
|
- !ruby/object:Gem::Dependency
|
63
47
|
name: timecop
|
64
48
|
requirement: !ruby/object:Gem::Requirement
|
65
49
|
none: false
|
66
50
|
requirements:
|
67
|
-
- -
|
51
|
+
- - ~>
|
68
52
|
- !ruby/object:Gem::Version
|
69
|
-
version:
|
53
|
+
version: 0.5.3
|
70
54
|
type: :development
|
71
55
|
prerelease: false
|
72
56
|
version_requirements: !ruby/object:Gem::Requirement
|
73
57
|
none: false
|
74
58
|
requirements:
|
75
|
-
- -
|
59
|
+
- - ~>
|
76
60
|
- !ruby/object:Gem::Version
|
77
|
-
version:
|
61
|
+
version: 0.5.3
|
78
62
|
- !ruby/object:Gem::Dependency
|
79
63
|
name: turn
|
80
64
|
requirement: !ruby/object:Gem::Requirement
|
81
65
|
none: false
|
82
66
|
requirements:
|
83
|
-
- -
|
67
|
+
- - ~>
|
84
68
|
- !ruby/object:Gem::Version
|
85
|
-
version:
|
69
|
+
version: 0.9.6
|
86
70
|
type: :development
|
87
71
|
prerelease: false
|
88
72
|
version_requirements: !ruby/object:Gem::Requirement
|
89
73
|
none: false
|
90
74
|
requirements:
|
91
|
-
- -
|
75
|
+
- - ~>
|
92
76
|
- !ruby/object:Gem::Version
|
93
|
-
version:
|
77
|
+
version: 0.9.6
|
94
78
|
- !ruby/object:Gem::Dependency
|
95
79
|
name: minitest
|
96
80
|
requirement: !ruby/object:Gem::Requirement
|
97
81
|
none: false
|
98
82
|
requirements:
|
99
|
-
- -
|
83
|
+
- - ~>
|
100
84
|
- !ruby/object:Gem::Version
|
101
|
-
version:
|
85
|
+
version: 4.3.1
|
102
86
|
type: :development
|
103
87
|
prerelease: false
|
104
88
|
version_requirements: !ruby/object:Gem::Requirement
|
105
89
|
none: false
|
106
90
|
requirements:
|
107
|
-
- -
|
91
|
+
- - ~>
|
108
92
|
- !ruby/object:Gem::Version
|
109
|
-
version:
|
93
|
+
version: 4.3.1
|
110
94
|
description: CSV Object-relational mapping for Ruby
|
111
95
|
email:
|
112
96
|
- lukasalexandre@gmail.com
|
@@ -126,18 +110,25 @@ files:
|
|
126
110
|
- lib/csv_record/callback.rb
|
127
111
|
- lib/csv_record/callbacks.rb
|
128
112
|
- lib/csv_record/connector.rb
|
113
|
+
- lib/csv_record/csv_fields.rb
|
129
114
|
- lib/csv_record/csv_queries/condition.rb
|
130
115
|
- lib/csv_record/csv_queries/query.rb
|
116
|
+
- lib/csv_record/csv_readers/class_reader.rb
|
117
|
+
- lib/csv_record/csv_readers/instance_reader.rb
|
118
|
+
- lib/csv_record/csv_readers/reader.rb
|
131
119
|
- lib/csv_record/csv_validations/custom_validation.rb
|
132
120
|
- lib/csv_record/csv_validations/presence_validation.rb
|
133
121
|
- lib/csv_record/csv_validations/uniqueness_validation.rb
|
134
122
|
- lib/csv_record/csv_validations/validations.rb
|
123
|
+
- lib/csv_record/csv_writers/class_writer.rb
|
124
|
+
- lib/csv_record/csv_writers/instance_writer.rb
|
125
|
+
- lib/csv_record/csv_writers/writer.rb
|
135
126
|
- lib/csv_record/document.rb
|
127
|
+
- lib/csv_record/exceptions.rb
|
128
|
+
- lib/csv_record/field.rb
|
136
129
|
- lib/csv_record/helpers.rb
|
137
|
-
- lib/csv_record/reader.rb
|
138
130
|
- lib/csv_record/timestamps.rb
|
139
131
|
- lib/csv_record/version.rb
|
140
|
-
- lib/csv_record/writer.rb
|
141
132
|
- test/csv_record/associations_test.rb
|
142
133
|
- test/csv_record/callbacks_test.rb
|
143
134
|
- test/csv_record/condition_test.rb
|
@@ -148,14 +139,16 @@ files:
|
|
148
139
|
- test/csv_record/timestamps_test.rb
|
149
140
|
- test/csv_record/validation_test.rb
|
150
141
|
- test/csv_record/writer_test.rb
|
142
|
+
- test/helpers.rb
|
151
143
|
- test/models/callback_test_class.rb
|
152
144
|
- test/models/custom_errors_class.rb
|
145
|
+
- test/models/customized_class.rb
|
153
146
|
- test/models/jedi.rb
|
154
147
|
- test/models/jedi_order.rb
|
155
148
|
- test/models/padawan.rb
|
156
149
|
- test/monkey_patches/object_test.rb
|
157
150
|
- test/test_helper.rb
|
158
|
-
homepage: https://github.com/
|
151
|
+
homepage: https://github.com/lukelex/csv_record
|
159
152
|
licenses:
|
160
153
|
- MIT
|
161
154
|
post_install_message:
|
@@ -165,13 +158,13 @@ require_paths:
|
|
165
158
|
required_ruby_version: !ruby/object:Gem::Requirement
|
166
159
|
none: false
|
167
160
|
requirements:
|
168
|
-
- -
|
161
|
+
- - '>='
|
169
162
|
- !ruby/object:Gem::Version
|
170
163
|
version: '0'
|
171
164
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
172
165
|
none: false
|
173
166
|
requirements:
|
174
|
-
- -
|
167
|
+
- - '>='
|
175
168
|
- !ruby/object:Gem::Version
|
176
169
|
version: '0'
|
177
170
|
requirements: []
|
@@ -192,8 +185,10 @@ test_files:
|
|
192
185
|
- test/csv_record/timestamps_test.rb
|
193
186
|
- test/csv_record/validation_test.rb
|
194
187
|
- test/csv_record/writer_test.rb
|
188
|
+
- test/helpers.rb
|
195
189
|
- test/models/callback_test_class.rb
|
196
190
|
- test/models/custom_errors_class.rb
|
191
|
+
- test/models/customized_class.rb
|
197
192
|
- test/models/jedi.rb
|
198
193
|
- test/models/jedi_order.rb
|
199
194
|
- test/models/padawan.rb
|