aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2018-03-14tom_tom/batch: Use `module ...` syntaxTeddy Wing
Change the `TomTom::Batch` to `module ... class ...` syntax instead. I like this better in this case. Refs #6095
2018-03-14Move `lib/tom_tom.rb` to `lib/tom_tom/batch.rb`Teddy Wing
Separate the functionality a little better by moving the `/batch` endpoint code into a new class. The goal here is also to lay the foundation for being able to call `TomTom.batch()` instead of `TomTom.new.batch()`. Refs #6095
2018-03-14TomTom#batch: Populate WayCosts with distance & time from APITeddy Wing
Look through the API response from `/batch` and extract the distance & time values given to us by TomTom. These are inserted in the `WayCost`s given to use in the argument to `#batch`. At the end, we get a list of `WayCost`s that are completely filled with distance & time values. We need to split up this code a bit to make it more testable, but already this seems to function correctly. Refs #6095
2018-03-14secrets.yml: Add `tomtom_api_key`Teddy Wing
Make the TomTom API key accessible to the application. It gets set in Docker via an environment variable. Still need to work out how we're setting it in development. For now I'm just saving it in `secrets.yml` without committing it. Refs #6095
2018-03-14Revert "TomTom: Add method for `calculateRoute` endpoint"Teddy Wing
This reverts commit f28a4b2c5b348bc12b455aa0cd76a9513103aea7. As stated in that commit, I'm going to use the `/batch` endpoint instead of `/calculateRoute` because I know that's already working.
2018-03-14TomTom: Add method for `calculateRoute` endpointTeddy Wing
A new method to provide access to the `/calculateRoute` endpoint, which calculates costs for a single route through a bunch of waypoints. This doesn't work currently because the API requires that I send `supportingPoints` in the body of the request. Since I'm not too clear on what those are, I'm going to cut off development of this method here and just use `#batch` instead for my purposes. My idea was to use this endpoint instead of `/batch` to allow us to calculate a single route instead of having the API do `/calculateRoute` for each of our point pairs. This seemed like it would be more efficient, and give us our distance and time costs between each waypoint all in one go, but since I'm not clear on how to use this API and whether it will give us the correct data, I'm going to stick with `/batch`. I'll probably be reverting this code. Just committing it now in case it becomes useful in the future. Refs #6095
2018-03-14TomTom#batch: Remove unwanted paramsTeddy Wing
I had copy-pasted these from the example in the docs (https://developer.tomtom.com/online-routing/online-routing-documentation/batch-routing), but I don't think we want some of these. For `maxAlternatives`, it's already 0 by default according to their docs, and the others don't really make sense for us because we want a general routing instead of one based on traffic or time of day. Refs #6095
2018-03-14TomTom: Use travelMode='bus'Teddy Wing
For now, hard-code 'bus' as the travel mode. This feature is currently only going to be used for Ouibus, so we want to be able to request in 'bus' mode, but for now don't have time to think about how to make it more extensible to other travel modes and operators. Refs #6095
2018-03-14TomTom: Remove old commented codeTeddy Wing
These served during development but are no longer needed. Refs #6095
2018-03-14Add `TomTom` class to communicate with their APITeddy Wing
Provides an interface to communicate with the TomTom API. Currently includes a method `#batch` to make a batch routing request (https://developer.tomtom.com/online-routing/online-routing-documentation/batch-routing). Left a bunch of development-related code in just to preserve my in-progress stages. Originally I was told to use the matrix routing API, but that turned out to not match what we wanted. Namely, matrix routing would produce a table with every point routed with every other point. We instead want routes of each segment in a line, in order (or, just the diagonal of the matrix). Using the batch API allows us to get the routes we need without doing unnecessary work. Update the `WayCost` class to provide `departure` and `arrival` methods as readers, and make `id` an optional parameter for now. (We still need to figure out how we're dealing with ID.) Refs #6095
2018-03-14WayCost.new: Make `distance` and `time` arguments optionalTeddy Wing
We don't have these values until after the TomTom API calculation, but we need to create `WayCost` objects before then. Give these values defaults so we don't have to set them. Refs #6095
2018-03-14Create `WayCost`Teddy Wing
A data class to hold the distance and time cost required to go between departure and arrival points. Refs #6095
2018-03-14Merge pull request #348 from af83/6036-fix-journeys-editorAlban Peignier
Fix the journeys time editor. Refs #6036
2018-03-14Merge pull request #367 from af83/6042-detailed_purchase_windowsAlban Peignier
Add detailed view for purchase windows. Refs #6042
2018-03-14Merge pull request #342 from af83/6021-handlke-offsets-in-journeysAlban Peignier
Allow journeys to span over 3 days. Refs #6021
2018-03-14Refs #6012; Update STIF initializer6021-handlke-offsets-in-journeysZog
2018-03-14Refs #6021: Make DAY_OFFSET_MAX configurableZog
2018-03-14Refs #6021 @1h; Allow journeys to span over 3 daysZog
And fix the way offsets are computed to use the timezones
2018-03-14Merge pull request #341 from af83/5972-automatic-registration-numbersAlban Peignier
Automatic registration_number generation. Refs #5972
2018-03-14Replace hardcoded AAA by expression sized by registration_number_format. ↵Alban Peignier
Refs #5972
2018-03-14Refs #5972 @1h; Automatic registration_number generationZog
2018-03-14Small fixes/improvements in SimpleInterfacesZog
2018-03-14Update newrelic_rpm to 4.8.0.341. Refs #6206Alban Peignier
2018-03-14Refs #61066107-bind-stop_area_referential-and-workgroupsZog
Refs #6107 Binds LineReferentials and StopAreaReferentials to Workgroups, and enforce uniqueness
2018-03-14Refs #6146; Fix display in tablesZog
2018-03-14Refs #6146; Add specsZog
2018-03-14Refs #6146; Fix typoZog
2018-03-14Refs #6146; Fix "activated/deactivated" filterZog
2018-03-14Merge pull request #378 from af83/6187-dashboard-calendar-link-fixLuc Donnet
Refs #6187 Fix Dashboard Calendar#show link
2018-03-14Delete @dashboard call to create link for calendar Refs #61876187-dashboard-calendar-link-fixLuc Donnet
2018-03-14Merge pull request #380 from ↵Luc Donnet
af83/6158-compliance-check-transport-submode-display Refs #6158 Fix display error when CC doesnt have transport submode
2018-03-13Refs #6158 Fix display error when CC doesnt have transport submode6158-compliance-check-transport-submode-displaycedricnjanga
2018-03-13Refs #6187 Fix Dashboard Calendar#show linkcedricnjanga
2018-03-13Try and fix specsZog
2018-03-13Fix bad name for vehicle_journey_control/delta in compliance_controls.fr.yml ↵Luc Donnet
Refs #6157 @1
2018-03-13Fix duplicate code in config/initializers/sidekiq.rbLuc Donnet
2018-03-13Merge pull request #371 from af83/5567-routes-map-on-line-showLuc Donnet
5567 Disable routes by default
2018-03-13Refs #6006; Fix VehicleJourney#with_ordered_stop_area_ids scope6006-fix-stops-filterZog
2018-03-13Refs #6040; Enforce stop points positions in merged Referential6040-fix-stop-points-poitions-in-merged-routesZog
2018-03-12Fix migration 20180306152953_update_imports_names with compact Refs #6133 @1Luc Donnet
2018-03-12Fix specsZog
2018-03-12Merge pull request #344 from af83/5896-add-cache-headersLuc Donnet
5896 Add cache-related headers for assets
2018-03-12Merge pull request #361 from af83/6068-simple-exporterLuc Donnet
6068 simple exporter
2018-03-12Merge pull request #362 from af83/6133-new-exportsLuc Donnet
6133 New exports
2018-03-12Refs #5146 Line state updatecedricnjanga
2018-03-12Refs #5567; Disable routes by default5567-routes-map-on-line-showZog
2018-03-12Regs #6133; Define file's extensions whitelist on a per-class basis6133-new-exportsZog
2018-03-12Refs #6133; Move heklper in the right placeZog
2018-03-12Refs #6133; Fix specsZog
2018-03-12Refs #6135; ExportsController#upload endpointZog
With token-based authentication