aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2017-11-16Refs: #4461@1h; CodeReviewrobert-bupRobert
- using webmock instead of mocking Net::HTTP therefore removing the connascence between the spec and the HTTP lib used in the implementation, thank you Teddy
2017-11-15Fixes: #4461@2h; Specing and ImplementingRobert
2017-11-15Refs: #4461@1.5h; Repaired netex_import factory, adapted spec/models/import_specRobert
2017-11-13Refs #4952 Add conidtion to display ComplianceControlBlock edit button ↵cedricnjanga
depending on user permissions
2017-11-13ComplianceCheckSet#update_status: Return `true` if no update happenedTeddy Wing
Return `true` from this method by default. If the `#update` call fails, then it will return `false`, but in all other cases, we should return `true`. That way, when the `Api::V1::ComplianceCheckSetsController#validated` endpoint is called, it will respond with the `ComplianceCheckSet` object instead of: {"status":"error","messages":[]} with no error messages. Refs #4757
2017-11-13ComplianceCheckSet#update_status: Handle resources with "IGNORED" statusTeddy Wing
If any associated resources have the "IGNORED" status, this shouldn't affect the outcome of a "successful" status. Allow the `ComplianceCheckSet` to be "successful" even if some `Resource`s are "IGNORED". Refs #4757
2017-11-13ComplianceCheckSet: Rename to `all_statuses_ok?`Teddy Wing
Another suggestion from Robert, since this method returns a boolean, maybe its name should end with a question mark. Refs #4757
2017-11-13ComplianceCheckSet: Rename to `all_statuses_ok`Teddy Wing
Suggestion from Robert to have a simpler name. I had just written it the way it sounded in my head when I wrote the method. Refs #4757
2017-11-13ComplianceCheckSet#update_status: Return result of `#update`Teddy Wing
We should return the result of the `ActiveRecord` `#update` call, so that we can determine if there was an error saving the `ComplianceCheckSet` record. Refs #4757
2017-11-13Revert "ComplianceCheckSet#update_status: Should return a boolean"Teddy Wing
This reverts commit b7477e28f90c961079c7b12c4992071cbc11b2d6. This logic isn't right. We should return true/false based on the result of `update`, as in, whether the value was able to be updated, instead of on the contents of the status.
2017-11-13ComplianceCheckSet#update_status: Should return a booleanTeddy Wing
Ensure that `#update_status` always returns a boolean value. We'll be using this to determine whether the updated status was 'successful' or not. Hmmm. Wait. That's not right. We want to return true from the update, we don't care about the status. The error case should be when the `update` fails. Darn. Refs #4757
2017-11-13ComplianceCheckSet#update_status: Only update 'successful' at the endTeddy Wing
Previously we were updating to a 'successful' status prematurely, at the first encounter with a successful `ComplianceCheckResource`. Here, we wait until we've looked at all associated `ComplianceCheckResource`s before setting 'successful'. Only if all associated `ComplianceCheckResource`s are successful do we set this status on the `ComplianceCheckSet`. Refs #4757
2017-11-13ComplianceCheckSet#update_status: First incomplete versionTeddy Wing
Fill in the `#update_status` method. It should update the status of the `ComplianceCheckSet` based on the status of its child `ComplianceCheckResource`s. This version doesn't work because it doesn't wait until the end of the loop to update the status to 'successful'. But it's the right logic for the 'failed' and 'warning' cases. Refs #4757
2017-11-13ComplianceCheckSet#update_status: Reverse test data orderTeddy Wing
Move the successful `ComplianceCheckResource`s to the end so that these tests fail if we don't wait until the end of a loop through the resoures before updating the status to 'successful'. Refs #4757
2017-11-13ComplianceCheckSet#update_status spec: Add failure status casesTeddy Wing
Add test cases for status update when `ComplianceCheckResource` are "ERROR" and "WARNING". If a single Resource is "ERROR" or "WARNING", then the `ComplianceCheckSet` becomes "failed" or "warning". Refs #4757
2017-11-13ComplianceCheckSet#update_status: Add spec for successful childrenTeddy Wing
Initial spec that checks the correct status field change when all `ComplianceCheckResource`s are successful. Refs #4757
2017-11-13ComplianceCheckSets#validated: Add response bodyTeddy Wing
On successful status update, respond with the `ComplianceCheckSet` object attributes. Otherwise, respond with an error JSON. Refs #4757
2017-11-13ComplianceCheckSetsController: Get ComplianceCheckSet and update statusTeddy Wing
Get the `ComplianceCheckSet` from the URL and call its `#update_status` method. This doesn't currently work all the way. We need to send a real response. Refs #4757
2017-11-13config/routes.rb: Remove "validated" from compliance check set API URLTeddy Wing
After a discussion with Luc yesterday, the URL we settled on was: /api/v1/compliance_check_sets/:id This matches the format of the import API route a little better. Refs #4757
2017-11-13Add route stub for validation finalisationTeddy Wing
This route will be called by the Java application when ComplianceCheck validation is completed. It will perform post-validation work, primarily updating statuses. Refs #4757
2017-11-13Change permission list for specscedricnjanga
2017-11-13Refs #4952 Fix bug related to compliance control set action links displaycedricnjanga
2017-11-13Merge pull request #115 from ↵Robert Dober
af83/4953-compliance_check_resources--change-type-column-to-resource_type compliance_check_resources: Rename `type` column to `resource_type`
2017-11-13compliance_check_resources: Rename `type` column to `resource_type`Teddy Wing
The Java application needs a `resource_type` column to be able to store the class/object that was validated by the resource's check. Since we don't need or want Single Table Inheritance on this table, rename the existing `type` field to `resource_type`. Refs #4953
2017-11-10Merge pull request #114 from af83/4947-change-new-foreign-keys-to-bigintRobert Dober
Migrate all foreign keys to `bigint` from `integer`
2017-11-10Change `compliance_check_set_id` to `bigint`Teddy Wing
I had missed this one in 63d85933ac99453c76df7cda102a4f60d94f5f53. Thanks a lot to Robert for scouring the fields and finding it. Since the v2 migration was irreversible, add a new one to change the type of this foreign key. Refs #4947
2017-11-10Migrate all foreign keys to `bigint` from `integer`Teddy Wing
All our primary keys are supposed to be `bigint`s, and our foreign keys should likewise be `bigint`s. But it's easy to forget this when creating migrations, or some committers might not have been up to speed on the convention. In any case, this changes all existing foreign keys to be `bigint`s. Need to get this out now so that Michel Etienne can use it to correctly test the Java application for compliance check validations. That's why I'm not including any future-looking checks or enforcements here. That will be coming next. Refs #4947
2017-11-10Remove RouteSection from SetUpdatedAt migration. Refs #4944Alban Peignier
2017-11-09Merge branch '4944_remove_route_section_code'Xinhui
2017-11-09Fix VJ shift button disable on conditioncedricnjanga
2017-11-09Remove call to route_section related method4944_remove_route_section_codeXinhui
2017-11-09Refs #4932 Change route duplication to redrect to routes#indexcedricnjanga
2017-11-09Refs #4776 Add policies to ComplianceControl and ComplianceControlSetcedricnjanga
2017-11-09Remove route_section localesXinhui
2017-11-09Remove model route_sectionsXinhui
2017-11-09Remove route_sections controllers, views, helperXinhui
2017-11-09Remove route_sections & route_sections related routesXinhui
2017-11-09Migration drop table route_sections & journey_pattern_sectionsXinhui
2017-11-08Merge pull request #110 from af83/4755-page_for_validate_referentialteddywing
4755 page for validate referential
2017-11-08fix bad indentationGuillaume
2017-11-08filter compliance_control_set by organisation on valisate referential and ↵Guillaume
add specs
2017-11-08Hotfix: adapted .nvmrc to node version in package.jsonRobert
2017-11-08update minumum node version to 6.12.0Guillaume
2017-11-07Merge branch '4820_refactoring_breadcrumb'Xinhui
2017-11-07Add missing breadcrumb on edit page4820_refactoring_breadcrumbXinhui
2017-11-06fix specsGuillaume
2017-11-06Fix on ImportMessage#criticity enumerationcedricnjanga
2017-11-06Refs #4919 Fix translations on ComplianceControl#showcedricnjanga
2017-11-06Refs #4859 Change ImportMessage#criticity type to stringcedricnjanga
2017-11-06add validate method in referentials_controller for call ↵Guillaume
ComplianceControlSetCopyWorker, and change routes/views for select compliance_control_set