<commit_before>require 'thor'
require 'putenv/messages'
require 'putenv/config'
require 'putenv/plugin'
require 'putenv/provider'
require 'putenv/platform'
require 'putenv/build'
require 'putenv/provision'

# Refer to README.md for use instructions
module Putenv
  # Start of main CLI
  class CLI < Thor
    package_name 'putenv'
    map '--version' => :version
    map '-v' => :version

    desc 'version, -v', DESC_VERSION
    def version
      puts VERSION
    end

    desc 'new', DESC_NEW
    method_options %w( provider -p ) => :string
    def new
      Putenv::Provider.new(options[:provider]).new_definition
    end

    # rubocop:disable LineLength
    desc 'health [ENVIRONMENT]', DESC_HEALTH
    method_options %w( provider -p ) => :string
    def health(env = '')
      puts HEALTHY if Putenv::Platform.new(Putenv::Provider.new(options[:provider])).healthy?(env)
    end
    # rubocop:enable LineLength

    # subcommand in Thor called as registered class
    register(Putenv::Plugin, 'plugin', 'plugin COMMAND', DESC_PLUGIN)
    register(Putenv::Build, 'build', 'build TARGET', DESC_BUILD)
  end
end<commit_msg>Allow for lazy provider by not specifying provider<commit_after>require 'thor'
require 'putenv/messages'
require 'putenv/config'
require 'putenv/plugin'
require 'putenv/provider'
require 'putenv/platform'
require 'putenv/build'
require 'putenv/provision'

# Refer to README.md for use instructions
module Putenv
  # Start of main CLI
  class CLI < Thor
    package_name 'putenv'
    map '--version' => :version
    map '-v' => :version

    desc 'version, -v', DESC_VERSION
    def version
      puts VERSION
    end

    desc 'new', DESC_NEW
    method_options %w( provider -p ) => :string, :required => false
    def new
      Putenv::Provider.new(options[:provider]).new_definition
    end

    # rubocop:disable LineLength
    desc 'health [ENVIRONMENT]', DESC_HEALTH
    method_options %w( provider -p ) => :string
    def health(env = '')
      provider = options[:provider] ? Putenv::Provider.new(options[:provider]) : nil
      # puts HEALTHY if Putenv::Platform.new(Putenv::Provider.new(options[:provider])).healthy?(env)
      puts HEALTHY if Putenv::Platform.new(provider).healthy?(env)
    end
    # rubocop:enable LineLength

    # subcommand in Thor called as registered class
    register(Putenv::Plugin, 'plugin', 'plugin COMMAND', DESC_PLUGIN)
    register(Putenv::Build, 'build', 'build TARGET', DESC_BUILD)
  end
end
{'fraction_non_alphanumeric': 0.11712078080520537, 'fraction_numerical': 0.0, 'mean_word_length': 3.823529411764706, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 12, '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': '7505683', 'n_tokens_mistral': 789, 'n_tokens_neox': 780, 'n_words': 214}