<commit_before>vendored_cucumber_bin = Dir["#{RAILS_ROOT}/vendor/{gems,plugins}/cucumber*/bin/cucumber"].first

namespace :cucumber do
  Cucumber::Rake::Task.new(:rcov) do |t|
    t.binary = vendored_cucumber_bin
    t.fork = true # You may get faster startup if you set this to false
    t.rcov = true
    t.rcov_opts << %[-o "features_coverage"]
    t.rcov_opts << %[-x "features"]
  end
end

<commit_msg>Add dependency check to custom cucumber rake task.<commit_after>vendored_cucumber_bin = Dir["#{RAILS_ROOT}/vendor/{gems,plugins}/cucumber*/bin/cucumber"].first

begin
  require 'cucumber/rake/task'

  namespace :cucumber do
    Cucumber::Rake::Task.new(:rcov) do |t|
      t.binary = vendored_cucumber_bin
      t.fork = true # You may get faster startup if you set this to false
      t.rcov = true
      t.rcov_opts << %[-o "features_coverage"]
      t.rcov_opts << %[-x "features"]
    end
  end
rescue LoadError
  desc 'cucumber rake task not available (cucumber not installed)'
  task :cucumber do
    abort 'Cucumber rake task is not available. Be sure to install cucumber as a gem or plugin'
  end
end

{'fraction_non_alphanumeric': 0.11379928315412187, 'fraction_numerical': 0.0, 'mean_word_length': 3.69327731092437, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 3, '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': '3365229', 'n_tokens_mistral': 401, 'n_tokens_neox': 396, 'n_words': 109}