<commit_before># Starting message
say %q{
      =============================================================
        load    template

}

# Clean up the Gemfile
run 'sed -e /#.*$/d -e /^\s*$/d -i Gemfile'
run %q{sed -e '/^gem /{x;p;x}' -e '/^group /{x;p;x}' -i Gemfile}

# Install third-party gems
append_file 'Gemfile', %q{
gem 'haml-rails', '~> 0.3.5'

group :development do
  gem 'hpricot'              #used by html2haml
  gem 'ruby_parser', '2.3.1' #used by html2haml
  gem 'pry', '~> 0.9.11'
end

group :development, :test do
  gem 'rspec-rails', '~> 2.12.2'
end

group :test do
  gem 'rb-inotify', '~> 0.8.8'
  gem 'guard-rspec', '~> 2.4.0'
  gem 'guard-spork', '~> 1.4.1'
  gem 'factory_girl_rails', '~> 4.2.0'
  gem 'shoulda-matchers', '~> 1.4.2'
  gem 'forgery', '~> 0.5.0'
  gem 'capybara', '~> 2.0.2'
  gem 'database_cleaner', '~> 0.9.1'
  gem 'launchy', '~> 2.1.2'
end
}
Bundler.with_clean_env do
  run 'bundle install > /dev/null'
end

# Configure haml
inside 'app/views/layouts' do
  run 'bundle exec html2haml application.html.erb > application.html.haml'
  remove_file 'application.html.erb'
end
run 'sed -e /hpricot/d -e /ruby_parser/d -i Gemfile'
Bundler.with_clean_env do
  run 'bundle install > /dev/null'
end

# Configure sass
inject_into_file 'config/application.rb', <<-EOS, after: "config.assets.version = '1.0'\n"

    # Make use of sass syntax over scss
    config.sass.preferred_syntax = :sass
EOS

# Configure rspec
generate 'rspec:install'
inject_into_file 'config/application.rb', <<-EOS, after: "config.sass.preferred_syntax = :sass\n"

    # Configure generators to use third-party gems
    config.generators do |g|
      g.test_framework :rspec,
        fixtures: true,
        view_specs: false,
        helper_specs: false,
        routing_specs: false,
        controller_specs: true,
        request_specs: true
      g.fixture_replacement :factory_girl, dir: 'spec/factories'
    end
EOS
run 'sed 1d -i spec/spec_helper.rb'<commit_msg>Turned on rails generators for the routing specs<commit_after># Starting message
say %q{
      =============================================================
        load    template

}

# Clean up the Gemfile
run 'sed -e /#.*$/d -e /^\s*$/d -i Gemfile'
run %q{sed -e '/^gem /{x;p;x}' -e '/^group /{x;p;x}' -i Gemfile}

# Install third-party gems
append_file 'Gemfile', %q{
gem 'haml-rails', '~> 0.3.5'

group :development do
  gem 'hpricot'              #used by html2haml
  gem 'ruby_parser', '2.3.1' #used by html2haml
  gem 'pry', '~> 0.9.11'
end

group :development, :test do
  gem 'rspec-rails', '~> 2.12.2'
end

group :test do
  gem 'rb-inotify', '~> 0.8.8'
  gem 'guard-rspec', '~> 2.4.0'
  gem 'guard-spork', '~> 1.4.1'
  gem 'factory_girl_rails', '~> 4.2.0'
  gem 'shoulda-matchers', '~> 1.4.2'
  gem 'forgery', '~> 0.5.0'
  gem 'capybara', '~> 2.0.2'
  gem 'database_cleaner', '~> 0.9.1'
  gem 'launchy', '~> 2.1.2'
end
}
Bundler.with_clean_env do
  run 'bundle install > /dev/null'
end

# Configure haml
inside 'app/views/layouts' do
  run 'bundle exec html2haml application.html.erb > application.html.haml'
  remove_file 'application.html.erb'
end
run 'sed -e /hpricot/d -e /ruby_parser/d -i Gemfile'
Bundler.with_clean_env do
  run 'bundle install > /dev/null'
end

# Configure sass
inject_into_file 'config/application.rb', <<-EOS, after: "config.assets.version = '1.0'\n"

    # Make use of sass syntax over scss
    config.sass.preferred_syntax = :sass
EOS

# Configure rspec
generate 'rspec:install'
inject_into_file 'config/application.rb', <<-EOS, after: "config.sass.preferred_syntax = :sass\n"

    # Configure generators to use third-party gems
    config.generators do |g|
      g.test_framework :rspec,
        fixtures: true,
        view_specs: false,
        helper_specs: false,
        routing_specs: true,
        controller_specs: true,
        request_specs: true
      g.fixture_replacement :factory_girl, dir: 'spec/factories'
    end
EOS
run 'sed 1d -i spec/spec_helper.rb'
{'fraction_non_alphanumeric': 0.1817269076305221, 'fraction_numerical': 0.02359437751004016, 'mean_word_length': 3.2213983050847457, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 33, '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': '25162', 'n_tokens_mistral': 1647, 'n_tokens_neox': 1566, 'n_words': 392}