File CRUD operations

* File create, delete, and get added.
* #get still needs a way to get the body and metadata at the same
   time. But also other response headers. May need a separate object for
   this–possibly a library-specific response object
* Not pleased with how Client#request is growing in complexity to handle
  various edges. More abstraction needed there.
Files too then.

On Thu, Jul 31, 2014 at 3:13 PM, Ash Wilson <notifications@github.com>
wrote:

>>          options
>>        )
>>      end
>>  
>> -    # Factory for `Redrax::File`s. Does *not* make an API call.
>> -    # @return [File] the newly created `Redrax::File`
>> -    def [](name)
>> -      File.new(client, container, name)
>> +    docs "http://docs.rackspace.com/files/api/v1/cf-devguide/content/PUT_createobject_v1__account___container___object__objectServicesOperations_d1e000.html"
>> +    # Creates an object in Cloud Files
>> +    # @param body [String] The content to place in the Object in Cloud Files.
>> +    # @param args [Hash] Accepts:
>> +    #   * metadata: A Hash of key-value pairs to store as metadata on the Object
>> +    #   * headers: Other non-metadata headers as supported by the API (see api_doc)
>> +    def create(container_name, file_name, body = nil, args = {})
>> +      client.request(
>> +        method:   :put,
>> +        path:     "#{container_name}/#{file_name}",
> We'll need to URL escape these. Because I guarantee @rgbkrk *will* create a container and an object called ☃. (This applies to `Containers.create` as well.)
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/elight/redrax/pull/7/files#r15663076