<commit_before>Feature: `rubygems_bundler` and `chef_berkshelf` shortcuts for tools

Scenario: rubygems_bundler
  Given a repository with following Vendorfile:
    """ruby
    # Delete Bundler's variables
    %w[RUBYOPT BUNDLE_PATH BUNDLE_BIN_PATH BUNDLE_GEMFILE].each do |var|
      ENV.delete(var)
    end
    rubygems_bundler
    """
  And following Gemfile:
    """ruby
    source "file://#{ENV['FIXTURES_DIR']}/rubygems"
    gem "hello"
    """
  When I run vendor command "install"
  Then following has been conjured:
    | Name         | rubygems        |
    | Path         | cache           |
    | With file    | hello-0.0.1.gem |
    | Without file | first-0.gem     |

Scenario: chef_berkshelf
  Given a repository with following Vendorfile:
    """ruby
    chef_berkshelf
    """
  And a file named "Berksfile" with:
    """ruby
    site :opscode
    cookbook 'build-essential'
    """
  And I successfully run `berks install`
  And I successfully run `git add Berksfile Berksfile.lock`
  And I successfully run `git commit -m Berksfile`
  When I run vendor command "install"
  Then following has been conjured:
    | Name         | cookbooks                   |
    | With file    | build-essential/metadata.rb  |

Scenario: postprocessing tool
  Given a repository with following Vendorfile:
    """ruby
    chef_berkshelf do
      FileUtils::rm_rf 'runit'
    end
    """
  And a file named "Berksfile" with:
    """ruby
    site :opscode
    cookbook 'runit'
    """
  And I successfully run `berks install`
  And I successfully run `git add Berksfile Berksfile.lock`
  And I successfully run `git commit -m Berksfile`
  When I run vendor command "install"
  Then following has been conjured:
    | Name         | cookbooks                   |
    | With file    | build-essential/metadata.rb |
    | With file    | yum/metadata.rb             |
    | Without file | runit/metadata.rb           |<commit_msg>Bring back @berkshelf tag, it was needed after all.<commit_after>Feature: `rubygems_bundler` and `chef_berkshelf` shortcuts for tools

Scenario: rubygems_bundler
  Given a repository with following Vendorfile:
    """ruby
    # Delete Bundler's variables
    %w[RUBYOPT BUNDLE_PATH BUNDLE_BIN_PATH BUNDLE_GEMFILE].each do |var|
      ENV.delete(var)
    end
    rubygems_bundler
    """
  And following Gemfile:
    """ruby
    source "file://#{ENV['FIXTURES_DIR']}/rubygems"
    gem "hello"
    """
  When I run vendor command "install"
  Then following has been conjured:
    | Name         | rubygems        |
    | Path         | cache           |
    | With file    | hello-0.0.1.gem |
    | Without file | first-0.gem     |

@berkshelf
Scenario: chef_berkshelf
  Given a repository with following Vendorfile:
    """ruby
    chef_berkshelf
    """
  And a file named "Berksfile" with:
    """ruby
    site :opscode
    cookbook 'build-essential'
    """
  And I successfully run `berks install`
  And I successfully run `git add Berksfile Berksfile.lock`
  And I successfully run `git commit -m Berksfile`
  When I run vendor command "install"
  Then following has been conjured:
    | Name         | cookbooks                   |
    | With file    | build-essential/metadata.rb  |

@berkshelf
Scenario: postprocessing tool
  Given a repository with following Vendorfile:
    """ruby
    chef_berkshelf do
      FileUtils::rm_rf 'runit'
    end
    """
  And a file named "Berksfile" with:
    """ruby
    site :opscode
    cookbook 'runit'
    """
  And I successfully run `berks install`
  And I successfully run `git add Berksfile Berksfile.lock`
  And I successfully run `git commit -m Berksfile`
  When I run vendor command "install"
  Then following has been conjured:
    | Name         | cookbooks                   |
    | With file    | build-essential/metadata.rb |
    | With file    | yum/metadata.rb             |
    | Without file | runit/metadata.rb           |
{'fraction_non_alphanumeric': 0.08567774936061381, 'fraction_numerical': 0.0020460358056265983, 'mean_word_length': 2.436731107205624, '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': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6414953', 'n_tokens_mistral': 1249, 'n_tokens_neox': 1213, 'n_words': 382}