eyes_core 3.18.0 → 3.18.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/applitools/core/batch_info.rb +20 -4
- data/lib/applitools/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 61b34e0cc3a83b84a7a4a2c9548eb55ad10c8b4a
|
4
|
+
data.tar.gz: f017a2093422378561cd8d3236fe696816129a80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd0fced9b70f0a10375e81dbbde7ae75cd8f0ee8f7969a176f0156a9c5323e21bb337a0d2a0eb43bd607c4af82a15ee12d8dd79e70d8965099a821fdb69ac980
|
7
|
+
data.tar.gz: 6a6fef3ccba6a3df74c7a0cd35886036442df8a4b1d365c13cb1a9d05eccd1efc3497653e18fdd3e49d54735472bc9e26a3718757c1ab8677fa61f3628c45ad0
|
@@ -1,12 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'securerandom'
|
4
|
+
require 'applitools/utils/utils'
|
4
5
|
require_relative 'helpers'
|
5
6
|
|
6
7
|
module Applitools
|
7
8
|
class BatchInfo
|
8
9
|
extend Helpers
|
9
|
-
attr_accessor :started_at, :id, :notify_on_completion
|
10
|
+
attr_accessor :started_at, :id, :notify_on_completion, :properties
|
10
11
|
|
11
12
|
environment_attribute :name, 'APPLITOOLS_BATCH_NAME'
|
12
13
|
environment_attribute :id, 'APPLITOOLS_BATCH_ID'
|
@@ -14,10 +15,24 @@ module Applitools
|
|
14
15
|
environment_attribute :env_notify_on_completion, 'APPLITOOLS_BATCH_NOTIFY'
|
15
16
|
|
16
17
|
|
17
|
-
def initialize(
|
18
|
+
def initialize(args = nil, started_at = Time.now)
|
19
|
+
case args
|
20
|
+
when String
|
21
|
+
name = args
|
22
|
+
when Hash
|
23
|
+
sym_args = Applitools::Utils.symbolize_keys args
|
24
|
+
id ||= sym_args[:id]
|
25
|
+
name ||= sym_args[:name]
|
26
|
+
properties ||= sym_args[:properties]
|
27
|
+
end
|
18
28
|
self.name = name if name
|
19
29
|
@started_at = started_at
|
20
|
-
|
30
|
+
if id
|
31
|
+
self.id = id
|
32
|
+
elsif self.id.nil? || self.id.empty?
|
33
|
+
self.id = SecureRandom.uuid
|
34
|
+
end
|
35
|
+
self.properties = properties if properties
|
21
36
|
self.notify_on_completion = 'true'.casecmp(env_notify_on_completion || '') == 0 ? true : false
|
22
37
|
end
|
23
38
|
|
@@ -27,7 +42,8 @@ module Applitools
|
|
27
42
|
'name' => name,
|
28
43
|
'startedAt' => @started_at.iso8601,
|
29
44
|
'batchSequenceName' => sequence_name,
|
30
|
-
'notifyOnCompletion' => notify_on_completion
|
45
|
+
'notifyOnCompletion' => notify_on_completion,
|
46
|
+
'properties' => properties
|
31
47
|
}
|
32
48
|
end
|
33
49
|
|
data/lib/applitools/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eyes_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.18.
|
4
|
+
version: 3.18.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Applitools Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04-
|
11
|
+
date: 2021-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oily_png
|