Sha256: 52747533f4f08467e8dd04f69a0466b97367fecc2c8f3af83b63dc9a3612214d

Contents?: true

Size: 753 Bytes

Versions: 1

Compression:

Stored size: 753 Bytes

Contents

#!/usr/bin/env ruby

require "bundler/setup"
require "gtfs/realtime"
require "sqlite3"

# Load the RIPTA feed as an example, with a sqlite3 database
GTFS::Realtime.configure do |config|
  config.static_feed = "http://www.ripta.com/googledata/current/google_transit.zip"
  config.trip_updates_feed = "http://realtime.ripta.com:81/api/tripupdates"
  config.vehicle_positions_feed = "http://realtime.ripta.com:81/api/vehiclepositions"
  config.service_alerts_feed = "http://realtime.ripta.com:81/api/servicealerts"
  config.database_path = "sqlite://database.db"
end

def reload!
  files = $LOADED_FEATURES.select { |feat| feat =~ /\/gtfs-realtime\// }
  files.each { |file| load file }
  GTFS::Realtime.refresh_realtime_feed!
end

require "irb"
IRB.start

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gtfs-realtime-0.3.0 bin/console