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/generators/steps_generator.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, 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

.configurationObject

Singleton de configuração



27
28
29
# File 'lib/bddgenx/configuration.rb', line 27

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

.configure {|configuration| ... } ⇒ Object

DSL para configurar

Yields:



32
33
34
# File 'lib/bddgenx/configuration.rb', line 32

def self.configure
  yield(configuration)
end