Commit Graph

426 Commits

Author SHA1 Message Date
Sebastian Thiel
a2dd71451d feat(config): basis for simplified value setting
Previously we would set static structures manully, using complex cases
and utility functions. Now we setup the foundation to allow setting
a generic `json::value::Value` instead, which can later be deserialized
into the target structure.

Related to #111
2015-05-12 11:17:42 +02:00
Sebastian Thiel
a66f1ad728 docs(README): added dev-diary episode 3
[skip ci]
2015-05-12 07:12:48 +02:00
Sebastian Thiel
2ca0529297 fix(rustup): dc630d01e 2015-05-09
* Vec::add was removed ... which forces me to write 4 lines instead of
  one very readable one :(.
  Not everything is to the better here, even though I can imagine they
  did it to prevent people from thinking this is a cheap operation.

[skip ci]
2015-05-11 10:58:00 +02:00
Sebastian Thiel
ee84fefb4a fix(rustup): deal with rustc lifetime issue
Related to #109
2015-05-11 10:56:36 +02:00
Sebastian Thiel
5e5f0dcc66 chore(osx-deployment): fix tar-handling
Previously it would fail as '*' was in fact not substituted by the
subshell. Now I just take the brutal route, using find.

[skip ci]
2015-05-11 06:32:30 +02:00
Sebastian Thiel
296debda85 chore(README): typo + fixed yaml references
[skip ci]
2015-05-10 21:11:11 +02:00
Sebastian Thiel
9ba25af48b chore(changelog): change wording
[skip ci]
2015-05-10 21:07:15 +02:00
Sebastian Thiel
23119a06d2 chore(changelog): updated for cli v0.2.0
[skip ci]
cli-v0.2.0
2015-05-10 20:57:51 +02:00
Sebastian Thiel
383595c44e docs(CLI): added Download information
That way, it's easy to obtain the respective precompiled binary, as
well as seeing the source-code.

Overall, it makes promoting the tools easier as the CLI docs can be
linked directly.

Closes #108
[skip ci]
2015-05-10 19:40:25 +02:00
Sebastian Thiel
9e64d1bd10 fix(deployment): limit tar.gz to executable
Previously it could re-pack tar-files and mess everything up.

[skip ci]
2015-05-10 19:00:25 +02:00
Sebastian Thiel
e92f440d9b imp(index.html): download links to tar.gz files
That way, we save bandwidth and preserve the executable bit of the
respective program.

Closes #107
[skip ci]
2015-05-10 18:51:08 +02:00
Sebastian Thiel
6bca4b75d9 docs(README): detailed deployment instructions
Related to #107
[skip ci]
2015-05-10 18:09:33 +02:00
Sebastian Thiel
ad6dd7758e chore(bash): move all scripts into src/bash
That way, they are more official than hidden scripts dumped in the
project root.

[skip ci]
2015-05-10 18:09:00 +02:00
Sebastian Thiel
be117767a1 fix(deployment): osx-tar files without directory
Previously, they contained the parent directory, which wasn't intended
and was different from the plain-layout dictated by the linux version
of the script.

[skip ci]
2015-05-10 17:34:24 +02:00
Sebastian Thiel
1d44d794eb chore(deployment): script to deploy for download
A fully untested utility script allows to unpack a tar file previously
created from `*-depoly.sh` scripts to a suitable location to be
compatible with the downloads links we generate in the documentation
index.

Related to #107
[skip ci]
2015-05-10 17:22:40 +02:00
Sebastian Thiel
3e70a89674 chore(versionup): publish APIs @v0.1.7
* keep track of publish through version files
* updated clog configuration and changelog (automatic)

[skip ci]
api-v0.1.7
2015-05-10 13:51:24 +02:00
Sebastian Thiel
9e6c9537a5 chore(code-up): latest version of all code 2015-05-10 12:07:12 +02:00
Sebastian Thiel
69b12104a9 imp(index.html): DL title contains os-name
That way, it's clearer, besides the icons themselves, which OS you are
downloading for.

Related to #106
[skip ci]
2015-05-10 11:43:02 +02:00
Sebastian Thiel
52027c6db5 feat(index.html):added download links (osx,ubuntu)
All assets are configured via shared.yaml and are located elsewhere in
the web. This could lead to broken assets at some point, but I am just
risking it for know, knowing that it's easily done to have local
resources.

Closes #106
[skip ci]
2015-05-10 11:03:36 +02:00
Sebastian Thiel
0e6605d7a4 feat(index.html): added back-link to crates.io
* url is created per-API and features a nice crates image coming
  from githubusercontent.

Closes #105
[skip ci]
2015-05-10 09:10:25 +02:00
Sebastian Thiel
5c284e1c41 refactor(index.html): non-redundant data access
Previously we would define information about the program types
in two places, once for the index, and once per program type.
Now within the index.html, we just load the respective program type
information to have access to the latest at all times.

Closes #104
[skip ci]
2015-05-10 08:37:05 +02:00
Sebastian Thiel
e86e55cae7 imp(API): improved display of BadRequest
Previously you would only see "BadRequest ... " without the information
that would actually help you to understand what the cause of the issue
is.
Now we will print all the information we have, accordingly, which
greatly improves usability.

Closes #103
[skip ci]
2015-05-09 19:15:16 +02:00
Sebastian Thiel
fff466f6bc docs(CLI): after_help url for method scmds
That way, whenever the extended help of a method (e.g. apis get-rest)
is queried, you can easily jump to the online docs to get details about
required data-structures or parameters for instance.

[skip ci]
2015-05-09 14:36:40 +02:00
Sebastian Thiel
15daf311ea refactor(API): use json_tools::IteratorExt
That way, we can invert the flow and produce more idiomatic code.
[skip ci]
2015-05-09 09:57:26 +02:00
Sebastian Thiel
5894c8163a imp(CLI): remove null in pretty-printed json
Without all that clutter, it's so much more enjoyable to read the
output.

The implementation is based on a suggestion of @erickt, which is
converts into a json::Value (able to represent any json structure),
on which the filtering is applied.

If we should ever implement pretty-printing in json-tools, we might
still consider using these capabilities instead, as we would avoid
building potentially large datastructures, all we would need is
a sufficiently large destination buffer which is a single alloc and
a consecutive region in memory.

Closes #102
[skip ci]
2015-05-08 19:12:45 +02:00
Sebastian Thiel
26314e743e imp(API): faster null-value removal
Previously reserialization of token streams with removed null values
was performed on a byte-per-byte basis, which was quite inefficient
to say the least.

Now it uses `io::copy` to copy in chunks of 65kb, which makes out
our throughput and should deliver about 150MB/s at least.
2015-05-08 19:06:38 +02:00
Sebastian Thiel
3efa4f2b12 fix(API): filter null values of requrest structs
Some servers, like youtube, reject null values possibly thanks to
the reliance on parts. Now we are filtering them (in a very inefficient,
but working way), which seems to be fine with the servers.

Effectively, we seem to be able now to upload videos ... .

More testing required !
2015-05-08 12:38:59 +02:00
Sebastian Thiel
3fe2732a01 fix(compat): upgrade to hyper v0.4.0
It was basically just a find-and-replace to adapt to the changed names
of Error and Result types.
2015-05-08 11:52:28 +02:00
Sebastian Thiel
8375dd0508 chore(CLI): remove special clap configuration
In latest clap, it's all fixed
2015-05-06 21:49:42 +02:00
Sebastian Thiel
2485343caa refactor(CLI): use arg_enum! clap-rs macro
That way, we get a better (case-insensitive) implementation of `FromStr`
which reduces the amount of code we have to maintain.

Closes #101
[skip ci]
2015-05-06 11:58:45 +02:00
Sebastian Thiel
294da41a30 chore(CLI): special clap configuration
Turn off default features to disable overly red first version
of otherwise very promising ascii-coloring support.

It's good to see that thanks to yaml, that flexibility is easily
achieved without altering any generator code.
2015-05-06 11:38:40 +02:00
Sebastian Thiel
ef63790422 refactor(CLI): better vector building
Instead of using multiple lines to add vectors up involving iterators,
I just add slices together. This should produce less, and possibly
faster machine code, with less ascii code.

Downloads tested with drive2, and are verified to be working !

Close #97
2015-05-06 11:04:19 +02:00
Sebastian Thiel
f1fe6bac01 refactor(CLI): move global params to runtime
Global params were repeated per method, even though they were global,
per API. Now they are kept in vectors and used at runtime, accordingly.
We save a little bit of code, have simple matches, and less repition.

It's unclear if this reduces the size of the binary though ... or the
compile times, as the extra loop is an extra loop after all ;).

