<commit_before>#encoding: utf-8
require 'rubygems'
require 'sinatra'
require 'sinatra/reloader' if development?

get '/' do
	erb "Hello, <a href=\"https://github.com/bootstrap-ruby/sinatra-bootstrap\">Original</a> pattern has been modified for <a href=\"http://rubyschool.us/\">Ruby School</a>"			
end

get '/about' do
	erb :about
end

get '/appointment' do
	erb :appointment
end

post '/appointment' do
	@username = params[:username]
	@phone = params[:phone]
	@time = params[:time]
	@performer = params[:performer]

	errors = {
		:username => 'Enter your name',
		:phone => 'Enter your phone number',
		:time => 'Enter desirable appoint time',
	}

	errors.each do |key,err| 
		if params[key] == ''
			@error = errors[key]
		end
	end<commit_msg>added sum of error and show all space inputs<commit_after>#encoding: utf-8
require 'rubygems'
require 'sinatra'
require 'sinatra/reloader' if development?

get '/' do
	erb "Hello, <a href=\"https://github.com/bootstrap-ruby/sinatra-bootstrap\">Original</a> pattern has been modified for <a href=\"http://rubyschool.us/\">Ruby School</a>"			
end

get '/about' do
	erb :about
end

get '/appointment' do
	erb :appointment
end

post '/appointment' do
	@username = params[:username]
	@phone = params[:phone]
	@time = params[:time]
	@performer = params[:performer]

	errors = {
		:username => 'Enter your name',
		:phone => 'Enter your phone number',
		:time => 'Enter desirable appoint time',
	}

	@error = errors.select {|key,_| params[key]==""}.values.join("<br>")
	#errors.each do |key,err| 
	#	if params[key] == ''
	#		@error = errors[key]
	#	end
	#end
{'fraction_non_alphanumeric': 0.16604010025062657, 'fraction_numerical': 0.0012531328320802004, 'mean_word_length': 4.253289473684211, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 18, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2411921', 'n_tokens_mistral': 582, 'n_tokens_neox': 554, 'n_words': 155}