File! Post! MONSTER!
Uses an http post request to send a file to a url.
Install
gem install file_post_monster --source http://gemcutter.org
Buy the ticket, take the ride
Well, this whole project has been hacked together pretty quickly, so at the mo it wont give you any feed back on success, and will just dump the default stack trace to the console on failure. Ill be working on this more in the coming weeks, so do stick around.
Usage
Use the post_file command from a shell…
$ post_file -f my_nice_file.txt -a http://monster/give_me_file
This will send the file ‘my_nice_file.text’ using an http POST to monster/give_me_file using the request parameter file.
Ohhh, here are some options…
-f, --file=PATH File to post (e.g. myfile.txt)
-a, --address=ADDRESS Address to post to (e.g. http://myfileservice.com/recieve)
-p, --param=PARAM_NAME Name of the parameter used for the file in the post request (e.g. file_param), DEFAULT => file
-l, --local_param=PARAM_NAME Name of a parameter used to post the exact local path with (e.g. local_file_path)
-n, --nesting=PARAM_NEST Parameter name you would like other parameters to be nested in
-h, --help Show this help message.
Thats it really!
Love Rob.
License
Copyright © 2010 Robert Oles
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.