simeonwillbanks/mygists — pull request #30 by simeonwillbanks (2013-01-15 20:05:47+00:00)
Title: User profiles are now public.

When viewing a profile you do not own, you only see public gists and tags.
Fixes #5

* Add custom ability for authorizing the process of refreshing gists
* When the signed in user matches the request profile, refresh the user's gists
* Remove ability which forces the signed in user to only read their own profile
* Within controllers, do not authorize profiles only load the profiles
* Add a specific message for when a profile has no gists and the profile is viewed by a user who does not own the profile
* Simplify MyGists::Fetch::Options by removing #filterable?
* Gists will always be public or private; since attribute can always be set from the last touched Gist
* Remove Gist.public_null_for since gists will always be public or private
* Add Gist.only_public to find public gists
* Add abilities for authorizing the reading of private gists and tags
* In profile factory, set token with MyGists::Secure
* Change gist tag context from 'descriptions' to 'public' or 'private', so tags can be found by 'public' or 'private' status
* Add MyGists::Search to power finding lists of tags and gists
* Remove ProfileDecorator #gists_by and #tags methods since MyGists::Search now has those responsibilities
* Add public and private traits to gist factory
* After creating a gist factory, tag the gist
* Add ActsAsTaggableOn::Tag.by_name scope to be used by MyGists::Search
* Add SearchTestData class to generate data to test MyGists::Search
* Add slug to Tags factory
* Add pagination to MyGists::Search
* Allow a factored up gist to be tagged with multiple tags
* Add "search test data" shared context to simplify MyGists::Search specs
* Remove explicit use of RSpec subject since David Chelimsky says it is a code smell
* Clean up routes file formatting
* Only allow html responses for specific controller actions
* Add MyGists::Search#total_pages as a public API to WillPaginate's total pages
* In TagsController, use MyGists::Search to find tags and gists
* Add tests for when an authenticated user visits another user's profile or gists
* Define MyGists::Search#empty? as an interface to ask search result if the search result has items
* When searching for tags or gists and they are empty, display a message to the user
* Refactor navigation items by replacing Profile with My Profile
* Only give My Profile an active CSS classname when the signed in user is visiting their profile
* Define MyGists::Search#current_page as an interface to WillPaginate's current_page
* Add rake task to upgrade gists and tags to have the correct public and private statuses
* Remove Google Analytics from ApplicationController
* Add gravatar_id to profiles
* After authenticating with GitHub save the users gravatar_id
* Add Gravatar model as a data container for gravatar service url parts
* Refactor ProfileDecorator#gravatar to use Gravatar model and users gravatar_id to build gravatar url
* Delete empty gravatar image since gravatar services handles default image
* Add rake upgrade:profiles_by_setting_gravatar_id task to set each users gravatar_id