<commit_before>require "rubygems"

require "rack/rewrite"

use Rack::Rewrite do
  r301 %r{/docs/yardoc/(.*)}, '/documentation/$1'
  r301 '/tutorial.html', '/guide'
  r301 '/download.html', '/install'
  r301 '/documentation', '/documentation/'
  r301 '/documentation/_index.html', '/documentation/'

  moved_permanently '/try.html', 'http://www.sassmeister.com'

  rewrite(%r{^(.*)/([^/.]+)$}, lambda do |match, rack_env|
      path = "#{File.dirname(__FILE__)}/build#{match[0]}"
      next "#{match[1]}/#{match[2]}/index.html" if Dir.exists?(path)
      next match[0] if File.exists?(path)
      "#{match[0]}.html"
  end)
end

if ENV["HEROKU"].nil? || ENV["HEROKU"] == 'false'
  require "middleman"
  run Middleman.server
else
  use Rack::Static, :urls => [""], :root => 'build', :index => 'index.html'

  run lambda {}
end
<commit_msg>attempting to fix issue sass/sass.github.com#25 by using a different style startup command<commit_after>require "rubygems"

require "rack/rewrite"

use Rack::Rewrite do
  r301 %r{/docs/yardoc/(.*)}, '/documentation/$1'
  r301 '/tutorial.html', '/guide'
  r301 '/download.html', '/install'
  r301 '/documentation', '/documentation/'
  r301 '/documentation/_index.html', '/documentation/'
  r301 '/try.html', 'http://sassmeister.com'

  rewrite(%r{^(.*)/([^/.]+)$}, lambda do |match, rack_env|
      path = "#{File.dirname(__FILE__)}/build#{match[0]}"
      next "#{match[1]}/#{match[2]}/index.html" if Dir.exists?(path)
      next match[0] if File.exists?(path)
      "#{match[0]}.html"
  end)
end

if ENV["HEROKU"].nil? || ENV["HEROKU"] == 'false'
  require "middleman"
  run Middleman.server
else
  use Rack::Static, :urls => [""], :root => 'build', :index => 'index.html'

  run lambda {}
end

{'fraction_non_alphanumeric': 0.21894858463316003, 'fraction_numerical': 0.027151935297515885, 'mean_word_length': 4.0202898550724635, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7601653', 'n_tokens_mistral': 681, 'n_tokens_neox': 640, 'n_words': 135}