Still need to test the download mode using drive1

Related to #97
[skip ci]
2015-05-05 21:44:27 +02:00
Sebastian Thiel
9274938f9f fix(CLI): completed list of parameter names
Previously the 'did-you-mean' functionality only knew the global
paramters, but not the method-local ones.
2015-05-05 20:46:45 +02:00
Sebastian Thiel
bbab1f2e38 refactor(CLI): use raw strings for argparser
That way, we should be save from contained '"' characters, and whatever
else.

Closes #100
2015-05-05 20:02:26 +02:00
Sebastian Thiel
362781e601 chore(README): added dev diary episode 2 link 2015-05-05 09:02:39 +02:00
Sebastian Thiel
5ebb34ed58 chore(contributing): added information about imp 2015-05-05 08:59:10 +02:00
Sebastian Thiel
ab2290192e chore(clog): add support for 'imp'
'imp' will resolve to 'improvements' in the changelog.
A new feature supported in clog v0.5.0
2015-05-05 08:49:18 +02:00
Sebastian Thiel
b27c990db8 fix(API): simplified call to form_urlencode
It now supports more generic inputs, as suggested in a lenghty
dialog on a corresponding github issue.

Required to build with >=0.2.33
2015-05-05 08:48:25 +02:00
Sebastian Thiel
fb80b056ac chore(clog): added changelog
Powered by [clog](http://goo.gl/QUpyeL)

[skip ci]
2015-05-02 15:35:59 +02:00
Sebastian Thiel
96415d17ca feat(CLI): did you mean for struct values
* functionality is cursor-aware, and fixes the actual string the user
  passed in. That way, it is made very clear how the suggested value
  is to be used.
* it's a known weakness of the implementation that it operates on a
  flattened list of field names, and thus may make nonsensical
  suggestions.
* added punctuation to all errors

Fixes #67
[skip ci]
2015-05-02 14:07:28 +02:00
Sebastian Thiel
d2a4e2ff8b fix(CLI): added latest reference CLI code
Just to have something to link to
2015-05-02 10:22:55 +02:00
Sebastian Thiel
89432cc646 fix(CLI): gate usage of upload_media_params
Previously the local stack variable would be used even though it
wasn't initialized as there were no upload flags. Now this only
happens if there are media params.

[skip ci]
2015-05-02 09:57:08 +02:00
Sebastian Thiel
75b80de3c6 feat(CLI): -u <mode> <file> parsing
* As `possible_values()` applies to all arguments, we cannot use it
  anymore but have to check the UploadProtocol type ourselves.
  Besides that, switching to the latest `clap` simplified our lives
  a little.
* ajusted docs to not enforce using `-r` all the time

Fixes #92
[skip ci]
2015-05-01 20:00:25 +02:00
Sebastian Thiel
c346645fc9 fix(API): let delegate forget uploaded urls
When uploading using the resumable protocol, we are now telling the
delegate to forget the previously stored URL after successful upload.
Previously it would have tried to return such a URL and thus made
the system retry uploading a file that was already uploaded.

Fixes #85
[skip ci]
2015-05-01 16:24:31 +02:00
Sebastian Thiel
d8acd607ae chore(lint):disabled rust linter,but configured it
It's usually too slow to run it, but besides that it's very practical
to have !

[skip ci]
2015-05-01 15:39:53 +02:00
Sebastian Thiel
bf6a2ba60c fix(CLI): handle repeated required strings
In a single case we wouldn't properly pass on string arguments that
were repeated. Now we handle them with a nice one-liner.

Fixes #96

[skip ci]
2015-05-01 15:22:59 +02:00
Sebastian Thiel
153324ebcc fix(CLI): 'about()' text for main commands
It shows up in the help, and makes it easier to navigate the command
tree without bringing up the html documentation.

Fixes #95
[skip ci]
2015-04-30 17:30:45 +02:00
Sebastian Thiel
94c821e09d fix(CLI): adjust JsonTokenStorage to yup-oauth
Signature of `set()` changed to return a `Result<(), _>` instead of
an `Option<_>`.

Related to https://github.com/Byron/yup-oauth2/issues/5
[skip ci]
2015-04-30 17:14:12 +02:00
Sebastian Thiel
2f200217f9 fix(CLI): unified error handling
* Use `Result` everywhere, instead of Option or tuples
* Properly handle error occurring after the dry-run. We do it in an
  extensible way, in case we need to do more than handle invalid output
  files at some point. Output files that could not be opened will now
  result in a nice error message with all the information we have.

Fixes #66
2015-04-30 16:31:49 +02:00