Skip to content

Commit 1ba8fc9

Browse files
committed
small fix to load_mlab_data
1 parent 6b27db5 commit 1ba8fc9

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

Gemfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ GEM
118118
sprockets (2.0.3)
119119
hike (~> 1.2)
120120
rack (~> 1.0)
121-
tilt (!= 1.3.0, ~> 1.1)
121+
tilt (~> 1.1, != 1.3.0)
122122
sqlite3 (1.3.4)
123123
therubyracer (0.9.9)
124124
libv8 (~> 3.3.10)

lib/tasks/load_mlab_data.rake

+1-3
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ namespace :load_mlab_data do
3131
row = row.to_hash.with_indifferent_access
3232
countrymeasurement = CountryMeasurement.new(row.to_hash.symbolize_keys)
3333
begin
34-
day = row['month'].split('-')[1]
35-
month = row['month'].split('-')[0]
36-
year = row['month'].split('-')[2]
34+
month, day, year = row['month'].split('-')
3735
countrymeasurement.month = "#{year}-#{month}-#{day}"
3836
rescue
3937
end

0 commit comments

Comments
 (0)