<feed xmlns='http://www.w3.org/2005/Atom'>
<title>chouette-core/spec/services, branch 3521-workbench_output_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>Refs: #4633@0.5h;</title>
<updated>2017-10-24T13:28:44+00:00</updated>
<author>
<name>Robert</name>
</author>
<published>2017-10-19T16:22:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=7f3b2aa1a1c4a2e051e1b2d3d3b57ab646b01a44'/>
<id>7f3b2aa1a1c4a2e051e1b2d3d3b57ab646b01a44</id>
<content type='text'>
Speced and implemented ZipService to return additional directories
in the entry's `spurious` field.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Speced and implemented ZipService to return additional directories
in the entry's `spurious` field.
</pre>
</div>
</content>
</entry>
<entry>
<title>HTTPService spec: Remove upload mock expectations</title>
<updated>2017-08-25T17:11:44+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-08-25T17:09:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=3f7c607546caf3fa3cad0fd5e4d47a84637f352e'/>
<id>3f7c607546caf3fa3cad0fd5e4d47a84637f352e</id>
<content type='text'>
These relied on the previous behaviour of `#post_resource` handling
uploads. This is no longer the case. Instead, you have to call
`HTTPService.upload` manually and pass the result to `#post_resource`
via the `params` argument (like in `WorkbenchImportWorker#params`).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These relied on the previous behaviour of `#post_resource` handling
uploads. This is no longer the case. Instead, you have to call
`HTTPService.upload` manually and pass the result to `#post_resource`
via the `params` argument (like in `WorkbenchImportWorker#params`).
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove `RetryService`</title>
<updated>2017-08-25T10:14:29+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-08-25T10:14:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=166b53305e41c51f4b401514a5ec2d828788a2cd'/>
<id>166b53305e41c51f4b401514a5ec2d828788a2cd</id>
<content type='text'>
This is no longer being used as the `WorkbenchImportWorker` was
refactored and it was decided that we don't want to enable retries for
imports.

For example, imagine you have an hour-long import that fails after 50
minutes. We retry three times and now we've wasted 2.5 hours of your
time just to tell you that the import failed.

Thus the decision was to remove it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is no longer being used as the `WorkbenchImportWorker` was
refactored and it was decided that we don't want to enable retries for
imports.

For example, imagine you have an hour-long import that fails after 50
minutes. We retry three times and now we've wasted 2.5 hours of your
time just to tell you that the import failed.

Thus the decision was to remove it.
</pre>
</div>
</content>
</entry>
<entry>
<title>Refs: #4273@20h;  Reverse Engeneeiring RubyZip fixed ZipService</title>
<updated>2017-08-21T03:26:55+00:00</updated>
<author>
<name>Robert</name>
</author>
<published>2017-08-21T03:13:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=327b1ec771a056451b0635ba80cc346fa1765299'/>
<id>327b1ec771a056451b0635ba80cc346fa1765299</id>
<content type='text'>
        - Replzed Lazy Enum over get_next_entry and group by with explicit looping and yielding to an instance level enumerator
          that yields streams per subdir (wich represents a referential).

        - Fixtures and Specs that use a REAL usecase.

        Next: Get rid of metadata kludge (should fix failing specs)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
        - Replzed Lazy Enum over get_next_entry and group by with explicit looping and yielding to an instance level enumerator
          that yields streams per subdir (wich represents a referential).

        - Fixtures and Specs that use a REAL usecase.

        Next: Get rid of metadata kludge (should fix failing specs)
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch '1726-WorkbenchImport-for-multi-Netex-import'</title>
<updated>2017-08-03T13:08:06+00:00</updated>
<author>
<name>Robert</name>
</author>
<published>2017-08-03T13:08:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=09b0d438c50c7cd9ec9c18d1d90c16877b07d9a9'/>
<id>09b0d438c50c7cd9ec9c18d1d90c16877b07d9a9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #50 from af83/3511-cron-job-to-notify-parent-WorkbenchImport-of-sub-import-status--rb201708011853</title>
<updated>2017-08-03T09:19:47+00:00</updated>
<author>
<name>Robert Dober</name>
</author>
<published>2017-08-03T09:19:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=494fdfab76e6557018de77dac6861513ffa0502b'/>
<id>494fdfab76e6557018de77dac6861513ffa0502b</id>
<content type='text'>
3511 cron job to notify parent workbench import of sub import status  rb201708011853</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
3511 cron job to notify parent workbench import of sub import status  rb201708011853</pre>
</div>
</content>
</entry>
<entry>
<title>Hotfix for Jenkins, removed specs needing `unzip`</title>
<updated>2017-08-02T12:40:34+00:00</updated>
<author>
<name>Robert</name>
</author>
<published>2017-08-02T12:40:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=420068615d1633a1a9fac48db82d3df04913af9a'/>
<id>420068615d1633a1a9fac48db82d3df04913af9a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>ParentImportNotifier spec: Extract `let` for `workbench_import`</title>
<updated>2017-08-02T10:10:05+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-08-02T10:10:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=0a3221c194115fc039577064590a6f4eb6f33a8a'/>
<id>0a3221c194115fc039577064590a6f4eb6f33a8a</id>
<content type='text'>
Make Robert happy :)

