bddgenx 0.1.48 → 0.1.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/bddgenx/generator.rb +3 -1
- data/lib/bddgenx/utils/parser.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 230aa1f7581925ef006f2a3a433edc0aafdd3054839ebaef6b0f1da0118b4753
|
4
|
+
data.tar.gz: 4107e5a54d49b50db2b705b78dcc0384d4469fa875d35cc781113fc70880d15f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d99c0c4be91f5ff9f78c4d4cea0280effff83cd0c25db1ac408a99e5f439fdd70a59c06b6d4b5fa0c25eb2ec8a681e86c085438535f99ec51ee4032a2e2ba000
|
7
|
+
data.tar.gz: dde6912e1e6a73b64a447d1516e5f79e84d75120083e0a79460e4acec59c7f3a6dc6b24da9f744c368db9993cb77f8ae951b8dea761121b4b64bb222455f992f
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.49
|
data/lib/bddgenx/generator.rb
CHANGED
@@ -51,6 +51,7 @@ module Bddgenx
|
|
51
51
|
def self.gerar_feature(input, override_path = nil)
|
52
52
|
historia = input.is_a?(String) ? Parser.ler_historia(input) : input
|
53
53
|
idioma = historia[:idioma] || 'pt'
|
54
|
+
cont = 1
|
54
55
|
|
55
56
|
# Geração do nome base do arquivo
|
56
57
|
nome_base = historia[:quero]
|
@@ -103,7 +104,8 @@ module Bddgenx
|
|
103
104
|
if exemplos.any?
|
104
105
|
# Cenário com Esquema
|
105
106
|
conteudo << " #{tag_line}\n"
|
106
|
-
conteudo << " #{palavras[:esquema]}: #{
|
107
|
+
conteudo << " #{palavras[:esquema]}: Exemplo #{cont} \n"
|
108
|
+
cont += 1
|
107
109
|
|
108
110
|
# Passos do cenário
|
109
111
|
passos.each do |p|
|
data/lib/bddgenx/utils/parser.rb
CHANGED
@@ -80,7 +80,7 @@ module Bddgenx
|
|
80
80
|
# Processa cada linha restante para blocos e exemplos
|
81
81
|
linhas.each do |linha|
|
82
82
|
# Início de bloco de exemplos: [EXEMPLO], [EXEMPLOS] ou [EXAMPLES] com tag opcional
|
83
|
-
if linha =~ /^\[(?:EXEMPLO|EXEMPLOS|EXAMPLES)\](?:@(\w+))?$/i
|
83
|
+
if linha =~ /^\[(?:EXEMPLO|EXEMPLOS|EXAMPLES)\](?:@([\w\-]+))?$/i
|
84
84
|
exemplos_mode = true
|
85
85
|
# Cria array de exemplos no último grupo, se ainda não existir
|
86
86
|
historia[:grupos].last[:exemplos] = []
|
@@ -88,7 +88,7 @@ module Bddgenx
|
|
88
88
|
end
|
89
89
|
|
90
90
|
# Início de bloco com tipo definido em TIPOS_BLOCOS e tag opcional
|
91
|
-
if linha =~ /^\[(#{TIPOS_BLOCOS.join('|')})\](?:@(\w+))?$/i
|
91
|
+
if linha =~ /^\[(#{TIPOS_BLOCOS.join('|')})\](?:@([\w\-]+))?$/i
|
92
92
|
exemplos_mode = false
|
93
93
|
tipo = Regexp.last_match(1).upcase
|
94
94
|
tag = Regexp.last_match(2)
|