lib/gtfs/realtime/configuration.rb in gtfs-realtime-0.2.3 vs lib/gtfs/realtime/configuration.rb in gtfs-realtime-0.3.0
- old
+ new
@@ -4,11 +4,15 @@
attr_accessor :static_feed, :trip_updates_feed, :vehicle_positions_feed, :service_alerts_feed, :database_path
def database_path=(new_path)
@database_path = new_path
- # reinitialize the database with the new path
+ # now that we know the DB path, we can initialize the database
+ require 'gtfs/realtime/database'
GTFS::Realtime::Database.path = database_path
+
+ # now that we have a database, initialize all the other models
+ require 'gtfs/realtime/bootstrap'
end
end
end
end