<feed xmlns='http://www.w3.org/2005/Atom'>
<title>chouette-core/spec, branch 6097-cache-route-WayCosts</title>
<subtitle>Chouette manage transport static data</subtitle>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/'/>
<entry>
<title>WayCost: Add `#cache_key` method</title>
<updated>2018-04-16T14:21:04+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-04-16T10:58:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=7a9a08325db222b11d22a7e72458e8d66875c42a'/>
<id>7a9a08325db222b11d22a7e72458e8d66875c42a</id>
<content type='text'>
Provides a uniform Rails cache key for all `WayCost`s using their `id`.
Since the `id` field is option, raise an error if the `WayCost` doesn't
have one.

Refs #6097
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Provides a uniform Rails cache key for all `WayCost`s using their `id`.
Since the `id` field is option, raise an error if the `WayCost` doesn't
have one.

Refs #6097
</pre>
</div>
</content>
</entry>
<entry>
<title>WayCostsFromRouteCostsPopulator: Handle missing route costs</title>
<updated>2018-04-16T14:21:04+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-04-16T10:15:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=ae3933586653c00ea92d788380fc81d3586e4d42'/>
<id>ae3933586653c00ea92d788380fc81d3586e4d42</id>
<content type='text'>
If a `Route#cost` is missing the method shouldn't fail. Instead, it
should just pass the `WayCost` along without distance &amp; time cost
values. This way we end up with a list of all `WayCost`s for all stop
areas, even the new ones that haven't been run through the TomTom
calculator yet.

Refs #6097
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If a `Route#cost` is missing the method shouldn't fail. Instead, it
should just pass the `WayCost` along without distance &amp; time cost
values. This way we end up with a list of all `WayCost`s for all stop
areas, even the new ones that haven't been run through the TomTom
calculator yet.

Refs #6097
</pre>
</div>
</content>
</entry>
<entry>
<title>Add `WayCostsFromRouteCostsPopulator`</title>
<updated>2018-04-16T14:21:04+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-04-16T10:04:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=fc1c4b7ca5b9e2886413ddd24d5cba90ea7dd804'/>
<id>fc1c4b7ca5b9e2886413ddd24d5cba90ea7dd804</id>
<content type='text'>
Gives us a way to take `Route#costs` and `WayCost`s created by
`StopAreasToWayCostsConverter` and merge the data together to obtain
complete `WayCost`s including distance and time values.

This will allow us to more easily interact with the Rails cache for
caching `WayCost`s.

Refs #6097
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Gives us a way to take `Route#costs` and `WayCost`s created by
`StopAreasToWayCostsConverter` and merge the data together to obtain
complete `WayCost`s including distance and time values.

This will allow us to more easily interact with the Rails cache for
caching `WayCost`s.

Refs #6097
</pre>
</div>
</content>
</entry>
<entry>
<title>Refs #6458; Fix Timetables autocompletion</title>
<updated>2018-04-16T13:23:04+00:00</updated>
<author>
<name>Zog</name>
</author>
<published>2018-04-13T14:01:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=51125f25847db2bb2c654c1bbfd1fd39295693f6'/>
<id>51125f25847db2bb2c654c1bbfd1fd39295693f6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Route: Change `#calculate_costs!` to `after_commit` callback</title>
<updated>2018-04-16T07:09:20+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-04-06T14:37:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=b05676bdda09c10a7130e0f86527a75e6535dad8'/>
<id>b05676bdda09c10a7130e0f86527a75e6535dad8</id>
<content type='text'>
Use an `after_commit` instead of an `after_save`. The `after_save` could
cause intermittent problems due to Sidekiq starting before the
record/transaction actually gets committed to the database. In those
cases, the record wouldn't be found and cause an error.

With an `after_commit` callback, the record is sure to be committed
before Sidekiq takes over.

Additionally, limit the callback to `:create` and `:update` because
otherwise it will be active on `:destroy` by default also. This work
isn't relevant on destroy, so don't do it then.

Update the tests:

* Update labels
* Use `build` instead of `create` because we're saving the record at the
  end anyway so we don't need an object that starts out persisted
* Use `truncation: true` for these tests because otherwise the `commit`
  callback doesn't get called due to transactional teardown

Refs #6407
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use an `after_commit` instead of an `after_save`. The `after_save` could
cause intermittent problems due to Sidekiq starting before the
record/transaction actually gets committed to the database. In those
cases, the record wouldn't be found and cause an error.

With an `after_commit` callback, the record is sure to be committed
before Sidekiq takes over.

Additionally, limit the callback to `:create` and `:update` because
otherwise it will be active on `:destroy` by default also. This work
isn't relevant on destroy, so don't do it then.

Update the tests:

* Update labels
* Use `build` instead of `create` because we're saving the record at the
  end anyway so we don't need an object that starts out persisted
* Use `truncation: true` for these tests because otherwise the `commit`
  callback doesn't get called due to transactional teardown

Refs #6407
</pre>
</div>
</content>
</entry>
<entry>
<title>Refs #6536; Cleanup value passed for secondary_company_ids by the lines form</title>
<updated>2018-04-13T09:06:27+00:00</updated>
<author>
<name>Zog</name>
</author>
<published>2018-04-13T09:06:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=13087614ceb0e9e3a604cd08a023f11cd0567bea'/>
<id>13087614ceb0e9e3a604cd08a023f11cd0567bea</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Specs cleanup</title>
<updated>2018-04-11T08:08:15+00:00</updated>
<author>
<name>Zog</name>
</author>
<published>2018-04-11T08:08:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=0f8994b5e80a66e123f5a7a26f5073e799716249'/>
<id>0f8994b5e80a66e123f5a7a26f5073e799716249</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix specs (WIP)</title>
<updated>2018-04-11T07:53:08+00:00</updated>
<author>
<name>Zog</name>
</author>
<published>2018-04-11T07:28:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=e58fa94e822bbf5c24a285eaf1b38737400d8923'/>
<id>e58fa94e822bbf5c24a285eaf1b38737400d8923</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Refs #6461; Don't initilialize CustomFields when they are not loaded by the model</title>
<updated>2018-04-10T20:42:14+00:00</updated>
<author>
<name>Zog</name>
</author>
<published>2018-04-06T08:09:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=7f7f93caf090aee755b23b408d5da2374088217b'/>
<id>7f7f93caf090aee755b23b408d5da2374088217b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Refs #6481; Add a spec to ensure we d'ont alter the original route when duplicating it</title>
<updated>2018-04-10T16:55:39+00:00</updated>
<author>
<name>Zog</name>
</author>
<published>2018-04-10T07:01:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=9f5154968fd4f212f4fd13072834647135304706'/>
<id>9f5154968fd4f212f4fd13072834647135304706</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
