<commit_before>require 'fileutils'

module Serverspec
  class Setup
    def self.run
      %w( spec spec/www.example.jp ).each { |dir| safe_mkdir(dir) }
      safe_create_spec
      safe_create_spec_helper
      safe_create_rakefile
    end

    def self.safe_create_spec
            content = <<-EOF
require 'spec_helper'

describe 'httpd' do
  it { should be_installed }
  it { should be_enabled   }
  it { should be_running   }
end

describe 'port 80' do
  it { should be_listening }
end

describe '/etc/httpd/conf/httpd.conf' do
  it { should be_file }
  it { should contain "ServerName www.example.jp" }
end<commit_msg>Modify sample spec code<commit_after>require 'fileutils'

module Serverspec
  class Setup
    def self.run
      %w( spec spec/www.example.jp ).each { |dir| safe_mkdir(dir) }
      safe_create_spec
      safe_create_spec_helper
      safe_create_rakefile
    end

    def self.safe_create_spec
            content = <<-EOF
require 'spec_helper'

describe 'httpd', :os => :redhat do
  it { should be_installed }
  it { should be_enabled   }
  it { should be_running   }
end

describe 'port 80', :os => :redhat do
  it { should be_listening }
end

describe '/etc/httpd/conf/httpd.conf', :os => :redhat do
  it { should be_file }
  it { should contain "ServerName www.example.jp" }
end
{'fraction_non_alphanumeric': 0.09264931087289434, 'fraction_numerical': 0.0030627871362940277, 'mean_word_length': 3.0215384615384617, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '2937117', 'n_tokens_mistral': 461, 'n_tokens_neox': 440, 'n_words': 122}