quarantine 2.2.0 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/quarantine/databases/google_sheets.rb +8 -9
- data/lib/quarantine/rspec_adapter.rb +4 -4
- data/lib/quarantine/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 31ffed67bd1774918fd52c8bfe309398d43b8c218175f2a414725382df680ee7
|
4
|
+
data.tar.gz: aca3eab589422f555224ce2638e979aff7f6fc2f17d4b33ac91e2f0177d4fb9b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0894a8c2561b741d3f9466d28e8424cde69ece0b7f228d700b485f748eb26531bd81ac549493a91641010ceb6b34eb1d7abbaf49475f4874d6f67db297d522ec'
|
7
|
+
data.tar.gz: 281ba613e8806b8d3f1e4318a65492435d971e0e89138cb87c44de2c7709a983672930e00cdfddb46bf245da4aa2e52804b2cf47d908fe9f0dd62eae3e7ac5fd
|
@@ -43,9 +43,8 @@ class Quarantine
|
|
43
43
|
items.each do |item|
|
44
44
|
cells = headers.map do |header|
|
45
45
|
match = header.match(/^(extra_)?(.+)/)
|
46
|
-
extra, name = match[1..]
|
47
|
-
|
48
|
-
value = extra ? item['extra_attributes'][name.to_sym] : item[name]
|
46
|
+
extra, name = match[1..2]
|
47
|
+
value = extra ? item['extra_attributes'][name] : item[name]
|
49
48
|
value.to_s
|
50
49
|
end
|
51
50
|
row_idx = indexes[item['id']]
|
@@ -109,12 +108,12 @@ class Quarantine
|
|
109
108
|
rows.map do |row|
|
110
109
|
hash_row = Hash[headers.zip(row)]
|
111
110
|
# TODO: use Google Sheets developer metadata to store type information
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
111
|
+
next nil if hash_row['id'].empty?
|
112
|
+
|
113
|
+
extra_values, base_values = hash_row.partition { |k, _v| k.start_with?('extra_') }
|
114
|
+
base_hash = Hash[base_values]
|
115
|
+
base_hash['extra_attributes'] = Hash[extra_values]
|
116
|
+
base_hash
|
118
117
|
end.compact
|
119
118
|
end
|
120
119
|
end
|
@@ -88,15 +88,15 @@ class Quarantine
|
|
88
88
|
end
|
89
89
|
end
|
90
90
|
# The example failed, but it's not the final retry yet, so return nil.
|
91
|
-
return nil
|
91
|
+
return nil # rubocop:disable Style/RedundantReturn
|
92
92
|
elsif metadata[:retry_attempts] > 0
|
93
93
|
# The example passed this time, but failed one or more times before - the definition of a flaky test.
|
94
|
-
return [:quarantined, false]
|
94
|
+
return [:quarantined, false] # rubocop:disable Style/RedundantReturn
|
95
95
|
elsif previously_quarantined
|
96
96
|
# The example passed the first time, but it's already marked quarantined, so keep it that way.
|
97
|
-
return [:quarantined, true]
|
97
|
+
return [:quarantined, true] # rubocop:disable Style/RedundantReturn
|
98
98
|
else
|
99
|
-
return [:passing, true]
|
99
|
+
return [:passing, true] # rubocop:disable Style/RedundantReturn
|
100
100
|
end
|
101
101
|
end
|
102
102
|
|
data/lib/quarantine/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quarantine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Flexport Engineering, Eric Zhu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04-
|
11
|
+
date: 2021-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|