Commit Graph

445 Commits

Author SHA1 Message Date
Sebastian Thiel
8aba8a5c75 Merge branch 'master' into syntex 2015-06-19 12:57:12 +02:00
Sebastian Thiel
1f9dc06a57 chore(travis): explicitly use stable rust
This would be the default, but I want to be sure everyone sees
stable is what we need.
2015-06-19 12:56:34 +02:00
Sebastian Thiel
a9e0be6583 fix(cli): work on stable
CLI was slightly adjusted to not use unstable features.
Fortunately, there is no serde magic happening, which allows
us to keep it simple without using a build script.
2015-06-19 12:55:00 +02:00
Sebastian Thiel
2ad8d887cd fix(api): minor fixes
* Mime crate must be used in the same version hyper uses
* made attempted move a borrow
2015-06-19 11:41:29 +02:00
Sebastian Thiel
5483e32832 fix(api): expanded header implementation
Now it compiles to the point where `Mime` appears as duplicate type,
for some reason.
2015-06-19 11:34:57 +02:00
Sebastian Thiel
b0a41c4e78 fix(api): first big step towards syntex
Even though there is a bug that caues {} to be used in stead of
(),
when exanding macros, which causes syntax errors that we have to
workaround, it's not a real issue.

What's happening additionally is missing hyper macros, which
now have to be expanded manually. Shouldn't be a problem,
pretty-printing when compiling is made for just that ;).

No, it's sad that `include!()` works so badly, it makes
using serde so difficult ... it's no fun i must say.

Just for stable ... I am not sure if it is worth it."
2015-06-18 22:51:17 +02:00
Sebastian Thiel
5c798d5fb6 docs(README): information about unstable rustc
Explicitly state that a nightly or beta rust toolchain is required
for successful builds.

Closes #120
2015-05-26 13:19:22 +02:00
Sebastian Thiel
267868cea3 Merge branch 'master' into next 2015-05-18 10:49:24 +02:00
William Orr
ed0debe999 chore(dependencies): bump hyper dep to 0.5.0
google-apis-rs no longer builds with hyper 0.4.0, due to the use of a
now-undefined macro
2015-05-18 10:31:17 +02:00
Sebastian Thiel
129fd38e00 imp(CLI): disallow empty values explicitly
[skip ci]
2015-05-18 10:19:38 +02:00
Sebastian Thiel
b858286f6e Merge branch 'worr-bug/clean-target'
[skip ci]
2015-05-18 10:11:33 +02:00
Sebastian Thiel
d9ed001b46 fix(make): clean was depending on unknown targets
There are no per-program-type docs clean, just made it depend on
docs-all-clean.

Also added the `docs-api|cli` target to the generated per-program-type
make help. It was just missing, even though it existed.
2015-05-18 10:11:02 +02:00
William Orr
bcf90cbcc8 fix(make): fix clean target for docs/cli
clean-all-docs and clean-all-cli aren't valid targets. The current mako
template causes `make clean` to abend reporting that it can't make these
targets.
2015-05-17 14:18:51 -07:00
Sebastian Thiel
2cc4807234 fix(API): URL substitution handling
Previously we would remove the wrong parameters when attempting to
remove only those parameters that have been used in the URL
substitution.

The code we have now is more idiomatic and appears to be removing the
correct parameters.

Closes #114
[skip ci]
2015-05-13 10:11:20 +02:00
Sebastian Thiel
ca36dbc505 feat(config): improved structure setter code
We save about 30% of CLI code just because we offload the work of
settings structures into serde, building a generic `json::Value` to
contain all the data, and then let serde do the deserialization for us.

All we need for that is some information we let the generator provide
and translate it into the runtime.

Closes #111
2015-05-13 08:45:57 +02:00
Sebastian Thiel
d0b69af413 refactor(config):OK version of json value setter
However, we don't set the correct field names yet, and are lacking
a remapping of CLI field names to struct field names before any
testing makes sense.
2015-05-13 07:51:08 +02:00
Sebastian Thiel
464394af22 refactor(config): handle recursive mut json values
* recurively drill down a mutable, recursive enumeration, without borrow
  checker issues. The obvious solution doesn't work, but should.
  Stackoverflow ?
* infrastructure to set actual value, with support for ararys, pods and
  hashmaps
2015-05-12 19:48:37 +02:00
Sebastian Thiel
e434563215 chore(cargo): compilation without local overrides
Also checked in code for groupsmigration to allow others to test it
simply by checking out the right commit.
2015-05-12 17:21:57 +02:00
Sebastian Thiel
f83dff672b refactor(config): bring in all required field data
Previously we only knew the type as string, now we have enums and
additional type information, like whether or not it's a POD.

However, borrow-checker doesn't like the current code, will need more
work.
2015-05-12 12:17:36 +02:00
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