diff --git a/app/index.rb b/app/index.rb index b827e81f..3fca82f0 100644 --- a/app/index.rb +++ b/app/index.rb @@ -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 diff --git a/app_helpers.rb b/app_helpers.rb index 3ab58ae3..47905238 100644 --- a/app_helpers.rb +++ b/app_helpers.rb @@ -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 diff --git a/environment.rb b/environment.rb index 4833f531..0501bd07 100644 --- a/environment.rb +++ b/environment.rb @@ -128,12 +128,4 @@ if ENV['RACK_ENV'] != 'development' Sass::Plugin.options[:style] = :compressed # 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 \ No newline at end of file diff --git a/ext/black_box.rb b/ext/black_box.rb deleted file mode 100644 index ec944378..00000000 --- a/ext/black_box.rb +++ /dev/null @@ -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 \ No newline at end of file