jgv / IPWriter

A Ruby port of Kim Asendorf's IPWriter for Rails.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ip-writer-rails

This is Kim Asendorf’s IP Writer ported to Ruby for use in for Rails applications. IP Writer reads the IP address of a visitor to a website and tweets it. By default it will tweet to the IP Writer twitter account, although you may configure it to tweet from any account you have access to.

Installation

Include IPWriter in your Gemfile: gem 'ip-writer-rails'

Usage

Using IPWriter is simple. Just include the ip_writer method anywhere in a controller.

class HomeController < ApplicationController
  def index
    ip_writer
    ......
  end
end

Tweet from any account

You can tweet from any account by passing your Twitter consumer and OAuth keys to IPWriter.

class HomeController < ApplicationController
  def index
    ip_writer(CONSUMER_KEY, CONSUMER_SECRET, OAUTH_TOKEN, OAUTH_TOKEN_SECRET)
    ......
  end
end

About

A Ruby port of Kim Asendorf's IPWriter for Rails.

License:MIT License


Languages

Language:Ruby 100.0%