aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2017-08-07Routes#duplicate: Add breadcrumb to pageTeddy Wing
Build a breadcrumb. In order to do so, we need to set the `@line` instance variable (how would I know that? I wouldn't, damn implicit dependencies). Refs #4189
2017-08-07Routes#duplicate: Add page headerTeddy Wing
Set header text in the locale files and display it on the page given the route ID in the URL. Remove the third argument from `pageheader` because after looking at the helper method's signature, I see that it's not necessary. Refs #4189
2017-08-07Add views/routes/duplicate.html.slimTeddy Wing
Duplicate of new.html.slim for now just to get the page working. Refs #4189
2017-08-07routes_controller_spec.rb: Convert to new Ruby hash syntaxTeddy Wing
2017-08-07routes_controller_spec.rb: Use lazy letTeddy Wing
Don't force creation of the `route`, create it lazily. Refs #4189
2017-08-07routes_controller_spec.rb: Remove old commented testTeddy Wing
This test was commented out in 2015. Safe to say we can remove it now.
2017-08-07routes_controller_spec.rb: Clean up whitespaceTeddy Wing
2017-08-07RoutesController: Get rid of old commented codeTeddy Wing
This method was commented out in 2012. Safe to say we can remove it.
2017-08-07Add routes to Routes#duplicateTeddy Wing
A couple of new routes for a form that will allow us to duplicate an itinéraire/route inside a line. Refs #4189
2017-08-04Timetable combination policycedricnjanga
2017-08-04Refs #4227 Add timetable_combination policiescedricnjanga
2017-08-03renamingRobert
2017-08-03Merge branch '1726-WorkbenchImport-for-multi-Netex-import'Robert
2017-08-03after migration'Robert
2017-08-03Merge pull request #52 from af83/4216_rename_attributsRobert Dober
4216 rename attributs
2017-08-03Merge pull request #50 from ↵Robert Dober
af83/3511-cron-job-to-notify-parent-WorkbenchImport-of-sub-import-status--rb201708011853 3511 cron job to notify parent workbench import of sub import status rb201708011853
2017-08-03Merge pull request #49 from ↵Robert Dober
af83/3507-update-rails_host-config-variable-and-workbench-import-zip-files-from-pull-request-comments 3507 update rails host config variable and workbench import zip files from pull request comments
2017-08-02Fixes: #4216@0.5h;Robert
2017-08-02Refs: #4216@0.5h; Corresponding migrationsRobert
2017-08-02Fix date filters for Timetable and workbenchescedricnjanga
2017-08-02Refs: #4216@0.3h; Brute force change of `message_attributs` to ↵Robert
`message_attributes` in code (not migration or schema!!!)
2017-08-02Refs: #4216@0.5h;Robert
Removed Dead Code Factories `clean_up_results` & `import_messages`
2017-08-02Merge pull request #51 from af83/4176_1726_neteximp_autocreate_refteddywing
4176 1726 neteximp autocreate ref
2017-08-02Hotfix for Jenkins, removed specs needing `unzip`Robert
2017-08-02Import#child_change: Get rid of unnecessary `return` keywordTeddy Wing
Refs #3509, #3511
2017-08-02ParentImportNotifier: Use `Import.finished_statuses`Teddy Wing
Instead of manually defining the finished statuses, use the method that's already defined on `Import` to get them. The only unfortunate part is that we now had to muss up our `Import` code and convert those methods to class methods in order for them to be accessible to `ParentImportNotifier` as well as its instance methods. Refs #3511
2017-08-02Hotfix for ENV["RAILS_HOST"], missing in production.rb and missnamed in ↵Robert
development.rb
2017-08-02ParentImportNotifier spec: Extract `let` for `workbench_import`Teddy Wing
Make Robert happy :) Refs #3511
2017-08-02Import spec: Extract `let`sTeddy Wing
I'm still not a fan of these myself, but let's make Robert happy. Refs #3511
2017-08-02Import spec: Convert helper methods to shared examplesTeddy Wing
At Robert's suggestion, convert these methods to RSpec shared examples. I had thought about using shared examples when I originally wanted to write these tests, but was trying to get things working quickly and couldn't figure out how to use them at the time, so I went with something that seemed obvious to me and worked. Now we can take advantage of the testing DSL available. Refs #3509, #3511
2017-08-02ParentImportNotifier: Simplify `#each` callTeddy Wing
This call can be written much more concisely. Thanks for the suggestion Robert! Refs #3511
2017-08-02ParentImportNotifier: Remove `self.` prefix when calling class methodTeddy Wing
Robert pointed out that it isn't necessary to prefix the method call with `self.`. Makes the code cleaner. Refs #3511
2017-08-02conflict resolutionRobert
2017-08-02conflict resolutionRobert
2017-08-02Refs: #4176@3h; NetexImportController refactored with help of ControlFlowRobert
2017-08-01Import#notify_parent: Update :notified_parent_atTeddy Wing
The `#notify_parent` method should update the `notified_parent_at` field on the child import so we know not to query it in subsequent batches of parent import notifications. Add the Timecop gem in order to be able to safely test the DateTime update. Refs #3511
2017-08-01Refs: #4176@2h; Request Spec for NetexImport adapted and implementedRobert
- Specing that, in case of a correct request Referential & NetexImport instances are created and a 201 is returned - Specing that, in case of an incorrect request, no instance is created and a 406 with a correct error message is returned - Implemented MISSING: Refactor controller implmentation
2017-08-01Refs: #4176@1h; Specing Referential Creation on NetexImport API callRobert
2017-08-01bup [amend me]Robert
2017-08-01Refs: #4176@2h; Request Spec for NetexImport adapted and implementedRobert
- Specing that, in case of a correct request Referential & NetexImport instances are created and a 201 is returned - Specing that, in case of an incorrect request, no instance is created and a 406 with a correct error message is returned - Implemented MISSING: Refactor controller implmentation
2017-08-01Refs: #4176@1h; Specing Referential Creation on NetexImport API callRobert
2017-08-01Unneeded FileService Implementation and Specs removed (deliberately after ↵Robert
merge to keep a reference in feature branch)
2017-08-01Import spec: Move helper method into `it` blockTeddy Wing
Not sure if this could cause any problems, but it makes more sense to me to put the helper method in the test where it's used, since that's the only place where it's used and that test is the only reason why it exists. Refs #3509, #3511
2017-08-01Import#child_change: Fix bug when parent status already setTeddy Wing
Don't update the parent status if it's already been set to a finished status. This protects against situations like this: child_import_1 status: :failed #child_change => parent_import status: :failed child_import_2 status: :successful #child_change => parent_import status: :successful In that scenario, even though one of the parent's children had failed, it still gets a successful status at the end. To prevent that situation, don't update the parent's status if it's already been set to a finished status. Refs #3509, #3511
2017-08-01Import spec: Get rid of thought process commentsTeddy Wing
I had apparently committed these comments from before I had written any tests and was thinking about what to test. Remove them. Refs #3509, #3511
2017-08-01Import: Add #symbols_with_indifferent_accessTeddy Wing
Didn't like the `flat_map` written inline in the `#failing_statuses` method because it wasn't obvious what it was doing. Got that from this answer by mr.musicman on Stack Overflow: https://stackoverflow.com/questions/21816139/is-there-something-like-with-indifferent-access-for-arrays-usable-for-include/42723778#42723778 (thank you) that describes how to make an array that responds to `#include?` for both symbols and string versions of those symbols. Extract that logic into its own method. Leaving it in `Import` for now because I only need it here and I didn't want to bother putting it in another module. Refs #3509, #3511
2017-08-01Import: Make #child_change workTeddy Wing
The `#child_change` method should update the current import (the parent) with a 'failed' or 'successful' status depending on the status of the child passed in. If the child has a failure status, the parent import should be updated to failed. If the import is `#ready?`, that tells us that all children have called `#child_change` without any problems, and we can update the parent's status to be successful. THAT PARAGRAPH IS WRONG. We could have `#ready?` with failed children. NEED TO UPDATE TO SUPPORT THAT. Add a method that describes the possible "failing" statuses. These are the ones that will cause 'failed' to be set on the parent. Refs #3509, #3511
2017-08-01Import: Add #ready?Teddy Wing
This boolean method answers whether or not the current import's `current_step` and `total_steps` fields match. If so, all of its subtasks are finished, in which case it can be thought of as "ready". Refs #4174, #3511
2017-08-01Import#notify_parent: Call #child_change on parent importTeddy Wing
Calling `#notify_parent` should call the `#child_change` method on the import's parent import. That `#child_change` method will tell the parent to update itself based on the status of the child. Refs #3511
2017-08-01Move `workbench_import` factory to its own fileTeddy Wing
I had started a separate `WorkbenchImport` factory in a separate branch, but now that I've rebased on Robert's work for #3507, we need to rectify the doubled `WorkbenchImport` factories. Use Robert's version but move it to the "workbench_imports.rb" factory file to match the `NetexImport` factory. Refs #3511