aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2018-05-09Refs #6960; Update imports to use nesw implementationZog
2018-05-07Refs #6960; Add a view to set the controls associated to each workbenchZog
2018-05-07Refs #Adapt CCSet CSV export filename to app languagecedricnjanga
2018-05-07Refs #6950 Adapt import CSV export filename to app languagecedricnjanga
2018-05-07Refs #6960; Add owners to workgroupsZog
And define policies
2018-05-07Add GTFS viewsZog
2018-05-07Add import_compliance_control_sets to WorkgroupsZog
And rename resource methods for better consistency
2018-05-07Better viewsZog
2018-05-07Ignore failed Referentials when looking for duplicatesZog
2018-05-07Trigger compliance checks after importsZog
2018-05-07Fix NETEX importsZog
2018-05-07Rework imports to use Resources and make the a little more verboseZog
2018-05-07Refs #6321; :fire: commentsZog
2018-05-07Refs #6923; More :lipstick:Zog
2018-05-07Refs #6923; :lipstick:Zog
2018-05-07Refs #6923; Use a feature: `consolidated_offers`Zog
2018-05-07refs #6923; small improvementsZog
2018-05-06Refs #6550; Fix CustomFields edition for JourneyPatternsZog
2018-05-06Update README.md for chouette-core. Refs #6958Alban Peignier
2018-05-06Remove outdated doc directory (see wiki). Refs #6958Alban Peignier
2018-05-06Update LICENSE file. Refs #6958Alban Peignier
2018-05-06Remove guard. Refs #6958Alban Peignier
2018-05-06Add 'TEST_ENV_NUMBER' in ci database.yml. Refs #6957Alban Peignier
2018-05-06Add parallel_tests. Refs #6957Alban Peignier
2018-05-06Update ci task to enable simple chouette-core build. Refs #6957Alban Peignier
2018-05-04Refs #6923; Some css sugarZog
2018-05-04Refs #6923; Implement a consolidated viewZog
2018-05-04Move `TomTom::Matrix::RemoteError` to`TomTom::Errors::MatrixRemoteError`6884-tomtom-matrix--handle-error-when-response-doesn,t-incluTeddy Wing
I previously tried to correct a circular dependency problem in a057276129b1f62b811743db3b8f867a05241ed3, but that didn't fix it (it was intermittent, and came back). After some wrangling, I've now deduced with some confidence that the problem comes from `RouteWayCostCalculator`, which used `TomTom::Matrix::RemoteError`. From the way it looks, this seems to mess up the Rails autoloader since `tom_tom.rb` will try to load the `Matrix` class from the `TomTom.matrix` call above. Or something. In an attempt to fix the circular dependency error for real this time, move the error class to a completely separate module from `Matrix`, and refer to this when we need to use the error class. Refs #6884
2018-05-04Fixes RouteWayCostCalculator spec. Refs #6661Alban Peignier
2018-05-04Disable config.middleware.insert_before for assets cache for staging. Refs #5896Alban Peignier
2018-05-04Merge pull request #541 from af83/6661-make-TomTom-data-more-consistentAlban Peignier
Disable traffic option in TomTom API invocations. Fixes #6661
2018-05-04Merge pull request #549 from af83/6920-activate-newly-created-referentialsLuc Donnet
6920 activate newly created referentials
2018-05-04Merge pull request #543 from af83/6864-fix-schedules-editorAlban Peignier
Fix schedules editor. Refs #6864
2018-05-04Refs #6920; Fix specs6920-activate-newly-created-referentialsZog
2018-05-03Refs #6346; Fix other companies formZog
2018-05-03Refs #6867; Add A LOT of TZsZog
2018-05-03Refs #6867; Remove duplicated entries in TZ selectZog
2018-05-03TomTom::Matrix#check_for_error_response: Handle HTTP error status codesTeddy Wing
We might not always get a nicely formatted JSON `['error']['description']` response body. Sometimes, like for example when you use an incorrect API key, even with an 'application/json' content type, TomTom will respond with: <h1>Developer Inactive</h1> What? In that case, the response has a 403 status. In addition to checking for an error in the response, should also be checking for the HTTP status code. Log the status code in the exception to give us more information about what went wrong. Update our existing tests now that `#check_for_error_response` takes a response object instead of a JSON string. Refs #6884
2018-05-03TomTom::Matrix spec: Fix typo 'an' -> 'a'Teddy Wing
Refs #6884
2018-05-03Move `TomTom::Matrix::RemoteError` to a new fileTeddy Wing
I was getting the following circular dependency error in Sidekiq: 2018-05-03T14:47:17.974Z 19217 TID-owg7qzmqc WARN: RuntimeError: Circular dependency detected while autoloading constant TomTom::Matrix::Point 2018-05-03T14:47:17.974Z 19217 TID-owg7qzmqc WARN: .../.gem/ruby/2.3.3/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:492:in `load_missing_constant' .../.gem/ruby/2.3.3/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:184:in `const_missing' .../stif-boiv/lib/tom_tom/matrix.rb:44:in `block in points_from_way_costs' .../stif-boiv/lib/tom_tom/matrix.rb:41:in `each' .../stif-boiv/lib/tom_tom/matrix.rb:41:in `points_from_way_costs' .../stif-boiv/lib/tom_tom/matrix.rb:12:in `matrix' .../stif-boiv/lib/tom_tom.rb:24:in `matrix' .../stif-boiv/app/services/route_way_cost_calculator.rb:8:in `calculate!' .../stif-boiv/app/workers/route_way_cost_worker.rb:12:in `perform' .../.gem/ruby/2.3.3/gems/sidekiq-4.2.10/lib/sidekiq/processor.rb:167:in `execute_job' .../.gem/ruby/2.3.3/gems/sidekiq-4.2.10/lib/sidekiq/processor.rb:139:in `block (5 levels) in process' .../.gem/ruby/2.3.3/gems/sidekiq-4.2.10/lib/sidekiq.rb:36:in `block in <module:Sidekiq>' .../.gem/ruby/2.3.3/gems/sidekiq-4.2.10/lib/sidekiq/processor.rb:135:in `block (4 levels) in process' .../.gem/ruby/2.3.3/gems/sidekiq-4.2.10/lib/sidekiq/middleware/chain.rb:128:in `block in invoke' .../.gem/ruby/2.3.3/gems/newrelic_rpm-4.8.0.341/lib/new_relic/agent/instrumentation/sidekiq.rb:33:in `block in call' .../.gem/ruby/2.3.3/gems/newrelic_rpm-4.8.0.341/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:369:in `perform_action_with_newrelic_trace' .../.gem/ruby/2.3.3/gems/newrelic_rpm-4.8.0.341/lib/new_relic/agent/instrumentation/sidekiq.rb:29:in `call' .../.gem/ruby/2.3.3/gems/sidekiq-4.2.10/lib/sidekiq/middleware/chain.rb:130:in `block in invoke' .../.gem/ruby/2.3.3/gems/sidekiq-4.2.10/lib/sidekiq/middleware/server/active_record.rb:6:in `call' .../.gem/ruby/2.3.3/gems/sidekiq-4.2.10/lib/sidekiq/middleware/chain.rb:130:in `block in invoke' .../.gem/ruby/2.3.3/gems/sidekiq-4.2.10/lib/sidekiq/middleware/server/logging.rb:10:in `call' .../.gem/ruby/2.3.3/gems/sidekiq-4.2.10/lib/sidekiq/middleware/chain.rb:130:in `block in invoke' .../.gem/ruby/2.3.3/gems/sidekiq-4.2.10/lib/sidekiq/middleware/server/retry_jobs.rb:74:in `call' .../.gem/ruby/2.3.3/gems/sidekiq-4.2.10/lib/sidekiq/middleware/chain.rb:130:in `block in invoke' .../.gem/ruby/2.3.3/gems/sidekiq-4.2.10/lib/sidekiq/middleware/chain.rb:133:in `invoke' .../.gem/ruby/2.3.3/gems/sidekiq-4.2.10/lib/sidekiq/processor.rb:134:in `block (3 levels) in process' .../.gem/ruby/2.3.3/gems/sidekiq-4.2.10/lib/sidekiq/logging.rb:32:in `with_context' .../.gem/ruby/2.3.3/gems/sidekiq-4.2.10/lib/sidekiq/processor.rb:132:in `block (2 levels) in process' .../.gem/ruby/2.3.3/gems/sidekiq-4.2.10/lib/sidekiq/processor.rb:183:in `stats' .../.gem/ruby/2.3.3/gems/sidekiq-4.2.10/lib/sidekiq/processor.rb:131:in `block in process' .../.gem/ruby/2.3.3/gems/sidekiq-4.2.10/lib/sidekiq.rb:35:in `block in <module:Sidekiq>' .../.gem/ruby/2.3.3/gems/sidekiq-4.2.10/lib/sidekiq/processor.rb:126:in `process' .../.gem/ruby/2.3.3/gems/sidekiq-4.2.10/lib/sidekiq/processor.rb:82:in `process_one' .../.gem/ruby/2.3.3/gems/sidekiq-4.2.10/lib/sidekiq/processor.rb:70:in `run' .../.gem/ruby/2.3.3/gems/sidekiq-4.2.10/lib/sidekiq/util.rb:17:in `watchdog' ../.gem/ruby/2.3.3/gems/sidekiq-4.2.10/lib/sidekiq/util.rb:26:in `block in safe_thread' Fix it by moving the error class to a new file. Refs #6884
2018-05-03Refs #6884; Allow for overnight stops6864-fix-schedules-editorZog
As long as one arrives after 11pm and leaves before 1am
2018-05-03Refs #6920; Fix typoZog
2018-05-03Refs #6921; Show "Unarchive" action in referentials listZog
2018-05-03Refs #6920; Activate Referentils created from scratchZog
2018-05-02RouteWayCostCalculator: Don't update `costs` if response errorsTeddy Wing
If there's an API error, we shouldn't update the route's `costs` field. Let's say we've already calculated some costs for a route A. We then edit and re-save A, which triggers a recalculation of the costs. Now the TomTom API responds with an error. We don't want to overwrite our existing costs with an empty array because they could still be useful. In this case, we should instead keep the existing costs we already had. To achieve this, move the `RemoteError` rescue into `RouteWayCostCalculator`, leaving the error unhandled in `TomTom.matrix`. Refs #6884
2018-05-02TomTom::Matrix: Handle error responses from TomTomTeddy Wing
Occasionally, the following error would appear in our logs: NoMethodError RouteWayCostWorker/perform Error message NoMethodError: undefined method `each_with_index' for nil:NilClass Stack trace (show Rails) /app/lib/tom_tom/matrix.rb: 83:in `extract_costs_to_way_costs!' /app/lib/tom_tom/matrix.rb: 23:in `matrix' /app/lib/tom_tom.rb: 24:in `matrix' /app/app/services/route_way_cost_calculator.rb: 8:in `calculate!' /app/app/workers/route_way_cost_worker.rb: 12:in `perform' …ems/2.3.0/gems/sidekiq-4.2.10/lib/sidekiq/processor.rb: 167:in `execute_job' …ems/2.3.0/gems/sidekiq-4.2.10/lib/sidekiq/processor.rb: 139:in `block (5 levels) in process' /var/lib/gems/2.3.0/gems/sidekiq-4.2.10/lib/sidekiq.rb: 36:in `block in <module:Sidekiq>' …ems/2.3.0/gems/sidekiq-4.2.10/lib/sidekiq/processor.rb: 135:in `block (4 levels) in process' ….0/gems/sidekiq-4.2.10/lib/sidekiq/middleware/chain.rb: 128:in `block in invoke' ….0/gems/sidekiq-4.2.10/lib/sidekiq/middleware/chain.rb: 130:in `block in invoke' …-4.2.10/lib/sidekiq/middleware/server/active_record.rb: 6:in `call' ….0/gems/sidekiq-4.2.10/lib/sidekiq/middleware/chain.rb: 130:in `block in invoke' …idekiq-4.2.10/lib/sidekiq/middleware/server/logging.rb: 10:in `call' ….0/gems/sidekiq-4.2.10/lib/sidekiq/middleware/chain.rb: 130:in `block in invoke' …kiq-4.2.10/lib/sidekiq/middleware/server/retry_jobs.rb: 74:in `call' ….0/gems/sidekiq-4.2.10/lib/sidekiq/middleware/chain.rb: 130:in `block in invoke' ….0/gems/sidekiq-4.2.10/lib/sidekiq/middleware/chain.rb: 133:in `invoke' …ems/2.3.0/gems/sidekiq-4.2.10/lib/sidekiq/processor.rb: 134:in `block (3 levels) in process' …/gems/2.3.0/gems/sidekiq-4.2.10/lib/sidekiq/logging.rb: 32:in `with_context' …ems/2.3.0/gems/sidekiq-4.2.10/lib/sidekiq/processor.rb: 132:in `block (2 levels) in process' …ems/2.3.0/gems/sidekiq-4.2.10/lib/sidekiq/processor.rb: 183:in `stats' …ems/2.3.0/gems/sidekiq-4.2.10/lib/sidekiq/processor.rb: 131:in `block in process' /var/lib/gems/2.3.0/gems/sidekiq-4.2.10/lib/sidekiq.rb: 35:in `block in <module:Sidekiq>' …ems/2.3.0/gems/sidekiq-4.2.10/lib/sidekiq/processor.rb: 126:in `process' …ems/2.3.0/gems/sidekiq-4.2.10/lib/sidekiq/processor.rb: 82:in `process_one' …ems/2.3.0/gems/sidekiq-4.2.10/lib/sidekiq/processor.rb: 70:in `run' …lib/gems/2.3.0/gems/sidekiq-4.2.10/lib/sidekiq/util.rb: 17:in `watchdog' …lib/gems/2.3.0/gems/sidekiq-4.2.10/lib/sidekiq/util.rb: 26:in `block in safe_thread' My best guess is that this was caused by TomTom responding with an error, which we weren't handling previously. In that case, the response would be a JSON string, but include an `'error'` field instead of `'matrix'` and `'summary'`. Thus, when we'd try to `matrix_json['matrix']`, it would fail. Add a new method that checks for errors before we try to parse `WayCost`s. If a server error is detected, we log the message to the Rails log and return an empty array. Refs #6884
2018-05-02Merge pull request #542 from af83/6627-add-chouette-faviconLuc Donnet
6627: Add Chouette favicon
2018-05-02Merge pull request #546 from af83/6572-make-new-referentials-pendingLuc Donnet
6572 Create Referentials in a pending state
2018-05-02Merge pull request #545 from ↵Luc Donnet
af83/6858-workbenches-show--disallow-deletion-of-pending-referent 6858: Workbenches#show: Don't allow pending referentials to be selected
2018-05-02Merge pull request #547 from af83/6841-fix-itlsLuc Donnet
6841 Revert useless and harmful migration