Commit Graph

22 Commits

Author SHA1 Message Date
Sebastian Thiel
2f3b2d24ce fix(CLI): simple and resumable upload works
* fixed boundary syntax of multi-part message. Was --BOUNDARY, now is
  --BOUNDARY--
* Fixed ContentRange parsing and serialization. We actually managed
  to break it last time we tried to update it to match the Go
  implementation.
* fixed uploadType header parameter. It's based on chosen protocol and
  whether or not the method supports multipart operation for the given
  protocol.

Related to #76
2015-04-25 18:45:37 +02:00
Sebastian Thiel
1dd1fcf4b8 feat(CLI): field cursor complete and untested
Tests just need to be run, and of course, the impementation might need
fixing.

Related to #64
2015-04-16 15:25:44 +02:00
Sebastian Thiel
c9c3ad011f test(cursor): initial test
Implementation has to follow next
2015-04-16 14:25:45 +02:00
Sebastian Thiel
fa011315c3 fix(test): add rustc_serialize to test-crate
A top-level `cargo test` didn't work anymore thanks to a missing
mention of rustc_serialize.

[skip ci]
2015-04-15 09:04:16 +02:00
Sebastian Thiel
b9a469c0a4 fix(cmn): use bytes=... when sending as well
Previously, `bytes=` was just parsed, but not sent to the server.
This change is motivated by a similar change in this commit:
http://goo.gl/AvyvLb
2015-04-11 09:31:23 +02:00
Sebastian Thiel
dd1d191966 fix(publish): v0.1.4
* macro 'alias' was renamed to 'rename'
* fixed `cargo test` on main project

The latter pointed me to the serde issue, which would have made
everything fail when actually used to communicate with google servers.
2015-04-07 15:53:30 +02:00
Sebastian Thiel
cefd606b53 feat(make): cli depends on API, generically
This allows us to build efficiently. CLI programs can now have their
own cmn.rs implementation, which we can test standalone with
`cargo test`.

The primary makefile currently just explicitly pulls in the type-*.yaml,
one day we could possibly put it into a loop.

Fixes #11
2015-03-24 12:56:24 +01:00
Sebastian Thiel
065753cc3a feat(cmn): implement query_transfer_status()
The delegate logic is implemented and seems sound.
It's somewhat funny that after all this back and forth, all we get
is a valid start position for the upload.
2015-03-22 17:58:34 +01:00
Sebastian Thiel
42a76e4655 feat(cmn): ContentRange header (parse and format)
Now we are able to send the transfer-update requests and implement the
actual chunk logic.
2015-03-22 16:24:39 +01:00
Sebastian Thiel
55978ff9a2 feat(json): Option<_> in schema only if needed
This means that only part fields will be optional.

Fixes #32
2015-03-20 16:43:13 +01:00
Sebastian Thiel
9f719dd928 feat(json): added field aliases, were needed
This makes sure our fields can properly be decoded.
2015-03-20 14:16:06 +01:00
Sebastian Thiel
d3bb130be0 feat(lib): use serge instead of serialize
However, for some reason, the `Serialize/Deserialize` macros don't work
for me, even though they work just fine in the respective tests of
the serge crate. What am I possibly doing wrong ?
2015-03-20 11:28:09 +01:00
Sebastian Thiel
9d401f5486 feat(doit): optimizations and simplification; seek
* MultiPartReader is using match to handle state, reducing unnecessary
  calls to 0 in that regard.
* Fixed seek() calls on readers, assuring they are reset to start each
  time the loop is done.
* both media-parameters now use `ReadSeek` streams.
* Use `seek()` to figure out size, simplifying the interface.

Closes #17
2015-03-19 07:30:43 +01:00
Sebastian Thiel
6b2301351f fix(common): MultiPartReader test case
Simple fixes, required as its API changed
2015-03-18 22:18:17 +01:00
Sebastian Thiel
e53e23a893 fix(common): MultiPartReader now works correctly
The state-handling was incorrect, causing it to not handle small reads
correctly.
However, this is working nicely now.
2015-03-18 21:09:48 +01:00
Sebastian Thiel
b127df17b0 feat(common): multibytereader single byte test
It shows that we actually don't handle our state correctly.
The first test which reads to string obviously uses a big-enough buffer.
2015-03-18 19:05:07 +01:00
Sebastian Thiel
8db346b8b0 feat(common): MultiPartReader is working.
Something that is missing is a single-byte read test
2015-03-18 18:48:03 +01:00
Sebastian Thiel
71c827b306 feat(doit): initial part writing
We are a state-machine, and handle parts of it correctly.
However, we don't yet write the boundary at all, and could improve
our use of match.
2015-03-18 17:53:39 +01:00
Sebastian Thiel
432faa275f feat(dev): spike to see how delegate can be work
To avoid an additional type parameter, we will use dynamic dispatch
for the delegate.

Having function overrides at some point seems like an excercise better
left for version 1.1 ;)
2015-03-09 11:18:44 +01:00
Sebastian Thiel
e164cf7366 feat(docs): Traits now show up as part of lib
Previously, they were in an extra, oddly named crate.
Now we just make it a part of our generated codebase.

That way, traits, and common code, shows up as part of the library.
Fair enough.

This also means that the types ar not reusable.
Maybe a mixed-mode can be used if that is desired.
2015-03-03 10:02:40 +01:00
Sebastian Thiel
c1eeee0591 feat(traits): add marker traits to schema types
Based on their involvement in activities.
It nearly works perfectly.
2015-03-03 09:25:42 +01:00
Sebastian Thiel
475163ec29 feat(mako): now sets up entire project structure
That way, we have a common library to pull in from the main repository,
and a space for testing new code (in a partial implementation).

Next there will be generated object structures.
2015-03-02 16:50:22 +01:00