Commit Graph

259 Commits

Author SHA1 Message Date
Sebastian Thiel
3403bd1c5c fix(publish): v0.1.3
* keywords are no longer than 20 characters, which is a restriction
  cargo imposes
* don't use 'homepage' link in cargo.toml unless the homepage is
  non-empty
* Added all publish-results to mark the respective crate version

Related to #46
2015-04-07 15:19:23 +02:00
Sebastian Thiel
99f8b65f75 fix(api-version-up): version 0.1.3
* builds with latest beta/nightly

Fixes #46
api-v0.1.3
2015-04-07 12:05:48 +02:00
Sebastian Thiel
91861dcb71 fix(rustup): rustc (be9bd7c93 2015-04-05)
* using std::convert
* update to latest hyper (and other dependencies)

Related to #46
2015-04-07 11:59:10 +02:00
Sebastian Thiel
919ae4d8ae fix(deps): github-pages index generation
Previously, we forgot to pull in the new type-specific dataset, which
caused the index.html.mako file to fail.
2015-03-25 14:28:59 +01:00
Sebastian Thiel
74bb79d6b4 docs(README): update to include CLI targets 2015-03-25 14:28:58 +01:00
Sebastian Thiel
a2ca1cb28e fix(version-up): check-in of latest sources
This also includes crate files to remember which
crates we have published already.

Related to #44
2015-03-25 14:26:30 +01:00
Sebastian Thiel
c7fb7c4093 fix(versionup): set the API version to 0.1.2 api-v0.1.2 2015-03-25 10:45:06 +01:00
Sebastian Thiel
e953535473 fix(versionup):incl. Result conform to standards
Related to #44
2015-03-25 10:32:34 +01:00
Sebastian Thiel
d1c97912cb feat(mkdocs): mkdocs generator works now
It can be selected for each type of program we want to build, and makes
sense for everything that is not a library.

We also tried to unify names and folders a bit more, even though there
certainly is more work to be done to be fully non-redundant.

Fixes #43
2015-03-24 18:11:12 +01:00
Sebastian Thiel
aa842bcc39 Merge branch 'refactor' 2015-03-24 12:59:29 +01: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
caaf62e51d chore(suffix):prepare dep generation to use suffix
That way, we can have multiple deps files, one per program 'type'
2015-03-24 11:57:12 +01:00
Sebastian Thiel
be7d8214c1 feat(api): api generation works once again
With the new structure, it should be easy to add CLI programs with
proper dependencies accordingly.
2015-03-24 09:38:14 +01:00
Sebastian Thiel
137ba8caf3 refactor(mako): put API relevant stuff into subdir
This is the first of many changes to come.
We try to leverage our ability to merge multiple data source into one
to abstract away what we are actually doing, and of course, to allow
sharing the majority of the code, were applicable.
2015-03-23 16:13:02 +01:00
Sebastian Thiel
d1c5bf1e4a fix(docs): remove newlines interpreted as test
When documenting mandatory arguments of a methods builder, it was
possible to document 'parts', which have a long multi-line description
with empty lines inbetween. This caused the indentation to be funny
and tricked rustdoc into thinking these are indented doc-tests.

Now we remove these empty lines, also hoping we dont encounter lines
with just whitespace in them. The latter would require a tiny update
of our regex.
2015-03-23 15:14:07 +01:00
Sebastian Thiel
e5b013e97c fix(result): remove custom Result Enum
Instead, we just use a customized `Result` tyoe and thus stick to
common Rust conventions.

Fixes #39
2015-03-23 14:57:31 +01:00
Sebastian Thiel
fca1b24cd1 fix(json-up): update json files from discovery API 2015-03-23 12:11:55 +01:00
Sebastian Thiel
4bfdc9fd01 chore(publish): make publish
We will now keep marker files to remember which crates we have published
successfully. These files are checked in to make this information
persist.

NOTE: We still don't explicitly exclude pseudo-changes in json files,
which are no real change except for a changed revision number.

Fixes #41
2015-03-23 12:11:18 +01:00
Sebastian Thiel
ea161897f5 fix(docs): typo fixes and misc. improvements
Fixes #42
2015-03-23 11:19:57 +01:00
Sebastian Thiel
6ad0c2ef79 fix(misc): whitespace and trait rename
* `ResourceMethodsBuilder` -> `MethodsBuilder`. This is now precise
   enough. Previously it was just to similar to what's now a
   `CallBuilder`
* Fixed whitespace issue in `doit()`
2015-03-23 08:49:27 +01:00
Sebastian Thiel
04f4c95688 fix(mbuild): upload size now taken properly
Previously, it would query the size from the wrong dict and obtain
the value 0 all the time. This would have made every upload fail with
`UploadSizeLimitExeeded`.
Now we obtain the actual size limit, and will ignore it if unset/0
for some reason.

Patch += 1
api-v0.1.1
2015-03-22 22:39:36 +01:00
Sebastian Thiel
3bc930ae47 fix(version-up): 0.1.0 release
* Added all APIs to source control
* upped crate version
api-v0.1.0
2015-03-22 20:30:01 +01:00
Sebastian Thiel
cd1ff18ba9 fix(cmn): upload() return value handling
Now deals with Cancellation and non-OK status codes correctly.

