csvundle 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: cfe4e593bd281d6156131676f379b83eae948382
4
+ data.tar.gz: 2051b683f89be1ccfebf96a8f2f3bae4ec370cbf
5
+ SHA512:
6
+ metadata.gz: 804fec13ecffbe86d731f4071ef4586e19acbf71aad65a7ba686c2ccef4f18960eaa6f753018ef3a993def3659024c22174a40d9b770fbd3d11304d0c314de52
7
+ data.tar.gz: f3c339f455c2cafc9b7113e2180cad46012132b3634e1687df279580edce6926181d778de2bb2a30b32061bb9066254511da9073509e2275b16f25f09abe3ea5
data/.gitignore ADDED
@@ -0,0 +1,10 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ *.swp
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/.ruby-gemset ADDED
@@ -0,0 +1 @@
1
+ csvundle
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ ruby-2.2.1
data/.travis.yml ADDED
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.2.1
4
+ before_install: gem install bundler -v 1.10.6
@@ -0,0 +1,13 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
4
+
5
+ We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
6
+
7
+ Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
8
+
9
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
10
+
11
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
12
+
13
+ This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in csvundle.gemspec
4
+ gemspec
data/README.md ADDED
@@ -0,0 +1,46 @@
1
+ # CSVundle
2
+ [ ![Codeship Status for cometaworks/CSVundle](https://codeship.com/projects/d9fe0ac0-5a29-0133-81d7-0e6f49d10408/status?branch=master)](https://codeship.com/projects/110270)
3
+
4
+ CSVundle is a utility for Access Terminal. It assists in the generation of CSV's for a given set properties.
5
+
6
+ ## Installation
7
+
8
+ Add this line to your application's Gemfile:
9
+
10
+ ```ruby
11
+ gem 'csvundle', git: 'https://github.com/cometaworks/csvundle.git', :branch => 'master'
12
+ ```
13
+
14
+ And then execute:
15
+
16
+ $ bundle
17
+
18
+ ## Usage
19
+
20
+ ```ruby
21
+ # It is quite a simple utility, with an exposed but uneeded API. In it's final implementation,
22
+ # the functionality needed will simply be:
23
+ # csv = CSVundle.csv_for(my_data, :lienalytics)
24
+ # However, the internal API has an `AccessCSV` class that can be used like so:
25
+ csv = CSVundle::AccessCSV.new
26
+ csv.colums << ["batHeads", "TOES", "ViciousFoes", "friends", "number of jerrys"]
27
+ csv.rows << [1, 6, 1, 99, "3.14159365358979323846264338327950288419"]
28
+ csv.rows << [2, 4, 14, 3, "3.14159365358979323846264338327950288419"]
29
+ csv.rows_for("number of jerrys")
30
+ # => { "number of jerrys": ["3.14159365358979323846264338327950288419", "3.14159365358979323846264338327950288419"] }
31
+ csv.normalized_columns
32
+ # => [:bat_heads, :toes, :vicious_foes, :friends, :"number of jerrys"]
33
+ csv.viperize(:BatFarts)
34
+ # => :bat_farts
35
+ ```
36
+
37
+ ## Development
38
+
39
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
40
+
41
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
42
+
43
+ ## Contributing
44
+
45
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/csvundle. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
46
+
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "csvundle"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
data/bin/setup ADDED
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+
5
+ bundle install
6
+
7
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,420 @@
1
+ "lienalytics":
2
+ "headers":
3
+ ["lien_ID",
4
+ "row_number",
5
+ "state_name",
6
+ "county_name",
7
+ "full_fips_code",
8
+ "apn",
9
+ "parcel_id",
10
+ "block",
11
+ "lot",
12
+ "qualifier",
13
+ "addl_lots",
14
+ "tax_type",
15
+ "list_item_reference",
16
+ "client_provided_parcel_id",
17
+ "certificate_no",
18
+ "face_value",
19
+ "redemptive_value",
20
+ "principal",
21
+ "tax_year",
22
+ "total_yearly_tax",
23
+ "location_street_address_1",
24
+ "location_street_address_2",
25
+ "location_city_state_zip",
26
+ "location_city",
27
+ "location_zip",
28
+ "longitude",
29
+ "latitude",
30
+ "county_land_use",
31
+ "county_land_use_desc",
32
+ "standardized_land_use",
33
+ "standardized_land_use_desc",
34
+ "county_held",
35
+ "prop_record_year",
36
+ "lien_rollup",
37
+ "location_house_number",
38
+ "location_street_dir_left",
39
+ "location_street_name",
40
+ "location_street_suffix",
41
+ "location_street_dir_right",
42
+ "location_unit_number",
43
+ "legal_status",
44
+ "interest_rate",
45
+ "penalty_rate",
46
+ "penalty_amount",
47
+ "premium_overbid",
48
+ "overbid_interest_rate",
49
+ "original_sale_auction_date",
50
+ "date_purchased_from_issuer",
51
+ "issuer",
52
+ "sub",
53
+ "assessment_year",
54
+ "assessed_land_value",
55
+ "assessed_improvement_value",
56
+ "total_assessed_value",
57
+ "market_value_year",
58
+ "market_land_value",
59
+ "market_improvement_value",
60
+ "total_market_value",
61
+ "lot_frontage",
62
+ "lot_depth",
63
+ "lot_size_unit",
64
+ "zoning",
65
+ "building_class",
66
+ "year_built",
67
+ "no_of_stories",
68
+ "no_of_units",
69
+ "last_sale_date",
70
+ "last_sale_price",
71
+ "last_arms_length_sale_date",
72
+ "last_arms_length_sale_price",
73
+ "prior_arms_length_sale_date",
74
+ "prior_arms_length_sale_price",
75
+ "legal_city",
76
+ "legal_block",
77
+ "legal_lot_number",
78
+ "legal_section",
79
+ "legal_district",
80
+ "legal_unit",
81
+ "legal_subdivision_name",
82
+ "legal_phase_number",
83
+ "legal_tract_number",
84
+ "legal_section_township_range_meridian",
85
+ "legal_assessors_map_ref",
86
+ "legal_brief_desc",
87
+ "current_owner",
88
+ "mailing_care_of",
89
+ "mailing_street_address",
90
+ "mailing_city_state",
91
+ "mailing_zip",
92
+ "owner_occupied",
93
+ "loan1_contract_date",
94
+ "loan1_recording_date",
95
+ "loan1_amount",
96
+ "loan1_due_date",
97
+ "loan1_type",
98
+ "loan2_contract_date",
99
+ "loan2_recording_date",
100
+ "loan2_amount",
101
+ "loan2_due_date",
102
+ "loan2_type",
103
+ "municipality",
104
+ "tags",
105
+ "bids",
106
+ "notes",
107
+ "additional_csv_data"]
108
+ "filler_row_count": 1
109
+ "initial_data": []
110
+
111
+ "lumentum":
112
+ "headers":
113
+ ["CountyName",
114
+ "BatchNumber",
115
+ "AdvNumber",
116
+ "CertificateNumber",
117
+ "NALFormat",
118
+ "ALTKEYFormat",
119
+ "PropertyAppraiserFormat",
120
+ "TaxCollectorFormat",
121
+ "ExtraFormat",
122
+ "AuctionFormat",
123
+ "NewParcel",
124
+ "ReParceled",
125
+ "CertYear",
126
+ "TaxYear",
127
+ "FaceAmt",
128
+ "MktValue",
129
+ "LandValue",
130
+ "StructureValue",
131
+ "ZoningCode",
132
+ "DigipanZoning",
133
+ "ZoningUseCode",
134
+ "HX",
135
+ "PropertySize",
136
+ "SfStructure",
137
+ "YearBuilt",
138
+ "ImprovedQuality",
139
+ "ConstructionClass",
140
+ "NumberOfBuildings",
141
+ "NumberOfResUnits",
142
+ "MultiSale",
143
+ "SalesHistoryAmount",
144
+ "SalesHistoryYear",
145
+ "SuperiorLien",
146
+ "LisPendens",
147
+ "Environmental",
148
+ "CDDName",
149
+ "BondStatus",
150
+ "TotalBondAmount",
151
+ "LastDateUpdated",
152
+ "LenderName",
153
+ "LenderAmount",
154
+ "LenderType",
155
+ "LoanType",
156
+ "LoanRecordingDate",
157
+ "LoanDueDate",
158
+ "Owner",
159
+ "OwnerType",
160
+ "OwnerChange",
161
+ "PropertyAddress",
162
+ "PropertyCity",
163
+ "PropertyState",
164
+ "PropertyZip",
165
+ "MailingAddress",
166
+ "MailingCity",
167
+ "MailState",
168
+ "MailingZip",
169
+ "LegalAddress",
170
+ "BackTaxLastUpdated",
171
+ "CertHolderType",
172
+ "TaxDeedHistory",
173
+ "BackTaxOpenCount",
174
+ "BackTaxClosedCount",
175
+ "RollupFaceAmount",
176
+ "Rollupinterest",
177
+ "RollupTotal",
178
+ "SAL_DATE1",
179
+ "DEL_YEAR1",
180
+ "FACE_AMT1",
181
+ "CER_NUM1",
182
+ "INT_RATE1",
183
+ "CERT_HOLDER_TYPE1",
184
+ "CER_STAT1",
185
+ "RED_DATE1",
186
+ "MONTHS_OPEN1",
187
+ "BIDDER_NUMBER1",
188
+ "BIDDER_NAME1",
189
+ "TAX_DEED1",
190
+ "SAL_DATE2",
191
+ "DEL_YEAR2",
192
+ "FACE_AMT2",
193
+ "CER_NUM2",
194
+ "INT_RATE2",
195
+ "CERT_HOLDER_TYPE2",
196
+ "CER_STAT2",
197
+ "RED_DATE2",
198
+ "MONTHS_OPEN2",
199
+ "BIDDER_NUMBER2",
200
+ "BIDDER_NAME2",
201
+ "TAX_DEED2",
202
+ "SAL_DATE3",
203
+ "DEL_YEAR3",
204
+ "FACE_AMT3",
205
+ "CER_NUM3",
206
+ "INT_RATE3",
207
+ "CERT_HOLDER_TYPE3",
208
+ "CER_STAT3",
209
+ "RED_DATE3",
210
+ "MONTHS_OPEN3",
211
+ "BIDDER_NUMBER3",
212
+ "BIDDER_NAME3",
213
+ "TAX_DEED3",
214
+ "SAL_DATE4",
215
+ "DEL_YEAR4",
216
+ "FACE_AMT4",
217
+ "CER_NUM4",
218
+ "INT_RATE4",
219
+ "CERT_HOLDER_TYPE4",
220
+ "CER_STAT4",
221
+ "RED_DATE4",
222
+ "MONTHS_OPEN4",
223
+ "BIDDER_NUMBER4",
224
+ "BIDDER_NAME4",
225
+ "TAX_DEED4",
226
+ "SAL_DATE5",
227
+ "DEL_YEAR5",
228
+ "FACE_AMT5",
229
+ "CER_NUM5",
230
+ "INT_RATE5",
231
+ "CERT_HOLDER_TYPE5",
232
+ "CER_STAT5",
233
+ "RED_DATE5",
234
+ "MONTHS_OPEN5",
235
+ "BIDDER_NUMBER5",
236
+ "BIDDER_NAME5",
237
+ "TAX_DEED5",
238
+ "SAL_DATE6",
239
+ "DEL_YEAR6",
240
+ "FACE_AMT6",
241
+ "CER_NUM6",
242
+ "INT_RATE6",
243
+ "CERT_HOLDER_TYPE6",
244
+ "CER_STAT6",
245
+ "RED_DATE6",
246
+ "MONTHS_OPEN6",
247
+ "BIDDER_NUMBER6",
248
+ "BIDDER_NAME6",
249
+ "TAX_DEED6",
250
+ "SAL_DATE7",
251
+ "DEL_YEAR7",
252
+ "FACE_AMT7",
253
+ "CER_NUM7",
254
+ "INT_RATE7",
255
+ "CERT_HOLDER_TYPE7",
256
+ "CER_STAT7",
257
+ "RED_DATE7",
258
+ "MONTHS_OPEN7",
259
+ "BIDDER_NUMBER7",
260
+ "BIDDER_NAME7",
261
+ "TAX_DEED7",
262
+ "SAL_DATE8",
263
+ "DEL_YEAR8",
264
+ "FACE_AMT8",
265
+ "CER_NUM8",
266
+ "INT_RATE8",
267
+ "CERT_HOLDER_TYPE8",
268
+ "CER_STAT8",
269
+ "RED_DATE8",
270
+ "MONTHS_OPEN8",
271
+ "BIDDER_NUMBER8",
272
+ "BIDDER_NAME8",
273
+ "TAX_DEED8",
274
+ "SAL_DATE9",
275
+ "DEL_YEAR9",
276
+ "FACE_AMT9",
277
+ "CER_NUM9",
278
+ "INT_RATE9",
279
+ "CERT_HOLDER_TYPE9",
280
+ "CER_STAT9",
281
+ "RED_DATE9",
282
+ "MONTHS_OPEN9",
283
+ "BIDDER_NUMBER9",
284
+ "BIDDER_NAME9",
285
+ "TAX_DEED9",
286
+ "SAL_DATE10",
287
+ "DEL_YEAR10",
288
+ "FACE_AMT10",
289
+ "CER_NUM10",
290
+ "INT_RATE10",
291
+ "CERT_HOLDER_TYPE10",
292
+ "CER_STAT10",
293
+ "RED_DATE10",
294
+ "MONTHS_OPEN10",
295
+ "BIDDER_NUMBER10",
296
+ "BIDDER_NAME10",
297
+ "TAX_DEED10",
298
+ "SAL_DATE11",
299
+ "DEL_YEAR11",
300
+ "FACE_AMT11",
301
+ "CER_NUM11",
302
+ "INT_RATE11",
303
+ "CERT_HOLDER_TYPE11",
304
+ "CER_STAT11",
305
+ "RED_DATE11",
306
+ "MONTHS_OPEN11",
307
+ "BIDDER_NUMBER11",
308
+ "BIDDER_NAME11",
309
+ "TAX_DEED11",
310
+ "SAL_DATE12",
311
+ "DEL_YEAR12",
312
+ "FACE_AMT12",
313
+ "CER_NUM12",
314
+ "INT_RATE12",
315
+ "CERT_HOLDER_TYPE12",
316
+ "CER_STAT12",
317
+ "RED_DATE12",
318
+ "MONTHS_OPEN12",
319
+ "BIDDER_NUMBER12",
320
+ "BIDDER_NAME12",
321
+ "TAX_DEED12",
322
+ "SAL_DATE13",
323
+ "DEL_YEAR13",
324
+ "FACE_AMT13",
325
+ "CER_NUM13",
326
+ "INT_RATE13",
327
+ "CERT_HOLDER_TYPE13",
328
+ "CER_STAT13",
329
+ "RED_DATE13",
330
+ "MONTHS_OPEN13",
331
+ "BIDDER_NUMBER13",
332
+ "BIDDER_NAME13",
333
+ "TAX_DEED13",
334
+ "SAL_DATE14",
335
+ "DEL_YEAR14",
336
+ "FACE_AMT14",
337
+ "CER_NUM14",
338
+ "INT_RATE14",
339
+ "CERT_HOLDER_TYPE14",
340
+ "CER_STAT14",
341
+ "RED_DATE14",
342
+ "MONTHS_OPEN14",
343
+ "BIDDER_NUMBER14",
344
+ "BIDDER_NAME14",
345
+ "TAX_DEED14",
346
+ "SAL_DATE15",
347
+ "DEL_YEAR15",
348
+ "FACE_AMT15",
349
+ "CER_NUM15",
350
+ "INT_RATE15",
351
+ "CERT_HOLDER_TYPE15",
352
+ "CER_STAT15",
353
+ "RED_DATE15",
354
+ "MONTHS_OPEN15",
355
+ "BIDDER_NUMBER15",
356
+ "BIDDER_NAME15",
357
+ "TAX_DEED15",
358
+ "SAL_DATE16",
359
+ "DEL_YEAR16",
360
+ "FACE_AMT16",
361
+ "CER_NUM16",
362
+ "INT_RATE16",
363
+ "CERT_HOLDER_TYPE16",
364
+ "CER_STAT16",
365
+ "RED_DATE16",
366
+ "MONTHS_OPEN16",
367
+ "BIDDER_NUMBER16",
368
+ "BIDDER_NAME16",
369
+ "TAX_DEED16",
370
+ "SAL_DATE17",
371
+ "DEL_YEAR17",
372
+ "FACE_AMT17",
373
+ "CER_NUM17",
374
+ "INT_RATE17",
375
+ "CERT_HOLDER_TYPE17",
376
+ "CER_STAT17",
377
+ "RED_DATE17",
378
+ "MONTHS_OPEN17",
379
+ "BIDDER_NUMBER17",
380
+ "BIDDER_NAME17",
381
+ "TAX_DEED17",
382
+ "SAL_DATE18",
383
+ "DEL_YEAR18",
384
+ "FACE_AMT18",
385
+ "CER_NUM18",
386
+ "INT_RATE18",
387
+ "CERT_HOLDER_TYPE18",
388
+ "CER_STAT18",
389
+ "RED_DATE18",
390
+ "MONTHS_OPEN18",
391
+ "BIDDER_NUMBER18",
392
+ "BIDDER_NAME18",
393
+ "TAX_DEED18",
394
+ "SAL_DATE19",
395
+ "DEL_YEAR19",
396
+ "FACE_AMT19",
397
+ "CER_NUM19",
398
+ "INT_RATE19",
399
+ "CERT_HOLDER_TYPE19",
400
+ "CER_STAT19",
401
+ "RED_DATE19",
402
+ "MONTHS_OPEN19",
403
+ "BIDDER_NUMBER19",
404
+ "BIDDER_NAME19",
405
+ "TAX_DEED19",
406
+ "SAL_DATE20",
407
+ "DEL_YEAR20",
408
+ "FACE_AMT20",
409
+ "CER_NUM20",
410
+ "INT_RATE20",
411
+ "CERT_HOLDER_TYPE20",
412
+ "CER_STAT20",
413
+ "RED_DATE20",
414
+ "MONTHS_OPEN20",
415
+ "BIDDER_NUMBER20",
416
+ "BIDDER_NAME20",
417
+ "TAX_DEED20"]
418
+ "filler_row_count": 0
419
+ "initial_data": []
420
+
@@ -0,0 +1,280 @@
1
+ "lienalytics":
2
+ - "lien_ID"
3
+ - "row_number"
4
+ - "state_name"
5
+ - "county_name"
6
+ - "full_fips_code"
7
+ - "apn"
8
+ - "parcel_id"
9
+ - "block"
10
+ - "lot"
11
+ - "qualifier"
12
+ - "addl_lots"
13
+ - "tax_type"
14
+ - "list_item_reference"
15
+ - "client_provided_parcel_id"
16
+ - "certificate_no"
17
+ - "face_value"
18
+ - "redemptive_value"
19
+ - "principal"
20
+ - "tax_year"
21
+ - "total_yearly_tax"
22
+ - "location_street_address_1"
23
+ - "location_street_address_2"
24
+ - "location_city_state_zip"
25
+ - "location_city"
26
+ - "location_zip"
27
+ - "longitude"
28
+ - "latitude"
29
+ - "county_land_use"
30
+ - "county_land_use_desc"
31
+ - "standardized_land_use"
32
+ - "standardized_land_use_desc"
33
+ - "county_held"
34
+ - "prop_record_year"
35
+ - "lien_rollup"
36
+ - "location_house_number"
37
+ - "location_street_dir_left"
38
+ - "location_street_name"
39
+ - "location_street_suffix"
40
+ - "location_street_dir_right"
41
+ - "location_unit_number"
42
+ - "legal_status"
43
+ - "interest_rate"
44
+ - "penalty_rate"
45
+ - "penalty_amount"
46
+ - "premium_overbid"
47
+ - "overbid_interest_rate"
48
+ - "original_sale_auction_date"
49
+ - "date_purchased_from_issuer"
50
+ - "issuer"
51
+ - "sub"
52
+ - "assessment_year"
53
+ - "assessed_land_value"
54
+ - "assessed_improvement_value"
55
+ - "total_assessed_value"
56
+ - "market_value_year"
57
+ - "market_land_value"
58
+ - "market_improvement_value"
59
+ - "total_market_value"
60
+ - "lot_frontage"
61
+ - "lot_depth"
62
+ - "lot_size_unit"
63
+ - "zoning"
64
+ - "building_class"
65
+ - "year_built"
66
+ - "no_of_stories"
67
+ - "no_of_units"
68
+ - "last_sale_date"
69
+ - "last_sale_price"
70
+ - "last_arms_length_sale_date"
71
+ - "last_arms_length_sale_price"
72
+ - "prior_arms_length_sale_date"
73
+ - "prior_arms_length_sale_price"
74
+ - "legal_city"
75
+ - "legal_block"
76
+ - "legal_lot_number"
77
+ - "legal_section"
78
+ - "legal_district"
79
+ - "legal_unit"
80
+ - "legal_subdivision_name"
81
+ - "legal_phase_number"
82
+ - "legal_tract_number"
83
+ - "legal_section_township_range_meridian"
84
+ - "legal_assessors_map_ref"
85
+ - "legal_brief_desc"
86
+ - "current_owner"
87
+ - "mailing_care_of"
88
+ - "mailing_street_address"
89
+ - "mailing_city_state"
90
+ - "mailing_zip"
91
+ - "owner_occupied"
92
+ - "loan1_contract_date"
93
+ - "loan1_recording_date"
94
+ - "loan1_amount"
95
+ - "loan1_due_date"
96
+ - "loan1_type"
97
+ - "loan2_contract_date"
98
+ - "loan2_recording_date"
99
+ - "loan2_amount"
100
+ - "loan2_due_date"
101
+ - "loan2_type"
102
+ - "municipality"
103
+ - "tags"
104
+ - "bids"
105
+ - "notes"
106
+ - "additional_csv_data"
107
+
108
+ lumentum:
109
+ - "lien_ID"
110
+ - "row_number"
111
+ - "state_name"
112
+ - "county_name"
113
+ - "full_fips_code"
114
+ - "apn"
115
+ - "parcel_id"
116
+ - "block"
117
+ - "lot"
118
+ - "qualifier"
119
+ - "addl_lots"
120
+ - "tax_type"
121
+ - "list_item_reference"
122
+ - "client_provided_parcel_id"
123
+ - "certificate_no"
124
+ - "face_value"
125
+ - "redemptive_value"
126
+ - "principal"
127
+ - "tax_year"
128
+ - "total_yearly_tax"
129
+ - "location_street_address_1"
130
+ - "location_street_address_2"
131
+ - "location_city_state_zip"
132
+ - "location_city"
133
+ - "location_zip"
134
+ - "longitude"
135
+ - "latitude"
136
+ - "county_land_use"
137
+ - "county_land_use_desc"
138
+ - "standardized_land_use"
139
+ - "standardized_land_use_desc"
140
+ - "county_held"
141
+ - "prop_record_year"
142
+ - "lien_rollup"
143
+ - "location_house_number"
144
+ - "location_street_dir_left"
145
+ - "location_street_name"
146
+ - "location_street_suffix"
147
+ - "location_street_dir_right"
148
+ - "location_unit_number"
149
+ - "legal_status"
150
+ - "interest_rate"
151
+ - "penalty_rate"
152
+ - "penalty_amount"
153
+ - "premium_overbid"
154
+ - "overbid_interest_rate"
155
+ - "original_sale_auction_date"
156
+ - "date_purchased_from_issuer"
157
+ - "issuer"
158
+ - "sub"
159
+ - "assessment_year"
160
+ - "assessed_land_value"
161
+ - "assessed_improvement_value"
162
+ - "total_assessed_value"
163
+ - "market_value_year"
164
+ - "market_land_value"
165
+ - "market_improvement_value"
166
+ - "total_market_value"
167
+ - "lot_frontage"
168
+ - "lot_depth"
169
+ - "lot_size_unit"
170
+ - "zoning"
171
+ - "building_class"
172
+ - "year_built"
173
+ - "no_of_stories"
174
+ - "no_of_units"
175
+ - "last_sale_date"
176
+ - "last_sale_price"
177
+ - "last_arms_length_sale_date"
178
+ - "last_arms_length_sale_price"
179
+ - "prior_arms_length_sale_date"
180
+ - "prior_arms_length_sale_price"
181
+ - "legal_city"
182
+ - "legal_block"
183
+ - "legal_lot_number"
184
+ - "legal_section"
185
+ - "legal_district"
186
+ - "legal_unit"
187
+ - "legal_subdivision_name"
188
+ - "legal_phase_number"
189
+ - "legal_tract_number"
190
+ - "legal_section_township_range_meridian"
191
+ - "legal_assessors_map_ref"
192
+ - "legal_brief_desc"
193
+ - "current_owner"
194
+ - "mailing_care_of"
195
+ - "mailing_street_address"
196
+ - "mailing_city_state"
197
+ - "mailing_zip"
198
+ - "owner_occupied"
199
+ - "loan1_contract_date"
200
+ - "loan1_recording_date"
201
+ - "loan1_amount"
202
+ - "loan1_due_date"
203
+ - "loan1_type"
204
+ - "loan2_contract_date"
205
+ - "loan2_recording_date"
206
+ - "loan2_amount"
207
+ - "loan2_due_date"
208
+ - "loan2_type"
209
+ - "municipality"
210
+ - "tags"
211
+ - "bids"
212
+ - "notes"
213
+ - "additional_csv_data"
214
+
215
+ lumentum:
216
+ - "CountyName"
217
+ - "BatchNumber"
218
+ - "AdvNumber"
219
+ - "CertificateNumber"
220
+ - "NALFormat"
221
+ - "ALTKEYFormat"
222
+ - "PropertyAppraiserFormat"
223
+ - "TaxCollectorFormat"
224
+ - "ExtraFormat"
225
+ - "AuctionFormat"
226
+ - "NewParcel"
227
+ - "ReParceled"
228
+ - "CertYear"
229
+ - "TaxYear"
230
+ - "FaceAmt"
231
+ - "MktValue"
232
+ - "LandValue"
233
+ - "StructureValue"
234
+ - "ZoningCode"
235
+ - "DigipanZoning"
236
+ - "ZoningUseCode"
237
+ - "HX"
238
+ - "PropertySize"
239
+ - "SfStructure"
240
+ - "YearBuilt"
241
+ - "ImprovedQuality"
242
+ - "ConstructionClass"
243
+ - "NumberOfBuildings"
244
+ - "NumberOfResUnits"
245
+ - "MultiSale"
246
+ - "SalesHistoryAmount"
247
+ - "SalesHistoryYear"
248
+ - "SuperiorLien"
249
+ - "LisPendens"
250
+ - "Environmental"
251
+ - "CDDName"
252
+ - "BondStatus"
253
+ - "TotalBondAmount"
254
+ - "LastDateUpdated"
255
+ - "LenderName"
256
+ - "LenderAmount"
257
+ - "LenderType"
258
+ - "LoanType"
259
+ - "LoanRecordingDate"
260
+ - "LoanDueDate"
261
+ - "Owner"
262
+ - "OwnerType"
263
+ - "OwnerChange"
264
+ - "PropertyAddress"
265
+ - "PropertyCity"
266
+ - "PropertyState"
267
+ - "PropertyZip"
268
+ - "MailingAddress"
269
+ - "MailingCity"
270
+ - "MailState"
271
+ - "MailingZip"
272
+ - "LegalAddress"
273
+ - "BackTaxLastUpdated"
274
+ - "CertHolderType"
275
+ - "TaxDeedHistory"
276
+ - "BackTaxOpenCount"
277
+ - "BackTaxClosedCount"
278
+ - "RollupFaceAmount"
279
+ - "Rollupinterest"
280
+ - "RollupTotal"
@@ -0,0 +1 @@
1
+
data/csvundle.gemspec ADDED
@@ -0,0 +1,26 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'csvundle/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "csvundle"
8
+ spec.version = CSVundle::VERSION
9
+ spec.authors = ["Ybur Yug"]
10
+ spec.email = ["bobbygrayson@gmail.com"]
11
+
12
+ spec.summary = %q{To package csvs for access terminal.}
13
+ spec.description = %q{A WIP gem to package csvs for access terminal.}
14
+ spec.homepage = "http://google.com"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
+ spec.bindir = "exe"
18
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
+ spec.require_paths = ["lib"]
20
+ spec.required_ruby_version = '>= 2.2.1'
21
+
22
+ spec.add_development_dependency "bundler", "~> 1.10"
23
+ spec.add_development_dependency "rake", "~> 10.0"
24
+ spec.add_development_dependency "rspec"
25
+ spec.add_development_dependency "pry"
26
+ end
@@ -0,0 +1,44 @@
1
+ require 'csv'
2
+ require 'yaml'
3
+
4
+ module CSVundle
5
+ class GenericCSV
6
+ attr_accessor :rows, :columns
7
+
8
+ def initialize
9
+ @rows, @columns = [], []
10
+ end
11
+
12
+ def viperize(symbol)
13
+ word = symbol.to_s.dup
14
+ word.gsub!(/::/, '/')
15
+ word.gsub!(/([A-Z]+)([A-Z][a-z])/,'\1_\2')
16
+ word.gsub!(/([a-z\d])([A-Z])/,'\1_\2')
17
+ word.tr!("-", "_")
18
+ word.downcase!
19
+ word.to_sym
20
+ end
21
+
22
+ def normalized_columns
23
+ columns.map { |c| viperize(c) }
24
+ end
25
+
26
+ def rows_for(column)
27
+ { "#{column}": @rows.map { |row| row[@columns.index(column)] } }
28
+ end
29
+ end
30
+
31
+ class AccessCSV < GenericCSV
32
+ attr_reader :setup_data
33
+ def initialize(type)
34
+ @setup_data = YAML.load(File.read("config/csv_setup_data.yml")).fetch(type.to_s)
35
+ @columns = @setup_data['headers']
36
+ @type = type if type_usable? type
37
+ end
38
+
39
+ def type_usable?(type)
40
+ [:lienalytics, :grant_street, :lumentum, :mtag, :old_lienalytics,
41
+ :real_auction, :tsr, :tsr_js].include? type.to_sym
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,3 @@
1
+ module CSVundle
2
+ VERSION = "0.1.1"
3
+ end
data/lib/csvundle.rb ADDED
@@ -0,0 +1,8 @@
1
+ require 'csvundle/version'
2
+ require 'csvundle/access_csv'
3
+
4
+ module CSVundle
5
+ def self.setup_data_for(type)
6
+ CSVundle::AccessCSV.new(type.to_sym).csv.setup_data
7
+ end
8
+ end
metadata ADDED
@@ -0,0 +1,117 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: csvundle
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ platform: ruby
6
+ authors:
7
+ - Ybur Yug
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2015-10-23 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.10'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.10'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: pry
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ description: A WIP gem to package csvs for access terminal.
70
+ email:
71
+ - bobbygrayson@gmail.com
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - ".gitignore"
77
+ - ".rspec"
78
+ - ".ruby-gemset"
79
+ - ".ruby-version"
80
+ - ".travis.yml"
81
+ - CODE_OF_CONDUCT.md
82
+ - Gemfile
83
+ - README.md
84
+ - Rakefile
85
+ - bin/console
86
+ - bin/setup
87
+ - config/csv_setup_data.yml
88
+ - config/headers.yml
89
+ - config/lumentum.rb
90
+ - csvundle.gemspec
91
+ - lib/csvundle.rb
92
+ - lib/csvundle/access_csv.rb
93
+ - lib/csvundle/version.rb
94
+ homepage: http://google.com
95
+ licenses: []
96
+ metadata: {}
97
+ post_install_message:
98
+ rdoc_options: []
99
+ require_paths:
100
+ - lib
101
+ required_ruby_version: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - ">="
104
+ - !ruby/object:Gem::Version
105
+ version: 2.2.1
106
+ required_rubygems_version: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ requirements: []
112
+ rubyforge_project:
113
+ rubygems_version: 2.4.6
114
+ signing_key:
115
+ specification_version: 4
116
+ summary: To package csvs for access terminal.
117
+ test_files: []