-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build rake file to populate database
- Loading branch information
1 parent
88a90e0
commit 29d221d
Showing
10 changed files
with
35,814 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
require 'csv' | ||
|
||
class MerchantParser | ||
attr_reader :path | ||
|
||
def initialize | ||
@path = "./data/merchants.csv" | ||
end | ||
|
||
def contents | ||
@contents ||= CSV.open(path, headers: true, header_converters: :symbol) | ||
end | ||
|
||
def start | ||
contents.each do |row| | ||
merchant = Merchant.create(name: row[:name], created_at: row[:created_at], updated_at: row[:updated_at]) | ||
puts "merchant #{merchant.name} created" | ||
end | ||
end | ||
end |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
id,name,created_at,updated_at | ||
1,Schroeder-Jerde,2012-03-27 14:53:59 UTC,2012-03-27 14:53:59 UTC | ||
2,"Klein, Rempel and Jones",2012-03-27 14:53:59 UTC,2012-03-27 14:53:59 UTC | ||
3,Willms and Sons,2012-03-27 14:53:59 UTC,2012-03-27 14:53:59 UTC | ||
4,Cummings-Thiel,2012-03-27 14:53:59 UTC,2012-03-27 14:53:59 UTC | ||
5,Williamson Group,2012-03-27 14:53:59 UTC,2012-03-27 14:53:59 UTC | ||
6,Williamson Group,2012-03-27 14:53:59 UTC,2012-03-27 16:12:25 UTC | ||
7,Bernhard-Johns,2012-03-27 14:53:59 UTC,2012-03-27 14:53:59 UTC | ||
8,"Osinski, Pollich and Koelpin",2012-03-27 14:53:59 UTC,2012-03-27 14:53:59 UTC | ||
9,Hand-Spencer,2012-03-27 14:53:59 UTC,2012-03-27 14:53:59 UTC | ||
10,"Bechtelar, Jones and Stokes",2012-03-27 14:54:00 UTC,2012-03-27 14:54:00 UTC | ||
11,Pollich and Sons,2012-03-27 14:54:00 UTC,2012-03-27 14:54:00 UTC | ||
12,Kozey Group,2012-03-27 14:54:00 UTC,2012-03-27 14:54:00 UTC | ||
13,Tillman Group,2012-03-27 14:54:00 UTC,2012-03-27 14:54:00 UTC | ||
14,Dicki-Bednar,2012-03-27 14:54:00 UTC,2012-03-27 14:54:00 UTC | ||
15,Adams-Kovacek,2012-03-27 14:54:00 UTC,2012-03-27 14:54:00 UTC | ||
16,"Bosco, Howe and Davis",2012-03-27 14:54:00 UTC,2012-03-27 14:54:00 UTC | ||
17,Ullrich-Moen,2012-03-27 14:54:00 UTC,2012-03-27 14:54:00 UTC | ||
18,Koepp LLC,2012-03-27 14:54:00 UTC,2012-03-27 14:54:00 UTC | ||
19,Brown Inc,2012-03-27 14:54:00 UTC,2012-03-27 14:54:00 UTC | ||
20,"Schulist, Wilkinson and Leannon",2012-03-27 14:54:00 UTC,2012-03-27 14:54:00 UTC | ||
21,"Leffler, Rice and Leuschke",2012-03-27 14:54:00 UTC,2012-03-27 14:54:00 UTC | ||
22,Thiel Inc,2012-03-27 14:54:01 UTC,2012-03-27 14:54:01 UTC | ||
23,Kilback Inc,2012-03-27 14:54:01 UTC,2012-03-27 14:54:01 UTC | ||
24,Ferry and Sons,2012-03-27 14:54:01 UTC,2012-03-27 14:54:01 UTC | ||
25,Hickle-Hessel,2012-03-27 14:54:01 UTC,2012-03-27 14:54:01 UTC | ||
26,"Balistreri, Schaefer and Kshlerin",2012-03-27 14:54:01 UTC,2012-03-27 14:54:01 UTC | ||
27,"Shields, Hirthe and Smith",2012-03-27 14:54:01 UTC,2012-03-27 14:54:01 UTC | ||
28,"Schiller, Barrows and Parker",2012-03-27 14:54:01 UTC,2012-03-27 14:54:01 UTC | ||
29,Tromp Inc,2012-03-27 14:54:01 UTC,2012-03-27 14:54:01 UTC | ||
30,"Ernser, Borer and Marks",2012-03-27 14:54:01 UTC,2012-03-27 14:54:01 UTC | ||
31,Maggio LLC,2012-03-27 14:54:01 UTC,2012-03-27 14:54:01 UTC | ||
32,Rowe and Sons,2012-03-27 14:54:01 UTC,2012-03-27 14:54:01 UTC | ||
33,Quitzon and Sons,2012-03-27 14:54:02 UTC,2012-03-27 14:54:02 UTC | ||
34,"Rutherford, Bogan and Leannon",2012-03-27 14:54:02 UTC,2012-03-27 14:54:02 UTC | ||
35,Schuster Group,2012-03-27 14:54:02 UTC,2012-03-27 14:54:02 UTC | ||
36,"Bernhard, Stanton and Funk",2012-03-27 14:54:02 UTC,2012-03-27 14:54:02 UTC | ||
37,Dibbert Group,2012-03-27 14:54:02 UTC,2012-03-27 14:54:02 UTC | ||
38,"Johnston, Gleason and O'Keefe",2012-03-27 14:54:02 UTC,2012-03-27 14:54:02 UTC | ||
39,"Schuppe, Friesen and Schmeler",2012-03-27 14:54:02 UTC,2012-03-27 14:54:02 UTC | ||
40,Wilderman Group,2012-03-27 14:54:03 UTC,2012-03-27 14:54:03 UTC | ||
41,Crona LLC,2012-03-27 14:54:03 UTC,2012-03-27 14:54:03 UTC | ||
42,Glover Inc,2012-03-27 14:54:03 UTC,2012-03-27 14:54:03 UTC | ||
43,"Marks, Shanahan and Bauch",2012-03-27 14:54:03 UTC,2012-03-27 14:54:03 UTC | ||
44,Gibson Group,2012-03-27 14:54:03 UTC,2012-03-27 14:54:03 UTC | ||
45,Dickinson-Klein,2012-03-27 14:54:03 UTC,2012-03-27 14:54:03 UTC | ||
46,"Huels, Homenick and Smith",2012-03-27 14:54:03 UTC,2012-03-27 14:54:03 UTC | ||
47,Franecki-Ullrich,2012-03-27 14:54:03 UTC,2012-03-27 14:54:03 UTC | ||
48,"Hand, Boyer and Mitchell",2012-03-27 14:54:03 UTC,2012-03-27 14:54:03 UTC | ||
49,"Marvin, Renner and Bauch",2012-03-27 14:54:03 UTC,2012-03-27 14:54:03 UTC | ||
50,Nader-Hyatt,2012-03-27 14:54:03 UTC,2012-03-27 14:54:03 UTC | ||
51,Paucek Inc,2012-03-27 14:54:03 UTC,2012-03-27 14:54:03 UTC | ||
52,Reynolds Inc,2012-03-27 14:54:03 UTC,2012-03-27 14:54:03 UTC | ||
53,"Rath, Gleason and Spencer",2012-03-27 14:54:04 UTC,2012-03-27 14:54:04 UTC | ||
54,Zemlak-Collins,2012-03-27 14:54:04 UTC,2012-03-27 14:54:04 UTC | ||
55,"Koch, Wolf and Jerde",2012-03-27 14:54:04 UTC,2012-03-27 14:54:04 UTC | ||
56,"Sporer, Christiansen and Connelly",2012-03-27 14:54:04 UTC,2012-03-27 14:54:04 UTC | ||
57,Parisian Group,2012-03-27 14:54:04 UTC,2012-03-27 14:54:04 UTC | ||
58,Rogahn LLC,2012-03-27 14:54:04 UTC,2012-03-27 14:54:04 UTC | ||
59,"Pollich, Romaguera and Bayer",2012-03-27 14:54:04 UTC,2012-03-27 14:54:04 UTC | ||
60,Smitham LLC,2012-03-27 14:54:05 UTC,2012-03-27 14:54:05 UTC | ||
61,"Auer, Crooks and Shanahan",2012-03-27 14:54:05 UTC,2012-03-27 14:54:05 UTC | ||
62,"Kunze, Kautzer and Little",2012-03-27 14:54:05 UTC,2012-03-27 14:54:05 UTC | ||
63,"Lehner, Padberg and O'Hara",2012-03-27 14:54:05 UTC,2012-03-27 14:54:05 UTC | ||
64,"Koepp, Waelchi and Donnelly",2012-03-27 14:54:05 UTC,2012-03-27 14:54:05 UTC | ||
65,"Hermann, Weimann and Botsford",2012-03-27 14:54:05 UTC,2012-03-27 14:54:05 UTC | ||
66,Bechtelar LLC,2012-03-27 14:54:05 UTC,2012-03-27 14:54:05 UTC | ||
67,Torp and Sons,2012-03-27 14:54:06 UTC,2012-03-27 14:54:06 UTC | ||
68,Heaney Group,2012-03-27 14:54:06 UTC,2012-03-27 14:54:06 UTC | ||
69,Watsica-Parisian,2012-03-27 14:54:06 UTC,2012-03-27 14:54:06 UTC | ||
70,Weimann-Schimmel,2012-03-27 14:54:06 UTC,2012-03-27 14:54:06 UTC | ||
71,Schulist Group,2012-03-27 14:54:06 UTC,2012-03-27 14:54:06 UTC | ||
72,Greenfelder-Keebler,2012-03-27 14:54:06 UTC,2012-03-27 14:54:06 UTC | ||
73,Sipes LLC,2012-03-27 14:54:06 UTC,2012-03-27 14:54:06 UTC | ||
74,Daugherty Group,2012-03-27 14:54:06 UTC,2012-03-27 14:54:06 UTC | ||
75,Eichmann-Turcotte,2012-03-27 14:54:06 UTC,2012-03-27 14:54:06 UTC | ||
76,"Kirlin, Jakubowski and Smitham",2012-03-27 14:54:07 UTC,2012-03-27 14:54:07 UTC | ||
77,"Kutch, Blick and O'Keefe",2012-03-27 14:54:07 UTC,2012-03-27 14:54:07 UTC | ||
78,Heathcote-Hettinger,2012-03-27 14:54:07 UTC,2012-03-27 14:54:07 UTC | ||
79,Pacocha-Mayer,2012-03-27 14:54:07 UTC,2012-03-27 14:54:07 UTC | ||
80,"Jakubowski, Predovic and Hudson",2012-03-27 14:54:07 UTC,2012-03-27 14:54:07 UTC | ||
81,Jewess Group,2012-03-27 14:54:07 UTC,2012-03-27 14:54:07 UTC | ||
82,Kulas LLC,2012-03-27 14:54:07 UTC,2012-03-27 14:54:07 UTC | ||
83,"Gulgowski, Torphy and Lynch",2012-03-27 14:54:07 UTC,2012-03-27 14:54:07 UTC | ||
84,Terry-Moore,2012-03-27 14:54:07 UTC,2012-03-27 14:54:07 UTC | ||
85,Sauer and Sons,2012-03-27 14:54:07 UTC,2012-03-27 14:54:07 UTC | ||
86,Marvin Group,2012-03-27 14:54:07 UTC,2012-03-27 14:54:07 UTC | ||
87,Johnson-Wiza,2012-03-27 14:54:08 UTC,2012-03-27 14:54:08 UTC | ||
88,Kiehn Group,2012-03-27 14:54:08 UTC,2012-03-27 14:54:08 UTC | ||
89,"Kassulke, O'Hara and Quitzon",2012-03-27 14:54:08 UTC,2012-03-27 14:54:08 UTC | ||
90,"Friesen, Hackett and Runte",2012-03-27 14:54:08 UTC,2012-03-27 14:54:08 UTC | ||
91,"Weissnat, Hermiston and Beer",2012-03-27 14:54:08 UTC,2012-03-27 14:54:08 UTC | ||
92,"Zemlak, Volkman and Haley",2012-03-27 14:54:08 UTC,2012-03-27 14:54:08 UTC | ||
93,Walter-Schowalter,2012-03-27 14:54:08 UTC,2012-03-27 14:54:08 UTC | ||
94,Boehm LLC,2012-03-27 14:54:08 UTC,2012-03-27 14:54:08 UTC | ||
95,Johnson-Dickinson,2012-03-27 14:54:08 UTC,2012-03-27 14:54:08 UTC | ||
96,Swaniawski-Cremin,2012-03-27 14:54:08 UTC,2012-03-27 14:54:08 UTC | ||
97,"Rice, Jerde and White",2012-03-27 14:54:09 UTC,2012-03-27 14:54:09 UTC | ||
98,"Okuneva, Prohaska and Rolfson",2012-03-27 14:54:09 UTC,2012-03-27 14:54:09 UTC | ||
99,Fahey-Stiedemann,2012-03-27 14:54:09 UTC,2012-03-27 14:54:09 UTC | ||
100,"Wisozk, Hoeger and Bosco",2012-03-27 14:54:09 UTC,2012-03-27 14:54:09 UTC |
Oops, something went wrong.