<commit_before><commit_msg>Rename process lifecycle feature to commands feature.<commit_after>Feature: Commands

  Cognizant provides a number of commands to maually change the state of a
  process as a part of its maintenance.

  Background:
    Given a file named "sleep_process.rb" with:
      """ruby
      Cognizant.monitor do
        name 'sleep_process'
        start_command 'sleep 60'
        autostart false
      end
      """

  @daemon
  @shell
  Scenario: Run the help command
    Given the daemon is running
    And the shell is running

    When I run "help" in the shell
    Then I should see "You can run the following commands" in the shell

  @daemon
  @shell
  Scenario: Run all maintenance commands for a sample sleep process
    Given the daemon is running
    And the shell is running

    When I run "load sleep_process.rb" successfully in the shell
    Then the status of "sleep_process" is "stopped"

    When I run "start sleep_process" successfully in the shell
    Then the status of "sleep_process" should be "running"

    When I run "stop sleep_process" successfully in the shell
    Then the status of "sleep_process" should be "stopped"

    When I run "restart sleep_process" successfully in the shell
    Then the status of "sleep_process" should be "running"

    When I run "unmonitor sleep_process" successfully in the shell
    Then the status of "sleep_process" should be "unmonitored"

    When I run "monitor sleep_process" successfully in the shell
    Then the status of "sleep_process" should be "running"

    When I run "stop sleep_process" successfully in the shell
    Then the status of "sleep_process" should be "stopped"

  @daemon
  @shell
  Scenario: Shut down the daemon via command
    Given the daemon is running
    And the shell is running

    When I run "shutdown" in the shell
    Then I should see "The daemon has been shutdown successfuly." in the shell
    And a process named "cognizantd" should not be running
{'fraction_non_alphanumeric': 0.044489383215369056, 'fraction_numerical': 0.0010111223458038423, 'mean_word_length': 3.2286324786324787, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2818255', 'n_tokens_mistral': 548, 'n_tokens_neox': 526, 'n_words': 271}