eyes_core 4.0.4 → 4.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 75034b315f72b3618b3dbf11275415ad4d6b6198
4
- data.tar.gz: 141e9a4bda412f6744dfe27a18dd4724c80f07bf
3
+ metadata.gz: 594c8d4219a36eebaef4d76310a8c9525235891d
4
+ data.tar.gz: f098d430a1c294deb84141dd2b8fb2c8505e0b01
5
5
  SHA512:
6
- metadata.gz: 83ac3e51133c6157ec47cffeba360aa78939a05d6e95afdb82b61e86e21051ac330ecd9aee8de40c1c2cdb69418c4e78388e8052e769fcacdf42bfd0420664ec
7
- data.tar.gz: 45035b9600c21207ccc79649949968275d28ae1eddf523c97774a18eb5770eb024c6eea92314270b1bb667af12792dd49779ba26113ac020181b247331246e2e
6
+ metadata.gz: 6442028a1b2f6eee6c86538d50c4272310f8ec9928216deee68062f93b7e89b0d9df9a342affcd7aa996faba44128d43227e8b32f0b917e522753a0dc08daffd
7
+ data.tar.gz: 842eb9c9fab4f64621a7d15f508112c20ade9f80f04c4eb34c84f180a8c19a3140c8ef04bd71e23ddb7dd2d22b412c2b4adb6ac748c63235530505519e316918
@@ -35,7 +35,9 @@ module Applitools
35
35
  self.id = PROCESS_DEFAULT_BATCH_ID
36
36
  end
37
37
  self.properties = properties if properties
38
- self.notify_on_completion = 'true'.casecmp(env_notify_on_completion || '') == 0 ? true : false
38
+ unless env_notify_on_completion.nil?
39
+ self.notify_on_completion = 'true'.casecmp(env_notify_on_completion || '') == 0 ? true : false
40
+ end
39
41
  end
40
42
 
41
43
  def json_data
@@ -27,5 +27,23 @@ module Applitools
27
27
  def close_all_eyes
28
28
  get_universal_eyes_manager.close_all_eyes
29
29
  end
30
+
31
+ # def close_batch(batch_id)
32
+ # if 'true'.casecmp(ENV['APPLITOOLS_DONT_CLOSE_BATCHES'] || '') == 0
33
+ # return Applitools::EyesLogger.info(
34
+ # 'APPLITOOLS_DONT_CLOSE_BATCHES environment variable set to true. Doing nothing.'
35
+ # ) && false
36
+ # end
37
+ # Applitools::ArgumentGuard.not_nil(batch_id, 'batch_id')
38
+ # Applitools::EyesLogger.info("Close batch called with #{batch_id}")
39
+ #
40
+ # close_batches_result = universal_client.core_close_batches(batch_id)
41
+ # if close_batches_result.is_a?(Hash) && close_batches_result[:message] && close_batches_result[:stack]
42
+ # Applitools::EyesLogger.logger.debug "Eyes close Batch: #{close_batches_result[:message]}"
43
+ # Applitools::EyesLogger.logger.debug "Stack for #{Applitools::Connectivity::UniversalClient::CORE_CLOSE_BATCHES} : #{close_batches_result[:stack]}"
44
+ # else
45
+ # Applitools::EyesLogger.info "delete batch is done with #{close_batches_result}"
46
+ # end
47
+ # end
30
48
  end
31
49
  end
@@ -93,8 +93,15 @@ module Applitools::Connectivity
93
93
  await(->(cb) { @socket.request(CORE_SET_VIEWPORT_SIZE, {driver: driver, size: size}, cb) })
94
94
  end
95
95
 
96
- def core_close_batches(close_batch_settings)
96
+ def core_close_batches(close_batch_settings=nil)
97
97
  # batchIds, serverUrl?, apiKey?, proxy?
98
+ unless close_batch_settings.is_a?(Hash)
99
+ batch_ids = [@open_config[:batch][:id]]
100
+ batch_ids = [close_batch_settings] if close_batch_settings.is_a?(String)
101
+ batch_ids = close_batch_settings if close_batch_settings.is_a?(Array)
102
+ optional = [:serverUrl, :apiKey, :proxy].map {|k| [k, @open_config[k]] }.to_h
103
+ close_batch_settings = { settings: ({ batchIds: batch_ids }.merge(optional).compact) }
104
+ end
98
105
  await(->(cb) { @socket.request(CORE_CLOSE_BATCHES, close_batch_settings, cb) })
99
106
  end
100
107
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  module Applitools
4
- VERSION = '4.0.4'.freeze
5
- UNIVERSAL_VERSION = '2.5.7'.freeze
4
+ VERSION = '4.0.5'.freeze
5
+ UNIVERSAL_VERSION = '2.5.11'.freeze
6
6
  end
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: 4.0.4
4
+ version: 4.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Applitools Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-13 00:00:00.000000000 Z
11
+ date: 2022-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -114,14 +114,14 @@ dependencies:
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 2.5.7
117
+ version: 2.5.11
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 2.5.7
124
+ version: 2.5.11
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: bundler
127
127
  requirement: !ruby/object:Gem::Requirement