aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
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
2017-09-21Merge pull request 55 into mastercedricnjanga
=> Debug to add the possibility to add included dates in a period (outside of day types) => Refacto in the timetable reducer to share more code between some actions
2017-09-21Merge branch 'master' of https://github.com/af83/stif-boivGuillaume
2017-09-21add organisation filter for compliance_control_setGuillaume
2017-09-21Refs #4551 Change import message 2_netex_4cedricnjanga
2017-09-21Add the rest of compliance control modelscedricnjanga
2017-09-20Refs #4551 Change import message 2_netex_4cedricnjanga
2017-09-20Add the rest of compliance control modelscedricnjanga
2017-09-20Fix error in UPDATE_DAY_TYPE action in timetable reducercedricnjanga
The condition to remove the right dates was not well implemented
2017-09-20Merge branch 'master' into Add_included_days_in_periodscedricnjanga
2017-09-20Add quotes in translation filecedricnjanga
2017-09-20Merge master to branch and resolve all the conflictscedricnjanga
We also needed to take remove the right time table dates when we update day types : - excluded dates that are out of day types - included dates that are in day types and in periods
2017-09-20add ransack filter for compliance_control_sets collectionGuillaume
2017-09-19ModelAttribute.methods_by_class: Take symbol parameter instead of stringTeddy Wing
Didn't like how `#initialize` takes a different type for `klass` than `.methods_by_class`. Make these types and values uniform. If we need to change it, we should make a separate mechanism to do so. I think. Refs #4401
2017-09-19ModelAttribute: Add `.methods_by_class` methodTeddy Wing
Allows us to get all `ModelAttribute`s given a certain class name. Needed an `#==` method to be able to test object equality more easily so I added one in. I don't like that the `klass` is a lowercase symbol and the `klass` attribute to `.methods_by_class` is a constantized string. Want to correct that and make them uniform. Only did it this way because that's how it was suggested in the ticket. Refs #4401
2017-09-19ModelAttribute: Make `@@all` a class instance variableTeddy Wing
Robert argues that the class variable is not ideal because its value gets shared with subclasses, violating the Liskov substitution principle: 17:44:23 < robert> ```133] pry(main)> class A; @@greeting = :hello end 17:44:23 < robert> => :hello 17:44:23 < robert> [134] pry(main)> class B < A; end 17:44:23 < robert> => nil 17:44:23 < robert> [135] pry(main)> B.class_variable_get '@@greeting' 17:44:23 < robert> => :hello Instead, go with his suggestion to use a class instance variable instead, which gives us the same amount of availability of the `all` list while not sharing it indiscriminately and making it easier to test. Refs #4401
2017-09-19Fix translationscedricnjanga
2017-09-19ModelAttribute: Add `#code` methodTeddy Wing
A method that returns a string representation of the attribute, in the form `:class#:name". This will be used to store a reference to the attribute in the database. For example, a validation will reference a `ModelAttribute` in a database column using this `#code` string. Refs #4401
2017-09-19ModelAttribute: Add `ModelAttribute`s for a bunch of models&attributesTeddy Wing
We want to define `ModelAttribute`s for an initial set of `Chouette` models: * Chouette::Route * Chouette::JourneyPattern * Chouette::VehicleJourney * Chouette::Footnote * Chouette::TimeTable * Chouette::RoutingConstraintZone I added these by looking at the `schema.rb` as well as some form views for these models. Given that information, I made some guesses about what attributes it might make sense to add here. We want to end up with a collection of only editable attributes for these models, so this excludes things like `created_at`, foreign keys, and programmatically set fields. This is my guess at what those fields are. We can refine the list later. We'll be using this list for Compliance Control to get a set of fields of a given type in order to create custom validations using those fields. Refs #4401
2017-09-19Fix spec on mission compliance controls permissionsXinhui
2017-09-19ModelAttribute spec: Allow test to handle existing elements in `@@all`Teddy Wing
When `ModelAttribute` instances are added to `@@all` directly in the class, the test breaks. Make it a little more robust by checking change in array size instead of total size. Refs #4401
2017-09-19Add `ModelAttribute`Teddy Wing
This new class will allow us to generate a list of all editable fields in all our models including the type of each field. We need this for Compliance Control, in order to get a list of fields or models & fields that can be selected to validate a given model validation check. The crucial bits here are the models, fields, and the types of those fields. These need to be defined (manually at least to begin with), accessible, and filterable. Refs #4401
2017-09-19Merge pull request #73 from ↵teddywing
af83/4555-rake-referential_create--update-Route#wayback-values referential.rake: Update `Route#wayback` values
2017-09-19referential.rake: Update `Route#wayback` valuesTeddy Wing
The possible values for this field changed in 2fa3be1518da4f471d614832f80526e074983195 to `outbound` and `inbound`. Update them accordingly in this Rake task, otherwise it fails. Refs #4555
2017-09-19Fix parse error on compliance_controls.enXinhui
2017-09-19Resolve merge conflictscedricnjanga
2017-09-19Fix compliance_control controller spec due to missing permissionsXinhui
2017-09-19Merge branch 'master' of github.com:AF83/stif-boivLuc Donnet