stddtool 0.1.0.1 → 0.2.0.1

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/stddtool.rb +19 -13
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 212b8f7cbfab0c4580463bb42f5b3ef7546b67bb
4
- data.tar.gz: ad70bf67159e02aaa7e3295394797907933ea7b7
3
+ metadata.gz: fac96c7c24541622c6fcfe701d73c106ae143064
4
+ data.tar.gz: f027bdf2ba5cc8c645a0886829d130446fd5920b
5
5
  SHA512:
6
- metadata.gz: 390622f6900933a6237bd0ab8a18eb533f55eeb58086dccca9dc6fd10eb43c5d6a19f6ad6d4fa018748d965452921abef4a16bd9471f0471d6d14c03759fe49d
7
- data.tar.gz: c051a4ad6f54a844b006cccb29e744e8b199dd7a9eddc755f173011b8a6b0858c3ddf3a58550684c048c5309c6c439ecec7234bcef6c977c280d3e9e7d88bea6
6
+ metadata.gz: 09176bf4f77b85f35715400e0a770448b7b606412e35888752566add9b3037546a37ec837afe8e2e45faa5d0cea158bc90a41416be8c5d5c08c10ae6bbc9b944
7
+ data.tar.gz: 6500e54ae3b68e693b61240a2e7d3d6f7fdb03b7118f98fdf56eadcef2ab11883a726405b1a6233a2d0b9a740007b6d92ac9b4c18af2113fba04d760cd6e6ea4
data/lib/stddtool.rb CHANGED
@@ -11,15 +11,15 @@ require 'base64'
11
11
 
12
12
  def initialize(step_mother, io, options)
13
13
  @buildnr = ENV['BUILD']
14
- @url = ENV['URL']
15
- @job = ENV['JOBNAME']
14
+ @job = ENV['JOB']
15
+ @url = ENV['STDD_URL'] ? ENV['STDD_URL'] : ['www.stddtool.se']
16
16
  @proxy = ENV['http_proxy'] ? URI.parse('http://'+ENV['http_proxy']) : OpenStruct.new
17
17
  # Generate string as runId
18
18
  o = [('a'..'z'), ('A'..'Z')].map { |i| i.to_a }.flatten
19
19
  @runID = (0...50).map{ o[rand(o.length)] }.join
20
20
  @delayed_messages = []
21
21
  p @runID
22
- p "Initiating STDDTool formatter"
22
+ p "Initiating STDDTool(#{@url}) formatter for #{@job} : #{@buildnr}"
23
23
  end
24
24
 
25
25
  def embed(src, mime_type, label)
@@ -47,11 +47,11 @@ require 'base64'
47
47
  end
48
48
 
49
49
  def before_background(background)
50
- @in_background = true
50
+ # @in_background = true
51
51
  end
52
52
 
53
53
  def after_background(background)
54
- @in_background = nil
54
+ # @in_background = nil
55
55
  end
56
56
 
57
57
  def before_step(step)
@@ -63,23 +63,30 @@ require 'base64'
63
63
  @duration = Time.now - @start_time
64
64
  end
65
65
 
66
+
67
+ def background_name(keyword, name, file_colon_line, source_indent)
68
+ p "Background #{name}"
69
+ scenarioObj=ScenarioObj.new(@featureID,keyword,name)
70
+ postScenario(scenarioObj)
71
+ end
72
+
66
73
  def scenario_name(keyword, name, file_colon_line, source_indent)
67
74
  p "scenario #{name}"
68
- scenarioObj=ScenarioObj.new(@featureID,keyword,name,@embedding)
75
+ scenarioObj=ScenarioObj.new(@featureID,keyword,name)
69
76
  postScenario(scenarioObj)
70
77
  end
71
78
 
72
79
 
73
80
  def after_step_result(keyword, step_match, multiline_arg, status, exception, source_indent, background, file_colon_line)
74
- if @in_background == true
75
- # do nothing. background gets reported as step anyway
76
- else
81
+ # if @in_background == true
82
+ # # do nothing. background gets reported as step anyway
83
+ # else
77
84
  step_name = step_match.format_args(lambda{|param| "*#{param}*"})
78
85
  # message = "#{step_name} #{status}"
79
86
  # puts keyword + " " + message
80
87
  stepObj=StepObj.new(keyword,step_name,status,exception, @duration,@delayed_messages)
81
88
  postStep(@scenarioID,stepObj)
82
- end
89
+ #end
83
90
  end
84
91
 
85
92
  def postFeature(featureObj)
@@ -191,14 +198,13 @@ class StepObj
191
198
  end
192
199
 
193
200
  class ScenarioObj
194
- def initialize(featureID,keyword, name,embedding)
201
+ def initialize(featureID,keyword, name )
195
202
  @feature_ID = featureID
196
203
  @scenario_keyword=keyword
197
204
  @scenario_name=name
198
- @scenario_embedding = embedding
199
205
  end
200
206
  def to_json
201
- {'featureId' => @feature_ID,'keyword' => @scenario_keyword, 'name' => @scenario_name,'embedding' => @scenario_embedding }.to_json
207
+ {'featureId' => @feature_ID,'keyword' => @scenario_keyword, 'name' => @scenario_name}.to_json
202
208
  end
203
209
  end
204
210
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stddtool
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.1
4
+ version: 0.2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anton Danielsson