aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2017-09-27Manually specifying policy classes for ComplianceControl & childrenXinhui
Refs #4581
2017-09-27ComplianceControlSet#show add compliance_control create linkXinhui
Refs #4563
2017-09-27Move ComplianceControl#index into ComplianceControlSet#showXinhui
Refs #4579
2017-09-27Add type to permited params & remove policy checkXinhui
2017-09-27Merge pull request #78 from ↵Robert Dober
af83/3520-workbench--add-output-association-to-ReferentialSuite 3520 workbench add output association to referential suite
2017-09-27spec/support/referential.rb: Use factoriesTeddy Wing
Instead of creating the objects directly in ActiveRecord, use our existing factories for these records as suggested by Robert. Refs #3520
2017-09-27Workbench spec: Use factoriesTeddy Wing
Leverage our existing factories instead of creating the objects on the models directly. Refs #3520
2017-09-27Merge pull request #80 from af83/4440-add-permissions-to-importsLuc Donnet
4440 add permissions to imports
2017-09-26Refs #4614cedricnjanga
Add small helper to create a clone from the window variable the backend send to the JS part We then only deal with variable shared within the app and not with window variable than we delete if we specify it
2017-09-26Refs #4614cedricnjanga
Add trad to React itineraries
2017-09-26Specs fixed (from logical merge errors)Robert
2017-09-26UnpriedRobert
2017-09-26Fixes: #4440@0.5h;Robert
Added Controller Spec Fixed Older Specs
2017-09-26Refs: #4440@1h; ImportPolicy applied in views and controllerRobert
2017-09-26Refs: #4440@1.5h;Robert
ImportPolicy changing *.imports →' imports.*
2017-09-26Refs: #4454@0.75h; Proposal for fixRobert
2017-09-26Refs: #4440@0.5h Added import permissionRobert
2017-09-26add date filter to compliance_control_sets Refs #4466Guillaume
2017-09-26Refs #4603 : Add translations to React Timetable appcedricnjanga
2017-09-26Refs #4602 fix period updatecedricnjanga
2017-09-25Add data migration to give all Workbenches a ReferentialSuiteTeddy Wing
Existing `Workbench`es don't have associated `ReferentialSuite`s in their `output` fields. The new requirement is that all `Workbench`es must have a `ReferentialSuite`. To enforce this for existing `Workbench` records, this data migration creates new (empty) `ReferentialSuite`s for each existing `Workbench`. Not performant at all, and I'm worried I'm missing some edge case, but this is the gist of it. Refs #3520
2017-09-25spec/support/referential.rb: Remove `output` initialisationTeddy Wing
Since the `output` attribute is now initialised automatically in the `Workbench#initialize_output` `before_validation` callback, the one I added here before I created the callback can be removed. Instead we'll rely on the callback to create a new `ReferentialSuite` for us. Refs #3520
2017-09-25Workbench: Ensure `output` attr is initialised when creating workbenchTeddy Wing
Since all `Workbench`es must have an associated `ReferentialSuite` via `output`, if none is provided when creating a new `Workbench`, create one automatically. This is done in a `before_validation` callback (eck, AR callbacks). In order for our prior 'should validate_presence_of' test to continue to work, we have to work around the new callback, otherwise Shoulda can't set `output` to `nil` to run its expectation and the test fails. Refs #3520
2017-09-25Workbench: Validate presence of `output`Teddy Wing
Ensure all workbenches always have an associated `ReferentialSuite` by validating presence of the `output` attribute. In order to pass the 'should have a valid factory' test, we need to define a `ReferentialSuite` factory and set up a default association on `output` in the `Workbench` factory. We also need to add set `output` when creating a `Workbench` in `spec/support/referential.rb`, otherwise we get a validation error that breaks the tests. Clean up the formatting of that call. In order to pass a `ReferentialSuite`, I just create one above, but I'm not sure if I should be using a `find_or_create` mechanism like the other associated objects do above. Refs #3520
2017-09-25Update of INSTALL.md -> Troubleshooting -> macOS -> NokogiriRobert
2017-09-25Merge branch 'master' of https://github.com/af83/stif-boivGuillaume
2017-09-25Workbench: Add `output` associationTeddy Wing
The `output` attribute should be a `ReferentialSuite`. Refs #3520
2017-09-25Add `output_id` column to `workbenches`Teddy Wing
This column will be a reference to a `ReferentialSuite`. Going forward, all `Workbench`es will be required to have an associated `ReferentialSuite`. Refs #3520
2017-09-25Merge pull request #77 from ↵Robert Dober
af83/4401-compliance-control-ModelAttribute--address-Robert,s-comments 4401 compliance control model attribute address robert,s comments
2017-09-25Merge branch 'master' of https://github.com/af83/stif-boivGuillaume
2017-09-25update locales for compliance control_sets Refs #4466Guillaume
2017-09-25ModelAttribute spec: Move `#instance_variable_set` to `before` block4401-compliance-control-ModelAttribute--address-Robert,s-commentsTeddy Wing
Recommendation from Robert. The `@__all__` is an implementation detail. It's more fragile to use `#instance_variable_set` in each test. Instead, put that part in a `before` block so that if we decide to change it, we only have to do so in one place. Now each test can blithely assume that `ModelAttribute.all` starts out as an empty list. Refs #4401
2017-09-25ModelAttribute#==: Check for matching class typeTeddy Wing
Thanks to Robert for this suggestion, of course it makes a lot of sense to verify class equivalence when checking equality. Refs #4401
2017-09-25ModelAttribute.classes: Move `#uniq` call higherTeddy Wing
Call `#uniq` right after mapping over the `klass` attribute. Recommendation from Robert (thanks!). This means there are less elements to deal with in the subsequent maps. Refs #4401
2017-09-25Refs: #4601 Fix bug to keep the routes stop points if validation dont passcedricnjanga
- Added functions to itineraries/form_helper to handle empty fields and modifiy input regarding the user input - Update the stop point checker to not add the error span each time the user hit the form's submit button
2017-09-25Merge pull request #76 from af83/3519-create-ReferentialSuite-modelRobert Dober
3519 create referential suite model
2017-09-22Add `has_many` association between `Referential` and `ReferentialSuite`Teddy Wing
`ReferentialSuite` has many `Referential`s. Need to add a foreign key column to the `referentials` table to allow that to work. Refs #3519
2017-09-22Add `ReferentialSuite`Teddy Wing
This model is responsible for collecting referentials in order to merge them into a single referential. * `new` corresponds to a referential in the process of being validated * `current` corresponds to the most recently validated referential Refs #3519
2017-09-22Refs #4593cedricnjanga
Object ID => Change the way provider_id in constructed to replace every space with an underscore.
2017-09-22Merge pull request #75 from ↵teddywing
af83/4401-create-compliance-control-model-attribute-class 4401 create compliance control model attribute class
2017-09-22ModelAttribute: Add `#from_code` methodTeddy Wing
Enables finding a `ModelAttribute` by a string code combining klass and name. Refs #4401
2017-09-22Refs #4593cedricnjanga
Object ID => Change the way provider_id in constructed to replace every space with an underscore.
2017-09-22ModelAttribute: Add `.group_by_class` methodTeddy Wing
This returns all defined `ModelAttribute`s as a hash of class keys containing lists of the attributes they contain. Refs #4401
2017-09-22ModelAttribute: Add `.classes` methodTeddy Wing
This allows people to get a list of the classes defined in `ModelAttribute`. The classes are turned into constant-cased strings. Not sure if that's useful, but this is how it was described in the ticket. Refs #4401
2017-09-22ModelAttribute: Add `.methods_by_class_and_type` methodTeddy Wing
This enables filtering by class like `.methods_by_class` and additionally only selecting attributes matching a certain data type. Refs #4401
2017-09-22ModelAttribute spec: Rename `@@all`Teddy Wing
In c9a997f337c9b45f62b50629de96fa95f20c1a7f, we changed the storage mechanism of `all` and made it not a class method. Update the spec description to reflect this. Refs #4401
2017-09-21Fix test on vehicle journey at stopcedricnjanga
2017-09-21Vehicle journey message error update to show the sort_id and not the local_idcedricnjanga
2017-09-21Comment begin_of_association_chain methodcedricnjanga
2017-09-21Merge branch 'master' of github.com:af83/stif-boivcedricnjanga