feat(CLI):required arg parsing + first doit() call

We are parsing required scalar values and handle parse-errors correctly,
to the point were we make a simple, non-upload doit() call.

It shows that we seem to build invalid calls, for now,but that's nothing
we can't fix once the time is ripe.

Next goals will be related to finalizing the argument parsing code.

Fixes #60
This commit is contained in:
Sebastian Thiel
2015-04-14 17:17:21 +02:00
parent d6919f1eb6
commit e34e24e049
7 changed files with 87 additions and 18 deletions

View File

@@ -3,6 +3,11 @@ api:
# exclude APIs which currently don't build correctly. State the reason for the exclusion as well
# to allow looking at it at a later point.
-
terms:
# how to actually do something with the API
action: doit
# when a resource is supposed to be uploaded
upload_action: upload
# Contains values shared among all API implementations
directories:
# directory under which all generated sources should reside

View File

@@ -1,10 +1,5 @@
api:
base_path: "etc/api"
terms:
# how to actually do something with the API
action: doit
# when a resource is supposed to be uploaded
upload_action: upload
properties:
# additional fields specified by the user
params: '_additional_params'

View File

@@ -26,6 +26,6 @@ cargo:
keywords: [cli]
is_executable: YES
dependencies:
- docopt = "*"
- docopt_macros = "*"
- docopt = "= 0.6.59"
- docopt_macros = "= 0.6.59"
- rustc-serialize = "*"