eyes_core 4.0.4 → 4.0.5.2

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
- SHA1:
3
- metadata.gz: 75034b315f72b3618b3dbf11275415ad4d6b6198
4
- data.tar.gz: 141e9a4bda412f6744dfe27a18dd4724c80f07bf
2
+ SHA256:
3
+ metadata.gz: 0b736b5fc20ded53589a45b2bdcbf90c1dd0a83726ea3e110fb598ec420b8ff2
4
+ data.tar.gz: 49b2a7d21f04d50104053dd541f5fc48d775cfc180eee0a12fc69f9af7b106c4
5
5
  SHA512:
6
- metadata.gz: 83ac3e51133c6157ec47cffeba360aa78939a05d6e95afdb82b61e86e21051ac330ecd9aee8de40c1c2cdb69418c4e78388e8052e769fcacdf42bfd0420664ec
7
- data.tar.gz: 45035b9600c21207ccc79649949968275d28ae1eddf523c97774a18eb5770eb024c6eea92314270b1bb667af12792dd49779ba26113ac020181b247331246e2e
6
+ metadata.gz: 0fce3e0e9b5f6592b8fc4bf6fad2296009a3437a1746ea867d64593a6beaef8894080bd1ea8530525bc8b6fc59afcdff10d2c8ffe28f7f79cd6a5b913c948bb1
7
+ data.tar.gz: ca19317f33509bfff0da465cd6533288a4b12178f707b561cf1d2488643ba2cf3f10492c0de7edece239fc68d6b5a9a4b1afe066bc7563ce3ec040829f3e7119
@@ -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
@@ -29,7 +29,7 @@ module Applitools
29
29
  ensure
30
30
  delete_all_batches
31
31
  end
32
- return all_test_results unless all_test_results.empty?
32
+ # return all_test_results unless all_test_results.empty?
33
33
  all_universal_results = close_all_eyes
34
34
  test_result_summary = Applitools::TestResultSummary.new(all_universal_results).old_style_results_array
35
35
  return [] if test_result_summary.reject { |tr| tr.aborted? }.empty?
@@ -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.2'.freeze
5
+ UNIVERSAL_VERSION = '2.5.17'.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.2
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-25 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.17
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.17
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: bundler
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -424,8 +424,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
424
424
  - !ruby/object:Gem::Version
425
425
  version: '0'
426
426
  requirements: []
427
- rubyforge_project:
428
- rubygems_version: 2.6.14.3
427
+ rubygems_version: 3.3.14
429
428
  signing_key:
430
429
  specification_version: 4
431
430
  summary: Core of the Applitools Ruby SDK