<commit_before>module Merb::Generators
  class CucumberGenerator < Generator
    def self.source_root
      File.join(File.dirname(__FILE__), 'cucumber', 'templates')
    end
    
    option :orm, :desc => 'Object-Relation Mapper to use (one of: none, activerecord, datamapper, sequel)'
    option :session_type, :default => :simple, :desc => 'Session type to use (one of: simple, webrat)'
    
    template(:env) { |t| t.source = t.destination = "features/env.rb" }
    
    template(:example_feature) { |t| t.source = t.destination = "features/login.feature" }
    template(:example_feature_steps) { |t| t.source = t.destination = "features/steps/login_steps.rb" }
    
    template(:common_webrat, :session_type => :webrat) do |t| 
      t.source = t.destination = "features/steps/common_webrat.rb"
    end
    template(:cucumber, :after => :chmod) { |t| t.source = t.destination = "bin/cucumber" }
    <commit_msg>Make example feature inclusion dependent on webrat session type.<commit_after>module Merb::Generators
  class CucumberGenerator < Generator
    def self.source_root
      File.join(File.dirname(__FILE__), 'cucumber', 'templates')
    end
    
    option :orm, :desc => 'Object-Relation Mapper to use (one of: none, activerecord, datamapper, sequel)'
    option :session_type, :default => :simple, :desc => 'Session type to use (one of: simple, webrat)'
    
    template(:env) { |t| t.source = t.destination = "features/env.rb" }
    
    template(:example_feature, :session_type => :webrat) do |t| 
      t.source = t.destination = "features/login.feature" 
    end
    template(:example_feature_steps, :session_type => :webrat) do |t| 
      t.source = t.destination = "features/steps/login_steps.rb"
    end
    template(:common_webrat, :session_type => :webrat) do |t| 
      t.source = t.destination = "features/steps/common_webrat.rb"
    end
    
    template(:cucumber, :after => :chmod) { |t| t.source = t.destination = "bin/cucumber" }
{'fraction_non_alphanumeric': 0.1390728476821192, 'fraction_numerical': 0.0, 'mean_word_length': 3.6103286384976525, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, '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': '5688051', 'n_tokens_mistral': 658, 'n_tokens_neox': 644, 'n_words': 152}