aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/plugins')
-rw-r--r--vendor/plugins/recaptcha/LICENSE19
-rw-r--r--vendor/plugins/recaptcha/README5
-rw-r--r--vendor/plugins/recaptcha/Rakefile23
-rw-r--r--vendor/plugins/recaptcha/init.rb3
-rw-r--r--vendor/plugins/recaptcha/install.rb1
-rw-r--r--vendor/plugins/recaptcha/lib/recaptcha.rb69
-rw-r--r--vendor/plugins/recaptcha/tasks/recaptcha_tasks.rake4
-rw-r--r--vendor/plugins/recaptcha/test/recaptcha_test.rb49
-rw-r--r--vendor/plugins/recaptcha/uninstall.rb1
9 files changed, 0 insertions, 174 deletions
diff --git a/vendor/plugins/recaptcha/LICENSE b/vendor/plugins/recaptcha/LICENSE
deleted file mode 100644
index dc9c67e75..000000000
--- a/vendor/plugins/recaptcha/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2007 Jason L Perry
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE. \ No newline at end of file
diff --git a/vendor/plugins/recaptcha/README b/vendor/plugins/recaptcha/README
deleted file mode 100644
index 8453064c6..000000000
--- a/vendor/plugins/recaptcha/README
+++ /dev/null
@@ -1,5 +0,0 @@
-NOTICE
-
-This plugin has moved to http://github.com/ambethia/recaptcha
-
-This subversion repository will no longer be updated, and eventually cease to exist.
diff --git a/vendor/plugins/recaptcha/Rakefile b/vendor/plugins/recaptcha/Rakefile
deleted file mode 100644
index 50d21099d..000000000
--- a/vendor/plugins/recaptcha/Rakefile
+++ /dev/null
@@ -1,23 +0,0 @@
-require 'rake'
-require 'rake/testtask'
-require 'rake/rdoctask'
-
-desc 'Default: run unit tests.'
-task :default => :test
-
-desc 'Test the recaptcha plugin.'
-Rake::TestTask.new(:test) do |t|
- t.libs << 'lib'
- t.pattern = 'test/**/*_test.rb'
- t.verbose = true
-end
-
-desc 'Generate documentation for the recaptcha plugin.'
-Rake::RDocTask.new(:rdoc) do |rdoc|
- rdoc.rdoc_dir = 'rdoc'
- rdoc.title = 'reCAPTCHA'
- rdoc.template = 'jamis'
- rdoc.options << '--line-numbers' << '--inline-source'
- rdoc.rdoc_files.include('README')
- rdoc.rdoc_files.include('lib/**/*.rb')
-end
diff --git a/vendor/plugins/recaptcha/init.rb b/vendor/plugins/recaptcha/init.rb
deleted file mode 100644
index 28494d250..000000000
--- a/vendor/plugins/recaptcha/init.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-require 'recaptcha.rb'
-ActionView::Base.send :include, Ambethia::ReCaptcha::Helper
-ActionController::Base.send :include, Ambethia::ReCaptcha::Controller \ No newline at end of file
diff --git a/vendor/plugins/recaptcha/install.rb b/vendor/plugins/recaptcha/install.rb
deleted file mode 100644
index a63be40f4..000000000
--- a/vendor/plugins/recaptcha/install.rb
+++ /dev/null
@@ -1 +0,0 @@
-puts IO.read(File.join(File.dirname(__FILE__), 'README')) \ No newline at end of file
diff --git a/vendor/plugins/recaptcha/lib/recaptcha.rb b/vendor/plugins/recaptcha/lib/recaptcha.rb
deleted file mode 100644
index 786555316..000000000
--- a/vendor/plugins/recaptcha/lib/recaptcha.rb
+++ /dev/null
@@ -1,69 +0,0 @@
-# ReCAPTCHA
-module Ambethia
- module ReCaptcha
- RECAPTCHA_API_SERVER = 'http://api.recaptcha.net';
- RECAPTCHA_API_SECURE_SERVER = 'https://api-secure.recaptcha.net';
- RECAPTCHA_VERIFY_SERVER = 'api-verify.recaptcha.net';
-
- SKIP_VERIFY_ENV = ['test']
-
- module Helper
- # Your public API can be specified in the +options+ hash or preferably the environment
- # variable +RECAPTCHA_PUBLIC_KEY+.
- def recaptcha_tags(options = {})
- # Default options
- key = options[:public_key] ||= ENV['RECAPTCHA_PUBLIC_KEY']
- error = options[:error] ||= session[:recaptcha_error]
- uri = options[:ssl] ? RECAPTCHA_API_SECURE_SERVER : RECAPTCHA_API_SERVER
- xhtml = Builder::XmlMarkup.new :target => out=(''), :indent => 2 # Because I can.
- if options[:display]
- xhtml.script(:type => "text/javascript"){ xhtml.text! "var RecaptchaOptions = #{options[:display].to_json};\n"}
- end
- xhtml.script(:type => "text/javascript", :src => "#{uri}/challenge?k=#{key}&error=#{error}") {}
- unless options[:noscript] == false
- xhtml.noscript do
- xhtml.iframe(:src => "#{uri}/noscript?k=#{key}",
- :height => options[:iframe_height] ||= 300,
- :width => options[:iframe_width] ||= 500,
- :frameborder => 0) {}; xhtml.br
- xhtml.textarea(:name => "recaptcha_challenge_field", :rows => 3, :cols => 40) {}
- xhtml.input :name => "recaptcha_response_field",
- :type => "hidden", :value => "manual_challenge"
- end
- end
- raise ReCaptchaError, "No public key specified." unless key
- return out
- end # recaptcha_tags
- end # Helpers
-
- module Controller
- # Your private API key must be specified in the environment variable +RECAPTCHA_PRIVATE_KEY+
- def verify_recaptcha(model = nil)
- return true if SKIP_VERIFY_ENV.include? ENV['RAILS_ENV']
- raise ReCaptchaError, "No private key specified." unless ENV['RECAPTCHA_PRIVATE_KEY']
- begin
- recaptcha = Net::HTTP.post_form URI.parse("http://#{RECAPTCHA_VERIFY_SERVER}/verify"), {
- :privatekey => ENV['RECAPTCHA_PRIVATE_KEY'],
- :remoteip => request.remote_ip,
- :challenge => params[:recaptcha_challenge_field],
- :response => params[:recaptcha_response_field]
- }
- answer, error = recaptcha.body.split.map(&:chomp)
- unless answer == 'true'
- session[:recaptcha_error] = error
- model.errors.add_to_base "Captcha response is incorrect, please try again." if model
- return false
- else
- session[:recaptcha_error] = nil
- return true
- end
- rescue Exception => e
- raise ReCaptchaError, e
- end
- end # verify_recaptcha
- end # ControllerHelpers
-
- class ReCaptchaError < StandardError; end
-
- end # ReCaptcha
-end # Ambethia \ No newline at end of file
diff --git a/vendor/plugins/recaptcha/tasks/recaptcha_tasks.rake b/vendor/plugins/recaptcha/tasks/recaptcha_tasks.rake
deleted file mode 100644
index a0cf1ad13..000000000
--- a/vendor/plugins/recaptcha/tasks/recaptcha_tasks.rake
+++ /dev/null
@@ -1,4 +0,0 @@
-# desc "Explaining what the task does"
-# task :recaptcha do
-# # Task goes here
-# end \ No newline at end of file
diff --git a/vendor/plugins/recaptcha/test/recaptcha_test.rb b/vendor/plugins/recaptcha/test/recaptcha_test.rb
deleted file mode 100644
index 0373d25b1..000000000
--- a/vendor/plugins/recaptcha/test/recaptcha_test.rb
+++ /dev/null
@@ -1,49 +0,0 @@
-require 'test/unit'
-require 'builder'
-require File.dirname(__FILE__) + '/../lib/recaptcha'
-
-class ReCaptchaTest < Test::Unit::TestCase
- include Ambethia::ReCaptcha
- include Ambethia::ReCaptcha::Helper
- include Ambethia::ReCaptcha::Controller
-
- attr_accessor :session
-
- def setup
- @session = {}
- ENV['RECAPTCHA_PUBLIC_KEY'] = '0000000000000000000000000000000000000000'
- ENV['RECAPTCHA_PRIVATE_KEY'] = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
- end
-
- def test_recaptcha_tags
- # Might as well match something...
- assert_match /http:\/\/api.recaptcha.net/, recaptcha_tags
- end
-
- def test_recaptcha_tags_with_ssl
- assert_match /https:\/\/api-secure.recaptcha.net/, recaptcha_tags(:ssl => true)
- end
-
- def test_recaptcha_tags_without_noscript
- assert_no_match /noscript/, recaptcha_tags(:noscript => false)
- end
-
- def test_should_raise_exception_without_public_key
- assert_raise ReCaptchaError do
- ENV['RECAPTCHA_PUBLIC_KEY'] = nil
- recaptcha_tags
- end
- end
-
- def test_should_raise_exception_without_private_key
- assert_raise ReCaptchaError do
- ENV['RECAPTCHA_PRIVATE_KEY'] = nil
- verify_recaptcha
- end
- end
-
- def test_should_verify_recaptcha
- # TODO Mock this, or figure something out...
- end
-
-end
diff --git a/vendor/plugins/recaptcha/uninstall.rb b/vendor/plugins/recaptcha/uninstall.rb
deleted file mode 100644
index 973833346..000000000
--- a/vendor/plugins/recaptcha/uninstall.rb
+++ /dev/null
@@ -1 +0,0 @@
-# Uninstall hook code here