aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2018-03-15Small fixes for i18n state Refs #6146 @16146-line-statesLuc Donnet
2018-03-15Refs #6139 Change Min max values validation concern to allowed float valuescedricnjanga
2018-03-15Rename export spec to use the right classes Refs #6133 @1Luc Donnet
2018-03-15Fixes VehicleJourneys javascript spec. Refs #6143Alban Peignier
2018-03-15Hide full_journey_time/commercial_journey_time labels when ↵Alban Peignier
costs_in_journey_patterns feature is not present. Refs #6102
2018-03-15Fix javascript specsZog
2018-03-15Merge pull request #382 from af83/6189-fix-i18n-on-stoparea-showAlban Peignier
Fix bad interpolation key in i18n file. Refs #6189
2018-03-15Merge pull request #370 from af83/6102-commercial-missionsAlban Peignier
Add label in JourneyPattern Editor header. Refs #6102
2018-03-15Merge pull request #369 from af83/6143-extra-rows-in-vjs-editor-headerAlban Peignier
Configurable extra headers on VJs editor. Refs #6143
2018-03-15Fixes extraHeaders position in VehicleJourneys component. Refs #61436143-extra-rows-in-vjs-editor-headerAlban Peignier
2018-03-15Ignore undefined CustomFields in extra headers for ↵Alban Peignier
VehicleJourneysController. Refs #6143
2018-03-15Refs #6143; Configurable extra headers on VJs editorZog
2018-03-15Merge pull request #355 from af83/5113-update-logoAlban Peignier
Refs #5113. Refs #5126. Update LineReferential icon
2018-03-15Route: Don't run `#calculate_costs!` on callback if TomTom disabledTeddy Wing
We say `TomTom` is disabled when no API key is present. If this is the case, the `after_save` callback that uses it shouldn't be executed. I had to change my `API_KEY` constant to an instance variable to be able to change it for testing. Refs #6095
2018-03-15Merge pull request #377 from af83/6107-bind-stop_area_referential-and-workgroupsAlban Peignier
Refs 6106 & 6107. Binds LineReferentials and StopAreaReferentials to Workgroups
2018-03-15Use confirmed StopAreas in SimpleImporter spec. Refs #6033Alban Peignier
2018-03-15Merge pull request #376 from af83/6006-fix-stops-filterAlban Peignier
Fix VehicleJourney#with_ordered_stop_area_ids scope. Refs #6006
2018-03-15Merge pull request #375 from af83/6040-fix-stop-points-poitions-in-merged-routesAlban Peignier
Enforce stop points positions in merged Referential. Refs #6040
2018-03-15Merge pull request #365 from af83/6033-stop-area-statesAlban Peignier
Enable stop area states. Refs #6033
2018-03-15Add StopArea#status in stop_areas#_form. Refs #60336033-stop-area-statesAlban Peignier
2018-03-15Keep schema.rb cleanAlban Peignier
2018-03-15Defines StopArea deactivated i18n. Refs #6033Alban Peignier
2018-03-15Refs #6033 Fix stop areas spec featurecedricnjanga
2018-03-15Refs #6033 Update activate and deactivate methodscedricnjanga
2018-03-15Refs #6033 add specscedricnjanga
2018-03-15Refs #6033 Update Stop Area schemacedricnjanga
2018-03-15Refs #6033 Changes for StopArea#index and StopArea#showcedricnjanga
2018-03-15Refs #6033 Update all StopArea#confirmed_atcedricnjanga
2018-03-15Refs #6033 Add confirmed_at attribute to Chouette::StopAreacedricnjanga
2018-03-15Delete number attributes for 3-Generic-2 compliance_controlLuc Donnet
2018-03-15Merge pull request #364 from af83/6028-compliance-controls-model-attributesLuc Donnet
Refs #6028 small changes in model attribute for CC
2018-03-15Refs 6189; Fix bad interpolation key in i18n file6189-fix-i18n-on-stoparea-showZog
2018-03-15Fix netex import key message in csv export Refs #5873 @1Luc Donnet
2018-03-14Fix translation for import ressources Refs #6133 @1Luc Donnet
2018-03-14Fix access for import ressources Refs #6133 @3Luc Donnet
2018-03-14Fix bug on VJs editor when invalid journeys are already in db.Zog
2018-03-14Route#duplicate: Use `#slice!` instead of `#slice`Teddy Wing
Johan suggested simplifying this method by changing the `slice` call: http://api.rubyonrails.org/classes/Hash.html#method-i-slice-21 I had modified this to fix the whitespace while working on the `WayCost` calculation function for `Chouette::Route`s, so don't really have a brain cache hit on this code, but the change makes sense and seems to work. Refs #6095
2018-03-14RouteWayCostWorker: Add comment about recursive workersTeddy Wing
Explain why we need to skip and un-skip the callback. Refs #6095
2018-03-14RouteWayCostWorker: Fix recursive worker callTeddy Wing
Since this method was run on `after_save` and in it `RouteWayCostCalculator` calls `#update` on the given route, it caused an infinite recursive call to the worker. To prevent this, wrap the `#calculate!` call in methods that unset and reset the callback. Refs #6095
2018-03-14RouteWayCostWorker: Switch to referential in order to find RouteTeddy Wing
Just running `Chouette::Route.find(id)` doesn't give us anything if we don't have a `Referential` selected. In order to properly get the correct route, pass the referential ID to the worker and switch to that referential before trying to select the route. Refs #6095
2018-03-14Route: Run `#calculate_costs!` on `after_save`Teddy Wing
Not efficient to send a request to the TomTom API every time we save a Route, but I'm banking on developing a cache system soon to avoid having to make the requests, so hopefully that will stop this from making expensive remote calls all the time. Refs #6095
2018-03-14Route: Fix whitespaceTeddy Wing
This method wasn't indented to the same level as the rest of the file. Refs #6095
2018-03-14Route: Add `#calculate_costs!` to populate `#costs` with `WayCost`sTeddy Wing
This new method will launch a worker that takes the route's `StopArea`s, converts them to `WayCost`s, sends them to the TomTom API to calculate distance and time costs, and saves those costs to the route's `costs` field. Refs #6095
2018-03-14Route: Get rid of unnecessary whitespaceTeddy Wing
Refs #6095
2018-03-14Add `costs` column to `Chouette::Route`Teddy Wing
This allows us to store `WayCost`s for a route so we can use those values as pre-filled defaults for a `JourneyPattern`'s costs. Refs #6095
2018-03-14Add `WayCostCollectionJSONSerializer`Teddy Wing
A JSON serialiser for a collection of `WayCost`s. This will be used to store `WayCost`s for a `Chouette::Route` in the `Route#costs` JSON field. Refs #6095
2018-03-14Add `StopAreasToWayCostsConverter`Teddy Wing
A new class that converts a list of `StopArea`s to `WayCost`s. This will be called from `Chouette::Route` to get `WayCost`s from its stops, which will then be JSON serialised and stored in `Route#costs`. Update `WayCost`: * Remove comment about calculating the ID automatically. It actually needs to be the same as the `JourneyPattern#cost` ID (`key`), which is a string with the IDs of the departure and arrival stops. * Make `#==` check that `id`s are the same, which necessitates making `id` a reader. Refs #6095
2018-03-14TomTom::Batch: Extract code to `#extract_costs_to_way_costs!`Teddy Wing
Extract some code from `#batch` to allow us to test the part that takes distance and time values from the response JSON and put fill them into `WayCost`s. In order for the test to work, had to add an `#==` method to `WayCost` and make `distance` and `time` accessors. The JSON file fixture is a copy of a response from the TomTom `/batch` API. The file is pretty big. I'm not sure if maybe I should condense it for the sake of test performance. Refs #6095
2018-03-14TomTom::Batch: Rename `#convert_way_costs_for_batch`Teddy Wing
Rename to `#convert_way_costs` since this method now lives inside the `TomTom::Batch` class, so that part of the name became redundant. Refs #6095
2018-03-14TomTom: Provide `TomTom.batch(...)` methodTeddy Wing
This change enables us to call `TomTom.batch(...)` instead of `TomTom.new.batch(...)` a couple commits ago. This is nice because the initialisation was kind of unnecessary for users of the class. Refs #6095