<commit_before>class RailsDebugBar
	def self.filter(controller)
		content_type = controller.response.content_type
		return unless content_type =~ /html/
		
		body = controller.response.body
		
		insertpoint = (body =~ /<\/body>/)
		if insertpoint.nil?
			insertpoint = -1
		end
		
		parts = ["DEBUG",
			rails_version
		]
		
		
		
		controller.response.body = body.insert(insertpoint, decorate_parts(parts))
	end
	
	def self.rails_version
		"Rails: "+Rails::VERSION::STRING
	end
	
	def self.decorate_parts(parts)
		css_for_insertion = <<-EOF
		<style>
		ul#rails_debug_bar {
			list-style-type: none;
			margin-bottom: 0;
			margin-top: 1em;
			padding-left: 0
		}
		ul#rails_debug_bar li {
			display: inline;
			padding: 0.2em;
			border: 1px solid black;
			background-color: #fda;
			color: black;
		}
		</style>
		EOF
		parts_for_insertion = parts.map{|s| "<li>#{CGI::escapeHTML s}</li>"}
		html_for_insertion = "<ul id=\"rails_debug_bar\">#{parts_for_insertion}</ul>"
		return css_for_insertion + html_for_insertion
	end
end<commit_msg>show off the controller & action<commit_after>class RailsDebugBar
	def self.filter(controller)
		content_type = controller.response.content_type
		return unless content_type =~ /html/
		
		body = controller.response.body
		
		insertpoint = (body =~ /<\/body>/)
		if insertpoint.nil?
			insertpoint = -1
		end
		
		parts = ["DEBUG",
			rails_version,
			"#{controller.class.to_s}/#{controller.action_name}.#{controller.request.format}"
		]
		
		
		
		controller.response.body = body.insert(insertpoint, decorate_parts(parts))
	end
	
	def self.rails_version
		"Rails: "+Rails::VERSION::STRING
	end
	
	def self.decorate_parts(parts)
		css_for_insertion = <<-EOF
		<style>
		ul#rails_debug_bar {
			list-style-type: none;
			margin-bottom: 0;
			margin-top: 1em;
			padding-left: 0
		}
		ul#rails_debug_bar li {
			display: inline;
			padding: 0.2em;
			border: 1px solid black;
			background-color: #fda;
			color: black;
		}
		</style>
		EOF
		parts_for_insertion = parts.map{|s| "<li>#{CGI::escapeHTML s}</li>"}
		html_for_insertion = "<ul id=\"rails_debug_bar\">#{parts_for_insertion}</ul>"
		return css_for_insertion + html_for_insertion
	end
end
{'fraction_non_alphanumeric': 0.1306532663316583, 'fraction_numerical': 0.006395614435815441, 'mean_word_length': 3.689507494646681, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 17, 'https://': 0, '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': '6159951', 'n_tokens_mistral': 927, 'n_tokens_neox': 783, 'n_words': 152}