Refs #3511
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make Robert happy :)

Refs #3511
</pre>
</div>
</content>
</entry>
<entry>
<title>Unneeded FileService Implementation and Specs removed (deliberately after merge to keep a reference in feature branch)</title>
<updated>2017-08-01T20:09:44+00:00</updated>
<author>
<name>Robert</name>
</author>
<published>2017-08-01T20:09:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=f4a879becb6ac5f3229f77e8a14122f085e02be5'/>
<id>f4a879becb6ac5f3229f77e8a14122f085e02be5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add a service that notifies parent imports of sub-import status</title>
<updated>2017-08-01T17:19:01+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-07-25T11:02:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=eb90176182c8caa3456a5582d2eb0623ce2b210c'/>
<id>eb90176182c8caa3456a5582d2eb0623ce2b210c</id>
<content type='text'>
A new service, `ParentImportNotifier`, will be called by a Cron job
every 5 minutes. This service will query all finished sub-imports that
haven't yet notified their parent, and tell them to do so.

factories/workbench_imports.rb:
Add a `WorkbenchImport` factory. This is currently incomplete. We'll
want to correctly initialise the `file` attribute eventually.

import.rb:
factories/imports.rb:
In order to get the test setup to work correctly, we skip the
`before_create` callback on `Import`. This is because that callback
initialises `status` to "new". We want to be able to set any status
value in our tests to test things properly. Thus the callback messes
with our buttermilk. For all imports created by the factory, skip this
callback. In order to skip the callback, I had to put it in its own
method and pass the method name to `#skip_callback`. That's why the
callback is now in a new method in `Import`.

Adds an empty `#notify_parent` method in `Import`. For now this doesn't
do anything, but eventually it will be filled in to perform the actual
notification. I this changeset, all we're doing is setting up the
connecting logic to notify the right things from the Cron job.

import_spec.rb:
Remove the `.class_name` validation because we removed that previously
in `Import`. The `belongs_to` is now a polymorphic association, with no
class name specified.

parent_import_notifier_spec.rb:
Needed to use `create` instead of `build_stubbed` in a lot of these
cases so that I could validate the query. Really don't like this because
now this set of tests is SUPER SLOW. If you have any ideas for how to
speed it up, let's do that.

Refs #3511
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A new service, `ParentImportNotifier`, will be called by a Cron job
every 5 minutes. This service will query all finished sub-imports that
haven't yet notified their parent, and tell them to do so.

factories/workbench_imports.rb:
Add a `WorkbenchImport` factory. This is currently incomplete. We'll
want to correctly initialise the `file` attribute eventually.

import.rb:
factories/imports.rb:
In order to get the test setup to work correctly, we skip the
`before_create` callback on `Import`. This is because that callback
initialises `status` to "new". We want to be able to set any status
value in our tests to test things properly. Thus the callback messes
with our buttermilk. For all imports created by the factory, skip this
callback. In order to skip the callback, I had to put it in its own
method and pass the method name to `#skip_callback`. That's why the
callback is now in a new method in `Import`.

Adds an empty `#notify_parent` method in `Import`. For now this doesn't
do anything, but eventually it will be filled in to perform the actual
notification. I this changeset, all we're doing is setting up the
connecting logic to notify the right things from the Cron job.

import_spec.rb:
Remove the `.class_name` validation because we removed that previously
in `Import`. The `belongs_to` is now a polymorphic association, with no
class name specified.

parent_import_notifier_spec.rb:
Needed to use `create` instead of `build_stubbed` in a lot of these
cases so that I could validate the query. Really don't like this because
now this set of tests is SUPER SLOW. If you have any ideas for how to
speed it up, let's do that.

Refs #3511
</pre>
</div>
</content>
</entry>
</feed>
