Sha256: a3674126f3ffd806444be665b1770880ac7bfba56d5f980cc68638002122278c

Contents?: true

Size: 1.21 KB

Versions: 2

Compression:

Stored size: 1.21 KB

Contents

# SocialAvatarProxy

This gem acts as a proxy for avatars on Twitter & Facebook.

[![Build Status][2]][1]

  [1]: http://travis-ci.org/platformq/social-avatar-proxy
  [2]: https://secure.travis-ci.org/platformq/social-avatar-proxy.png?branch=master

## Installation

Add this line to your application's Gemfile:

```ruby
gem "social-avatar-proxy"
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install social-avatar-proxy

## Usage

# Rack

The Rack app is available at: SocialAvatarProxy::App

# Rails

In your `config/routes.rb` file:

```ruby
mount SocialAvatarProxy::Engine, at: "/avatars"
```

The engine is basically a proxy for the Rack app, it also adds the path helpers below:

In your views:

```ruby
# for a Twitter user, by username:
image_tag(twitter_avatar_path("username"))
# by ID:
image_tag(twitter_avatar_path(12345))

# for a Facebook user, by username:
image_tag(facebook_avatar_path("username"))
# by ID:
image_tag(facebook_avatar_path(12345))
```

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
social-avatar-proxy-0.0.9 README.md
social-avatar-proxy-0.0.8 README.md