<feed xmlns='http://www.w3.org/2005/Atom'>
<title>chouette-core/spec/lib, branch 4655-dashboard-controller</title>
<subtitle>Chouette manage transport static data</subtitle>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/'/>
<entry>
<title>ModelAttribute spec: Move `#instance_variable_set` to `before` block</title>
<updated>2017-09-25T10:29:25+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-09-25T10:29:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=bcae693304405cc9c273cf60952b1d123a820e31'/>
<id>bcae693304405cc9c273cf60952b1d123a820e31</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>ModelAttribute: Add `#from_code` method</title>
<updated>2017-09-22T12:10:45+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-09-22T12:10:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=2d7ce83439f29d261f0c5ec05140359218cfe661'/>
<id>2d7ce83439f29d261f0c5ec05140359218cfe661</id>
<content type='text'>
Enables finding a `ModelAttribute` by a string code combining klass and
name.

Refs #4401
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Enables finding a `ModelAttribute` by a string code combining klass and
name.

Refs #4401
</pre>
</div>
</content>
</entry>
<entry>
<title>ModelAttribute: Add `.group_by_class` method</title>
<updated>2017-09-22T10:42:41+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-09-22T10:42:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=9086e4c7d253927e7fad07bcd4eb194eeff393ca'/>
<id>9086e4c7d253927e7fad07bcd4eb194eeff393ca</id>
<content type='text'>
This returns all defined `ModelAttribute`s as a hash of class keys
containing lists of the attributes they contain.

Refs #4401
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This returns all defined `ModelAttribute`s as a hash of class keys
containing lists of the attributes they contain.

Refs #4401
</pre>
</div>
</content>
</entry>
<entry>
<title>ModelAttribute: Add `.classes` method</title>
<updated>2017-09-22T10:25:36+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-09-22T10:25:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=404b143af9ed49912e1e0065c832639188aa87de'/>
<id>404b143af9ed49912e1e0065c832639188aa87de</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>ModelAttribute: Add `.methods_by_class_and_type` method</title>
<updated>2017-09-22T10:11:41+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-09-22T10:11:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=9179af1df905ff9980228d2aa0ba77418f2781aa'/>
<id>9179af1df905ff9980228d2aa0ba77418f2781aa</id>
<content type='text'>
This enables filtering by class like `.methods_by_class` and
additionally only selecting attributes matching a certain data type.

Refs #4401
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This enables filtering by class like `.methods_by_class` and
additionally only selecting attributes matching a certain data type.

Refs #4401
</pre>
</div>
</content>
</entry>
<entry>
<title>ModelAttribute spec: Rename `@@all`</title>
<updated>2017-09-22T10:05:10+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-09-22T10:05:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=198659b133aba39cdd92d37fd3b93a223159994b'/>
<id>198659b133aba39cdd92d37fd3b93a223159994b</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>ModelAttribute.methods_by_class: Take symbol parameter instead of string</title>
<updated>2017-09-19T16:16:16+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-09-19T16:16:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=5b437302c3cbc90f920de11169f249658c23a5ee'/>
<id>5b437302c3cbc90f920de11169f249658c23a5ee</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>ModelAttribute: Add `.methods_by_class` method</title>
<updated>2017-09-19T16:13:20+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-09-19T16:13:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=a60bf813aa118648998093242d6db0e1d8613e76'/>
<id>a60bf813aa118648998093242d6db0e1d8613e76</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>ModelAttribute: Add `#code` method</title>
<updated>2017-09-19T15:00:30+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-09-19T14:59:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=e1547b52a372942b34cda3b3fee4ab76e9f1b65e'/>
<id>e1547b52a372942b34cda3b3fee4ab76e9f1b65e</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>ModelAttribute spec: Allow test to handle existing elements in `@@all`</title>
<updated>2017-09-19T14:12:55+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-09-19T13:39:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=2f555897bff3f8fa6dd5e9e0c6d48f0073edc349'/>
<id>2f555897bff3f8fa6dd5e9e0c6d48f0073edc349</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
</feed>
