aipim-rails 0.0.160 → 0.0.161

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/aipim-rails/parser.rb +11 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c98abd9b6ce9661eb723bcf8c0b13db39b5037ad
4
- data.tar.gz: 54ae79cd279376fad2db824ade688bf387657f09
3
+ metadata.gz: d0fc95917c3ca5a6a24635092ceaa9fdb38ba51b
4
+ data.tar.gz: 2f770c59a94da2727099e079d750d474b16f48df
5
5
  SHA512:
6
- metadata.gz: 8cc8e7d07eba54bc7eab75a70d779465b8a06d3d85e9d1611e7dc830b777a9ef507559d960b566109dce086b7661015cdf6a85dd81b5bd56e11824be5cc261e5
7
- data.tar.gz: 1c505705786d7e0a97d712997e7b3b2f4c330de5c92c235035bdc9585dc6d3c37ea5899adfdbb31d4d26d6e9b191a06b6d178bf9e3cfdf1fbe296c436649adf4
6
+ metadata.gz: bf14407bbf578cf986aecf43f6e0765629e1da79f0189205e06f791b8ebca3b7573c135509421fd2b8d326c50a255290eb758bf21ab1049c9aaa9232456f16d1
7
+ data.tar.gz: 25b8ddc293ae60a7064f88aa8f55dbccdac6fb253af66f71eb79c0350536820abeb6525af996797a463018b66a1bde60adc8fb357002c2a800bb4ebab2134dd0
@@ -2,14 +2,17 @@ require 'aipim-rails/parser_helper'
2
2
 
3
3
  module Parser
4
4
 
5
+ # inicia o processo de parset
5
6
  def self.init(filename)
6
7
  parser(filename)
7
8
  end
8
9
 
9
10
 
10
11
  def self.tag_screenshot(line,file,workset)
11
- if line && ParserHelper.is_tag?(line) && ParserHelper.is_screenshot?(line)
12
- workset[:screenshot] = true
12
+ if line && ParserHelper.is_tag?(line)
13
+ if ParserHelper.is_screenshot?(line)
14
+ workset[:screenshot] = true
15
+ end
13
16
  line = ParserHelper::read_line(file)
14
17
  end
15
18
  return line, workset
@@ -44,11 +47,13 @@ module Parser
44
47
  while ((line = ParserHelper::read_line(file)) && !ParserHelper.is_command?(line))
45
48
  scenario_steps << line if !(line.gsub(" ", "") == "")
46
49
  end
50
+ screenshot = nil
47
51
  if workset[:screenshot]
48
52
  screenshot = workset[:screenshots][workset[:screenshot_counter]].to_s
49
53
  workset[:screenshot_counter] += 1
50
54
  workset[:screenshot] = false
51
55
  end
56
+ workset[:screenshot] = false
52
57
  workset[:scenarios] << {name: scenario_name, steps: scenario_steps, screenshot: screenshot}
53
58
  end
54
59
  return line, workset
@@ -71,6 +76,7 @@ module Parser
71
76
  # Get screenshot files
72
77
  screenshots = get_screenshot_files(filename)
73
78
 
79
+ # variaveis de trabalho
74
80
  workset = {
75
81
  screenshot: false,
76
82
  screenshot_counter: 0,
@@ -82,12 +88,15 @@ module Parser
82
88
  scenarios: []
83
89
  }
84
90
 
91
+ # esse codigo é q faz a magica
85
92
  line = ParserHelper::read_line(file)
86
93
  while (line)
87
94
  line, workset = process_tags(line,file,workset)
88
95
  end
89
96
  file.close
97
+ # no final o workset vai estar com tudo que precisamos
90
98
 
99
+ # montar a feature com o qu eu tenho do workset
91
100
  feature = {
92
101
  feature_name: workset[:feature_name],
93
102
  feature_description: workset[:feature_description],
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aipim-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.160
4
+ version: 0.0.161
5
5
  platform: ruby
6
6
  authors:
7
7
  - Facta TI