Module: Bddgenx

Defined in:
lib/parser.rb,
lib/bddgenx/setup.rb,
lib/bddgenx/version.rb,
lib/bddgenx/configuration.rb,
lib/bddgenx/reports/backup.rb,
lib/bddgenx/reports/tracer.rb,
lib/bddgenx/support/loader.rb,
lib/bddgenx/generators/runner.rb,
lib/bddgenx/ia/gemini_cliente.rb,
lib/bddgenx/support/validator.rb,
lib/bddgenx/ia/chatgtp_cliente.rb,
lib/bddgenx/support/font_loader.rb,
lib/bddgenx/generators/generator.rb,
lib/bddgenx/reports/pdf_exporter.rb,
lib/bddgenx/utils/language_helper.rb,
lib/bddgenx/support/properties_loader.rb,
lib/bddgenx/generators/steps_generator.rb,
lib/bddgenx/ia/microsoft_copilot_cliente.rb,
lib/bddgenx/utils/gherkin_cleaner_helper.rb,
lib/bddgenx/utils/remover_steps_duplicados_helper.rb

Overview

lib/bddgenx/steps_generator.rb encoding: utf-8

Classe responsável por gerar automaticamente os arquivos de definição de passos do Cucumber a partir de arquivos ‘.feature`. Suporta palavras-chave do Gherkin tanto em Português quanto em Inglês, além de identificar parâmetros dinamicamente (strings e números).

Defined Under Namespace

Modules: IA, Support, Utils Classes: Backup, Configuration, FontLoader, Generator, PDFExporter, Parser, PropertiesLoader, Runner, Setup, StepsGenerator, Tracer, Validator

Constant Summary collapse

TIPOS_BLOCOS =

Tipos de blocos reconhecidos na história (.txt), incluindo variações em Português e Inglês para blocos de exemplo.

Returns:

  • (Array<String>)
%w[
  CONTEXT SUCCESS FAILURE ERROR EXCEPTION
  VALIDATION PERMISSION EDGE_CASE PERFORMANCE
  EXEMPLO EXEMPLOS RULE
].freeze
VERSION_FILE =

Caminho absoluto para o arquivo VERSION, que fica 3 níveis acima deste arquivo: lib/bddgenx/version.rb → lib/bddgenx → lib → raiz do projeto

File.expand_path("../../../VERSION", __FILE__)
VERSION =

Lê o conteúdo do arquivo VERSION para definir a constante VERSION Se o arquivo não existir, exibe um aviso e define o valor padrão “0.0.0”

if File.exist?(VERSION_FILE)
  File.read(VERSION_FILE).strip
else
  warn "WARNING: VERSION file not found, defaulting to 0.0.0"
  "0.0.0"
end

Class Method Summary collapse

Class Method Details

.configurationConfiguration

Retorna uma instância singleton da configuração da gem.

Returns:



76
77
78
# File 'lib/bddgenx/configuration.rb', line 76

def self.configuration
  @configuration ||= Configuration.new
end

.configure {|config| ... } ⇒ Object

Permite configurar a gem usando um bloco DSL.

Exemplo:

Bddgenx.configure do |config|
  config.mode = :gemini
  config.gemini_api_key_env = 'MY_GEMINI_KEY'
end

Yield Parameters:



90
91
92
# File 'lib/bddgenx/configuration.rb', line 90

def self.configure
  yield(configuration)
end