02-a: Rename spec/controllers to spec/features for organization.
02-a: Add file chooser to root page.

* In spec file: added ":type => :feature do" to allow capybara methods in rspec tests.
02-a: Filechooser has an upload button.

* Ran into an issue with Capybara's have_field selector. Apparently it doesn't work when the input field has a type of 'submit'. My workaround here is to use css to to check for the field.
02-a: Root page has a file uploader form.
02-b: Upload form posts to '/upload' route.

* Works with a valid file. Validations are needed for both posting invalid files, and clicking 'upload' without selecting a file.
02-b: Add resources folder with test video to spec file.

* This folder should contain resources for testing file upload.
02-b: Add client-side validation for presence of upload file.

* I started out trying to test this with Jasmine, but backtracked, as it was turning into a rabbit hole. There are a few things that I need to learn about testing events to make this work.
02-b: Refactor client-side validation for presence of file.
02-b: Upload route raises a 406 if the upload filetype is not whitelisted.

* For MVP, I chose to go with a single filetype, mp4. This should easily be extendible by adding additional filetypes.
02-b: Add invalid.txt to spec resources.

* This file can be used to test filetype validation on the uploads.
02-b: Add 406 page for invalid upload.

* This will be called if the user tries to upload a non-whitelisted filetype.
02-c: Add VideoConverter class with method #makeGif.

* This method should be called when a user uploads a video.
02-d: Add copy_to_temp_input to VideoConverter class

* I explored the idea of just using the tempfile created on upload to perform the transformations, but settled on the idea of copying it to a temp directory for a couple of reasons, mainly that it will be easier to grab the file and display it for a user if I move this to a two step process in the future. Second, because it is not totally clear where the tempfile created on upload ends up when the code is pushed to the server.
02-d: Extract visit '/' to before :each in user_uploads_a_file.

* Just a little refactoring.
02-d: VideoConverter.copy_to_temp_input is called when a valid file is uploaded.

* This will likely change once a convert_to_fig method has been completed. Ideally both methods will wrapped in a single method call from the controller.
01-d: Validate file extension only by mp4, not application/mp4.

* Ran into an interesting discrepancy between testing and production. When mocking an mp4 file, the filetype is listed as "application/mp4", however, in 'production' the actual file gets listed as "video/mp4".

Below is an excerpt from the MIME Type Registration for MPEG-4
http://tools.ietf.org/html/rfc4337

2.  Selection of MIME Types for MP4 Files

   The MIME types to be assigned to MP4 files are selected according to
   the contents.  Basic guidelines for selecting MIME types are as
   follows:

   a) if the file contains neither visual nor audio presentations, but
      only, for example, MPEG-J or MPEG-7, use application/mp4;

   b) for all other files, including those that have MPEG-J, etc., in
      addition to video or audio streams, video/mp4 should be used;
      however:

   c) for files with audio but no visual aspect, including those that
      have MPEG-J, etc., in addition to audio streams, audio/mp4 may be
      used.

   In any case, these indicate files conforming to the "MP4"
   specification, ISO/IEC 14496-1:2000, systems file format.
02-d: Add expectation for invalid file upload. It should not create a temp file.
02-e: Change makeGif to convert_to_gif.

* In keeping with ruby style.
02-e: Add streamio-ffmpeg gem.

* I found streamio-ffmpeg while looking through the source code for carrierwave-video. One of the nice things about it is that it will let you pass a raw ffmpeg command into its transcode method. This is a helpful stopgap for the time being, although I intend to refactor it after MVP is complete, for readability.
02-e: Require streamio-ffmpeg gem in VideoConverter file.