Git ignore downloaded node modules
Drop ref to non-existent public/javascripts/viewer

I added this in 91cb9665319c5d4140962c67e1fee038c2ca838c, but the
directory/and or files do not exist.  Unsure why it didn't break
the build at that time, but it is now.
Update sample secrets.yml file to be current

This brings in all of the keys that we've added to the configuration
Don't escape JSON for featured reporting interface
Interface for admins to run embedded hits report

Adds a form and action in /admin to download the hits for
a given organization
Update Rails to 4.1.6
Name file for org's slug, temp hide btn on submit

This hides the submit button for 5 seconds after it's clicked and download initiated.  This is to prevent the user from
thinking that didn't click properly and initiating multiple downloads of the file.
Fix styles on text-inputs on featured reporting

These were severely broken with improper text-indent and left-margin
Removing the "light" style from them fixed the issue.
Admin interface for modifying account memberships

A simple lookup form that looks up accounts by email
and then displays the organizations they are a member of.

The default organization can be switched between the organizations
and the roles adjusted as needed.
Update button titles and check params presence

Only attempt to display the memberships if the request
is a post and the email was given.
update note_embeds to fix css specificity issue (see https://github.com/documentcloud/documentcloud-notes/issues/3 )
Fix upgrading reviewer account to full privileges

The "upgrade_reviewer_to_real" method hadn't been upgraded from when
the account had an "organization" attribute so was throwing
errors when it attempted to write to it.

This no longer updates any old annotations to the new organization.
Our thinking is that since annotations were left by the reviewer
for the inviting organization, they should remain attributed
to that organization.
BOOLEAN search terms need word boundaries on sides

Otherwise words such as "Grandmother" end up as "Grmother"
when the booleans are stripped out in preparation for search
term highlighting
Streaming & find_each for Accounts CSV generation

The accounts download was taking an long time and large
amount of memory to generate.  This helps, but it's still
running 4 sql queries per account row.  We'll have to start
employing counter_cache or something similar to gain more efficiency.

This extracts the existing CSV streaming code from doc_hits into
a "deliver_csv" method.  We should consider further extracting that
into a mixin if additional controllers need it in the future.
Use Tempfile for zipfile creation

When Dir.mktmpdir is unlinked, the inner files are inaccessible to send_file.
This meant that we had to keep it around until after the download was complete,
which littered the /tmp directory with directories filled with zip files.

Since we only need a single file, Tempfile is more appropriate.  We can close
the filehandle and any process that is currently reading from it (like send_file)
can continue to read even after the file is unlinked when the tempfile is
garbage collected.

A future enhancement might be to switch to the Zipline gem.  That would allow
streaming the zip file while files are being added to it, allowing downloading
to begin sooner.
Administer Organizations and their memberships

Add an organization administrative interface with
links to and from the existing membership admin screens.
Offer to link existing account to new organization

Instead of refusing to create a new organization when the email is already in
use, add an additional "relink" checkbox control.  If the checkbox is selected,
add an additional membership for the account and set it as the default.
Add demo flag on Organization management screen
Correct typographical error (duplicate for)
Include status code when redirecting.