csv_madness 0.0.6 → 0.0.10
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.
Potentially problematic release.
This version of csv_madness might be problematic. Click here for more details.
- checksums.yaml +5 -13
- data/.document +5 -0
- data/CHANGELOG.markdown +4 -0
- data/Gemfile +2 -8
- data/README.rdoc +55 -47
- data/Rakefile +10 -49
- data/VERSION +1 -1
- data/lib/csv_madness/builder.rb +95 -10
- data/lib/csv_madness/column.rb +30 -0
- data/lib/csv_madness/column_methods/core_methods.rb +6 -0
- data/lib/csv_madness/column_methods/default_value_methods.rb +7 -0
- data/lib/csv_madness/column_methods/error_methods.rb +19 -0
- data/lib/csv_madness/column_methods/fetch_methods.rb +11 -0
- data/lib/csv_madness/column_methods/typing_methods.rb +24 -0
- data/lib/csv_madness/column_set.rb +5 -0
- data/lib/csv_madness/column_type.rb +74 -0
- data/lib/csv_madness/column_types/date.rb +14 -0
- data/lib/csv_madness/column_types/float.rb +25 -0
- data/lib/csv_madness/column_types/integer.rb +17 -0
- data/lib/csv_madness/column_types/string.rb +9 -0
- data/lib/csv_madness/data_accessor_module.rb +79 -44
- data/lib/csv_madness/exceptions.rb +16 -0
- data/lib/csv_madness/gem_api.rb +11 -2
- data/lib/csv_madness/index_set.rb +36 -0
- data/lib/csv_madness/indexer.rb +105 -0
- data/lib/csv_madness/record.rb +68 -40
- data/lib/csv_madness/record_filter.rb +68 -0
- data/lib/csv_madness/record_methods/method_methods.rb +57 -0
- data/lib/csv_madness/sheet.rb +172 -442
- data/lib/csv_madness/sheet_methods/base.rb +6 -0
- data/lib/csv_madness/sheet_methods/class_methods.rb +84 -0
- data/lib/csv_madness/sheet_methods/column_methods.rb +175 -0
- data/lib/csv_madness/sheet_methods/file_methods.rb +44 -0
- data/lib/csv_madness/sheet_methods/indexing.rb +133 -0
- data/lib/csv_madness/sheet_methods/record_methods.rb +175 -0
- data/lib/csv_madness/sheet_methods/sorting_methods.rb +10 -0
- data/lib/csv_madness/utils/const_proc.rb +19 -0
- data/lib/csv_madness/utils/counter.rb +24 -0
- data/lib/csv_madness/utils/counter_proc.rb +31 -0
- data/lib/csv_madness/utils/looker_upper.rb +36 -0
- data/lib/csv_madness.rb +2 -2
- data/test/csv/nil_headers.csv +5 -0
- data/test/csv/out/.gitkeep +0 -0
- data/test/csv/pokemon.csv +9 -0
- data/test/csv/test_column_types.csv +2 -2
- data/test/helper.rb +13 -5
- data/test/test_builder.rb +43 -3
- data/test/test_csv_madness.rb +34 -25
- data/test/test_index_set.rb +30 -0
- data/test/test_indexer.rb +50 -0
- data/test/test_reloading_spreadsheet.rb +5 -2
- data/test/test_sheet.rb +184 -37
- data/test/test_utils.rb +99 -0
- metadata +82 -36
data/test/test_sheet.rb
CHANGED
|
@@ -3,49 +3,68 @@ require 'helper'
|
|
|
3
3
|
class TestSheet < MadTestCase
|
|
4
4
|
context "testing getter_name()" do
|
|
5
5
|
should "return proper function names" do
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
test_data = [
|
|
7
|
+
[" heLLo __ world ", :hello_world],
|
|
8
|
+
["0 heLLo __ worlD!!! ", :_0_hello_world],
|
|
9
|
+
["9ess 🐙 bsv++=", :_9ess_bsv ]
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
for input, expected in test_data
|
|
13
|
+
assert_equal expected, CsvMadness::Sheet.getter_name( input )
|
|
14
|
+
end
|
|
8
15
|
end
|
|
9
16
|
end
|
|
10
17
|
|
|
11
18
|
context "testing default spreadsheet paths" do
|
|
12
|
-
should "
|
|
13
|
-
assert_raises(RuntimeError) do
|
|
19
|
+
should "raise error if a path does not exist" do
|
|
20
|
+
assert_raises( RuntimeError ) do
|
|
14
21
|
CsvMadness::Sheet.add_search_path( CsvMadness.root.join("rocaganthor") )
|
|
15
22
|
end
|
|
16
23
|
end
|
|
17
24
|
|
|
18
25
|
should "check a search path for files to load" do
|
|
19
|
-
|
|
20
|
-
assert sheet.is_a?(CsvMadness::Sheet)
|
|
26
|
+
load_sheet( "with_nils.csv" )
|
|
27
|
+
assert @sheet.is_a?( CsvMadness::Sheet )
|
|
21
28
|
end
|
|
22
29
|
end
|
|
23
30
|
|
|
24
31
|
context "testing column_types" do
|
|
25
|
-
|
|
26
|
-
|
|
32
|
+
setup do
|
|
33
|
+
load_sheet("test_column_types.csv")
|
|
27
34
|
|
|
28
|
-
for type
|
|
29
|
-
sheet.set_column_type( type, type )
|
|
35
|
+
for type in CsvMadness::ColumnType::COLUMN_TYPE_LOOKUP.keys
|
|
36
|
+
@sheet.set_column_type( type, type )
|
|
30
37
|
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
should "gracefully handle empty strings for all column_types" do
|
|
31
41
|
|
|
32
|
-
record = sheet.records[0]
|
|
42
|
+
record = @sheet.records[0]
|
|
33
43
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
44
|
+
assert_nil record.date
|
|
45
|
+
assert_nil record.number
|
|
46
|
+
assert_nil record.float
|
|
37
47
|
|
|
38
|
-
record = sheet.records[1]
|
|
48
|
+
record = @sheet.records[1]
|
|
39
49
|
assert_equal "12", record.id
|
|
40
50
|
assert_equal 134.2, record.number
|
|
41
51
|
assert_equal 100, record.integer
|
|
42
52
|
assert_equal Time.parse("2013-01-13"), record.date
|
|
43
53
|
end
|
|
54
|
+
|
|
55
|
+
should "convert cells to proper column type when adding record" do
|
|
56
|
+
rec = @sheet.add_record( {:id => 13, :number => "-40.7", :integer => "12", :float => "37.4", :date => "1/31/2017" } )
|
|
57
|
+
|
|
58
|
+
assert_kind_of Float, rec.number
|
|
59
|
+
assert_equal( -40.7, rec.number )
|
|
60
|
+
assert_kind_of Integer, rec.id
|
|
61
|
+
|
|
62
|
+
end
|
|
44
63
|
end
|
|
45
64
|
|
|
46
65
|
context "testing add/remove records" do
|
|
47
66
|
setup do
|
|
48
|
-
|
|
67
|
+
load_sheet( "simple.csv", :index => :id )
|
|
49
68
|
end
|
|
50
69
|
|
|
51
70
|
should "add record" do
|
|
@@ -58,17 +77,38 @@ class TestSheet < MadTestCase
|
|
|
58
77
|
end
|
|
59
78
|
end
|
|
60
79
|
|
|
61
|
-
should "
|
|
80
|
+
should "add record (block form)" do
|
|
81
|
+
count = @sheet.records.length
|
|
82
|
+
|
|
83
|
+
block_ran = false
|
|
84
|
+
|
|
85
|
+
rec = @sheet.add_record( [] ) do |r|
|
|
86
|
+
block_ran = true
|
|
87
|
+
|
|
88
|
+
r.id = "8"
|
|
89
|
+
r.fname = "Omaha"
|
|
90
|
+
r.lname = "Williams"
|
|
91
|
+
r.age = "55"
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
assert block_ran, "Block did not run."
|
|
95
|
+
|
|
96
|
+
assert_equal count + 1, @sheet.length
|
|
97
|
+
assert_kind_of CsvMadness::Record, rec
|
|
98
|
+
assert_equal "8", rec.id
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
should "remove_record" do
|
|
62
102
|
count = @sheet.records.length
|
|
63
103
|
record = @sheet.records.last
|
|
64
104
|
record_id = record.id
|
|
65
105
|
|
|
66
|
-
|
|
106
|
+
assert_not_nil @sheet.fetch(:id, record_id)
|
|
67
107
|
|
|
68
108
|
|
|
69
109
|
@sheet.remove_record( record )
|
|
70
110
|
assert_equal (count - 1), @sheet.records.length
|
|
71
|
-
|
|
111
|
+
assert_nil @sheet.fetch(:id, record_id)
|
|
72
112
|
|
|
73
113
|
count = @sheet.records.length
|
|
74
114
|
record = @sheet.records[0]
|
|
@@ -81,43 +121,150 @@ class TestSheet < MadTestCase
|
|
|
81
121
|
end
|
|
82
122
|
|
|
83
123
|
context "testing blanking and splitting of spreadsheet" do
|
|
124
|
+
setup do
|
|
125
|
+
@sheet = CsvMadness.load( "splitter.csv" )
|
|
126
|
+
@blank_sheet = @sheet.blanked
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
teardown do
|
|
130
|
+
self.empty_output_folder
|
|
131
|
+
end
|
|
132
|
+
|
|
84
133
|
should "deliver me a properly blanked spreadsheet (simple)" do
|
|
85
|
-
sheet
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
sheet.length.times do |i|
|
|
89
|
-
blank_sheet.add_record( sheet.remove_record( 0 ) )
|
|
134
|
+
@sheet.length.times do |i|
|
|
135
|
+
@blank_sheet.add_record( @sheet.remove_record( 0 ) )
|
|
90
136
|
end
|
|
91
137
|
|
|
92
|
-
assert_zero sheet.length
|
|
93
|
-
assert_equal 10, blank_sheet.length
|
|
94
|
-
assert_nil blank_sheet.spreadsheet_file
|
|
138
|
+
assert_zero @sheet.length
|
|
139
|
+
assert_equal 10, @blank_sheet.length
|
|
140
|
+
assert_nil @blank_sheet.spreadsheet_file
|
|
95
141
|
end
|
|
96
142
|
|
|
97
143
|
should "deliver me a properly blanked spreadsheet (index)" do
|
|
98
|
-
|
|
99
|
-
blank_sheet
|
|
144
|
+
assert_zero @blank_sheet.length
|
|
145
|
+
assert_includes( @blank_sheet.index_columns, :id ) if @blank_sheet.indexing_enabled?
|
|
100
146
|
end
|
|
101
147
|
|
|
102
148
|
should "split splitter" do
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
149
|
+
sheets = @sheet.split do |record|
|
|
150
|
+
record.party
|
|
151
|
+
end
|
|
106
152
|
|
|
107
153
|
for party in %w(D I R)
|
|
108
|
-
assert_equal_length sheets[party], sheet.records.select{|r| r.party == party }
|
|
154
|
+
assert_equal_length sheets[party], @sheet.records.select{|r| r.party == party }
|
|
109
155
|
end
|
|
110
156
|
|
|
111
|
-
|
|
112
|
-
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
# assert_includes sheets["D"].index_columns, :id
|
|
160
|
+
# assert_includes sheets["I"].index_columns, :party
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
should "write back a blank sheet to a csv file" do
|
|
164
|
+
outpath = @csv_output_path
|
|
165
|
+
|
|
166
|
+
blankcsv = outpath.join( "blank.csv" )
|
|
167
|
+
onerecord = outpath.join( "onerecord.csv" )
|
|
168
|
+
|
|
169
|
+
@blank_sheet.write_to_file( blankcsv )
|
|
170
|
+
@blank_sheet.add_record( ["1","Mary","Moore","D"] )
|
|
171
|
+
@blank_sheet.write_to_file( onerecord )
|
|
172
|
+
|
|
173
|
+
reloaded = CsvMadness.load( blankcsv )
|
|
174
|
+
assert_length 0, reloaded
|
|
175
|
+
|
|
176
|
+
reloaded = CsvMadness.load( onerecord )
|
|
177
|
+
record = reloaded.records.first
|
|
178
|
+
|
|
179
|
+
assert_length 1, reloaded
|
|
180
|
+
|
|
181
|
+
assert_equal "Mary", record.fname
|
|
182
|
+
assert_equal "1", record.id
|
|
113
183
|
end
|
|
114
184
|
end
|
|
115
185
|
|
|
116
186
|
context "testing hilarious spreadsheet fails" do
|
|
117
187
|
should "raise error on forbidden column name" do
|
|
118
|
-
assert_raises(
|
|
119
|
-
|
|
188
|
+
assert_raises( CsvMadness::ForbiddenColumnNameError ) do
|
|
189
|
+
CsvMadness.load( "forbidden_column.csv" )
|
|
190
|
+
end
|
|
191
|
+
end
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
context "testing nils in headers" do
|
|
195
|
+
should "load the sheet without errors" do
|
|
196
|
+
ss = CsvMadness.load( "nil_headers.csv" )
|
|
197
|
+
assert_kind_of( CsvMadness::Sheet, ss )
|
|
198
|
+
|
|
199
|
+
expected_columns = [:col0, :fname, :col2, :col3, :col4]
|
|
200
|
+
|
|
201
|
+
for col in expected_columns
|
|
202
|
+
assert_includes( ss.columns, col )
|
|
203
|
+
assert_respond_to( ss[0], col )
|
|
204
|
+
end
|
|
205
|
+
end
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
context "testing sorting" do
|
|
209
|
+
setup do
|
|
210
|
+
load_sheet( "pokemon.csv" )
|
|
211
|
+
@sheet.set_column_type( :id, :integer )
|
|
212
|
+
@sheet.set_column_type( :cp, :integer )
|
|
213
|
+
@sheet.set_column_type( :hp, :integer )
|
|
214
|
+
|
|
215
|
+
@initial_id_result = [1,2,3,4,5,6,7,8]
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
should "successfully load sheet w/ proper results for :id column" do
|
|
219
|
+
assert_equal_length( @initial_id_result, @sheet.column(:id) )
|
|
220
|
+
assert_equal( @initial_id_result, @sheet.column(:id) )
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
should "not alter the order when sorting by ID (already in order)" do
|
|
224
|
+
@sheet.sort( :id )
|
|
225
|
+
assert_equal_length( @initial_id_result, @sheet.column(:id) )
|
|
226
|
+
assert_equal( @initial_id_result, @sheet.column(:id) )
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
should "alter order at other times" do
|
|
230
|
+
flunk
|
|
231
|
+
end
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
context "testing add_blank_record" do
|
|
235
|
+
setup do
|
|
236
|
+
load_sheet "simple.csv"
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
should "add_a_blank_record (block form)" do
|
|
240
|
+
rec = @sheet.add_blank_record do |record|
|
|
241
|
+
record.id = "5"
|
|
242
|
+
record.fname = "Larry"
|
|
243
|
+
record.lname = "Wilmore"
|
|
244
|
+
record.age = "55"
|
|
120
245
|
end
|
|
246
|
+
|
|
247
|
+
assert_equal "Larry", @sheet.records.last.fname
|
|
248
|
+
assert_equal "55", rec.age
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
should "add_a_blank_record (no-block)" do
|
|
252
|
+
len = @sheet.length
|
|
253
|
+
rec = @sheet.add_blank_record
|
|
254
|
+
|
|
255
|
+
assert_equal( len + 1, @sheet.length )
|
|
256
|
+
|
|
257
|
+
rec.fname = "Bill"
|
|
258
|
+
assert_equal( "Bill", @sheet.records[len].fname )
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
should "update via apply_update_hash" do
|
|
264
|
+
record = @sheet.add_blank_record
|
|
265
|
+
record.apply_update_hash( :id => "6", :fname => "Teddy", :lname => "Roosevelt", :age => 109 )
|
|
266
|
+
assert_equal 109, record.age
|
|
267
|
+
assert_equal "6", record.id
|
|
121
268
|
end
|
|
122
269
|
end
|
|
123
270
|
end
|
data/test/test_utils.rb
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
require 'helper'
|
|
2
|
+
|
|
3
|
+
class TestUtils < MadTestCase
|
|
4
|
+
include CsvMadness::Utils
|
|
5
|
+
|
|
6
|
+
context "testing for constants" do
|
|
7
|
+
should "have all the constants" do
|
|
8
|
+
assert defined?( CsvMadness )
|
|
9
|
+
assert defined?( CsvMadness::Utils )
|
|
10
|
+
assert defined?( CsvMadness::Utils::Counter )
|
|
11
|
+
assert defined?( CsvMadness::Utils::CounterProc )
|
|
12
|
+
assert defined?( CsvMadness::Utils::ConstProc )
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
should "respond to factory methods" do
|
|
16
|
+
assert_respond_to ConstProc, :proc_for
|
|
17
|
+
assert_respond_to CounterProc, :counter
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
context "testing Counter" do
|
|
22
|
+
context "with a default/zero counter" do
|
|
23
|
+
setup do
|
|
24
|
+
@counter = Counter.new
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
should "respond to methods" do
|
|
28
|
+
assert_respond_to @counter, :value
|
|
29
|
+
assert_respond_to @counter, :click
|
|
30
|
+
assert_respond_to @counter, :reset
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
should "start at zero" do
|
|
34
|
+
assert_zero @counter.value
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
should "track tick counts" do
|
|
38
|
+
300.times do |i|
|
|
39
|
+
@counter.click
|
|
40
|
+
assert_equal i + 1, @counter.value
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
@counter.reset
|
|
44
|
+
|
|
45
|
+
assert_zero @counter.value
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
context "when initialized with a positive counter" do
|
|
50
|
+
setup do
|
|
51
|
+
@counter = Counter.new(255)
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
should "work okay" do
|
|
55
|
+
assert_equal 255, @counter.value
|
|
56
|
+
assert_equal 256, @counter.click
|
|
57
|
+
assert_equal 256, @counter.value
|
|
58
|
+
assert_equal 257, @counter.click
|
|
59
|
+
assert_equal 258, @counter.click
|
|
60
|
+
assert_equal 255, @counter.reset
|
|
61
|
+
assert_equal 255, @counter.value
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
context "when initialized with a negative counter" do
|
|
67
|
+
setup do
|
|
68
|
+
@counter = Counter.new( -12 )
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
should "work okay" do
|
|
72
|
+
assert_equal( -12, @counter.value )
|
|
73
|
+
assert_equal( -11, @counter.click )
|
|
74
|
+
assert_equal( -11, @counter.value )
|
|
75
|
+
assert_equal( -10, @counter.click )
|
|
76
|
+
assert_equal( -9, @counter.click )
|
|
77
|
+
assert_equal( -12, @counter.reset )
|
|
78
|
+
assert_equal( -12, @counter.value )
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
context "testing CounterProc" do
|
|
84
|
+
context "with default counter" do
|
|
85
|
+
setup do
|
|
86
|
+
@proc = CounterProc.counter
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
should "start at zero and increment each time it's called" do
|
|
90
|
+
assert_zero @proc.call
|
|
91
|
+
assert_one @proc.times_called
|
|
92
|
+
assert_one @proc.call
|
|
93
|
+
assert_equal 2, @proc.times_called
|
|
94
|
+
@proc.reset
|
|
95
|
+
assert_zero @proc.times_called
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
end
|
metadata
CHANGED
|
@@ -1,47 +1,60 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: csv_madness
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.10
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Bryce Anderson
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: fun_with_gems
|
|
15
14
|
requirement: !ruby/object:Gem::Requirement
|
|
16
15
|
requirements:
|
|
17
|
-
- -
|
|
18
|
-
- !ruby/object:Gem::Version
|
|
19
|
-
version: 0.0.2
|
|
20
|
-
- - ~>
|
|
16
|
+
- - "~>"
|
|
21
17
|
- !ruby/object:Gem::Version
|
|
22
18
|
version: '0.0'
|
|
19
|
+
- - ">="
|
|
20
|
+
- !ruby/object:Gem::Version
|
|
21
|
+
version: 0.0.6
|
|
23
22
|
type: :runtime
|
|
24
23
|
prerelease: false
|
|
25
24
|
version_requirements: !ruby/object:Gem::Requirement
|
|
26
25
|
requirements:
|
|
27
|
-
- -
|
|
28
|
-
- !ruby/object:Gem::Version
|
|
29
|
-
version: 0.0.2
|
|
30
|
-
- - ~>
|
|
26
|
+
- - "~>"
|
|
31
27
|
- !ruby/object:Gem::Version
|
|
32
28
|
version: '0.0'
|
|
29
|
+
- - ">="
|
|
30
|
+
- !ruby/object:Gem::Version
|
|
31
|
+
version: 0.0.6
|
|
32
|
+
- !ruby/object:Gem::Dependency
|
|
33
|
+
name: csv
|
|
34
|
+
requirement: !ruby/object:Gem::Requirement
|
|
35
|
+
requirements:
|
|
36
|
+
- - ">="
|
|
37
|
+
- !ruby/object:Gem::Version
|
|
38
|
+
version: '0'
|
|
39
|
+
type: :runtime
|
|
40
|
+
prerelease: false
|
|
41
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
42
|
+
requirements:
|
|
43
|
+
- - ">="
|
|
44
|
+
- !ruby/object:Gem::Version
|
|
45
|
+
version: '0'
|
|
33
46
|
- !ruby/object:Gem::Dependency
|
|
34
47
|
name: fun_with_testing
|
|
35
48
|
requirement: !ruby/object:Gem::Requirement
|
|
36
49
|
requirements:
|
|
37
|
-
- -
|
|
50
|
+
- - ">="
|
|
38
51
|
- !ruby/object:Gem::Version
|
|
39
52
|
version: '0'
|
|
40
53
|
type: :development
|
|
41
54
|
prerelease: false
|
|
42
55
|
version_requirements: !ruby/object:Gem::Requirement
|
|
43
56
|
requirements:
|
|
44
|
-
- -
|
|
57
|
+
- - ">="
|
|
45
58
|
- !ruby/object:Gem::Version
|
|
46
59
|
version: '0'
|
|
47
60
|
description: CSV Madness removes what little pain is left from Ruby's CSV class. Load
|
|
@@ -50,54 +63,87 @@ email: keeputahweird@gmail.com
|
|
|
50
63
|
executables: []
|
|
51
64
|
extensions: []
|
|
52
65
|
extra_rdoc_files:
|
|
66
|
+
- CHANGELOG.markdown
|
|
53
67
|
- LICENSE.txt
|
|
54
68
|
- README.rdoc
|
|
55
69
|
files:
|
|
56
|
-
-
|
|
57
|
-
- ./lib/csv_madness/builder.rb
|
|
58
|
-
- ./lib/csv_madness/data_accessor_module.rb
|
|
59
|
-
- ./lib/csv_madness/gem_api.rb
|
|
60
|
-
- ./lib/csv_madness/record.rb
|
|
61
|
-
- ./lib/csv_madness/sheet.rb
|
|
62
|
-
- ./test/csv/forbidden_column.csv
|
|
63
|
-
- ./test/csv/simple.csv
|
|
64
|
-
- ./test/csv/splitter.csv
|
|
65
|
-
- ./test/csv/test_column_types.csv
|
|
66
|
-
- ./test/csv/with_nils.csv
|
|
67
|
-
- ./test/helper.rb
|
|
68
|
-
- ./test/test_builder.rb
|
|
69
|
-
- ./test/test_csv_madness.rb
|
|
70
|
-
- ./test/test_merging_columns.rb
|
|
71
|
-
- ./test/test_reloading_spreadsheet.rb
|
|
72
|
-
- ./test/test_sheet.rb
|
|
70
|
+
- ".document"
|
|
73
71
|
- CHANGELOG.markdown
|
|
74
72
|
- Gemfile
|
|
75
73
|
- LICENSE.txt
|
|
76
74
|
- README.rdoc
|
|
77
75
|
- Rakefile
|
|
78
76
|
- VERSION
|
|
77
|
+
- lib/csv_madness.rb
|
|
78
|
+
- lib/csv_madness/builder.rb
|
|
79
|
+
- lib/csv_madness/column.rb
|
|
80
|
+
- lib/csv_madness/column_methods/core_methods.rb
|
|
81
|
+
- lib/csv_madness/column_methods/default_value_methods.rb
|
|
82
|
+
- lib/csv_madness/column_methods/error_methods.rb
|
|
83
|
+
- lib/csv_madness/column_methods/fetch_methods.rb
|
|
84
|
+
- lib/csv_madness/column_methods/typing_methods.rb
|
|
85
|
+
- lib/csv_madness/column_set.rb
|
|
86
|
+
- lib/csv_madness/column_type.rb
|
|
87
|
+
- lib/csv_madness/column_types/date.rb
|
|
88
|
+
- lib/csv_madness/column_types/float.rb
|
|
89
|
+
- lib/csv_madness/column_types/integer.rb
|
|
90
|
+
- lib/csv_madness/column_types/string.rb
|
|
91
|
+
- lib/csv_madness/data_accessor_module.rb
|
|
92
|
+
- lib/csv_madness/exceptions.rb
|
|
93
|
+
- lib/csv_madness/gem_api.rb
|
|
94
|
+
- lib/csv_madness/index_set.rb
|
|
95
|
+
- lib/csv_madness/indexer.rb
|
|
96
|
+
- lib/csv_madness/record.rb
|
|
97
|
+
- lib/csv_madness/record_filter.rb
|
|
98
|
+
- lib/csv_madness/record_methods/method_methods.rb
|
|
99
|
+
- lib/csv_madness/sheet.rb
|
|
100
|
+
- lib/csv_madness/sheet_methods/base.rb
|
|
101
|
+
- lib/csv_madness/sheet_methods/class_methods.rb
|
|
102
|
+
- lib/csv_madness/sheet_methods/column_methods.rb
|
|
103
|
+
- lib/csv_madness/sheet_methods/file_methods.rb
|
|
104
|
+
- lib/csv_madness/sheet_methods/indexing.rb
|
|
105
|
+
- lib/csv_madness/sheet_methods/record_methods.rb
|
|
106
|
+
- lib/csv_madness/sheet_methods/sorting_methods.rb
|
|
107
|
+
- lib/csv_madness/utils/const_proc.rb
|
|
108
|
+
- lib/csv_madness/utils/counter.rb
|
|
109
|
+
- lib/csv_madness/utils/counter_proc.rb
|
|
110
|
+
- lib/csv_madness/utils/looker_upper.rb
|
|
111
|
+
- test/csv/forbidden_column.csv
|
|
112
|
+
- test/csv/nil_headers.csv
|
|
113
|
+
- test/csv/out/.gitkeep
|
|
114
|
+
- test/csv/pokemon.csv
|
|
115
|
+
- test/csv/simple.csv
|
|
116
|
+
- test/csv/splitter.csv
|
|
117
|
+
- test/csv/test_column_types.csv
|
|
118
|
+
- test/csv/with_nils.csv
|
|
119
|
+
- test/helper.rb
|
|
120
|
+
- test/test_builder.rb
|
|
121
|
+
- test/test_csv_madness.rb
|
|
122
|
+
- test/test_index_set.rb
|
|
123
|
+
- test/test_indexer.rb
|
|
124
|
+
- test/test_merging_columns.rb
|
|
125
|
+
- test/test_reloading_spreadsheet.rb
|
|
126
|
+
- test/test_sheet.rb
|
|
127
|
+
- test/test_utils.rb
|
|
79
128
|
homepage: http://github.com/darthschmoo/csv_madness
|
|
80
129
|
licenses:
|
|
81
130
|
- MIT
|
|
82
131
|
metadata: {}
|
|
83
|
-
post_install_message:
|
|
84
132
|
rdoc_options: []
|
|
85
133
|
require_paths:
|
|
86
134
|
- lib
|
|
87
135
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
88
136
|
requirements:
|
|
89
|
-
- -
|
|
137
|
+
- - ">="
|
|
90
138
|
- !ruby/object:Gem::Version
|
|
91
139
|
version: '0'
|
|
92
140
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
93
141
|
requirements:
|
|
94
|
-
- -
|
|
142
|
+
- - ">="
|
|
95
143
|
- !ruby/object:Gem::Version
|
|
96
144
|
version: '0'
|
|
97
145
|
requirements: []
|
|
98
|
-
|
|
99
|
-
rubygems_version: 2.2.2
|
|
100
|
-
signing_key:
|
|
146
|
+
rubygems_version: 3.6.9
|
|
101
147
|
specification_version: 4
|
|
102
148
|
summary: CSV Madness turns your CSV rows into happycrazy objects.
|
|
103
149
|
test_files: []
|