deprecate the black box and the questions

This commit is contained in:
Kyle Drake 2015-01-19 10:21:45 -08:00
parent b9530b3d43
commit 73f29bf9cc
4 changed files with 0 additions and 42 deletions

View file

@ -31,9 +31,6 @@ get '/?' do
@sites_count = SimpleCache.get :sites_count
end
@blackbox_question = BlackBox.generate
@question_first_number, @question_last_number = generate_question
erb :index, layout: false
end

View file

@ -1,15 +1,3 @@
def generate_question
if ENV['RACK_ENV'] == 'test'
question_first_number = 1
question_last_number = 1
else
question_first_number = rand 5
question_last_number = rand 5
end
session[:question_answer] = (question_first_number + question_last_number).to_s
[question_first_number, question_last_number]
end
def dashboard_if_signed_in
redirect '/dashboard' if signed_in?
end

View file

@ -129,11 +129,3 @@ if ENV['RACK_ENV'] != 'development'
# Sass::Plugin.options[:never_update] = true
Sass::Plugin.options[:full_exception] = false
end
unless ENV['RACK_ENV'] == 'test'
if File.exist?('./black_box.rb')
require './black_box.rb'
else
puts "WARNING: Black box was not loaded!"
end
end

View file

@ -1,19 +0,0 @@
# The BlackBox is a component that we don't include in the source code.
# It is used for our anti-spam code, which is not public.
# If you're a spammer and reading this to try to break it, please leave us alone.
# All you're doing is hurting a site that's trying to make the internet suck
# less and prevent it from turning into an soviet-apartment-bloc social network Orwellian nightmare.
# Also, we will very quickly detect and change the black box as soon as you figure out how to break it.
# Please choose another site to go after, we implore you.
class BlackBox
class << self
def generate(*args)
'derp'
end
def valid?(input, ip)
input == 'derp'
end
end
end