Fixes #18
2015-03-22 20:21:21 +01:00
Sebastian Thiel
29ee94b4c0 feat(cmn): Resumable upload implemented
With all bells and whisles. For now, we don't have a good return value
to indicate that the operation was cancelled, which needs fixing.
2015-03-22 19:56:35 +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
556906ca60 fix(docs): re-export types used by delegate
Otherwise, delegate implementation might not actually be possible.
2015-03-22 13:28:28 +01:00
Sebastian Thiel
3a9aa51949 fix(docs):better introduction and version handling
Make it cristal clear what the crate version means, and what version of
the documentation you are looking at. Also do this in the README file.

Assure that 'Google' is capitalized.
2015-03-22 12:33:43 +01:00
Sebastian Thiel
d26cf77406 feat(mbuild): use of oauth2::Scheme
That way, we improved our API, reduced code bloat, and are very clear
about the what we do for Authorization.
2015-03-22 12:07:40 +01:00
Sebastian Thiel
030c40d269 fix(cargo): repository/source-code link
Previously it pointed to a timestamp file. Unified repository
source code link generation, and simplified 'deps.mako'.

Related to #38
2015-03-22 10:51:06 +01:00
Sebastian Thiel
8ad316bda3 feat(cargo): crate version +<revision>
That way, crate names reveal exact inforamtion about the contained
API revision.

* crate version: code gen version
* +<revision> (build-metadata): exact version of API schema

Fixes #38
2015-03-22 10:40:59 +01:00
Sebastian Thiel
57e0f06583 feat(mbuild): check upload size against max-size
Fixes #37
2015-03-22 10:12:04 +01:00
Sebastian Thiel
c1d09e6d57 docs(lib): minor phrasing changes
Also removed superfluous 'extern' for tests
2015-03-22 09:32:08 +01:00
Sebastian Thiel
f73204c6b9 fix(cmn) re-export important types from cmn
That way, 'cmn' becomes our private module. All URLs were updated
to reflect that.

This commit also contains an early implementation of the
'transfer_status' method, which will require plenty of work.
2015-03-22 09:26:49 +01:00
Sebastian Thiel
ffef7dda57 feat(dlg): make actual store_upload_url() call
We also assure to call only as often as we have to, keeping some state
between the loops accordingly.
2015-03-21 18:44:08 +01:00
Sebastian Thiel
9ea85273cd feat(mbuild): improved delegate calls
The delegate will be asked for an upload URL, that he may store during
yet another call.
2015-03-21 18:25:59 +01:00
Sebastian Thiel
4bf280079e fix(mbuild): simplification and cleanup
* renamed `*MethodsBuilder` type to `*Methods` type
* renamed `*CallBuilder` type to `*Call` type
* greatly simplified `doit()` signature if uploads are involved
* pass `auth` to upload helper
2015-03-21 16:27:41 +01:00
Sebastian Thiel
307d3f487c feat(mbuild): resumable-upload infrastructure
Layout the `ResumableUploadHelper` and implement the entire logic
with the mbuild renerator.

All that's left to be done is to implement the 'chunked upload' method.

The borrow checker helped me to prevent a bug as well.
2015-03-21 13:55:15 +01:00
Sebastian Thiel
98f4bbab47 fix(lib):schema_markers() accessed map incorrectly 2015-03-21 10:35:20 +01:00
Sebastian Thiel
80161f72be fix(types):prune unused and ToParts trait
* do not emit unused types. Sometimes though, rustc doesn't seem to
  detect that attributses are actually used
* ToParts trait is used and implemented only when needed.

Linters are back to 'normal'.

Fixes #35
2015-03-21 10:23:40 +01:00
Sebastian Thiel
0152138e0c fix(docs): pretty names for methods and resources
Previously, it was possible for methods to have '.' which showed up
in the documentation. Now these are replaced with ' '.
2015-03-21 08:34:30 +01:00
Sebastian Thiel
5ff22851fa fix(apis): exclude those with recursive schemas
They currently don't compile as Box 'serde' is not supported.
See https://github.com/erickt/rust-serde/issues/45.

Related to #34.
2015-03-21 08:20:06 +01:00
Sebastian Thiel
9abf0eb64a chore(youtube): add latest version
* json takes delegate errors
2015-03-20 20:11:58 +01:00
Sebastian Thiel
8d9f175f91 fix(types): make recursive types possible
Must be `Option<Box<T>>` now, whereas a simple `Box<T>` worked
previously. Anyway, serde can't decode/encode Boxes yet, so
plus1 was removed from the list of APIs to build.

Related to #34
2015-03-20 20:10:16 +01:00
Sebastian Thiel
0823dec75c feat(doit): don't crash if json decode fails.
Instead, tell the delegate about it and return the error.

Fixes #33
2015-03-20 19:31:19 +01:00
Sebastian Thiel
8bb2166da0 feat(types): mark unused types with marker trait
For some reason, some google APIs define types they never use. We now
mark them, just because we can, to show our superiority ;) ;) ;) :D .
2015-03-20 18:31:46 +01:00
Sebastian Thiel
10dfeeb1aa fix(name): MethodBuilder -> CallBuilder
Find-and-replace. It seems to build and work correctly, still
2015-03-20 18:20:50 +01:00
Sebastian Thiel
97da926e28 fix(readme):improved markdown for library overview
And names of free methods, which previously contained '.'. These are
now spaces.
2015-03-20 18:15:39 +01:00
Sebastian Thiel
bb75c5b698 feat(schema): support for 'variant' schema
Documentation links, at one spot, have been updated as well.
The variant schema is represented natively as enum, it all looks
very good.

Json has been taken care of as well ... .
2015-03-20 18:11:29 +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