rokka-io / rokka-client-php-cli Goto Github PK
View Code? Open in Web Editor NEWSimple CLI to access the rokka.io service
Home Page: https://rokka.io
License: MIT License
Simple CLI to access the rokka.io service
Home Page: https://rokka.io
License: MIT License
generate the .phar and upload it to the github releases.
replace composer config --unset platform.php
with a config setting the php version to the lowest supported so that we generate the correct .phar.
also drop the composer.lock file from git at this point.
remove all deprecated commands / options before we release 2.0
cli: #31
bundle rokka-io/rokka-client-bundle#7
the app bootstrap should check the configuration and if no credentials are set only allow the commands that make sense to be executed in that case. probably also have a command to interactively set up the configuration with known values.
it would be nice to have a command that verifies that the configuration works, connecting to the server and checking if it can see the default organization.
move stack cloning operation to ApiHelper (and move that to the library?), then use that from the stack clone command. allow the command to specify a comma separated list of stacks to clone, or just --all to clone all stacks.
should we do the same with the image clone command?
(also on the rokka-client-php library)
the README.md should have an Installation section right after the introduction. i guess its just download the .phar, but that should be said explicitly. also that its not meant to be included in your project but used stand alone, to avoid confusion.
many commands check if the specified (or configured default) organization exists. some also check if the image exists. it would be a lot better if the api library would throw proper exceptions instead of just vomiting a guzzle exception at us. then we could stop first doing a call to the api and instead catch OrganizationNotFoundException / StackNotFoundException / ImageNotFoundException and display a nice message for those, while not hiding other problems (connection, credentials etc)
In the readme, it says:
run bin/rokka-cli.php
But after a fresh install, there is not bin folder
vagrant@zebra:/vagrant$ mkdir rokka-cli && cd rokka-cli
vagrant@zebra:/vagrant/rokka-cli$ composer require rokka/client-cli
...
symfony/dependency-injection suggests installing symfony/expression-language (For using expressions in service container configuration)
symfony/dependency-injection suggests installing symfony/proxy-manager-bridge (Generate service proxies to lazy load them)
symfony/console suggests installing symfony/event-dispatcher ()
symfony/console suggests installing symfony/process ()
Writing lock file
Generating autoload files
vagrant@zebra:/vagrant/rokka-cli$ ll
total 36K
-rw-r--r-- 1 501 dialout 62 Nov 18 11:58 composer.json
-rw-r--r-- 1 501 dialout 28K Nov 18 11:58 composer.lock
drwxr-xr-x 9 501 dialout 306 Nov 18 11:58 vendor
Hi
When uploading an image with the php cli, the message body's hash is not correctly included in the Api-Signature. In fact the body's hash is always sha1("").
Base.php getEncodedBodyData() seems to return ("") for multipart messages.
I was trying to implement a java client for the image upload functionality. Which never worked when I accidently found out I could upload any image using the same signature, wich was generated with sha1("") as the body hash.
This might be a system wide issue, as it seems to be implemented wrong on the client and the backend side.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.