<commit_before>require 'rbconfig'

# This generator bootstraps a Rails project for use with RSpec
class JsSpecGenerator < Rails::Generator::Base
  DEFAULT_SHEBANG = File.join(Config::CONFIG['bindir'],
                              Config::CONFIG['ruby_install_name'])

  def initialize(runtime_args, runtime_options = {})
    super
  end

  def manifest
    record do |m|
      script_options     = { :chmod => 0755, :shebang => options[:shebang] == DEFAULT_SHEBANG ? nil : options[:shebang] }

      m.directory 'spec'
      m.directory 'javascripts'
      m.template  'spec_helper.js',                 'spec/javascripts/spec_helper.js'
      m.file      'script/js_spec_server',          'script/js_spec_server', script_options
      m.file      'script/js_spec',                 'script/js_spec',        script_options
    end
  end

protected

  def banner
    "Usage: #{$0} js_spec"
  end

end<commit_msg>Generator creates spec/javascripts directory instead of javascripts.<commit_after>require 'rbconfig'

# This generator bootstraps a Rails project for use with RSpec
class JsSpecGenerator < Rails::Generator::Base
  DEFAULT_SHEBANG = File.join(Config::CONFIG['bindir'],
                              Config::CONFIG['ruby_install_name'])

  def initialize(runtime_args, runtime_options = {})
    super
  end

  def manifest
    record do |m|
      script_options     = { :chmod => 0755, :shebang => options[:shebang] == DEFAULT_SHEBANG ? nil : options[:shebang] }

      m.directory 'spec'
      m.directory 'spec/javascripts'
      m.template  'spec_helper.js',                 'spec/javascripts/spec_helper.js'
      m.file      'script/js_spec_server',          'script/js_spec_server', script_options
      m.file      'script/js_spec',                 'script/js_spec',        script_options
    end
  end

protected

  def banner
    "Usage: #{$0} js_spec"
  end

end
{'fraction_non_alphanumeric': 0.10478723404255319, 'fraction_numerical': 0.005319148936170213, 'mean_word_length': 2.645348837209302, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '1871749', 'n_tokens_mistral': 589, 'n_tokens_neox': 566, 'n_words': 127}