<commit_before>Feature: Middleman CLI

  Scenario: Create a new project
    Given I run `middleman init MY_PROJECT`
    Then the exit status should be 0
    When I cd to "MY_PROJECT"
    Then the following files should exist:
      | config.rb                                     |
      | source/index.html.erb                         |
      | source/images/background.png                  |
      | source/images/middleman.png                   |
      | source/layouts/layout.erb                     |
      | source/javascripts/all.js                     |
      | source/stylesheets/all.css                    |
      | source/stylesheets/normalize.css              |
      
  Scenario: Create a new project (alias i)
    When I run `middleman i MY_PROJECT`
    Then a directory named "MY_PROJECT" should exist
    
  Scenario: Create a new project (alias i)
    When I run `middleman new MY_PROJECT`
    Then a directory named "MY_PROJECT" should exist
  
  Scenario: Create a new project (alias i)
    When I run `middleman n MY_PROJECT`
    Then a directory named "MY_PROJECT" should exist
    
  Scenario: Create a new project with Rack
    When I run `middleman init MY_PROJECT --rack`
    Then a directory named "MY_PROJECT" should exist
    When I cd to "MY_PROJECT"
    Then the following files should exist:
      | config.rb                                     |
      | config.ru                                     |
    Then the following files should not exist:
      | Gemfile                                       |
    
  Scenario: Create a new project with Bundler
    When I run `middleman init MY_PROJECT --bundler`
    Then a directory named "MY_PROJECT" should exist
    When I cd to "MY_PROJECT"
    Then the following files should exist:
      | config.rb                                     |
      | Gemfile                                       |
    Then the following files should not exist:  
      | config.ru                                     |
      
  Scenario: Create a new HTML5 project
    When I run `middleman init MY_PROJECT --template=html5`
    Then a directory named "MY_PROJECT" should exist
    When I cd to "MY_PROJECT"
    Then the following files should exist:
      | config.rb                                     |
    Then the following files should not exist:
      | config.ru                                     |
      | Gemfile                                       |
    And the file "config.rb" should contain "set :js_dir, 'js'"
    Then a directory named "source" should exist
    When I cd to "source"
    Then the following files should exist:
      | index.html                                    |
      | humans.txt                                    |
      | js/script.js                                  |
      
  Scenario: Create a new HTML5 project with Rack
    When I run `middleman init MY_PROJECT --rack --template=html5`
    Then a directory named "MY_PROJECT" should exist
    When I cd to "MY_PROJECT"
    Then the following files should exist:
      | config.rb                                     |
      | config.ru                                     |
    Then the following files should not exist:
      | Gemfile                                       |
    
  Scenario: Create a new HTML5 project with Bundler
    When I run `middleman init MY_PROJECT --bundler --template=html5`
    Then a directory named "MY_PROJECT" should exist
    When I cd to "MY_PROJECT"
    Then the following files should exist:
      | config.rb                                     |
      | Gemfile                                       |
    Then the following files should not exist:  
      | config.ru                                     |
      
  Scenario: Create a new Mobile HTML5 project
    When I run `middleman init MY_PROJECT --template=mobile`
    Then a directory named "MY_PROJECT" should exist
    When I cd to "MY_PROJECT"
    Then the following files should exist:
      | config.rb                                     |
    Then the following files should not exist:
      | config.ru                                     |
      | Gemfile                                       |
    Then a directory named "source" should exist
    When I cd to "source"
    Then the following files should exist:
      | index.html                                    |
      | humans.txt                                    |
      | js/libs/respond.min.js                        |
      
  Scenario: Create a new Mobile HTML5 project with Rack
    When I run `middleman init MY_PROJECT --rack --template=mobile`
    Then a directory named "MY_PROJECT" should exist
    When I cd to "MY_PROJECT"
    Then the following files should exist:
      | config.rb                                     |
      | config.ru                                     |
    Then the following files should not exist:
      | Gemfile                                       |
    
  Scenario: Create a new Mobile HTML5 project with Bundler
    When I run `middleman init MY_PROJECT --bundler --template=mobile`
    Then a directory named "MY_PROJECT" should exist
    When I cd to "MY_PROJECT"
    Then the following files should exist:
      | config.rb                                     |
      | Gemfile                                       |
    Then the following files should not exist:  
      | config.ru                                     |<commit_msg>Fix CLI tests now that we generate a Gemfile by default<commit_after>Feature: Middleman CLI

  Scenario: Create a new project
    Given I run `middleman init MY_PROJECT`
    Then the exit status should be 0
    When I cd to "MY_PROJECT"
    Then the following files should exist:
      | Gemfile                                       |
      | config.rb                                     |
      | source/index.html.erb                         |
      | source/images/background.png                  |
      | source/images/middleman.png                   |
      | source/layouts/layout.erb                     |
      | source/javascripts/all.js                     |
      | source/stylesheets/all.css                    |
      | source/stylesheets/normalize.css              |
      
  Scenario: Create a new project (alias i)
    When I run `middleman i MY_PROJECT`
    Then a directory named "MY_PROJECT" should exist
    
  Scenario: Create a new project (alias new)
    When I run `middleman new MY_PROJECT`
    Then a directory named "MY_PROJECT" should exist
  
  Scenario: Create a new project (alias n)
    When I run `middleman n MY_PROJECT`
    Then a directory named "MY_PROJECT" should exist
    
  Scenario: Create a new project with Rack
    When I run `middleman init MY_PROJECT --rack`
    Then a directory named "MY_PROJECT" should exist
    When I cd to "MY_PROJECT"
    Then the following files should exist:
      | config.rb                                     |
      | config.ru                                     |
      | Gemfile                                       |
    
  Scenario: Create a new project without Bundler
    When I run `middleman init MY_PROJECT --no-bundler`
    Then a directory named "MY_PROJECT" should exist
    When I cd to "MY_PROJECT"
    Then the following files should exist:
      | config.rb                                     |
    Then the following files should not exist:  
      | Gemfile                                       |
      | config.ru                                     |
      
  Scenario: Create a new HTML5 project
    When I run `middleman init MY_PROJECT --template=html5`
    Then a directory named "MY_PROJECT" should exist
    When I cd to "MY_PROJECT"
    Then the following files should exist:
      | config.rb                                     |
      | Gemfile                                       |
    Then the following files should not exist:
      | config.ru                                     |
    And the file "config.rb" should contain "set :js_dir, 'js'"
    Then a directory named "source" should exist
    When I cd to "source"
    Then the following files should exist:
      | index.html                                    |
      | humans.txt                                    |
      | js/script.js                                  |
      
  Scenario: Create a new HTML5 project with Rack
    When I run `middleman init MY_PROJECT --rack --template=html5`
    Then a directory named "MY_PROJECT" should exist
    When I cd to "MY_PROJECT"
    Then the following files should exist:
      | config.rb                                     |
      | config.ru                                     |
      | Gemfile                                       |
    
  Scenario: Create a new Mobile HTML5 project
    When I run `middleman init MY_PROJECT --template=mobile`
    Then a directory named "MY_PROJECT" should exist
    When I cd to "MY_PROJECT"
    Then the following files should exist:
      | config.rb                                     |
      | Gemfile                                       |
    Then the following files should not exist:
      | config.ru                                     |
    Then a directory named "source" should exist
    When I cd to "source"
    Then the following files should exist:
      | index.html                                    |
      | humans.txt                                    |
      | js/libs/respond.min.js                        |
      
  Scenario: Create a new Mobile HTML5 project with Rack
    When I run `middleman init MY_PROJECT --rack --template=mobile`
    Then a directory named "MY_PROJECT" should exist
    When I cd to "MY_PROJECT"
    Then the following files should exist:
      | config.rb                                     |
      | config.ru                                     |
      | Gemfile                                       |
{'fraction_non_alphanumeric': 0.05156836869353365, 'fraction_numerical': 0.001725713125571008, 'mean_word_length': 1.2035338850369044, 'pattern_counts': {'":': 0, '<': 3, '<?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': 54, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '110490', 'n_tokens_mistral': 2426, 'n_tokens_neox': 2336, 'n_words': 893}