aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2018-02-22WorkbenchImportWorker: Use temp files for entry group subdir ZipsTeddy Wing
Instead of creating our own files for these subdirectory Zip files, use temp files. There are two advantages to doing this: 1. We can customise the location they get saved to. This means we can use `Rails.root` as a default, but specify a custom location in a Rails config variable. 2. The files will be automatically deleted on every garbage collection. In actuality, #2 above was already handled by the `eg_file.unlink` line, and #1 could be easily added to the existing code. Using a `Tempfile`, though, makes the fact that these are temporary files more explicit. The reason why we want to be able to customise the location of these tempfiles is that in our production environment set up by Puppet, the `#{Rails.root}/tmp/imports` directory isn't writable by the application, which causes this code to error. We thus want a way to change the path in different environments. We keep the `eg_file.unlink` call here because we want the temporary file to be deleted as soon as possible. The Ruby documentation even recommends it (https://ruby-doc.org/stdlib-2.5.0/libdoc/tempfile/rdoc/Tempfile.html#class-Tempfile-label-Explicit+close): > it's good practice to do so: not explicitly deleting unused Tempfiles > can potentially leave behind large amounts of tempfiles on > the filesystem until they're garbage collected. I got rid of the `#upload_entry_group_tmpfile` method in this change, moving its contents to `#upload_entry_group_stream`. This was easy enough to do since it was only called in that one place. The reason I did this is because it took an open `File` object as an argument and closed the file at the end of the method. That's a major side effect. I don't think the method should be closing a file it doesn't own. After moving this work to `#upload_entry_group_stream`, we can close and unlink the file in the same place where it was created. Refs #4315
2018-02-22Refs #5999 Update workgroup call in TimeTable#newcedricnjanga
2018-02-21Refs #5942; Apply users TZ when computing a schedule5942-apply-user-tzZog
2018-02-21Refs #5944; Skip automated times calculation when no start time is set5944-skip-schedule-calculation-when-no-time-is-setZog
2018-02-21Move importers outputs in logsZog
2018-02-21Improve output of importersZog
2018-02-21Avoid error in referentials/_overview when one of lines isn't associated to ↵Alban Peignier
a transport mode
2018-02-21Merge branch '5865-validate-referential-cloning' of ↵5865-validate-referential-cloningLuc Donnet
github.com:AF83/stif-boiv into 5865-validate-referential-cloning
2018-02-21Fix specsZog
2018-02-21Refs #5865 @1h; Ensure user is allowed to duplicate a referential before ↵Zog
doing so I also changed the way 403 errors are handled, to properly respond with a 403 HTTP code
2018-02-20Refs #5979 Change export CSV filenames to have a readable date in it5979_change_export_csv_filenamescedricnjanga
2018-02-20Refs #5882 Fix CC name and code filter5882_ccset_code_filtercedricnjanga
2018-02-20Refs #5609 Change slug formatcedricnjanga
2018-02-20Use page as will_paginate param_name by default. Refs #3542Alban Peignier
2018-02-20Merge pull request #304 from af83/5901-fix-calendar-autocompletionteddywing
5901 Makes TimeTable search accent-insensitive
2018-02-20Refs #5901; Update specs and fix unaccented searchZog
2018-02-20Refs #5901; Makes TimeTable search accent insensitiveZog
2018-02-20Merge pull request #308 from ↵Alban Peignier
af83/5911-stops-filter-on-referential-journeys-index Better stops filters on ReferentialVJs#index. Refs #5911
2018-02-20Merge pull request #297 from af83/5486-fix-react-warningsLuc Donnet
5486 Use minified version of React/Redux in production
2018-02-20Merge pull request #294 from af83/5863-use-shallow-urls-for-referentialsLuc Donnet
5863 Remove workbench id from the querystring
2018-02-20Fix specs on VehicleJourneyAtStopZog
2018-02-20Merge branch '5863-use-shallow-urls-for-referentials' of ↵Luc Donnet
github.com:AF83/stif-boiv into 5863-use-shallow-urls-for-referentials
2018-02-20Refs #5863 @6h; Remove workbench id from the querystringZog
Infer it when possible, and use a nested otherwise
2018-02-20Fix specsZog
2018-02-20Refs #5924; Fix SimpleImporter lookup scopeZog
2018-02-20Regs #5924; Rename imports tasksZog
2018-02-20Refs #5924; Remove `local_id` methodsZog
2018-02-20Refs #5924; Fix some bugs revealed during importsZog
- The checksum computing for VehicleJourneyAtStops - Offsets calculation in VehicleJourneys
2018-02-20Refs #5924 @14h; Extend importersZog
Mostly add a way to override the default behaviour and process each row its own way
2018-02-20Refs #5924 @2h; Update specsZog
2018-02-20Refs #5924; Update rake tasksZog
2018-02-20Refs #5924 @2h; Provide a mechanism to define a custom importerZog
2018-02-20Refs #5924 @1H; Add `before` actionsZog
2018-02-20Fix specsZog
2018-02-20Refs #5765; :fire: commentZog
2018-02-20Refs #5765; Add new task to import in a given referentialZog
2018-02-20Refs #5765 @6h; Add a customizable importer mechanismZog
2018-02-20Replace current_workgroup by referential.workgroup. Refs #5867Alban Peignier
2018-02-19fix type in secret file for dockerFlorent Peyraud
2018-02-19Remove ReferentialVehicleJourneysController when only end stop. Refs #59115911-stops-filter-on-referential-journeys-indexAlban Peignier
2018-02-19Search VehicleJourneys with one StopArea or two ordered StopAreas. Refs #5911Alban Peignier
2018-02-19Fixes StopArea#start/end order. Refs #5911Alban Peignier
2018-02-19Refs #5911 @2h; Better stops filters on ReferentialVJs#indexZog
2018-02-19Merge pull request #303 from af83/5899-use-waiting-time-in-schedulesAlban Peignier
Use waiting_time in schedules computation. Refs #5899
2018-02-19Merge pull request #309 from af83/5919-make-coluns-sortableAlban Peignier
Make ReferentialVJs#index sortable. Refs #5919
2018-02-19Merge pull request #286 from af83/5853-detailed-calendar-view-in-vjs-indexAlban Peignier
Add a detailed calendars view on VJs editor. Refs #5853
2018-02-19Fixes javascript VehicleJourneys snapshot. Refs #58535853-detailed-calendar-view-in-vjs-indexAlban Peignier
2018-02-19Refs #5853; Better cssZog
2018-02-19Refs #5853 @2h; Add a detailed calendars view on VJs editorZog
2018-02-19Avoid error in referentials/_overview when one of lines isn't associated to ↵Alban Peignier
a company