<commit_before>class AhnGenerator < RubiGen::Base

  DEFAULT_SHEBANG = File.join(Config::CONFIG['bindir'],
                              Config::CONFIG['ruby_install_name'])

  default_options :author => nil

  attr_reader :name, :component

  def initialize(runtime_args, runtime_options = {})
    super
    usage if args.empty?
    @destination_root = File.expand_path(args.shift)
    @name = base_name
    @component = 'simon_game'
    extract_options
  end

  def manifest
    record do |m|
      # Ensure appropriate folder(s) exists
      m.directory ''
      BASEDIRS.each { |path| m.directory path }

      m.file  *[".ahnrc"]*2

      m.file  *["components/simon_game/simon_game.rb"]*2
      m.file  *["components/ami_remote/ami_remote.rb"]*2

      m.file  *["components/disabled/xmpp_gateway/xmpp_gateway.rb"]*2
      m.file  *["components/disabled/xmpp_gateway/xmpp_gateway.yml"]*2
      m.file  *["components/disabled/xmpp_gateway/README.yml"]*2

      m.file  *["components/disabled/stomp_gateway/stomp_gateway.rb"]*2
      m.file  *["components/disabled/stomp_gateway/stomp_gateway.yml"]*2
      m.file  *["components/disabled/stomp_gateway/README.markdown"]*2

      m.file  *["components/disabled/restful_rpc/restful_rpc.rb"]*2
      m.file  *["components/disabled/restful_rpc/restful_rpc.yml"]*2
      m.file  *["components/disabled/restful_rpc/README.markdown"]*2
      m.file  *["components/disabled/restful_rpc/example-client.rb"]*2
      m.file  *["components/disabled/restful_rpc/spec/restful_rpc_spec.rb"]*2

      m.file  *["components/disabled/sandbox/sandbox.yml"]*2
      m.file  *["components/disabled/sandbox/sandbox.rb"]*2

      m.file  *["config/startup.rb"]*2
      m.file  *["dialplan.rb"]*2
      m.file  *["events.rb"]*2
      m.file  *["README"]*2
      m.file  *["Rakefile"]*2

      # m.dependency "install_rubigen_scripts", [destination_root, 'ahn', 'adhearsion', 'test_spec'],
      #   :shebang => options[:shebang], :collision => :force
    end
  end

  protected
    def banner
      <<-EOS
Creates a ...
<commit_msg>Filename typo<commit_after>class AhnGenerator < RubiGen::Base

  DEFAULT_SHEBANG = File.join(Config::CONFIG['bindir'],
                              Config::CONFIG['ruby_install_name'])

  default_options :author => nil

  attr_reader :name, :component

  def initialize(runtime_args, runtime_options = {})
    super
    usage if args.empty?
    @destination_root = File.expand_path(args.shift)
    @name = base_name
    @component = 'simon_game'
    extract_options
  end

  def manifest
    record do |m|
      # Ensure appropriate folder(s) exists
      m.directory ''
      BASEDIRS.each { |path| m.directory path }

      m.file  *[".ahnrc"]*2

      m.file  *["components/simon_game/simon_game.rb"]*2
      m.file  *["components/ami_remote/ami_remote.rb"]*2

      m.file  *["components/disabled/xmpp_gateway/xmpp_gateway.rb"]*2
      m.file  *["components/disabled/xmpp_gateway/xmpp_gateway.yml"]*2
      m.file  *["components/disabled/xmpp_gateway/README.markdown"]*2

      m.file  *["components/disabled/stomp_gateway/stomp_gateway.rb"]*2
      m.file  *["components/disabled/stomp_gateway/stomp_gateway.yml"]*2
      m.file  *["components/disabled/stomp_gateway/README.markdown"]*2

      m.file  *["components/disabled/restful_rpc/restful_rpc.rb"]*2
      m.file  *["components/disabled/restful_rpc/restful_rpc.yml"]*2
      m.file  *["components/disabled/restful_rpc/README.markdown"]*2
      m.file  *["components/disabled/restful_rpc/example-client.rb"]*2
      m.file  *["components/disabled/restful_rpc/spec/restful_rpc_spec.rb"]*2

      m.file  *["components/disabled/sandbox/sandbox.yml"]*2
      m.file  *["components/disabled/sandbox/sandbox.rb"]*2

      m.file  *["config/startup.rb"]*2
      m.file  *["dialplan.rb"]*2
      m.file  *["events.rb"]*2
      m.file  *["README"]*2
      m.file  *["Rakefile"]*2

      # m.dependency "install_rubigen_scripts", [destination_root, 'ahn', 'adhearsion', 'test_spec'],
      #   :shebang => options[:shebang], :collision => :force
    end
  end

  protected
    def banner
      <<-EOS
Creates a ...

{'fraction_non_alphanumeric': 0.15015742310486802, 'fraction_numerical': 0.010171954468394284, 'mean_word_length': 3.146586345381526, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '5982957', 'n_tokens_mistral': 1535, 'n_tokens_neox': 1478, 'n_words': 203}