diff --git a/CHANGELOG b/CHANGELOG index 5e30f927..9acb7cf0 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,5 @@ * Removed Ambethia namespace, and restructured classes a bit +* Added an example rails app in the example-rails branch == 0.2.0 / 2009-09-12 diff --git a/README.rdoc b/README.rdoc index 67d7743c..fcd3d07e 100644 --- a/README.rdoc +++ b/README.rdoc @@ -15,6 +15,16 @@ You'll want to add your public and private API keys in the environment variables and RECAPTCHA_PRIVATE_KEY, respectively. You could also specify them in config/environment.rb if you are so inclined. Exceptions will be raised if you call these methods and the keys can't be found. +== Rails Installation + +ReCaptcha for rails can be installed as a gem: + + config.gem "ambethia-recaptcha", :lib => "recaptcha/rails", :source => "http://gems.github.com" + +Or, as a standard rails plugin: + + script/plugin install git://github.com/ambethia/recaptcha.git + == +recaptcha_tags+ Some of the options available: diff --git a/Rakefile b/Rakefile index 2719c41d..4a6cc8b0 100644 --- a/Rakefile +++ b/Rakefile @@ -5,6 +5,7 @@ begin Jeweler::Tasks.new do |gem| gem.name = "recaptcha" gem.description = "This plugin adds helpers for the ReCAPTCHA API " + gem.summary = "Helpers for the ReCAPTCHA API" gem.homepage = "http://github.com/ambethia/recaptcha" gem.authors = ["Jason L. Perry"] gem.email = "jasper@ambethia.com" diff --git a/init.rb b/init.rb index ca3896f0..9125b1e4 100644 --- a/init.rb +++ b/init.rb @@ -1,2 +1,4 @@ -require 'recaptcha' +# Rails plugin initialization. +# You can also install it as a gem: +# config.gem "ambethia-recaptcha", :lib => "recaptcha/rails", :source => "http://gems.github.com" require 'recaptcha/rails' \ No newline at end of file diff --git a/lib/recaptcha/rails.rb b/lib/recaptcha/rails.rb index de034c40..08741cfd 100644 --- a/lib/recaptcha/rails.rb +++ b/lib/recaptcha/rails.rb @@ -1,2 +1,4 @@ +require 'recaptcha' + ActionView::Base.send(:include, Recaptcha::ClientHelper) ActionController::Base.send(:include, Recaptcha::Verify) \ No newline at end of file diff --git a/recaptcha.gemspec b/recaptcha.gemspec index 29e47de8..3a2c42f3 100644 --- a/recaptcha.gemspec +++ b/recaptcha.gemspec @@ -1,3 +1,6 @@ +# Generated by jeweler +# DO NOT EDIT THIS FILE +# Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec` # -*- encoding: utf-8 -*- Gem::Specification.new do |s| @@ -6,7 +9,7 @@ Gem::Specification.new do |s| s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["Jason L. Perry"] - s.date = %q{2009-09-12} + s.date = %q{2009-09-14} s.description = %q{This plugin adds helpers for the ReCAPTCHA API } s.email = %q{jasper@ambethia.com} s.extra_rdoc_files = [ @@ -23,7 +26,9 @@ Gem::Specification.new do |s| "VERSION", "init.rb", "lib/recaptcha.rb", - "lib/recaptcha/recaptcha.rb", + "lib/recaptcha/client_helper.rb", + "lib/recaptcha/rails.rb", + "lib/recaptcha/verify.rb", "recaptcha.gemspec", "tasks/recaptcha_tasks.rake", "test/recaptcha_test.rb", @@ -33,7 +38,7 @@ Gem::Specification.new do |s| s.rdoc_options = ["--charset=UTF-8"] s.require_paths = ["lib"] s.rubygems_version = %q{1.3.5} - s.summary = nil + s.summary = %q{Helpers for the ReCAPTCHA API} s.test_files = [ "test/recaptcha_test.rb", "test/verify_recaptcha_test.rb"