KnowSheet/Bricks — pull request #13 by dkorolev (2014-12-10 12:12:02+00:00)
Title: Migration AlohaStatsClient -> Bricks + a lot of things.

Hi @deathbaba

I'll call the night here and continue tomorrow. Review appreciated. Here's where I got to:

1. Migrated Apple-specific HTTP client code from ```AlohaStatsClient``` into ```Bricks```.
2. Organized ```bricks```' directory structure. Also moved in a few components: scoped guard and write file to string.
3. Since most HTTP client preparatory work is done in the outer wrapper supporting various implementations, made the Apple-specific one as short as possible. Even merged those source files.
4. Tweaked the template-based implementation of HTTP client invocation to still support the clean syntax we invented, but allow for injection of various implementations.
5. Added a (still dummy) POSIX implementation alongside the Apple one.
6. Added header guards to choose one or another.
7. Made sure both Mac and Linux build the project successfully.

State of the art:

1. Builds and tests pass on Mac.
2. Builds with dummy HTTP client, thus tests do not pass on Linux.

Blockers:

1. To have the POSIX implementation compatible with the Apple one, I'll have to 1) extract protocol, domain name, port and URL, and 2) resolve the domain. Worth doing (unless we decide to make calling conventions stricter, which I'd be against)
2. I still have to allow running tests on multiple typed implementations side-by-side.

Plan:

Let's sync up in the morning. If I wake up too early, I'll probably try to connect a ```curl```-based Linux implementation as the POSIX one to unblock us.

I stand by my word that adding Cereal is half an hour task once the above is done. Looking forward to it tomorrow.

Thanks,
Dima